WebKit Bugzilla
Attachment 372221 Details for
Bug 198881
: [LFC] Add limited quirks mode to LayoutState.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198881-20190616082710.patch (text/plain), 3.70 KB, created by
zalan
on 2019-06-16 08:27:16 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2019-06-16 08:27:16 PDT
Size:
3.70 KB
patch
obsolete
>Subversion Revision: 246472 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 758776bc6e26eb7b84318bfd3a0d75d43e0d1fd6..7ee9ec40ee72ada367efeeac783136950818956b 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,22 @@ >+2019-06-16 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC] Add limited quirks mode to LayoutState. >+ https://bugs.webkit.org/show_bug.cgi?id=198881 >+ <rdar://problem/51773229> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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-15 Simon Fraser <simon.fraser@apple.com> > > Make layerTreeAsText() output a bit less verbose >diff --git a/Source/WebCore/layout/LayoutState.h b/Source/WebCore/layout/LayoutState.h >index 2373e66807ed0091611a7733bc7182bc3c016d0d..69727bd4f73ea3069f5bfa093c14a787fbc6c0a2 100644 >--- a/Source/WebCore/layout/LayoutState.h >+++ b/Source/WebCore/layout/LayoutState.h >@@ -63,7 +63,8 @@ public: > > 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 @@ public: > 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 @@ private: > 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 >diff --git a/Source/WebCore/page/FrameViewLayoutContext.cpp b/Source/WebCore/page/FrameViewLayoutContext.cpp >index 327b6ead3a2d89a32fcffb7e56ff63f046520c0e..26f1b5a6d8c1545414bf9fda26f901a440dfcddf 100644 >--- a/Source/WebCore/page/FrameViewLayoutContext.cpp >+++ b/Source/WebCore/page/FrameViewLayoutContext.cpp >@@ -60,7 +60,12 @@ static void layoutUsingFormattingContext(const RenderView& renderView) > 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); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198881
:
372181
| 372221