Chromium Code Reviews| Index: Source/core/rendering/RenderLayerModelObject.cpp |
| diff --git a/Source/core/rendering/RenderLayerModelObject.cpp b/Source/core/rendering/RenderLayerModelObject.cpp |
| index 3e63935ffa1048de6f4fbf5a9ae84a4ab5c55414..54eada7e315f9089b7ae5855253eec4325453edf 100644 |
| --- a/Source/core/rendering/RenderLayerModelObject.cpp |
| +++ b/Source/core/rendering/RenderLayerModelObject.cpp |
| @@ -210,5 +210,33 @@ void RenderLayerModelObject::setBackingNeedsPaintInvalidationInRect(const Layout |
| } |
| } |
| +void RenderLayerModelObject::addChildFocusRingRects(Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset) const |
| +{ |
| + for (RenderObject* current = slowFirstChild(); current; current = current->nextSibling()) { |
| + if (current->isText() || current->isListMarker()) |
| + continue; |
| + |
| + if (current->isBox()) { |
|
dsinclair
2014/11/06 23:56:22
if (!current->isBox()) {
current->addFocusRingRe
Xianzhu
2014/11/12 19:10:14
Done.
|
| + RenderBox* box = toRenderBox(current); |
| + if (box->hasLayer()) { |
| + Vector<LayoutRect> layerFocusRingRects; |
| + box->addFocusRingRects(layerFocusRingRects, LayoutPoint()); |
| + for (size_t i = 0; i < layerFocusRingRects.size(); ++i) { |
| + FloatQuad quadInBox = box->localToContainerQuad(FloatQuad(layerFocusRingRects[i]), this); |
| + LayoutRect rect = LayoutRect(quadInBox.boundingBox()); |
| + if (!rect.isEmpty()) { |
| + rect.moveBy(additionalOffset); |
| + rects.append(rect); |
| + } |
| + } |
| + } else { |
| + box->addFocusRingRects(rects, additionalOffset + box->locationOffset()); |
| + } |
| + } else { |
| + current->addFocusRingRects(rects, additionalOffset); |
| + } |
| + } |
| +} |
| + |
| } // namespace blink |