WebKit Bugzilla
Attachment 360673 Details for
Bug 194071
: [LFC][BFC] Add support for block level replaced box.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194071-20190130191008.patch (text/plain), 6.64 KB, created by
zalan
on 2019-01-30 19:10:21 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2019-01-30 19:10:21 PST
Size:
6.64 KB
patch
obsolete
>Subversion Revision: 240722 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 0c2aef2bf0cf50d3a3a6b62ef94e4e9e2f422909..5aab4a24b0993c0f5512921c355e4b8a29f35500 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,17 @@ >+2019-01-30 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC][BFC] Add support for block level replaced box. >+ https://bugs.webkit.org/show_bug.cgi?id=194071 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * layout/layouttree/LayoutBox.cpp: >+ (WebCore::Layout::Box::Box): >+ * layout/layouttree/LayoutBox.h: >+ * layout/layouttree/LayoutTreeBuilder.cpp: >+ (WebCore::Layout::TreeBuilder::createSubTree): >+ (WebCore::Layout::outputLayoutBox): >+ > 2019-01-30 Dean Jackson <dino@apple.com> > > PointerEvents - tiltX and tiltY are reversed >diff --git a/Source/WebCore/layout/layouttree/LayoutBox.cpp b/Source/WebCore/layout/layouttree/LayoutBox.cpp >index 6d05903d416abffc753380b1258215a745cec173..392659dfaeebb573f880936277ddafc4d64a264b 100644 >--- a/Source/WebCore/layout/layouttree/LayoutBox.cpp >+++ b/Source/WebCore/layout/layouttree/LayoutBox.cpp >@@ -46,6 +46,11 @@ Box::Box(Optional<ElementAttributes> attributes, RenderStyle&& style, BaseTypeFl > m_replaced = std::make_unique<Replaced>(*this); > } > >+Box::Box(Optional<ElementAttributes> attributes, RenderStyle&& style) >+ : Box(attributes, WTFMove(style), BaseTypeFlag::BoxFlag) >+{ >+} >+ > Box::~Box() > { > } >diff --git a/Source/WebCore/layout/layouttree/LayoutBox.h b/Source/WebCore/layout/layouttree/LayoutBox.h >index 52f7406ccf10b70d1f9ea302e3de72c2fa391cbb..0a151107278fa3647c7eb0d604f970d8223479f8 100644 >--- a/Source/WebCore/layout/layouttree/LayoutBox.h >+++ b/Source/WebCore/layout/layouttree/LayoutBox.h >@@ -61,15 +61,16 @@ public: > }; > > enum BaseTypeFlag { >- ContainerFlag = 1 << 0, >- BlockContainerFlag = 1 << 1, >- InlineBoxFlag = 1 << 2, >- InlineContainerFlag = 1 << 3, >- LineBreakBoxFlag = 1 << 4 >+ BoxFlag = 1 << 0, >+ ContainerFlag = 1 << 1, >+ BlockContainerFlag = 1 << 2, >+ InlineBoxFlag = 1 << 3, >+ InlineContainerFlag = 1 << 4, >+ LineBreakBoxFlag = 1 << 5 > }; > typedef unsigned BaseTypeFlags; > >- Box(Optional<ElementAttributes>, RenderStyle&&, BaseTypeFlags); >+ Box(Optional<ElementAttributes>, RenderStyle&&); > virtual ~Box(); > > bool establishesFormattingContext() const; >@@ -135,6 +136,9 @@ public: > void setNextSibling(Box& nextSibling) { m_nextSibling = &nextSibling; } > void setPreviousSibling(Box& previousSibling) { m_previousSibling = &previousSibling; } > >+protected: >+ Box(Optional<ElementAttributes>, RenderStyle&&, BaseTypeFlags); >+ > private: > RenderStyle m_style; > Optional<ElementAttributes> m_elementAttributes; >diff --git a/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp b/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp >index 800629b5143ae97e771c2e9d27831a46b3dde4b7..f8da0bd7244e974a2dbd81caa69fdf3cf5643d8d 100644 >--- a/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp >+++ b/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp >@@ -77,7 +77,7 @@ void TreeBuilder::createSubTree(const RenderElement& rootRenderer, Container& ro > return Box::ElementAttributes { Box::ElementType::TableFooterGroup }; > if (element->hasTagName(HTMLNames::tfootTag)) > return Box::ElementAttributes { Box::ElementType::TableFooterGroup }; >- if (element->hasTagName(HTMLNames::imgTag)) >+ if (element->hasTagName(HTMLNames::imgTag) || element->hasTagName(HTMLNames::iframeTag)) > return Box::ElementAttributes { Box::ElementType::Replaced }; > return Box::ElementAttributes { Box::ElementType::GenericElement }; > } >@@ -92,7 +92,11 @@ void TreeBuilder::createSubTree(const RenderElement& rootRenderer, Container& ro > downcast<InlineBox>(*box).setTextContent(downcast<RenderText>(child).originalText()); > } else if (is<RenderReplaced>(child)) { > auto& renderer = downcast<RenderReplaced>(child); >- box = std::make_unique<InlineBox>(elementAttributes(renderer), RenderStyle::clone(renderer.style())); >+ auto display = renderer.style().display(); >+ if (display == DisplayType::Block) >+ box = std::make_unique<Box>(elementAttributes(renderer), RenderStyle::clone(renderer.style())); >+ else >+ box = std::make_unique<InlineBox>(elementAttributes(renderer), RenderStyle::clone(renderer.style())); > } else if (is<RenderElement>(child)) { > auto& renderer = downcast<RenderElement>(child); > auto display = renderer.style().display(); >@@ -176,7 +180,9 @@ static void outputLayoutBox(TextStream& stream, const Box& layoutBox, const Disp > if (!layoutBox.parent()) > stream << "initial "; > stream << "block container"; >- } else >+ } else if (layoutBox.isBlockLevelBox()) >+ stream << "block box"; >+ else > stream << "box"; > // FIXME: Inline text runs don't create display boxes yet. > if (displayBox) { >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 4eaf961b3dac508ebee8940bed711ce2f456cf7b..8009c0dd4d9bfc013e9bf297c93e30b12107537d 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,12 @@ >+2019-01-30 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC][BFC] Add support for block level replaced box. >+ https://bugs.webkit.org/show_bug.cgi?id=194071 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * LayoutReloaded/misc/LFC-passing-tests.txt: >+ > 2019-01-30 Zalan Bujtas <zalan@apple.com> > > [LFC] Expand tests coverage. >diff --git a/Tools/LayoutReloaded/misc/LFC-passing-tests.txt b/Tools/LayoutReloaded/misc/LFC-passing-tests.txt >index 4e72f457c9f3123b94dd9d2fd7405f115afc3360..1a9548ea51ebec5ad06129452ec603cbd35abdc9 100644 >--- a/Tools/LayoutReloaded/misc/LFC-passing-tests.txt >+++ b/Tools/LayoutReloaded/misc/LFC-passing-tests.txt >@@ -414,6 +414,12 @@ css2.1/20110323/absolute-non-replaced-width-013.htm > css2.1/20110323/absolute-non-replaced-width-014.htm > css2.1/20110323/absolute-non-replaced-width-015.htm > css2.1/20110323/absolute-non-replaced-width-016.htm >+css2.1/20110323/absolute-replaced-height-004.htm >+css2.1/20110323/absolute-replaced-height-005.htm >+css2.1/20110323/absolute-replaced-height-007.htm >+css2.1/20110323/absolute-replaced-height-011.htm >+css2.1/20110323/absolute-replaced-height-012.htm >+css2.1/20110323/absolute-replaced-height-014.htm > css2.1/t0402-c71-fwd-parsing-00-f.html > css2.1/t0402-c71-fwd-parsing-01-f.html > css2.1/t0402-c71-fwd-parsing-03-f.html
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
Flags:
koivisto
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194071
: 360673