| 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 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1089 void RenderLayer::updateScrollableArea() | 1089 void RenderLayer::updateScrollableArea() |
| 1090 { | 1090 { |
| 1091 if (requiresScrollableArea()) | 1091 if (requiresScrollableArea()) |
| 1092 m_scrollableArea = adoptPtr(new RenderLayerScrollableArea(*this)); | 1092 m_scrollableArea = adoptPtr(new RenderLayerScrollableArea(*this)); |
| 1093 else | 1093 else |
| 1094 m_scrollableArea = nullptr; | 1094 m_scrollableArea = nullptr; |
| 1095 } | 1095 } |
| 1096 | 1096 |
| 1097 bool RenderLayer::hasOverflowControls() const | 1097 bool RenderLayer::hasOverflowControls() const |
| 1098 { | 1098 { |
| 1099 return m_scrollableArea && (m_scrollableArea->hasScrollbar() || renderer()->
style()->resize() != RESIZE_NONE); | 1099 return m_scrollableArea && m_scrollableArea->hasScrollbar(); |
| 1100 } | 1100 } |
| 1101 | 1101 |
| 1102 void RenderLayer::paint(GraphicsContext* context, const LayoutRect& damageRect,
PaintBehavior paintBehavior, RenderObject* paintingRoot, PaintLayerFlags paintFl
ags) | 1102 void RenderLayer::paint(GraphicsContext* context, const LayoutRect& damageRect,
PaintBehavior paintBehavior, RenderObject* paintingRoot, PaintLayerFlags paintFl
ags) |
| 1103 { | 1103 { |
| 1104 LayerPaintingInfo paintingInfo(this, enclosingIntRect(damageRect), paintBeha
vior, LayoutSize(), paintingRoot); | 1104 LayerPaintingInfo paintingInfo(this, enclosingIntRect(damageRect), paintBeha
vior, LayoutSize(), paintingRoot); |
| 1105 if (shouldPaintLayerInSoftwareMode(paintingInfo, paintFlags)) | 1105 if (shouldPaintLayerInSoftwareMode(paintingInfo, paintFlags)) |
| 1106 paintLayer(context, paintingInfo, paintFlags); | 1106 paintLayer(context, paintingInfo, paintFlags); |
| 1107 } | 1107 } |
| 1108 | 1108 |
| 1109 void RenderLayer::paintOverlayScrollbars(GraphicsContext* context, const LayoutR
ect& damageRect, PaintBehavior paintBehavior, RenderObject* paintingRoot) | 1109 void RenderLayer::paintOverlayScrollbars(GraphicsContext* context, const LayoutR
ect& damageRect, PaintBehavior paintBehavior, RenderObject* paintingRoot) |
| (...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1952 if (hitLayer) { | 1952 if (hitLayer) { |
| 1953 if (!depthSortDescendants) | 1953 if (!depthSortDescendants) |
| 1954 return hitLayer; | 1954 return hitLayer; |
| 1955 candidateLayer = hitLayer; | 1955 candidateLayer = hitLayer; |
| 1956 } | 1956 } |
| 1957 | 1957 |
| 1958 // Collect the fragments. This will compute the clip rectangles for each lay
er fragment. | 1958 // Collect the fragments. This will compute the clip rectangles for each lay
er fragment. |
| 1959 LayerFragments layerFragments; | 1959 LayerFragments layerFragments; |
| 1960 collectFragments(layerFragments, rootLayer, hitTestRect, RootRelativeClipRec
ts, IncludeOverlayScrollbarSize); | 1960 collectFragments(layerFragments, rootLayer, hitTestRect, RootRelativeClipRec
ts, IncludeOverlayScrollbarSize); |
| 1961 | 1961 |
| 1962 if (m_scrollableArea && m_scrollableArea->hitTestResizerInFragments(layerFra
gments, hitTestLocation)) { | |
| 1963 renderer()->updateHitTestResult(result, hitTestLocation.point()); | |
| 1964 return this; | |
| 1965 } | |
| 1966 | |
| 1967 // Next we want to see if the mouse pos is inside the child RenderObjects of
the layer. Check | 1962 // Next we want to see if the mouse pos is inside the child RenderObjects of
the layer. Check |
| 1968 // every fragment in reverse order. | 1963 // every fragment in reverse order. |
| 1969 if (isSelfPaintingLayer()) { | 1964 if (isSelfPaintingLayer()) { |
| 1970 // Hit test with a temporary HitTestResult, because we only want to comm
it to 'result' if we know we're frontmost. | 1965 // Hit test with a temporary HitTestResult, because we only want to comm
it to 'result' if we know we're frontmost. |
| 1971 HitTestResult tempResult(result.hitTestLocation()); | 1966 HitTestResult tempResult(result.hitTestLocation()); |
| 1972 bool insideFragmentForegroundRect = false; | 1967 bool insideFragmentForegroundRect = false; |
| 1973 if (hitTestContentsForFragments(layerFragments, request, tempResult, hit
TestLocation, HitTestDescendants, insideFragmentForegroundRect) | 1968 if (hitTestContentsForFragments(layerFragments, request, tempResult, hit
TestLocation, HitTestDescendants, insideFragmentForegroundRect) |
| 1974 && isHitCandidate(this, false, zOffsetForContentsPtr, unflattenedTra
nsformState.get())) { | 1969 && isHitCandidate(this, false, zOffsetForContentsPtr, unflattenedTra
nsformState.get())) { |
| 1975 if (result.isRectBasedTest()) | 1970 if (result.isRectBasedTest()) |
| 1976 result.append(tempResult); | 1971 result.append(tempResult); |
| (...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2782 } | 2777 } |
| 2783 } | 2778 } |
| 2784 | 2779 |
| 2785 void showLayerTree(const blink::RenderObject* renderer) | 2780 void showLayerTree(const blink::RenderObject* renderer) |
| 2786 { | 2781 { |
| 2787 if (!renderer) | 2782 if (!renderer) |
| 2788 return; | 2783 return; |
| 2789 showLayerTree(renderer->enclosingLayer()); | 2784 showLayerTree(renderer->enclosingLayer()); |
| 2790 } | 2785 } |
| 2791 #endif | 2786 #endif |
| OLD | NEW |