Title: [169041] trunk/Source/WebCore
- Revision
- 169041
- Author
- [email protected]
- Date
- 2014-05-19 02:02:04 -0700 (Mon, 19 May 2014)
Log Message
Fix assertion failure with simple line layout debug borders enabled.
Rubber-stamped by Andreas Kling.
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintDebugBorders): We shoudn't try to paint empty rects.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (169040 => 169041)
--- trunk/Source/WebCore/ChangeLog 2014-05-19 09:00:56 UTC (rev 169040)
+++ trunk/Source/WebCore/ChangeLog 2014-05-19 09:02:04 UTC (rev 169041)
@@ -1,3 +1,12 @@
+2014-05-19 Antti Koivisto <[email protected]>
+
+ Fix assertion failure with simple line layout debug borders enabled.
+
+ Rubber-stamped by Andreas Kling.
+
+ * rendering/SimpleLineLayoutFunctions.cpp:
+ (WebCore::SimpleLineLayout::paintDebugBorders): We shoudn't try to paint empty rects.
+
2014-05-18 Andreas Kling <[email protected]>
Reduce constructor copypasta in RenderText and RenderElement.
Modified: trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp (169040 => 169041)
--- trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp 2014-05-19 09:00:56 UTC (rev 169040)
+++ trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp 2014-05-19 09:02:04 UTC (rev 169041)
@@ -46,16 +46,16 @@
namespace WebCore {
namespace SimpleLineLayout {
-static void paintDebugBorders(GraphicsContext& context, const LayoutRect& borderRect, const LayoutPoint& paintOffset)
+static void paintDebugBorders(GraphicsContext& context, LayoutRect borderRect, const LayoutPoint& paintOffset)
{
- if (borderRect.isEmpty())
+ borderRect.moveBy(paintOffset);
+ IntRect snappedRect = pixelSnappedIntRect(borderRect);
+ if (snappedRect.isEmpty())
return;
GraphicsContextStateSaver stateSaver(context);
context.setStrokeColor(Color(0, 255, 0), ColorSpaceDeviceRGB);
context.setFillColor(Color::transparent, ColorSpaceDeviceRGB);
- LayoutRect rect(borderRect);
- rect.moveBy(paintOffset);
- context.drawRect(pixelSnappedIntRect(rect));
+ context.drawRect(snappedRect);
}
void paintFlow(const RenderBlockFlow& flow, const Layout& layout, PaintInfo& paintInfo, const LayoutPoint& paintOffset)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes