Title: [243605] trunk
Revision
243605
Author
[email protected]
Date
2019-03-28 09:02:24 -0700 (Thu, 28 Mar 2019)

Log Message

[SimpleLineLayout] Disable SLL when text-underline-position is not auto.
https://bugs.webkit.org/show_bug.cgi?id=196338
<rdar://problem/47975167>

Reviewed by Daniel Bates.

Source/WebCore:

Disable simple line layout unconditionally on non-auto text-underline-position content. We don't support it yet.

Test: fast/text/simple-line-layout-with-text-underline-position.html

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForStyle):

LayoutTests:

* fast/text/simple-line-layout-with-text-underline-position-expected.html: Added.
* fast/text/simple-line-layout-with-text-underline-position.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (243604 => 243605)


--- trunk/LayoutTests/ChangeLog	2019-03-28 15:54:20 UTC (rev 243604)
+++ trunk/LayoutTests/ChangeLog	2019-03-28 16:02:24 UTC (rev 243605)
@@ -1,3 +1,14 @@
+2019-03-28  Zalan Bujtas  <[email protected]>
+
+        [SimpleLineLayout] Disable SLL when text-underline-position is not auto.
+        https://bugs.webkit.org/show_bug.cgi?id=196338
+        <rdar://problem/47975167>
+
+        Reviewed by Daniel Bates.
+
+        * fast/text/simple-line-layout-with-text-underline-position-expected.html: Added.
+        * fast/text/simple-line-layout-with-text-underline-position.html: Added.
+
 2019-03-28  Carlos Garcia Campos  <[email protected]>
 
         [FreeType] Incorrect application of glyph positioning in the Y direction

Added: trunk/LayoutTests/fast/text/simple-line-layout-with-text-underline-position-expected.html (0 => 243605)


--- trunk/LayoutTests/fast/text/simple-line-layout-with-text-underline-position-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text/simple-line-layout-with-text-underline-position-expected.html	2019-03-28 16:02:24 UTC (rev 243605)
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that simple line layout is disabled for text-underline-position: under</title>
+</head>
+<body></body>
+</html>

Added: trunk/LayoutTests/fast/text/simple-line-layout-with-text-underline-position.html (0 => 243605)


--- trunk/LayoutTests/fast/text/simple-line-layout-with-text-underline-position.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text/simple-line-layout-with-text-underline-position.html	2019-03-28 16:02:24 UTC (rev 243605)
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that simple line layout is disabled for text-underline-position: under</title>
+<style>
+div {
+    color: white;      
+}
+
+.first {
+    overflow: hidden;
+}
+.second, .first {
+	text-underline-position: under;
+}
+</style>
+<script>
+if (window.internals) {
+    internals.settings.setSimpleLineLayoutDebugBordersEnabled(true);
+    internals.settings.setSimpleLineLayoutEnabled(true);
+}
+</script>
+</head>
+<body>
+<div class=first>Pass if after selecting these 2 lines</div>
+<div class=second>this line is still visible</div>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (243604 => 243605)


--- trunk/Source/WebCore/ChangeLog	2019-03-28 15:54:20 UTC (rev 243604)
+++ trunk/Source/WebCore/ChangeLog	2019-03-28 16:02:24 UTC (rev 243605)
@@ -1,3 +1,18 @@
+2019-03-28  Zalan Bujtas  <[email protected]>
+
+        [SimpleLineLayout] Disable SLL when text-underline-position is not auto.
+        https://bugs.webkit.org/show_bug.cgi?id=196338
+        <rdar://problem/47975167>
+
+        Reviewed by Daniel Bates.
+
+        Disable simple line layout unconditionally on non-auto text-underline-position content. We don't support it yet.
+
+        Test: fast/text/simple-line-layout-with-text-underline-position.html
+
+        * rendering/SimpleLineLayout.cpp:
+        (WebCore::SimpleLineLayout::canUseForStyle):
+
 2019-03-28  Víctor Manuel Jáquez Leal  <[email protected]>
 
         Silence lot of warnings when compiling with clang

Modified: trunk/Source/WebCore/rendering/SimpleLineLayout.cpp (243604 => 243605)


--- trunk/Source/WebCore/rendering/SimpleLineLayout.cpp	2019-03-28 15:54:20 UTC (rev 243604)
+++ trunk/Source/WebCore/rendering/SimpleLineLayout.cpp	2019-03-28 16:02:24 UTC (rev 243605)
@@ -201,7 +201,7 @@
     AvoidanceReasonFlags reasons = { };
     if (style.textOverflow() == TextOverflow::Ellipsis)
         SET_REASON_AND_RETURN_IF_NEEDED(FlowHasTextOverflow, reasons, includeReasons);
-    if ((style.textDecorationsInEffect() & TextDecoration::Underline) && (style.textUnderlinePosition() != TextUnderlinePosition::Auto || !style.textUnderlineOffset().isAuto() || !style.textDecorationThickness().isAuto()))
+    if (style.textUnderlinePosition() != TextUnderlinePosition::Auto || !style.textUnderlineOffset().isAuto() || !style.textDecorationThickness().isAuto())
         SET_REASON_AND_RETURN_IF_NEEDED(FlowHasUnsupportedUnderlineDecoration, reasons, includeReasons);
     // Non-visible overflow should be pretty easy to support.
     if (style.overflowX() != Overflow::Visible || style.overflowY() != Overflow::Visible)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to