From a4b7225fb8f131bcdc0b0d13f725e6ba0fb1bb1a Mon Sep 17 00:00:00 2001 From: Aleksandr Shoronov Date: Sat, 17 Sep 2022 14:37:32 +0000 Subject: [PATCH] Bug 1790067 - Removed the warning about non-cell relative parts of table. r=emilio Differential Revision: https://phabricator.services.mozilla.com/D157583 --- .../en-US/chrome/layout/layout_errors.properties | 1 - layout/base/nsPresContext.cpp | 1 - layout/base/nsPresContext.h | 10 ---------- layout/tables/nsTableFrame.cpp | 15 --------------- 4 files changed, 27 deletions(-) diff --git a/dom/locales/en-US/chrome/layout/layout_errors.properties b/dom/locales/en-US/chrome/layout/layout_errors.properties index 1d4467a97f85..e8e2f406e092 100644 --- a/dom/locales/en-US/chrome/layout/layout_errors.properties +++ b/dom/locales/en-US/chrome/layout/layout_errors.properties @@ -8,7 +8,6 @@ ImageMapCircleNegativeRadius=The “coords” attribute of the tag is not in the “x1,y1,x2,y2 …” format. ImageMapPolyOddNumberOfCoords=The “coords” attribute of the tag is missing the last “y” coordinate (the correct format is “x1,y1,x2,y2 …”). -TablePartRelPosWarning=Relative positioning of table rows and row groups is now supported. This site may need to be updated because it may depend on this feature having no effect. ScrollLinkedEffectFound3=This site appears to use a scroll-linked positioning effect. This may not work well with asynchronous panning; see https://firefox-source-docs.mozilla.org/performance/scroll-linked_effects.html for further details and to join the discussion on related tools and features! ## LOCALIZATION NOTE(CompositorAnimationWarningContentTooLargeArea): diff --git a/layout/base/nsPresContext.cpp b/layout/base/nsPresContext.cpp index aa55b730fb1f..1f3871b2eead 100644 --- a/layout/base/nsPresContext.cpp +++ b/layout/base/nsPresContext.cpp @@ -279,7 +279,6 @@ nsPresContext::nsPresContext(dom::Document* aDocument, nsPresContextType aType) mCounterStylesDirty(true), mFontFeatureValuesDirty(true), mIsVisual(false), - mHasWarnedAboutPositionedTableParts(false), mHasWarnedAboutTooLargeDashedOrDottedRadius(false), mQuirkSheetAdded(false), mHadNonBlankPaint(false), diff --git a/layout/base/nsPresContext.h b/layout/base/nsPresContext.h index cf4478a898e9..91479a9e0e29 100644 --- a/layout/base/nsPresContext.h +++ b/layout/base/nsPresContext.h @@ -1068,14 +1068,6 @@ class nsPresContext : public nsISupports, public mozilla::SupportsWeakPtr { bool IsDeviceSizePageSize(); - bool HasWarnedAboutPositionedTableParts() const { - return mHasWarnedAboutPositionedTableParts; - } - - void SetHasWarnedAboutPositionedTableParts() { - mHasWarnedAboutPositionedTableParts = true; - } - bool HasWarnedAboutTooLargeDashedOrDottedRadius() const { return mHasWarnedAboutTooLargeDashedOrDottedRadius; } @@ -1364,8 +1356,6 @@ class nsPresContext : public nsISupports, public mozilla::SupportsWeakPtr { unsigned mIsVisual : 1; - unsigned mHasWarnedAboutPositionedTableParts : 1; - unsigned mHasWarnedAboutTooLargeDashedOrDottedRadius : 1; // Have we added quirk.css to the style set? diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index 5cee02a04744..1c774862912f 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -250,21 +250,6 @@ bool nsTableFrame::PageBreakAfter(nsIFrame* aSourceFrame, /* static */ void nsTableFrame::RegisterPositionedTablePart(nsIFrame* aFrame) { - // Supporting relative positioning for table parts other than table cells has - // the potential to break sites that apply 'position: relative' to those - // parts, expecting nothing to happen. We warn at the console to make tracking - // down the issue easy. - if (!aFrame->IsTableCellFrame()) { - nsIContent* content = aFrame->GetContent(); - nsPresContext* presContext = aFrame->PresContext(); - if (content && !presContext->HasWarnedAboutPositionedTableParts()) { - presContext->SetHasWarnedAboutPositionedTableParts(); - nsContentUtils::ReportToConsole( - nsIScriptError::warningFlag, "Layout: Tables"_ns, content->OwnerDoc(), - nsContentUtils::eLAYOUT_PROPERTIES, "TablePartRelPosWarning"); - } - } - nsTableFrame* tableFrame = nsTableFrame::GetTableFrame(aFrame); MOZ_ASSERT(tableFrame, "Should have a table frame here"); tableFrame = static_cast(tableFrame->FirstContinuation());