Chromium Code Reviews| Index: Source/core/rendering/RenderInline.cpp |
| diff --git a/Source/core/rendering/RenderInline.cpp b/Source/core/rendering/RenderInline.cpp |
| index 802732c0f5f72098f7cce116e6e11ae04e76402b..84539940e01b14f27012d0b2f89b355372b7377c 100644 |
| --- a/Source/core/rendering/RenderInline.cpp |
| +++ b/Source/core/rendering/RenderInline.cpp |
| @@ -1363,9 +1363,25 @@ void RenderInline::imageChanged(WrappedImagePtr, const IntRect*) |
| setShouldDoFullPaintInvalidation(true); |
| } |
| +namespace { |
|
esprehn
2014/08/21 17:22:08
No need for the anonymous namespace. Also why woul
Xianzhu
2014/08/21 17:26:28
I saw yield(FloatRect()) in the code, so wondering
Xianzhu
2014/08/22 00:12:15
Tried to ignore empty rects for all GeneratorConte
|
| + |
| +class AbsoluteRectsIgnoringEmptyRectsGeneratorContext : public AbsoluteRectsGeneratorContext { |
| +public: |
| + AbsoluteRectsIgnoringEmptyRectsGeneratorContext(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) |
| + : AbsoluteRectsGeneratorContext(rects, accumulatedOffset) { } |
| + |
| + void operator()(const FloatRect& rect) |
| + { |
| + if (!rect.isEmpty()) |
| + AbsoluteRectsGeneratorContext::operator()(rect); |
| + } |
| +}; |
| + |
| +} // unnamed namespace |
| + |
| void RenderInline::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer) const |
| { |
| - AbsoluteRectsGeneratorContext context(rects, additionalOffset); |
| + AbsoluteRectsIgnoringEmptyRectsGeneratorContext context(rects, additionalOffset); |
| generateLineBoxRects(context); |
| addChildFocusRingRects(rects, additionalOffset, paintContainer); |