| 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 2253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2264 ASSERT(graphicsLayer == m_graphicsLayer.get() || graphicsLayer == m_scro
llingContentsLayer.get()); | 2264 ASSERT(graphicsLayer == m_graphicsLayer.get() || graphicsLayer == m_scro
llingContentsLayer.get()); |
| 2265 anchorLayoutObject = m_owningLayer.layoutObject(); | 2265 anchorLayoutObject = m_owningLayer.layoutObject(); |
| 2266 offsetFromAnchorLayoutObject = graphicsLayer->offsetFromLayoutObject(); | 2266 offsetFromAnchorLayoutObject = graphicsLayer->offsetFromLayoutObject(); |
| 2267 adjustForCompositedScrolling(graphicsLayer, offsetFromAnchorLayoutObject
); | 2267 adjustForCompositedScrolling(graphicsLayer, offsetFromAnchorLayoutObject
); |
| 2268 } | 2268 } |
| 2269 | 2269 |
| 2270 // Start with the bounds of the graphics layer in the space of the anchor La
youtObject. | 2270 // Start with the bounds of the graphics layer in the space of the anchor La
youtObject. |
| 2271 FloatRect graphicsLayerBoundsInObjectSpace(graphicsLayerBounds); | 2271 FloatRect graphicsLayerBoundsInObjectSpace(graphicsLayerBounds); |
| 2272 graphicsLayerBoundsInObjectSpace.move(offsetFromAnchorLayoutObject); | 2272 graphicsLayerBoundsInObjectSpace.move(offsetFromAnchorLayoutObject); |
| 2273 // The object space means including writing mode flip. | 2273 // The object space means including writing mode flip. |
| 2274 if (anchorLayoutObject->isBox()) | 2274 if (anchorLayoutObject->isBox() && !anchorLayoutObject->isLayoutView()) |
| 2275 toLayoutBox(anchorLayoutObject)->flipForWritingMode(graphicsLayerBoundsI
nObjectSpace); | 2275 toLayoutBox(anchorLayoutObject)->flipForWritingMode(graphicsLayerBoundsI
nObjectSpace); |
| 2276 | 2276 |
| 2277 // Now map the bounds to its visible content rect in screen space, including
applying clips along the way. | 2277 // Now map the bounds to its visible content rect in screen space, including
applying clips along the way. |
| 2278 LayoutRect visibleContentRect(graphicsLayerBoundsInObjectSpace); | 2278 LayoutRect visibleContentRect(graphicsLayerBoundsInObjectSpace); |
| 2279 LayoutView* rootView = anchorLayoutObject->view(); | 2279 LayoutView* rootView = anchorLayoutObject->view(); |
| 2280 while (rootView->frame()->ownerLayoutObject()) | 2280 while (rootView->frame()->ownerLayoutObject()) |
| 2281 rootView = rootView->frame()->ownerLayoutObject()->view(); | 2281 rootView = rootView->frame()->ownerLayoutObject()->view(); |
| 2282 anchorLayoutObject->mapToVisualRectInAncestorSpace(rootView, visibleContentR
ect); | 2282 anchorLayoutObject->mapToVisualRectInAncestorSpace(rootView, visibleContentR
ect); |
| 2283 visibleContentRect.intersect(LayoutRect(rootView->frameView()->visibleConten
tRect())); | 2283 visibleContentRect.intersect(LayoutRect(rootView->frameView()->visibleConten
tRect())); |
| 2284 | 2284 |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2641 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2641 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
| 2642 name = "Scrolling Contents Layer"; | 2642 name = "Scrolling Contents Layer"; |
| 2643 } else { | 2643 } else { |
| 2644 ASSERT_NOT_REACHED(); | 2644 ASSERT_NOT_REACHED(); |
| 2645 } | 2645 } |
| 2646 | 2646 |
| 2647 return name; | 2647 return name; |
| 2648 } | 2648 } |
| 2649 | 2649 |
| 2650 } // namespace blink | 2650 } // namespace blink |
| OLD | NEW |