Title: [184219] trunk
- Revision
- 184219
- Author
- [email protected]
- Date
- 2015-05-12 14:24:37 -0700 (Tue, 12 May 2015)
Log Message
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: trunk/LayoutTests/ChangeLog (184218 => 184219)
--- trunk/LayoutTests/ChangeLog 2015-05-12 21:20:26 UTC (rev 184218)
+++ trunk/LayoutTests/ChangeLog 2015-05-12 21:24:37 UTC (rev 184219)
@@ -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-12 Joanmarie Diggs <[email protected]>
AX: [ATK] ARIA menu items should not have anonymous block children
Added: trunk/LayoutTests/fast/text/simple-line-layout-text-stroke-width-expected.txt (0 => 184219)
--- trunk/LayoutTests/fast/text/simple-line-layout-text-stroke-width-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/text/simple-line-layout-text-stroke-width-expected.txt 2015-05-12 21:24:37 UTC (rev 184219)
@@ -0,0 +1,5 @@
+PASS internals.repaintRectsAsText().indexOf('90 8 62 18') is not -1
+PASS successfullyParsed is true
+
+TEST COMPLETE
+foobar
Added: trunk/LayoutTests/fast/text/simple-line-layout-text-stroke-width.html (0 => 184219)
--- trunk/LayoutTests/fast/text/simple-line-layout-text-stroke-width.html (rev 0)
+++ trunk/LayoutTests/fast/text/simple-line-layout-text-stroke-width.html 2015-05-12 21:24:37 UTC (rev 184219)
@@ -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: trunk/Source/WebCore/ChangeLog (184218 => 184219)
--- trunk/Source/WebCore/ChangeLog 2015-05-12 21:20:26 UTC (rev 184218)
+++ trunk/Source/WebCore/ChangeLog 2015-05-12 21:24:37 UTC (rev 184219)
@@ -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 Alexey Proskuryakov <[email protected]>
Build fix.
Modified: trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp (184218 => 184219)
--- trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp 2015-05-12 21:20:26 UTC (rev 184218)
+++ trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp 2015-05-12 21:24:37 UTC (rev 184219)
@@ -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) || run.start() == run.end())
+ FloatRect rect = run.rect();
+ rect.inflate(strokeOverflow);
+ if (!rect.intersects(paintRect) || run.start() == run.end())
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