WebKit Bugzilla
Attachment 372181 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-20190615003652.patch (text/plain), 3.72 KB, created by
zalan
on 2019-06-15 00:36:54 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2019-06-15 00:36:54 PDT
Size:
3.72 KB
patch
obsolete
>Subversion Revision: 246456 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 5379bfa3b2ea2503e35953aa8c19fb000e6db0b9..19828a540c8298bc6ba1c41ac18c46ce60bf7a2e 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,22 @@ >+2019-06-15 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 Zalan Bujtas <zalan@apple.com> > > [LFC] Fix available width for shrink-to-fit (for out-of-flow non-replaced box) >diff --git a/Source/WebCore/layout/LayoutState.h b/Source/WebCore/layout/LayoutState.h >index 2373e66807ed0091611a7733bc7182bc3c016d0d..130a5d25901ed3d9e51f4419c7f279ad4b6c1448 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::Yes; } > // 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