Title: [184380] releases/WebKitGTK/webkit-2.8
Revision
184380
Author
[email protected]
Date
2015-05-15 04:59:25 -0700 (Fri, 15 May 2015)

Log Message

Merge r184219 - REGRESSION(r175617): Some text doesn't render on internationalculinarycenter.com
https://bugs.webkit.org/show_bug.cgi?id=144917
rdar://problem/20545878

Reviewed by Andreas Kling.

This patch ensures that text stroke width value is taken into account while
calculating visual overflow for simple line layout.
Ceiling the text stroke width value matches the normal text layout behaviour.

Source/WebCore:

Test: fast/text/simple-line-layout-text-stroke-width.html

* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow):
(WebCore::SimpleLineLayout::collectFlowOverflow):

LayoutTests:

* fast/text/simple-line-layout-text-stroke-width-expected.txt: Added.
* fast/text/simple-line-layout-text-stroke-width.html: Added.

Modified Paths

Added Paths

Diff

Modified: releases/WebKitGTK/webkit-2.8/LayoutTests/ChangeLog (184379 => 184380)


--- releases/WebKitGTK/webkit-2.8/LayoutTests/ChangeLog	2015-05-15 11:00:15 UTC (rev 184379)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/ChangeLog	2015-05-15 11:59:25 UTC (rev 184380)
@@ -1,3 +1,18 @@
+2015-05-12  Zalan Bujtas  <[email protected]>
+
+        REGRESSION(r175617): Some text doesn't render on internationalculinarycenter.com
+        https://bugs.webkit.org/show_bug.cgi?id=144917
+        rdar://problem/20545878
+
+        Reviewed by Andreas Kling.
+
+        This patch ensures that text stroke width value is taken into account while
+        calculating visual overflow for simple line layout.
+        Ceiling the text stroke width value matches the normal text layout behaviour.
+
+        * fast/text/simple-line-layout-text-stroke-width-expected.txt: Added.
+        * fast/text/simple-line-layout-text-stroke-width.html: Added.
+
 2015-05-11  Chris Fleizach  <[email protected]>
 
         AX: Crash at WebCore::AccessibilityMenuList::addChildren()

Added: releases/WebKitGTK/webkit-2.8/LayoutTests/fast/text/simple-line-layout-text-stroke-width-expected.txt (0 => 184380)


--- releases/WebKitGTK/webkit-2.8/LayoutTests/fast/text/simple-line-layout-text-stroke-width-expected.txt	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/fast/text/simple-line-layout-text-stroke-width-expected.txt	2015-05-15 11:59:25 UTC (rev 184380)
@@ -0,0 +1,5 @@
+PASS internals.repaintRectsAsText().indexOf('90 8 62 18') is not -1
+PASS successfullyParsed is true
+
+TEST COMPLETE
+foobar

Added: releases/WebKitGTK/webkit-2.8/LayoutTests/fast/text/simple-line-layout-text-stroke-width.html (0 => 184380)


--- releases/WebKitGTK/webkit-2.8/LayoutTests/fast/text/simple-line-layout-text-stroke-width.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/fast/text/simple-line-layout-text-stroke-width.html	2015-05-15 11:59:25 UTC (rev 184380)
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that simple line layout takes text stroke width value into account when calculating repaint rects.</title>
+<style>
+	div {
+		position: absolute;
+		-webkit-text-stroke-width: 10px;
+	}
+</style>
+<script>jsTestIsAsync = true;</script>
+<script src=""
+<script>
+	if (window.internals)
+		internals.startTrackingRepaints();
+</script>
+</head>
+<body>
+	<div id=foo>foobar</div>
+<script>
+	setTimeout(function() { 
+		document.getElementById("foo").style.left = "100px";
+		document.body.offsetWidth;
+		if (window.internals) {
+			shouldNotBe("internals.repaintRectsAsText().indexOf('90 8 62 18')", "-1");
+			internals.stopTrackingRepaints();
+			finishJSTest();
+		}
+	}
+	, 0);
+</script>
+</body>
+<script src=""
+</html>

Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog (184379 => 184380)


--- releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog	2015-05-15 11:00:15 UTC (rev 184379)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog	2015-05-15 11:59:25 UTC (rev 184380)
@@ -1,3 +1,21 @@
+2015-05-12  Zalan Bujtas  <[email protected]>
+
+        REGRESSION(r175617): Some text doesn't render on internationalculinarycenter.com
+        https://bugs.webkit.org/show_bug.cgi?id=144917
+        rdar://problem/20545878
+
+        Reviewed by Andreas Kling.
+
+        This patch ensures that text stroke width value is taken into account while
+        calculating visual overflow for simple line layout.
+        Ceiling the text stroke width value matches the normal text layout behaviour.
+
+        Test: fast/text/simple-line-layout-text-stroke-width.html
+
+        * rendering/SimpleLineLayoutFunctions.cpp:
+        (WebCore::SimpleLineLayout::paintFlow):
+        (WebCore::SimpleLineLayout::collectFlowOverflow):
+
 2015-05-12  Carlos Garcia Campos  <[email protected]>
 
         [EGL][X11] XPixmap created in GLContextEGL::createPixmapContext() is leaked

Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp (184379 => 184380)


--- releases/WebKitGTK/webkit-2.8/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp	2015-05-15 11:00:15 UTC (rev 184379)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp	2015-05-15 11:59:25 UTC (rev 184380)
@@ -79,8 +79,11 @@
     paintRect.moveBy(-paintOffset);
 
     auto resolver = runResolver(flow, layout);
+    float strokeOverflow = ceilf(flow.style().textStrokeWidth());
     for (const auto& run : resolver.rangeForRect(paintRect)) {
-        if (!run.rect().intersects(paintRect))
+        FloatRect rect = run.rect();
+        rect.inflate(strokeOverflow);
+        if (!rect.intersects(paintRect))
             continue;
         TextRun textRun(run.text());
         textRun.setTabSize(!style.collapseWhiteSpace(), style.tabSize());
@@ -127,8 +130,10 @@
 void collectFlowOverflow(RenderBlockFlow& flow, const Layout& layout)
 {
     auto resolver = lineResolver(flow, layout);
+    float strokeOverflow = ceilf(flow.style().textStrokeWidth());
     for (auto it = resolver.begin(), end = resolver.end(); it != end; ++it) {
         auto rect = *it;
+        rect.inflate(strokeOverflow);
         flow.addLayoutOverflow(rect);
         flow.addVisualOverflow(rect);
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to