Modified: trunk/LayoutTests/ChangeLog (215877 => 215878)
--- trunk/LayoutTests/ChangeLog 2017-04-27 17:04:23 UTC (rev 215877)
+++ trunk/LayoutTests/ChangeLog 2017-04-27 17:11:38 UTC (rev 215878)
@@ -1,3 +1,14 @@
+2017-04-27 Zalan Bujtas <[email protected]>
+
+ Use text-shadow to visualize simple line layout coverage.
+ https://bugs.webkit.org/show_bug.cgi?id=171379
+
+ Reviewed by Antti Koivisto.
+
+ * fast/inline/simple-line-layout-16bit-content-expected-mismatch.html: Added.
+ * fast/inline/simple-line-layout-16bit-content-expected.html: Removed.
+ * fast/inline/simple-line-layout-16bit-content.html:
+
2017-04-27 Joanmarie Diggs <[email protected]>
[ATK] ARIA alertdialogs should be exposed with ROLE_DIALOG
Deleted: trunk/LayoutTests/fast/inline/simple-line-layout-16bit-content-expected.html (215877 => 215878)
--- trunk/LayoutTests/fast/inline/simple-line-layout-16bit-content-expected.html 2017-04-27 17:04:23 UTC (rev 215877)
+++ trunk/LayoutTests/fast/inline/simple-line-layout-16bit-content-expected.html 2017-04-27 17:11:38 UTC (rev 215878)
@@ -1,18 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<title>This tests that we use simple line layout to layout/render 16bit content.</title>
-<style>
- div {
- color: white;
- }
-</style>
-<script>
- if (window.internals)
- internals.settings.setSimpleLineLayoutDebugBordersEnabled(true);
-</script>
-</head>
-<body>
- <div>uuuooooaaee</div>
-</body>
-</html>
Modified: trunk/LayoutTests/fast/inline/simple-line-layout-16bit-content.html (215877 => 215878)
--- trunk/LayoutTests/fast/inline/simple-line-layout-16bit-content.html 2017-04-27 17:04:23 UTC (rev 215877)
+++ trunk/LayoutTests/fast/inline/simple-line-layout-16bit-content.html 2017-04-27 17:11:38 UTC (rev 215878)
@@ -5,7 +5,7 @@
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<style>
div {
- color: white;
+ color: transparent;
}
</style>
<script>
Modified: trunk/Source/WebCore/ChangeLog (215877 => 215878)
--- trunk/Source/WebCore/ChangeLog 2017-04-27 17:04:23 UTC (rev 215877)
+++ trunk/Source/WebCore/ChangeLog 2017-04-27 17:11:38 UTC (rev 215878)
@@ -1,3 +1,16 @@
+2017-04-27 Zalan Bujtas <[email protected]>
+
+ Use text-shadow to visualize simple line layout coverage.
+ https://bugs.webkit.org/show_bug.cgi?id=171379
+
+ Reviewed by Antti Koivisto.
+
+ It's more subtle (for everyday use).
+
+ * rendering/SimpleLineLayoutFunctions.cpp:
+ (WebCore::SimpleLineLayout::paintFlow):
+ (WebCore::SimpleLineLayout::paintDebugBorders): Deleted.
+
2017-04-27 Joanmarie Diggs <[email protected]>
[ATK] ARIA alertdialogs should be exposed with ROLE_DIALOG
Modified: trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp (215877 => 215878)
--- trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp 2017-04-27 17:04:23 UTC (rev 215877)
+++ trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp 2017-04-27 17:11:38 UTC (rev 215878)
@@ -53,18 +53,6 @@
namespace WebCore {
namespace SimpleLineLayout {
-static void paintDebugBorders(GraphicsContext& context, LayoutRect borderRect, const LayoutPoint& paintOffset)
-{
- borderRect.moveBy(paintOffset);
- IntRect snappedRect = snappedIntRect(borderRect);
- if (snappedRect.isEmpty())
- return;
- GraphicsContextStateSaver stateSaver(context);
- context.setStrokeColor(Color(0, 255, 0));
- context.setFillColor(Color::transparent);
- context.drawRect(snappedRect);
-}
-
FloatRect computeOverflow(const RenderBlockFlow& flow, const FloatRect& layoutRect)
{
auto overflowRect = layoutRect;
@@ -89,12 +77,16 @@
if (style.visibility() != VISIBLE)
return;
- bool debugBordersEnabled = flow.settings().simpleLineLayoutDebugBordersEnabled();
-
TextPainter textPainter(paintInfo.context());
textPainter.setFont(style.fontCascade());
textPainter.setTextPaintStyle(computeTextPaintStyle(flow.frame(), style, paintInfo));
+ std::unique_ptr<ShadowData> debugShadow = nullptr;
+ if (flow.settings().simpleLineLayoutDebugBordersEnabled()) {
+ debugShadow = std::make_unique<ShadowData>(IntPoint(0, 0), 10, 20, ShadowStyle::Normal, true, Color(0, 255, 0, 200));
+ textPainter.addTextShadow(debugShadow.get(), nullptr);
+ }
+
std::optional<TextDecorationPainter> textDecorationPainter;
if (style.textDecorationsInEffect() != TextDecorationNone) {
const RenderText* textRenderer = childrenOfType<RenderText>(flow).first();
@@ -131,8 +123,6 @@
textDecorationPainter->setWidth(rect.width());
textDecorationPainter->paintTextDecoration(textRun, textOrigin, rect.location() + paintOffset);
}
- if (debugBordersEnabled)
- paintDebugBorders(paintInfo.context(), LayoutRect(run.rect()), paintOffset);
}
}