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 3867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3878 } | 3878 } |
3879 } | 3879 } |
3880 | 3880 |
3881 void RenderLayer::addLayerHitTestRects(LayerHitTestRects& rects) const | 3881 void RenderLayer::addLayerHitTestRects(LayerHitTestRects& rects) const |
3882 { | 3882 { |
3883 if (!size().isEmpty()) { | 3883 if (!size().isEmpty()) { |
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 the bounding box of the layer in the space of
its parent |
3889 // of the layer in the space of it's parent (eg. for border / scroll
bars). | 3889 // (eg. for border / scroll bars) and if it's composited then the en
tire contents |
3890 rect.append(m_scrollableArea->overflowRect()); | 3890 // as well as they may be on another composited layer. Skip reportin
g contents |
| 3891 // for non-composited layers as they'll get projected to the same la
yer as the |
| 3892 // bounding box. |
| 3893 if (compositingState() != NotComposited) |
| 3894 rect.append(m_scrollableArea->overflowRect()); |
| 3895 |
3891 rects.set(this, rect); | 3896 rects.set(this, rect); |
3892 if (const RenderLayer* parentLayer = parent()) { | 3897 if (const RenderLayer* parentLayer = parent()) { |
3893 LayerHitTestRects::iterator iter = rects.find(parentLayer); | 3898 LayerHitTestRects::iterator iter = rects.find(parentLayer); |
3894 if (iter == rects.end()) | 3899 if (iter == rects.end()) |
3895 iter = rects.add(parentLayer, Vector<LayoutRect>()).iterator
; | 3900 iter = rects.add(parentLayer, Vector<LayoutRect>()).iterator
; |
3896 iter->value.append(boundingBox(parentLayer)); | 3901 iter->value.append(boundingBox(parentLayer)); |
3897 } | 3902 } |
3898 } else { | 3903 } else { |
3899 rect.append(localBoundingBox()); | 3904 rect.append(localBoundingBox()); |
3900 rects.set(this, rect); | 3905 rects.set(this, rect); |
(...skipping 18 matching lines...) Expand all Loading... |
3919 } | 3924 } |
3920 } | 3925 } |
3921 | 3926 |
3922 void showLayerTree(const WebCore::RenderObject* renderer) | 3927 void showLayerTree(const WebCore::RenderObject* renderer) |
3923 { | 3928 { |
3924 if (!renderer) | 3929 if (!renderer) |
3925 return; | 3930 return; |
3926 showLayerTree(renderer->enclosingLayer()); | 3931 showLayerTree(renderer->enclosingLayer()); |
3927 } | 3932 } |
3928 #endif | 3933 #endif |
OLD | NEW |