Title: [237451] trunk/Source/WebCore
Revision
237451
Author
[email protected]
Date
2018-10-26 07:25:14 -0700 (Fri, 26 Oct 2018)

Log Message

[LFC] Inline formatting context has higher priority than block
https://bugs.webkit.org/show_bug.cgi?id=190924

Reviewed by Antti Koivisto.

When an element establishes both inline and block formatting contexts, we need to pick one to
create (and we choose the content driven formatting type (inline)). See example below:

<div style="overflow: hidden">This text should be inside an inlines formatting context.</div>

* layout/LayoutContext.cpp:
(WebCore::Layout::LayoutContext::formattingContext const):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (237450 => 237451)


--- trunk/Source/WebCore/ChangeLog	2018-10-26 14:05:25 UTC (rev 237450)
+++ trunk/Source/WebCore/ChangeLog	2018-10-26 14:25:14 UTC (rev 237451)
@@ -1,3 +1,18 @@
+2018-10-26  Zalan Bujtas  <[email protected]>
+
+        [LFC] Inline formatting context has higher priority than block
+        https://bugs.webkit.org/show_bug.cgi?id=190924
+
+        Reviewed by Antti Koivisto.
+
+        When an element establishes both inline and block formatting contexts, we need to pick one to
+        create (and we choose the content driven formatting type (inline)). See example below:
+
+        <div style="overflow: hidden">This text should be inside an inlines formatting context.</div>
+
+        * layout/LayoutContext.cpp:
+        (WebCore::Layout::LayoutContext::formattingContext const):
+
 2018-10-26  Ali Juma  <[email protected]>
 
         REGRESSION (r237255): Text selection is broken in form fields

Modified: trunk/Source/WebCore/layout/LayoutContext.cpp (237450 => 237451)


--- trunk/Source/WebCore/layout/LayoutContext.cpp	2018-10-26 14:05:25 UTC (rev 237450)
+++ trunk/Source/WebCore/layout/LayoutContext.cpp	2018-10-26 14:25:14 UTC (rev 237451)
@@ -158,12 +158,12 @@
 
 std::unique_ptr<FormattingContext> LayoutContext::formattingContext(const Box& formattingContextRoot) const
 {
+    if (formattingContextRoot.establishesInlineFormattingContext())
+        return std::make_unique<InlineFormattingContext>(formattingContextRoot);
+
     if (formattingContextRoot.establishesBlockFormattingContext())
         return std::make_unique<BlockFormattingContext>(formattingContextRoot);
 
-    if (formattingContextRoot.establishesInlineFormattingContext())
-        return std::make_unique<InlineFormattingContext>(formattingContextRoot);
-
     ASSERT_NOT_IMPLEMENTED_YET();
     return nullptr;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to