Title: [100395] trunk/Source/WebCore
Revision
100395
Author
[email protected]
Date
2011-11-15 19:54:12 -0800 (Tue, 15 Nov 2011)

Log Message

Web Inspector: Share Highlight Code for Drawing Outlined Quad
https://bugs.webkit.org/show_bug.cgi?id=72451

Patch by Joseph Pecoraro <[email protected]> on 2011-11-15
Reviewed by Timothy Hatcher.

* inspector/DOMNodeHighlighter.cpp:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (100394 => 100395)


--- trunk/Source/WebCore/ChangeLog	2011-11-16 03:18:14 UTC (rev 100394)
+++ trunk/Source/WebCore/ChangeLog	2011-11-16 03:54:12 UTC (rev 100395)
@@ -1,3 +1,12 @@
+2011-11-15  Joseph Pecoraro  <[email protected]>
+
+        Web Inspector: Share Highlight Code for Drawing Outlined Quad
+        https://bugs.webkit.org/show_bug.cgi?id=72451
+
+        Reviewed by Timothy Hatcher.
+
+        * inspector/DOMNodeHighlighter.cpp:
+
 2011-11-15  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r100308.

Modified: trunk/Source/WebCore/inspector/DOMNodeHighlighter.cpp (100394 => 100395)


--- trunk/Source/WebCore/inspector/DOMNodeHighlighter.cpp	2011-11-16 03:18:14 UTC (rev 100394)
+++ trunk/Source/WebCore/inspector/DOMNodeHighlighter.cpp	2011-11-16 03:54:12 UTC (rev 100395)
@@ -462,26 +462,8 @@
     FloatRect overlayRect = view->visibleContentRect();
     context.translate(-overlayRect.x(), -overlayRect.y());
 
-    static const int outlineThickness = 2;
-
-    Path quadPath = quadToPath(FloatRect(*(highlightData->rect)));
-
-    // Clip out the quad, then draw with a 2px stroke to get a pixel
-    // of outline (because inflating a quad is hard)
-    {
-        context.save();
-        context.clipOut(quadPath);
-
-        context.setStrokeThickness(outlineThickness);
-        context.setStrokeColor(highlightData->contentOutline, ColorSpaceDeviceRGB);
-        context.strokePath(quadPath);
-
-        context.restore();
-    }
-
-    // Now do the fill
-    context.setFillColor(highlightData->content, ColorSpaceDeviceRGB);
-    context.fillPath(quadPath);
+    FloatRect highlightRect(*(highlightData->rect));
+    drawOutlinedQuad(context, highlightRect, highlightData->content, highlightData->contentOutline);
 }
 
 } // anonymous namespace
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to