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

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

Issue 711493004: Remove unnecessary paintContainer parameter from addFocusRingRects (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 1 month 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/core/rendering/RenderObject.h ('k') | Source/core/rendering/RenderTextControl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderObject.cpp
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp
index aaa9368fc974acd7ea827335978a7220988005a4..b56705cb905111631a6d7759d8b73d7e0b5d2cda 100644
--- a/Source/core/rendering/RenderObject.cpp
+++ b/Source/core/rendering/RenderObject.cpp
@@ -966,32 +966,6 @@ bool RenderObject::mustInvalidateBackgroundOrBorderPaintOnHeightChange() const
return false;
}
-void RenderObject::addChildFocusRingRects(Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer) const
-{
- for (RenderObject* current = slowFirstChild(); current; current = current->nextSibling()) {
- if (current->isText() || current->isListMarker())
- continue;
-
- if (current->isBox()) {
- RenderBox* box = toRenderBox(current);
- if (box->hasLayer()) {
- Vector<LayoutRect> layerFocusRingRects;
- box->addFocusRingRects(layerFocusRingRects, LayoutPoint(), box);
- for (size_t i = 0; i < layerFocusRingRects.size(); ++i) {
- FloatQuad quadInBox = box->localToContainerQuad(FloatQuad(layerFocusRingRects[i]), paintContainer);
- LayoutRect rect = LayoutRect(quadInBox.boundingBox());
- if (!rect.isEmpty())
- rects.append(rect);
- }
- } else {
- box->addFocusRingRects(rects, additionalOffset + box->locationOffset(), paintContainer);
- }
- } else {
- current->addFocusRingRects(rects, additionalOffset, paintContainer);
- }
- }
-}
-
IntRect RenderObject::absoluteBoundingBoxRect() const
{
Vector<FloatQuad> quads;
@@ -1026,8 +1000,8 @@ IntRect RenderObject::absoluteBoundingBoxRectIgnoringTransforms() const
IntRect RenderObject::absoluteFocusRingBoundingBoxRect() const
{
Vector<LayoutRect> rects;
- const RenderLayerModelObject* container = containerForPaintInvalidation();
- addFocusRingRects(rects, LayoutPoint(localToContainerPoint(FloatPoint(), container)), container);
+ const RenderLayerModelObject* container = enclosingLayer()->renderer();
+ addFocusRingRects(rects, LayoutPoint(localToContainerPoint(FloatPoint(), container)));
return container->localToAbsoluteQuad(FloatQuad(unionRect(rects))).enclosingBoundingBox();
}
« no previous file with comments | « Source/core/rendering/RenderObject.h ('k') | Source/core/rendering/RenderTextControl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698