+2011-11-15 Joseph Pecoraro <pecoraro@apple.com>
+
+ 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 <webkit.review.bot@gmail.com>
Unreviewed, rolling out r100308.
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