Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutInline.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutInline.cpp b/third_party/WebKit/Source/core/layout/LayoutInline.cpp |
| index d8abdb06ea2e634593a42aa87e078561dcbcca34..19c4700cc9fb14f4411be3bbe2c604bb5de9e07f 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutInline.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutInline.cpp |
| @@ -876,12 +876,16 @@ class HitTestCulledInlinesGeneratorContext { |
| const HitTestLocation& location) |
| : m_intersected(false), m_region(region), m_location(location) {} |
| void operator()(const FloatRect& rect) { |
| - m_intersected = m_intersected || m_location.intersects(rect); |
| - m_region.unite(enclosingIntRect(rect)); |
| + bool intersects = m_location.intersects(rect); |
| + m_intersected = m_intersected || intersects; |
|
wkorman
2017/01/04 00:36:35
nit: could use |= here and below.
|
| + if (intersects) |
| + m_region.unite(enclosingIntRect(rect)); |
| } |
| void operator()(const LayoutRect& rect) { |
| - m_intersected = m_intersected || m_location.intersects(rect); |
| - m_region.unite(enclosingIntRect(rect)); |
| + bool intersects = m_location.intersects(rect); |
| + m_intersected = m_intersected || intersects; |
| + if (intersects) |
| + m_region.unite(enclosingIntRect(rect)); |
| } |
| bool intersected() const { return m_intersected; } |