Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Unified Diff: Source/WebCore/rendering/RenderObject.cpp

Issue 12641003: Merge 144350 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/rendering/RenderObject.h ('k') | Source/WebCore/rendering/RenderReplaced.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderObject.cpp
===================================================================
--- Source/WebCore/rendering/RenderObject.cpp (revision 145114)
+++ Source/WebCore/rendering/RenderObject.cpp (working copy)
@@ -1090,14 +1090,14 @@
}
}
-void RenderObject::paintFocusRing(GraphicsContext* context, const LayoutPoint& paintOffset, RenderStyle* style)
+void RenderObject::paintFocusRing(PaintInfo& paintInfo, const LayoutPoint& paintOffset, RenderStyle* style)
{
Vector<IntRect> focusRingRects;
- addFocusRingRects(focusRingRects, paintOffset);
+ addFocusRingRects(focusRingRects, paintOffset, paintInfo.paintContainer);
if (style->outlineStyleIsAuto())
- context->drawFocusRing(focusRingRects, style->outlineWidth(), style->outlineOffset(), style->visitedDependentColor(CSSPropertyOutlineColor));
+ paintInfo.context->drawFocusRing(focusRingRects, style->outlineWidth(), style->outlineOffset(), style->visitedDependentColor(CSSPropertyOutlineColor));
else
- addPDFURLRect(context, unionRect(focusRingRects));
+ addPDFURLRect(paintInfo.context, unionRect(focusRingRects));
}
void RenderObject::addPDFURLRect(GraphicsContext* context, const LayoutRect& rect)
@@ -1113,23 +1113,20 @@
context->setURLForRect(n->document()->completeURL(href), pixelSnappedIntRect(rect));
}
-void RenderObject::paintOutline(GraphicsContext* graphicsContext, const LayoutRect& paintRect)
+void RenderObject::paintOutline(PaintInfo& paintInfo, const LayoutRect& paintRect)
{
if (!hasOutline())
return;
RenderStyle* styleToUse = style();
LayoutUnit outlineWidth = styleToUse->outlineWidth();
- EBorderStyle outlineStyle = styleToUse->outlineStyle();
- Color outlineColor = styleToUse->visitedDependentColor(CSSPropertyOutlineColor);
-
int outlineOffset = styleToUse->outlineOffset();
if (styleToUse->outlineStyleIsAuto() || hasOutlineAnnotation()) {
if (!theme()->supportsFocusRing(styleToUse)) {
// Only paint the focus ring by hand if the theme isn't able to draw the focus ring.
- paintFocusRing(graphicsContext, paintRect.location(), styleToUse);
+ paintFocusRing(paintInfo, paintRect.location(), styleToUse);
}
}
@@ -1146,6 +1143,10 @@
if (outer.isEmpty())
return;
+ EBorderStyle outlineStyle = styleToUse->outlineStyle();
+ Color outlineColor = styleToUse->visitedDependentColor(CSSPropertyOutlineColor);
+
+ GraphicsContext* graphicsContext = paintInfo.context;
bool useTransparencyLayer = outlineColor.hasAlpha();
if (useTransparencyLayer) {
if (outlineStyle == SOLID) {
@@ -1218,7 +1219,7 @@
// descendants.
FloatPoint absolutePoint = localToAbsolute();
addFocusRingRects(rects, flooredLayoutPoint(absolutePoint));
- size_t count = rects.size();
+ size_t count = rects.size();
for (size_t i = 0; i < count; ++i) {
IntRect rect = rects[i];
rect.move(-absolutePoint.x(), -absolutePoint.y());
« no previous file with comments | « Source/WebCore/rendering/RenderObject.h ('k') | Source/WebCore/rendering/RenderReplaced.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698