Title: [246477] trunk/Source/WebCore
- Revision
- 246477
- Author
- [email protected]
- Date
- 2019-06-16 12:30:46 -0700 (Sun, 16 Jun 2019)
Log Message
[LFC] Add limited quirks mode to LayoutState.
https://bugs.webkit.org/show_bug.cgi?id=198881
<rdar://problem/51773229>
Reviewed by Antti Koivisto.
This is in preparation for introducing limited quirks mode to inline layout.
* layout/LayoutState.h:
(WebCore::Layout::LayoutState::setQuirksMode):
(WebCore::Layout::LayoutState::inQuirksMode const):
(WebCore::Layout::LayoutState::inLimitedQuirksMode const):
(WebCore::Layout::LayoutState::inNoQuirksMode const):
(WebCore::Layout::LayoutState::setInQuirksMode): Deleted.
* page/FrameViewLayoutContext.cpp:
(WebCore::layoutUsingFormattingContext):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (246476 => 246477)
--- trunk/Source/WebCore/ChangeLog 2019-06-16 19:30:15 UTC (rev 246476)
+++ trunk/Source/WebCore/ChangeLog 2019-06-16 19:30:46 UTC (rev 246477)
@@ -1,5 +1,24 @@
2019-06-16 Zalan Bujtas <[email protected]>
+ [LFC] Add limited quirks mode to LayoutState.
+ https://bugs.webkit.org/show_bug.cgi?id=198881
+ <rdar://problem/51773229>
+
+ Reviewed by Antti Koivisto.
+
+ This is in preparation for introducing limited quirks mode to inline layout.
+
+ * layout/LayoutState.h:
+ (WebCore::Layout::LayoutState::setQuirksMode):
+ (WebCore::Layout::LayoutState::inQuirksMode const):
+ (WebCore::Layout::LayoutState::inLimitedQuirksMode const):
+ (WebCore::Layout::LayoutState::inNoQuirksMode const):
+ (WebCore::Layout::LayoutState::setInQuirksMode): Deleted.
+ * page/FrameViewLayoutContext.cpp:
+ (WebCore::layoutUsingFormattingContext):
+
+2019-06-16 Zalan Bujtas <[email protected]>
+
[LFC][IFC] Completely collapsed runs should not go to the trimmable run list.
https://bugs.webkit.org/show_bug.cgi?id=198900
<rdar://problem/51782156>
Modified: trunk/Source/WebCore/layout/LayoutState.h (246476 => 246477)
--- trunk/Source/WebCore/layout/LayoutState.h 2019-06-16 19:30:15 UTC (rev 246476)
+++ trunk/Source/WebCore/layout/LayoutState.h 2019-06-16 19:30:46 UTC (rev 246477)
@@ -63,7 +63,8 @@
void updateLayout();
void styleChanged(const Box&, StyleDiff);
- void setInQuirksMode(bool inQuirksMode) { m_inQuirksMode = inQuirksMode; }
+ enum class QuirksMode { No, Limited, Yes };
+ void setQuirksMode(QuirksMode quirksMode) { m_quirksMode = quirksMode; }
enum class UpdateType {
Overflow = 1 << 0,
@@ -88,7 +89,9 @@
Display::Box& displayBoxForLayoutBox(const Box& layoutBox) const;
bool hasDisplayBox(const Box& layoutBox) const { return m_layoutToDisplayBox.contains(&layoutBox); }
- bool inQuirksMode() const { return m_inQuirksMode; }
+ bool inQuirksMode() const { return m_quirksMode == QuirksMode::Yes; }
+ bool inLimitedQuirksMode() const { return m_quirksMode == QuirksMode::Limited; }
+ bool inNoQuirksMode() const { return m_quirksMode == QuirksMode::No; }
// For testing purposes only
void verifyAndOutputMismatchingLayoutTree(const RenderView&) const;
@@ -103,7 +106,7 @@
HashSet<const FormattingContext*> m_formattingContextList;
#endif
mutable HashMap<const Box*, std::unique_ptr<Display::Box>> m_layoutToDisplayBox;
- bool m_inQuirksMode { false };
+ QuirksMode m_quirksMode { QuirksMode::No };
};
#ifndef NDEBUG
Modified: trunk/Source/WebCore/page/FrameViewLayoutContext.cpp (246476 => 246477)
--- trunk/Source/WebCore/page/FrameViewLayoutContext.cpp 2019-06-16 19:30:15 UTC (rev 246476)
+++ trunk/Source/WebCore/page/FrameViewLayoutContext.cpp 2019-06-16 19:30:46 UTC (rev 246477)
@@ -60,7 +60,12 @@
return;
auto initialContainingBlock = Layout::TreeBuilder::createLayoutTree(renderView);
auto layoutState = std::make_unique<Layout::LayoutState>(*initialContainingBlock);
- layoutState->setInQuirksMode(renderView.document().inQuirksMode());
+ auto quirksMode = Layout::LayoutState::QuirksMode::No;
+ if (renderView.document().inLimitedQuirksMode())
+ quirksMode = Layout::LayoutState::QuirksMode::Limited;
+ else if (renderView.document().inQuirksMode())
+ quirksMode = Layout::LayoutState::QuirksMode::Yes;
+ layoutState->setQuirksMode(quirksMode);
layoutState->updateLayout();
layoutState->verifyAndOutputMismatchingLayoutTree(renderView);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes