Chromium Code Reviews| Index: Source/core/rendering/RenderObject.cpp |
| diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp |
| index 531ee887d3e6d09775cbec1963fb2da91f5082fd..e79ac4c11f682a22094ba25b2d45461691edee9a 100644 |
| --- a/Source/core/rendering/RenderObject.cpp |
| +++ b/Source/core/rendering/RenderObject.cpp |
| @@ -1249,6 +1249,30 @@ void RenderObject::paintOutline(PaintInfo& paintInfo, const LayoutRect& paintRec |
| graphicsContext->endLayer(); |
| } |
| +void RenderObject::addChildrenFocusRingRects(Vector<IntRect>& rects, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer) |
| +{ |
| + for (RenderObject* curr = slowFirstChild(); curr; curr = curr->nextSibling()) { |
|
esprehn
2014/05/29 21:37:06
current, don't abbreviate.
Xianzhu
2014/05/29 22:12:31
Done.
|
| + if (curr->isText() || curr->isListMarker()) |
| + continue; |
| + |
| + if (curr->isBox()) { |
| + RenderBox* box = toRenderBox(curr); |
| + if (box->hasLayer()) { |
| + Vector<IntRect> layerFocusRingRects; |
| + box->addFocusRingRects(layerFocusRingRects, LayoutPoint(), box); |
| + for (size_t i = 0; i < layerFocusRingRects.size(); ++i) |
| + rects.append(box->localToContainerQuad(FloatRect(layerFocusRingRects[i]), paintContainer).enclosingBoundingBox()); |
| + } else { |
| + FloatPoint pos(additionalOffset); |
| + pos.move(box->locationOffset()); // FIXME: Snap offsets? crbug.com/350474 |
| + box->addFocusRingRects(rects, flooredIntPoint(pos), paintContainer); |
| + } |
| + } else { |
| + curr->addFocusRingRects(rects, additionalOffset, paintContainer); |
| + } |
| + } |
| +} |
| + |
| // FIXME: In repaint-after-layout, we should be able to change the logic to remove the need for this function. See crbug.com/368416. |
| LayoutPoint RenderObject::positionFromRepaintContainer(const RenderLayerModelObject* repaintContainer) const |
| { |