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

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: 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
Index: Source/core/rendering/RenderObject.cpp
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp
index aa3aa7c9990aefd910ef72a60242b5bc7960a5b2..23d664f4e6f5e1e8d5194d1cade54d681f86b74d 100644
--- a/Source/core/rendering/RenderObject.cpp
+++ b/Source/core/rendering/RenderObject.cpp
@@ -971,32 +971,6 @@ void RenderObject::paintOutline(PaintInfo& paintInfo, const LayoutRect& paintRec
ObjectPainter(*this).paintOutline(paintInfo, paintRect);
}
-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;
@@ -1031,11 +1005,10 @@ IntRect RenderObject::absoluteBoundingBoxRectIgnoringTransforms() const
void RenderObject::absoluteFocusRingQuads(Vector<FloatQuad>& quads)
{
Vector<LayoutRect> rects;
- const RenderLayerModelObject* container = containerForPaintInvalidation();
- addFocusRingRects(rects, LayoutPoint(localToContainerPoint(FloatPoint(), container)), container);
+ addFocusRingRects(rects, LayoutPoint());
size_t count = rects.size();
for (size_t i = 0; i < count; ++i)
- quads.append(container->localToAbsoluteQuad(FloatQuad(rects[i])));
+ quads.append(localToAbsoluteQuad(FloatQuad(rects[i])));
}
FloatRect RenderObject::absoluteBoundingBoxRectForRange(const Range* range)

Powered by Google App Engine
This is Rietveld 408576698