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 2269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2280 | 2280 |
2281 // Start with the bounds of the graphics layer in the space of the anchor La
youtObject. | 2281 // Start with the bounds of the graphics layer in the space of the anchor La
youtObject. |
2282 FloatRect graphicsLayerBoundsInObjectSpace(graphicsLayerBounds); | 2282 FloatRect graphicsLayerBoundsInObjectSpace(graphicsLayerBounds); |
2283 graphicsLayerBoundsInObjectSpace.move(offsetFromAnchorLayoutObject); | 2283 graphicsLayerBoundsInObjectSpace.move(offsetFromAnchorLayoutObject); |
2284 | 2284 |
2285 // Now map the bounds to its visible content rect in screen space, including
applying clips along the way. | 2285 // Now map the bounds to its visible content rect in screen space, including
applying clips along the way. |
2286 LayoutRect visibleContentRect(graphicsLayerBoundsInObjectSpace); | 2286 LayoutRect visibleContentRect(graphicsLayerBoundsInObjectSpace); |
2287 LayoutView* rootView = anchorLayoutObject->view(); | 2287 LayoutView* rootView = anchorLayoutObject->view(); |
2288 while (rootView->frame()->ownerLayoutObject()) | 2288 while (rootView->frame()->ownerLayoutObject()) |
2289 rootView = rootView->frame()->ownerLayoutObject()->view(); | 2289 rootView = rootView->frame()->ownerLayoutObject()->view(); |
2290 anchorLayoutObject->mapRectToPaintInvalidationBacking(rootView, visibleConte
ntRect, 0); | 2290 anchorLayoutObject->mapToVisibleRectInContainerSpace(rootView, visibleConten
tRect, 0); |
2291 visibleContentRect.intersect(LayoutRect(rootView->frameView()->visibleConten
tRect())); | 2291 visibleContentRect.intersect(LayoutRect(rootView->frameView()->visibleConten
tRect())); |
2292 | 2292 |
2293 // Map the visible content rect from screen space to local graphics layer sp
ace. | 2293 // Map the visible content rect from screen space to local graphics layer sp
ace. |
2294 IntRect localInterestRect; | 2294 IntRect localInterestRect; |
2295 // If the visible content rect is empty, then it makes no sense to map it ba
ck since there is nothing to map. | 2295 // If the visible content rect is empty, then it makes no sense to map it ba
ck since there is nothing to map. |
2296 if (!visibleContentRect.isEmpty()) { | 2296 if (!visibleContentRect.isEmpty()) { |
2297 localInterestRect = anchorLayoutObject->absoluteToLocalQuad(FloatRect(vi
sibleContentRect), UseTransforms | TraverseDocumentBoundaries).enclosingBounding
Box(); | 2297 localInterestRect = anchorLayoutObject->absoluteToLocalQuad(FloatRect(vi
sibleContentRect), UseTransforms | TraverseDocumentBoundaries).enclosingBounding
Box(); |
2298 localInterestRect.move(-offsetFromAnchorLayoutObject); | 2298 localInterestRect.move(-offsetFromAnchorLayoutObject); |
2299 } | 2299 } |
2300 // Expand by interest rect padding amount. | 2300 // Expand by interest rect padding amount. |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2602 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { | 2602 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { |
2603 name = "Scrolling Block Selection Layer"; | 2603 name = "Scrolling Block Selection Layer"; |
2604 } else { | 2604 } else { |
2605 ASSERT_NOT_REACHED(); | 2605 ASSERT_NOT_REACHED(); |
2606 } | 2606 } |
2607 | 2607 |
2608 return name; | 2608 return name; |
2609 } | 2609 } |
2610 | 2610 |
2611 } // namespace blink | 2611 } // namespace blink |
OLD | NEW |