| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. |
| 5 * All rights reserved. | 5 * All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 } | 869 } |
| 870 | 870 |
| 871 namespace { | 871 namespace { |
| 872 | 872 |
| 873 class HitTestCulledInlinesGeneratorContext { | 873 class HitTestCulledInlinesGeneratorContext { |
| 874 public: | 874 public: |
| 875 HitTestCulledInlinesGeneratorContext(Region& region, | 875 HitTestCulledInlinesGeneratorContext(Region& region, |
| 876 const HitTestLocation& location) | 876 const HitTestLocation& location) |
| 877 : m_intersected(false), m_region(region), m_location(location) {} | 877 : m_intersected(false), m_region(region), m_location(location) {} |
| 878 void operator()(const FloatRect& rect) { | 878 void operator()(const FloatRect& rect) { |
| 879 m_intersected = m_intersected || m_location.intersects(rect); | 879 if (m_location.intersects(rect)) { |
| 880 m_region.unite(enclosingIntRect(rect)); | 880 m_intersected = true; |
| 881 m_region.unite(enclosingIntRect(rect)); |
| 882 } |
| 881 } | 883 } |
| 882 void operator()(const LayoutRect& rect) { | 884 void operator()(const LayoutRect& rect) { |
| 883 m_intersected = m_intersected || m_location.intersects(rect); | 885 if (m_location.intersects(rect)) { |
| 884 m_region.unite(enclosingIntRect(rect)); | 886 m_intersected = true; |
| 887 m_region.unite(enclosingIntRect(rect)); |
| 888 } |
| 885 } | 889 } |
| 886 bool intersected() const { return m_intersected; } | 890 bool intersected() const { return m_intersected; } |
| 887 | 891 |
| 888 private: | 892 private: |
| 889 bool m_intersected; | 893 bool m_intersected; |
| 890 Region& m_region; | 894 Region& m_region; |
| 891 const HitTestLocation& m_location; | 895 const HitTestLocation& m_location; |
| 892 }; | 896 }; |
| 893 | 897 |
| 894 } // unnamed namespace | 898 } // unnamed namespace |
| (...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1514 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason); | 1518 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason); |
| 1515 } | 1519 } |
| 1516 | 1520 |
| 1517 // TODO(lunalu): Not to just dump 0, 0 as the x and y here | 1521 // TODO(lunalu): Not to just dump 0, 0 as the x and y here |
| 1518 LayoutRect LayoutInline::debugRect() const { | 1522 LayoutRect LayoutInline::debugRect() const { |
| 1519 IntRect linesBox = enclosingIntRect(linesBoundingBox()); | 1523 IntRect linesBox = enclosingIntRect(linesBoundingBox()); |
| 1520 return LayoutRect(IntRect(0, 0, linesBox.width(), linesBox.height())); | 1524 return LayoutRect(IntRect(0, 0, linesBox.width(), linesBox.height())); |
| 1521 } | 1525 } |
| 1522 | 1526 |
| 1523 } // namespace blink | 1527 } // namespace blink |
| OLD | NEW |