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

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

Issue 12545020: Revert 145087 (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 145111)
+++ Source/WebCore/rendering/RenderObject.cpp (working copy)
@@ -1090,14 +1090,14 @@
}
}
-void RenderObject::paintFocusRing(PaintInfo& paintInfo, const LayoutPoint& paintOffset, RenderStyle* style)
+void RenderObject::paintFocusRing(GraphicsContext* context, const LayoutPoint& paintOffset, RenderStyle* style)
{
Vector<IntRect> focusRingRects;
- addFocusRingRects(focusRingRects, paintOffset, paintInfo.paintContainer);
+ addFocusRingRects(focusRingRects, paintOffset);
if (style->outlineStyleIsAuto())
- paintInfo.context->drawFocusRing(focusRingRects, style->outlineWidth(), style->outlineOffset(), style->visitedDependentColor(CSSPropertyOutlineColor));
+ context->drawFocusRing(focusRingRects, style->outlineWidth(), style->outlineOffset(), style->visitedDependentColor(CSSPropertyOutlineColor));
else
- addPDFURLRect(paintInfo.context, unionRect(focusRingRects));
+ addPDFURLRect(context, unionRect(focusRingRects));
}
void RenderObject::addPDFURLRect(GraphicsContext* context, const LayoutRect& rect)
@@ -1113,20 +1113,23 @@
context->setURLForRect(n->document()->completeURL(href), pixelSnappedIntRect(rect));
}
-void RenderObject::paintOutline(PaintInfo& paintInfo, const LayoutRect& paintRect)
+void RenderObject::paintOutline(GraphicsContext* graphicsContext, 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(paintInfo, paintRect.location(), styleToUse);
+ paintFocusRing(graphicsContext, paintRect.location(), styleToUse);
}
}
@@ -1143,10 +1146,6 @@
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) {
@@ -1219,7 +1218,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