| 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 2280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2291 } else { | 2291 } else { |
| 2292 ASSERT(graphicsLayer == m_graphicsLayer.get() || graphicsLayer == m_scro
llingContentsLayer.get()); | 2292 ASSERT(graphicsLayer == m_graphicsLayer.get() || graphicsLayer == m_scro
llingContentsLayer.get()); |
| 2293 anchorLayoutObject = m_owningLayer.layoutObject(); | 2293 anchorLayoutObject = m_owningLayer.layoutObject(); |
| 2294 offsetFromAnchorLayoutObject = graphicsLayer->offsetFromLayoutObject(); | 2294 offsetFromAnchorLayoutObject = graphicsLayer->offsetFromLayoutObject(); |
| 2295 adjustForCompositedScrolling(graphicsLayer, offsetFromAnchorLayoutObject
); | 2295 adjustForCompositedScrolling(graphicsLayer, offsetFromAnchorLayoutObject
); |
| 2296 } | 2296 } |
| 2297 | 2297 |
| 2298 // Start with the bounds of the graphics layer in the space of the anchor La
youtObject. | 2298 // Start with the bounds of the graphics layer in the space of the anchor La
youtObject. |
| 2299 FloatRect graphicsLayerBoundsInObjectSpace(graphicsLayerBounds); | 2299 FloatRect graphicsLayerBoundsInObjectSpace(graphicsLayerBounds); |
| 2300 graphicsLayerBoundsInObjectSpace.move(offsetFromAnchorLayoutObject); | 2300 graphicsLayerBoundsInObjectSpace.move(offsetFromAnchorLayoutObject); |
| 2301 // The object space means including writing mode flip. | |
| 2302 if (anchorLayoutObject->isBox()) | |
| 2303 toLayoutBox(anchorLayoutObject)->flipForWritingMode(graphicsLayerBoundsI
nObjectSpace); | |
| 2304 | 2301 |
| 2305 // Now map the bounds to its visible content rect in screen space, including
applying clips along the way. | 2302 // Now map the bounds to its visible content rect in screen space, including
applying clips along the way. |
| 2306 LayoutRect visibleContentRect(graphicsLayerBoundsInObjectSpace); | 2303 LayoutRect visibleContentRect(graphicsLayerBoundsInObjectSpace); |
| 2307 LayoutView* rootView = anchorLayoutObject->view(); | 2304 LayoutView* rootView = anchorLayoutObject->view(); |
| 2308 while (rootView->frame()->ownerLayoutObject()) | 2305 while (rootView->frame()->ownerLayoutObject()) |
| 2309 rootView = rootView->frame()->ownerLayoutObject()->view(); | 2306 rootView = rootView->frame()->ownerLayoutObject()->view(); |
| 2310 anchorLayoutObject->mapToVisualRectInAncestorSpace(rootView, visibleContentR
ect); | 2307 anchorLayoutObject->mapToVisualRectInAncestorSpace(rootView, visibleContentR
ect); |
| 2311 visibleContentRect.intersect(LayoutRect(rootView->frameView()->visibleConten
tRect())); | 2308 visibleContentRect.intersect(LayoutRect(rootView->frameView()->visibleConten
tRect())); |
| 2312 | 2309 |
| 2313 IntRect enclosingGraphicsLayerBounds(enclosingIntRect(graphicsLayerBounds)); | 2310 IntRect enclosingGraphicsLayerBounds(enclosingIntRect(graphicsLayerBounds)); |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2669 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2666 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
| 2670 name = "Scrolling Contents Layer"; | 2667 name = "Scrolling Contents Layer"; |
| 2671 } else { | 2668 } else { |
| 2672 ASSERT_NOT_REACHED(); | 2669 ASSERT_NOT_REACHED(); |
| 2673 } | 2670 } |
| 2674 | 2671 |
| 2675 return name; | 2672 return name; |
| 2676 } | 2673 } |
| 2677 | 2674 |
| 2678 } // namespace blink | 2675 } // namespace blink |
| OLD | NEW |