Chromium Code Reviews| Index: Source/core/layout/LayoutInline.cpp |
| diff --git a/Source/core/layout/LayoutInline.cpp b/Source/core/layout/LayoutInline.cpp |
| index 0ec59c7cdb61b20bc9a6afcd9defc9ab2ff93663..a215c0686094b7ba3a8a6b8c3c62273fb16fd53f 100644 |
| --- a/Source/core/layout/LayoutInline.cpp |
| +++ b/Source/core/layout/LayoutInline.cpp |
| @@ -682,6 +682,10 @@ public: |
| { |
| m_quads.append(m_geometryMap.absoluteRect(rect)); |
| } |
| + void operator()(const LayoutRect& rect) |
| + { |
| + m_quads.append(m_geometryMap.absoluteRect(FloatRect(rect))); |
|
jbroman
2015/08/26 19:06:43
nit: I don't feel strongly, but how about delegati
chrishtr
2015/08/26 20:53:51
Done.
|
| + } |
| private: |
| Vector<FloatQuad>& m_quads; |
| LayoutGeometryMap m_geometryMap; |
| @@ -786,6 +790,11 @@ public: |
| m_intersected = m_intersected || m_location.intersects(rect); |
| m_region.unite(enclosingIntRect(rect)); |
| } |
| + void operator()(const LayoutRect& rect) |
| + { |
| + m_intersected = m_intersected || m_location.intersects(rect); |
| + m_region.unite(enclosingIntRect(rect)); |
| + } |
| bool intersected() const { return m_intersected; } |
| private: |
| bool m_intersected; |
| @@ -849,6 +858,10 @@ public: |
| { |
| m_rect.uniteIfNonZero(rect); |
| } |
| + void operator()(const LayoutRect& rect) |
| + { |
| + m_rect.uniteIfNonZero(FloatRect(rect)); |
|
jbroman
2015/08/26 19:06:43
could do the same here; not sure if it's cleaner o
chrishtr
2015/08/26 20:53:51
Done.
|
| + } |
| private: |
| FloatRect& m_rect; |
| }; |
| @@ -1354,7 +1367,13 @@ public: |
| void operator()(const FloatRect& rect) |
| { |
| LayoutRect layoutRect(rect); |
|
jbroman
2015/08/26 19:06:43
nit: and here, but delegating to the LayoutRect ov
chrishtr
2015/08/26 20:53:51
Done.
|
| - layoutRect.move(m_accumulatedOffset.x(), m_accumulatedOffset.y()); |
| + layoutRect.moveBy(m_accumulatedOffset); |
| + m_rects.append(layoutRect); |
| + } |
| + void operator()(const LayoutRect& rect) |
| + { |
| + LayoutRect layoutRect(rect); |
| + layoutRect.moveBy(m_accumulatedOffset); |
| m_rects.append(layoutRect); |
| } |
| private: |
| @@ -1372,6 +1391,11 @@ public: |
| if (!rect.isEmpty()) |
| AbsoluteLayoutRectsGeneratorContext::operator()(rect); |
| } |
| + void operator()(const LayoutRect& rect) |
| + { |
| + if (!rect.isEmpty()) |
| + AbsoluteLayoutRectsGeneratorContext::operator()(FloatRect(rect)); |
| + } |
| }; |
| } // unnamed namespace |