| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. |
| 3 * | 3 * |
| 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 5 * | 5 * |
| 6 * Other contributors: | 6 * Other contributors: |
| 7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
| 9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
| 10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
| (...skipping 3873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3884 Vector<LayoutRect> rect; | 3884 Vector<LayoutRect> rect; |
| 3885 | 3885 |
| 3886 if (renderBox() && renderBox()->scrollsOverflow()) { | 3886 if (renderBox() && renderBox()->scrollsOverflow()) { |
| 3887 // For scrolling layers, rects are taken to be in the space of the c
ontents. | 3887 // For scrolling layers, rects are taken to be in the space of the c
ontents. |
| 3888 // We need to include both the entire contents, and also the boundin
g box | 3888 // We need to include both the entire contents, and also the boundin
g box |
| 3889 // of the layer in the space of it's parent (eg. for border / scroll
bars). | 3889 // of the layer in the space of it's parent (eg. for border / scroll
bars). |
| 3890 rect.append(m_scrollableArea->overflowRect()); | 3890 rect.append(m_scrollableArea->overflowRect()); |
| 3891 rects.set(this, rect); | 3891 rects.set(this, rect); |
| 3892 if (const RenderLayer* parentLayer = parent()) { | 3892 if (const RenderLayer* parentLayer = parent()) { |
| 3893 LayerHitTestRects::iterator iter = rects.find(parentLayer); | 3893 LayerHitTestRects::iterator iter = rects.find(parentLayer); |
| 3894 if (iter == rects.end()) | 3894 if (iter == rects.end()) { |
| 3895 iter = rects.add(parentLayer, Vector<LayoutRect>()).iterator
; | 3895 rects.add(parentLayer, Vector<LayoutRect>()).iterator->value
.append(boundingBox(parentLayer)); |
| 3896 iter->value.append(boundingBox(parentLayer)); | 3896 } else { |
| 3897 iter->value.append(boundingBox(parentLayer)); |
| 3898 } |
| 3897 } | 3899 } |
| 3898 } else { | 3900 } else { |
| 3899 rect.append(localBoundingBox()); | 3901 rect.append(localBoundingBox()); |
| 3900 rects.set(this, rect); | 3902 rects.set(this, rect); |
| 3901 } | 3903 } |
| 3902 } | 3904 } |
| 3903 | 3905 |
| 3904 for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) | 3906 for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) |
| 3905 child->addLayerHitTestRects(rects); | 3907 child->addLayerHitTestRects(rects); |
| 3906 } | 3908 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 3919 } | 3921 } |
| 3920 } | 3922 } |
| 3921 | 3923 |
| 3922 void showLayerTree(const WebCore::RenderObject* renderer) | 3924 void showLayerTree(const WebCore::RenderObject* renderer) |
| 3923 { | 3925 { |
| 3924 if (!renderer) | 3926 if (!renderer) |
| 3925 return; | 3927 return; |
| 3926 showLayerTree(renderer->enclosingLayer()); | 3928 showLayerTree(renderer->enclosingLayer()); |
| 3927 } | 3929 } |
| 3928 #endif | 3930 #endif |
| OLD | NEW |