| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 // Do not leave the destroyed pointer dangling on any RenderLayers that pain
ted to this mapping's squashing layer. | 153 // Do not leave the destroyed pointer dangling on any RenderLayers that pain
ted to this mapping's squashing layer. |
| 154 for (size_t i = 0; i < m_squashedLayers.size(); ++i) { | 154 for (size_t i = 0; i < m_squashedLayers.size(); ++i) { |
| 155 RenderLayer* oldSquashedLayer = m_squashedLayers[i].renderLayer; | 155 RenderLayer* oldSquashedLayer = m_squashedLayers[i].renderLayer; |
| 156 if (oldSquashedLayer->groupedMapping() == this) { | 156 if (oldSquashedLayer->groupedMapping() == this) { |
| 157 oldSquashedLayer->setGroupedMapping(0, true); | 157 oldSquashedLayer->setGroupedMapping(0, true); |
| 158 oldSquashedLayer->setLostGroupedMapping(true); | 158 oldSquashedLayer->setLostGroupedMapping(true); |
| 159 } | 159 } |
| 160 } | 160 } |
| 161 | 161 |
| 162 updateClippingLayers(false, false); | 162 updateClippingLayers(false, false); |
| 163 updateOverflowControlsLayers(false, false, false, false); | 163 updateOverflowControlsLayers(false, false, false); |
| 164 updateChildTransformLayer(false); | 164 updateChildTransformLayer(false); |
| 165 updateForegroundLayer(false); | 165 updateForegroundLayer(false); |
| 166 updateBackgroundLayer(false); | 166 updateBackgroundLayer(false); |
| 167 updateMaskLayer(false); | 167 updateMaskLayer(false); |
| 168 updateClippingMaskLayers(false); | 168 updateClippingMaskLayers(false); |
| 169 updateScrollingLayers(false); | 169 updateScrollingLayers(false); |
| 170 updateSquashingLayers(false); | 170 updateSquashingLayers(false); |
| 171 destroyGraphicsLayers(); | 171 destroyGraphicsLayers(); |
| 172 } | 172 } |
| 173 | 173 |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 if (scrollParent) { | 353 if (scrollParent) { |
| 354 // If our containing block is our ancestor scrolling layer, then we'll a
lready be clipped | 354 // If our containing block is our ancestor scrolling layer, then we'll a
lready be clipped |
| 355 // to it via our scroll parent and we don't need an ancestor clipping la
yer. | 355 // to it via our scroll parent and we don't need an ancestor clipping la
yer. |
| 356 if (m_owningLayer.renderer()->containingBlock()->enclosingLayer() == m_o
wningLayer.ancestorScrollingLayer()) | 356 if (m_owningLayer.renderer()->containingBlock()->enclosingLayer() == m_o
wningLayer.ancestorScrollingLayer()) |
| 357 needsAncestorClip = false; | 357 needsAncestorClip = false; |
| 358 } | 358 } |
| 359 | 359 |
| 360 if (updateClippingLayers(needsAncestorClip, needsDescendantsClippingLayer)) | 360 if (updateClippingLayers(needsAncestorClip, needsDescendantsClippingLayer)) |
| 361 layerConfigChanged = true; | 361 layerConfigChanged = true; |
| 362 | 362 |
| 363 if (updateOverflowControlsLayers(requiresHorizontalScrollbarLayer(), require
sVerticalScrollbarLayer(), requiresScrollCornerLayer(), needsAncestorClip)) | 363 if (updateOverflowControlsLayers(requiresHorizontalScrollbarLayer(), require
sVerticalScrollbarLayer(), needsAncestorClip)) |
| 364 layerConfigChanged = true; | 364 layerConfigChanged = true; |
| 365 | 365 |
| 366 bool scrollingConfigChanged = false; | 366 bool scrollingConfigChanged = false; |
| 367 if (updateScrollingLayers(m_owningLayer.needsCompositedScrolling())) { | 367 if (updateScrollingLayers(m_owningLayer.needsCompositedScrolling())) { |
| 368 layerConfigChanged = true; | 368 layerConfigChanged = true; |
| 369 scrollingConfigChanged = true; | 369 scrollingConfigChanged = true; |
| 370 } | 370 } |
| 371 | 371 |
| 372 bool hasPerspective = false; | 372 bool hasPerspective = false; |
| 373 if (RenderStyle* style = renderer->style()) | 373 if (RenderStyle* style = renderer->style()) |
| (...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 931 m_graphicsLayer->addChild(m_overflowControlsClippingLayer.get()); | 931 m_graphicsLayer->addChild(m_overflowControlsClippingLayer.get()); |
| 932 m_overflowControlsClippingLayer->addChild(m_overflowControlsHostLayer.ge
t()); | 932 m_overflowControlsClippingLayer->addChild(m_overflowControlsHostLayer.ge
t()); |
| 933 } else if (m_overflowControlsHostLayer) { | 933 } else if (m_overflowControlsHostLayer) { |
| 934 m_graphicsLayer->addChild(m_overflowControlsHostLayer.get()); | 934 m_graphicsLayer->addChild(m_overflowControlsHostLayer.get()); |
| 935 } | 935 } |
| 936 | 936 |
| 937 if (m_layerForHorizontalScrollbar) | 937 if (m_layerForHorizontalScrollbar) |
| 938 m_overflowControlsHostLayer->addChild(m_layerForHorizontalScrollbar.get(
)); | 938 m_overflowControlsHostLayer->addChild(m_layerForHorizontalScrollbar.get(
)); |
| 939 if (m_layerForVerticalScrollbar) | 939 if (m_layerForVerticalScrollbar) |
| 940 m_overflowControlsHostLayer->addChild(m_layerForVerticalScrollbar.get())
; | 940 m_overflowControlsHostLayer->addChild(m_layerForVerticalScrollbar.get())
; |
| 941 if (m_layerForScrollCorner) | |
| 942 m_overflowControlsHostLayer->addChild(m_layerForScrollCorner.get()); | |
| 943 | 941 |
| 944 // The squashing containment layer, if it exists, becomes a no-op parent. | 942 // The squashing containment layer, if it exists, becomes a no-op parent. |
| 945 if (m_squashingLayer) { | 943 if (m_squashingLayer) { |
| 946 ASSERT(compositor()->layerSquashingEnabled()); | 944 ASSERT(compositor()->layerSquashingEnabled()); |
| 947 ASSERT((m_ancestorClippingLayer && !m_squashingContainmentLayer) || (!m_
ancestorClippingLayer && m_squashingContainmentLayer)); | 945 ASSERT((m_ancestorClippingLayer && !m_squashingContainmentLayer) || (!m_
ancestorClippingLayer && m_squashingContainmentLayer)); |
| 948 | 946 |
| 949 if (m_squashingContainmentLayer) { | 947 if (m_squashingContainmentLayer) { |
| 950 m_squashingContainmentLayer->removeAllChildren(); | 948 m_squashingContainmentLayer->removeAllChildren(); |
| 951 m_squashingContainmentLayer->addChild(m_graphicsLayer.get()); | 949 m_squashingContainmentLayer->addChild(m_graphicsLayer.get()); |
| 952 m_squashingContainmentLayer->addChild(m_squashingLayer.get()); | 950 m_squashingContainmentLayer->addChild(m_squashingLayer.get()); |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1141 | 1139 |
| 1142 // Only a member function so it can call createGraphicsLayer. | 1140 // Only a member function so it can call createGraphicsLayer. |
| 1143 bool CompositedLayerMapping::toggleScrollbarLayerIfNeeded(OwnPtr<GraphicsLayer>&
layer, bool needsLayer, CompositingReasons reason) | 1141 bool CompositedLayerMapping::toggleScrollbarLayerIfNeeded(OwnPtr<GraphicsLayer>&
layer, bool needsLayer, CompositingReasons reason) |
| 1144 { | 1142 { |
| 1145 if (needsLayer == !!layer) | 1143 if (needsLayer == !!layer) |
| 1146 return false; | 1144 return false; |
| 1147 layer = needsLayer ? createGraphicsLayer(reason) : nullptr; | 1145 layer = needsLayer ? createGraphicsLayer(reason) : nullptr; |
| 1148 return true; | 1146 return true; |
| 1149 } | 1147 } |
| 1150 | 1148 |
| 1151 bool CompositedLayerMapping::updateOverflowControlsLayers(bool needsHorizontalSc
rollbarLayer, bool needsVerticalScrollbarLayer, bool needsScrollCornerLayer, boo
l needsAncestorClip) | 1149 bool CompositedLayerMapping::updateOverflowControlsLayers(bool needsHorizontalSc
rollbarLayer, bool needsVerticalScrollbarLayer, bool needsAncestorClip) |
| 1152 { | 1150 { |
| 1153 bool horizontalScrollbarLayerChanged = toggleScrollbarLayerIfNeeded(m_layerF
orHorizontalScrollbar, needsHorizontalScrollbarLayer, CompositingReasonLayerForH
orizontalScrollbar); | 1151 bool horizontalScrollbarLayerChanged = toggleScrollbarLayerIfNeeded(m_layerF
orHorizontalScrollbar, needsHorizontalScrollbarLayer, CompositingReasonLayerForH
orizontalScrollbar); |
| 1154 bool verticalScrollbarLayerChanged = toggleScrollbarLayerIfNeeded(m_layerFor
VerticalScrollbar, needsVerticalScrollbarLayer, CompositingReasonLayerForVertica
lScrollbar); | 1152 bool verticalScrollbarLayerChanged = toggleScrollbarLayerIfNeeded(m_layerFor
VerticalScrollbar, needsVerticalScrollbarLayer, CompositingReasonLayerForVertica
lScrollbar); |
| 1155 bool scrollCornerLayerChanged = toggleScrollbarLayerIfNeeded(m_layerForScrol
lCorner, needsScrollCornerLayer, CompositingReasonLayerForScrollCorner); | |
| 1156 | 1153 |
| 1157 bool needsOverflowControlsHostLayer = needsHorizontalScrollbarLayer || needs
VerticalScrollbarLayer || needsScrollCornerLayer; | 1154 bool needsOverflowControlsHostLayer = needsHorizontalScrollbarLayer || needs
VerticalScrollbarLayer; |
| 1158 toggleScrollbarLayerIfNeeded(m_overflowControlsHostLayer, needsOverflowContr
olsHostLayer, CompositingReasonLayerForOverflowControlsHost); | 1155 toggleScrollbarLayerIfNeeded(m_overflowControlsHostLayer, needsOverflowContr
olsHostLayer, CompositingReasonLayerForOverflowControlsHost); |
| 1159 bool needsOverflowClipLayer = needsOverflowControlsHostLayer && needsAncesto
rClip; | 1156 bool needsOverflowClipLayer = needsOverflowControlsHostLayer && needsAncesto
rClip; |
| 1160 toggleScrollbarLayerIfNeeded(m_overflowControlsClippingLayer, needsOverflowC
lipLayer, CompositingReasonLayerForOverflowControlsHost); | 1157 toggleScrollbarLayerIfNeeded(m_overflowControlsClippingLayer, needsOverflowC
lipLayer, CompositingReasonLayerForOverflowControlsHost); |
| 1161 | 1158 |
| 1162 if (ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLay
er(m_owningLayer)) { | 1159 if (ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLay
er(m_owningLayer)) { |
| 1163 if (horizontalScrollbarLayerChanged) | 1160 if (horizontalScrollbarLayerChanged) |
| 1164 scrollingCoordinator->scrollableAreaScrollbarLayerDidChange(m_owning
Layer.scrollableArea(), HorizontalScrollbar); | 1161 scrollingCoordinator->scrollableAreaScrollbarLayerDidChange(m_owning
Layer.scrollableArea(), HorizontalScrollbar); |
| 1165 if (verticalScrollbarLayerChanged) | 1162 if (verticalScrollbarLayerChanged) |
| 1166 scrollingCoordinator->scrollableAreaScrollbarLayerDidChange(m_owning
Layer.scrollableArea(), VerticalScrollbar); | 1163 scrollingCoordinator->scrollableAreaScrollbarLayerDidChange(m_owning
Layer.scrollableArea(), VerticalScrollbar); |
| 1167 } | 1164 } |
| 1168 | 1165 |
| 1169 return horizontalScrollbarLayerChanged || verticalScrollbarLayerChanged || s
crollCornerLayerChanged; | 1166 return horizontalScrollbarLayerChanged || verticalScrollbarLayerChanged; |
| 1170 } | 1167 } |
| 1171 | 1168 |
| 1172 void CompositedLayerMapping::positionOverflowControlsLayers(const IntSize& offse
tFromRoot) | 1169 void CompositedLayerMapping::positionOverflowControlsLayers(const IntSize& offse
tFromRoot) |
| 1173 { | 1170 { |
| 1174 IntSize offsetFromRenderer = m_graphicsLayer->offsetFromRenderer() - rounded
IntSize(m_owningLayer.subpixelAccumulation()); | 1171 IntSize offsetFromRenderer = m_graphicsLayer->offsetFromRenderer() - rounded
IntSize(m_owningLayer.subpixelAccumulation()); |
| 1175 if (GraphicsLayer* layer = layerForHorizontalScrollbar()) { | 1172 if (GraphicsLayer* layer = layerForHorizontalScrollbar()) { |
| 1176 Scrollbar* hBar = m_owningLayer.scrollableArea()->horizontalScrollbar(); | 1173 Scrollbar* hBar = m_owningLayer.scrollableArea()->horizontalScrollbar(); |
| 1177 if (hBar) { | 1174 if (hBar) { |
| 1178 layer->setPosition(hBar->frameRect().location() - offsetFromRoot - o
ffsetFromRenderer); | 1175 layer->setPosition(hBar->frameRect().location() - offsetFromRoot - o
ffsetFromRenderer); |
| 1179 layer->setSize(hBar->frameRect().size()); | 1176 layer->setSize(hBar->frameRect().size()); |
| 1180 if (layer->hasContentsLayer()) | 1177 if (layer->hasContentsLayer()) |
| 1181 layer->setContentsRect(IntRect(IntPoint(), hBar->frameRect().siz
e())); | 1178 layer->setContentsRect(IntRect(IntPoint(), hBar->frameRect().siz
e())); |
| 1182 } | 1179 } |
| 1183 layer->setDrawsContent(hBar && !layer->hasContentsLayer()); | 1180 layer->setDrawsContent(hBar && !layer->hasContentsLayer()); |
| 1184 } | 1181 } |
| 1185 | 1182 |
| 1186 if (GraphicsLayer* layer = layerForVerticalScrollbar()) { | 1183 if (GraphicsLayer* layer = layerForVerticalScrollbar()) { |
| 1187 Scrollbar* vBar = m_owningLayer.scrollableArea()->verticalScrollbar(); | 1184 Scrollbar* vBar = m_owningLayer.scrollableArea()->verticalScrollbar(); |
| 1188 if (vBar) { | 1185 if (vBar) { |
| 1189 layer->setPosition(vBar->frameRect().location() - offsetFromRoot - o
ffsetFromRenderer); | 1186 layer->setPosition(vBar->frameRect().location() - offsetFromRoot - o
ffsetFromRenderer); |
| 1190 layer->setSize(vBar->frameRect().size()); | 1187 layer->setSize(vBar->frameRect().size()); |
| 1191 if (layer->hasContentsLayer()) | 1188 if (layer->hasContentsLayer()) |
| 1192 layer->setContentsRect(IntRect(IntPoint(), vBar->frameRect().siz
e())); | 1189 layer->setContentsRect(IntRect(IntPoint(), vBar->frameRect().siz
e())); |
| 1193 } | 1190 } |
| 1194 layer->setDrawsContent(vBar && !layer->hasContentsLayer()); | 1191 layer->setDrawsContent(vBar && !layer->hasContentsLayer()); |
| 1195 } | 1192 } |
| 1196 | |
| 1197 if (GraphicsLayer* layer = layerForScrollCorner()) { | |
| 1198 const LayoutRect& scrollCornerAndResizer = m_owningLayer.scrollableArea(
)->scrollCornerAndResizerRect(); | |
| 1199 layer->setPosition(scrollCornerAndResizer.location() - offsetFromRendere
r); | |
| 1200 layer->setSize(scrollCornerAndResizer.size()); | |
| 1201 layer->setDrawsContent(!scrollCornerAndResizer.isEmpty()); | |
| 1202 } | |
| 1203 } | 1193 } |
| 1204 | 1194 |
| 1205 bool CompositedLayerMapping::hasUnpositionedOverflowControlsLayers() const | 1195 bool CompositedLayerMapping::hasUnpositionedOverflowControlsLayers() const |
| 1206 { | 1196 { |
| 1207 if (GraphicsLayer* layer = layerForHorizontalScrollbar()) { | 1197 if (GraphicsLayer* layer = layerForHorizontalScrollbar()) { |
| 1208 if (!layer->drawsContent()) | 1198 if (!layer->drawsContent()) |
| 1209 return true; | 1199 return true; |
| 1210 } | 1200 } |
| 1211 | 1201 |
| 1212 if (GraphicsLayer* layer = layerForVerticalScrollbar()) { | 1202 if (GraphicsLayer* layer = layerForVerticalScrollbar()) { |
| 1213 if (!layer->drawsContent()) | 1203 if (!layer->drawsContent()) |
| 1214 return true; | 1204 return true; |
| 1215 } | 1205 } |
| 1216 | 1206 |
| 1217 if (GraphicsLayer* layer = layerForScrollCorner()) { | |
| 1218 if (!layer->drawsContent()) | |
| 1219 return true; | |
| 1220 } | |
| 1221 | |
| 1222 return false; | 1207 return false; |
| 1223 } | 1208 } |
| 1224 | 1209 |
| 1225 enum ApplyToGraphicsLayersModeFlags { | 1210 enum ApplyToGraphicsLayersModeFlags { |
| 1226 ApplyToCoreLayers = (1 << 0), | 1211 ApplyToCoreLayers = (1 << 0), |
| 1227 ApplyToSquashingLayer = (1 << 1), | 1212 ApplyToSquashingLayer = (1 << 1), |
| 1228 ApplyToScrollbarLayers = (1 << 2), | 1213 ApplyToScrollbarLayers = (1 << 2), |
| 1229 ApplyToBackgroundLayer = (1 << 3), | 1214 ApplyToBackgroundLayer = (1 << 3), |
| 1230 ApplyToMaskLayers = (1 << 4), | 1215 ApplyToMaskLayers = (1 << 4), |
| 1231 ApplyToContentLayers = (1 << 5), | 1216 ApplyToContentLayers = (1 << 5), |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1265 if (((mode & ApplyToMaskLayers) || (mode & ApplyToContentLayers)) && mapping
->childClippingMaskLayer()) | 1250 if (((mode & ApplyToMaskLayers) || (mode & ApplyToContentLayers)) && mapping
->childClippingMaskLayer()) |
| 1266 f(mapping->childClippingMaskLayer()); | 1251 f(mapping->childClippingMaskLayer()); |
| 1267 | 1252 |
| 1268 if (((mode & ApplyToBackgroundLayer) || (mode & ApplyToContentLayers)) && ma
pping->backgroundLayer()) | 1253 if (((mode & ApplyToBackgroundLayer) || (mode & ApplyToContentLayers)) && ma
pping->backgroundLayer()) |
| 1269 f(mapping->backgroundLayer()); | 1254 f(mapping->backgroundLayer()); |
| 1270 | 1255 |
| 1271 if ((mode & ApplyToScrollbarLayers) && mapping->layerForHorizontalScrollbar(
)) | 1256 if ((mode & ApplyToScrollbarLayers) && mapping->layerForHorizontalScrollbar(
)) |
| 1272 f(mapping->layerForHorizontalScrollbar()); | 1257 f(mapping->layerForHorizontalScrollbar()); |
| 1273 if ((mode & ApplyToScrollbarLayers) && mapping->layerForVerticalScrollbar()) | 1258 if ((mode & ApplyToScrollbarLayers) && mapping->layerForVerticalScrollbar()) |
| 1274 f(mapping->layerForVerticalScrollbar()); | 1259 f(mapping->layerForVerticalScrollbar()); |
| 1275 if ((mode & ApplyToScrollbarLayers) && mapping->layerForScrollCorner()) | |
| 1276 f(mapping->layerForScrollCorner()); | |
| 1277 } | 1260 } |
| 1278 | 1261 |
| 1279 struct UpdateRenderingContextFunctor { | 1262 struct UpdateRenderingContextFunctor { |
| 1280 void operator() (GraphicsLayer* layer) const { layer->setRenderingContext(re
nderingContext); } | 1263 void operator() (GraphicsLayer* layer) const { layer->setRenderingContext(re
nderingContext); } |
| 1281 int renderingContext; | 1264 int renderingContext; |
| 1282 }; | 1265 }; |
| 1283 | 1266 |
| 1284 void CompositedLayerMapping::updateRenderingContext() | 1267 void CompositedLayerMapping::updateRenderingContext() |
| 1285 { | 1268 { |
| 1286 // All layers but the squashing layer (which contains 'alien' content) shoul
d be included in this | 1269 // All layers but the squashing layer (which contains 'alien' content) shoul
d be included in this |
| (...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2057 // We have to use the same root as for hit testing, because both methods
can compute and cache clipRects. | 2040 // We have to use the same root as for hit testing, because both methods
can compute and cache clipRects. |
| 2058 doPaintTask(paintInfo, paintLayerFlags, &context, clip); | 2041 doPaintTask(paintInfo, paintLayerFlags, &context, clip); |
| 2059 } else if (graphicsLayer == m_squashingLayer.get()) { | 2042 } else if (graphicsLayer == m_squashingLayer.get()) { |
| 2060 ASSERT(compositor()->layerSquashingEnabled()); | 2043 ASSERT(compositor()->layerSquashingEnabled()); |
| 2061 for (size_t i = 0; i < m_squashedLayers.size(); ++i) | 2044 for (size_t i = 0; i < m_squashedLayers.size(); ++i) |
| 2062 doPaintTask(m_squashedLayers[i], paintLayerFlags, &context, clip); | 2045 doPaintTask(m_squashedLayers[i], paintLayerFlags, &context, clip); |
| 2063 } else if (graphicsLayer == layerForHorizontalScrollbar()) { | 2046 } else if (graphicsLayer == layerForHorizontalScrollbar()) { |
| 2064 paintScrollbar(m_owningLayer.scrollableArea()->horizontalScrollbar(), co
ntext, clip); | 2047 paintScrollbar(m_owningLayer.scrollableArea()->horizontalScrollbar(), co
ntext, clip); |
| 2065 } else if (graphicsLayer == layerForVerticalScrollbar()) { | 2048 } else if (graphicsLayer == layerForVerticalScrollbar()) { |
| 2066 paintScrollbar(m_owningLayer.scrollableArea()->verticalScrollbar(), cont
ext, clip); | 2049 paintScrollbar(m_owningLayer.scrollableArea()->verticalScrollbar(), cont
ext, clip); |
| 2067 } else if (graphicsLayer == layerForScrollCorner()) { | |
| 2068 const IntRect& scrollCornerAndResizer = m_owningLayer.scrollableArea()->
scrollCornerAndResizerRect(); | |
| 2069 context.save(); | |
| 2070 context.translate(-scrollCornerAndResizer.x(), -scrollCornerAndResizer.y
()); | |
| 2071 IntRect transformedClip = clip; | |
| 2072 transformedClip.moveBy(scrollCornerAndResizer.location()); | |
| 2073 m_owningLayer.scrollableArea()->paintScrollCorner(&context, IntPoint(),
transformedClip); | |
| 2074 m_owningLayer.scrollableArea()->paintResizer(&context, IntPoint(), trans
formedClip); | |
| 2075 context.restore(); | |
| 2076 } | 2050 } |
| 2077 #if ENABLE(ASSERT) | 2051 #if ENABLE(ASSERT) |
| 2078 if (Page* page = renderer()->frame()->page()) | 2052 if (Page* page = renderer()->frame()->page()) |
| 2079 page->setIsPainting(false); | 2053 page->setIsPainting(false); |
| 2080 #endif | 2054 #endif |
| 2081 } | 2055 } |
| 2082 | 2056 |
| 2083 bool CompositedLayerMapping::isTrackingPaintInvalidations() const | 2057 bool CompositedLayerMapping::isTrackingPaintInvalidations() const |
| 2084 { | 2058 { |
| 2085 GraphicsLayerClient* client = compositor(); | 2059 GraphicsLayerClient* client = compositor(); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2178 } else if (graphicsLayer == m_childTransformLayer.get()) { | 2152 } else if (graphicsLayer == m_childTransformLayer.get()) { |
| 2179 name = "Child Transform Layer"; | 2153 name = "Child Transform Layer"; |
| 2180 } else if (graphicsLayer == m_maskLayer.get()) { | 2154 } else if (graphicsLayer == m_maskLayer.get()) { |
| 2181 name = "Mask Layer"; | 2155 name = "Mask Layer"; |
| 2182 } else if (graphicsLayer == m_childClippingMaskLayer.get()) { | 2156 } else if (graphicsLayer == m_childClippingMaskLayer.get()) { |
| 2183 name = "Child Clipping Mask Layer"; | 2157 name = "Child Clipping Mask Layer"; |
| 2184 } else if (graphicsLayer == m_layerForHorizontalScrollbar.get()) { | 2158 } else if (graphicsLayer == m_layerForHorizontalScrollbar.get()) { |
| 2185 name = "Horizontal Scrollbar Layer"; | 2159 name = "Horizontal Scrollbar Layer"; |
| 2186 } else if (graphicsLayer == m_layerForVerticalScrollbar.get()) { | 2160 } else if (graphicsLayer == m_layerForVerticalScrollbar.get()) { |
| 2187 name = "Vertical Scrollbar Layer"; | 2161 name = "Vertical Scrollbar Layer"; |
| 2188 } else if (graphicsLayer == m_layerForScrollCorner.get()) { | |
| 2189 name = "Scroll Corner Layer"; | |
| 2190 } else if (graphicsLayer == m_overflowControlsHostLayer.get()) { | 2162 } else if (graphicsLayer == m_overflowControlsHostLayer.get()) { |
| 2191 name = "Overflow Controls Host Layer"; | 2163 name = "Overflow Controls Host Layer"; |
| 2192 } else if (graphicsLayer == m_overflowControlsClippingLayer.get()) { | 2164 } else if (graphicsLayer == m_overflowControlsClippingLayer.get()) { |
| 2193 name = "Overflow Controls ClipLayer Layer"; | 2165 name = "Overflow Controls ClipLayer Layer"; |
| 2194 } else if (graphicsLayer == m_scrollingLayer.get()) { | 2166 } else if (graphicsLayer == m_scrollingLayer.get()) { |
| 2195 name = "Scrolling Layer"; | 2167 name = "Scrolling Layer"; |
| 2196 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2168 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
| 2197 name = "Scrolling Contents Layer"; | 2169 name = "Scrolling Contents Layer"; |
| 2198 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { | 2170 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { |
| 2199 name = "Scrolling Block Selection Layer"; | 2171 name = "Scrolling Block Selection Layer"; |
| 2200 } else { | 2172 } else { |
| 2201 ASSERT_NOT_REACHED(); | 2173 ASSERT_NOT_REACHED(); |
| 2202 } | 2174 } |
| 2203 | 2175 |
| 2204 return name; | 2176 return name; |
| 2205 } | 2177 } |
| 2206 | 2178 |
| 2207 } // namespace blink | 2179 } // namespace blink |
| OLD | NEW |