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 2206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2217 graphicsLayerBoundsInObjectSpace.move(offsetFromAnchorLayoutObject); | 2217 graphicsLayerBoundsInObjectSpace.move(offsetFromAnchorLayoutObject); |
2218 // The object space means including writing mode flip. | 2218 // The object space means including writing mode flip. |
2219 if (anchorLayoutObject->isBox()) | 2219 if (anchorLayoutObject->isBox()) |
2220 toLayoutBox(anchorLayoutObject)->flipForWritingMode(graphicsLayerBoundsI
nObjectSpace); | 2220 toLayoutBox(anchorLayoutObject)->flipForWritingMode(graphicsLayerBoundsI
nObjectSpace); |
2221 | 2221 |
2222 // Now map the bounds to its visible content rect in screen space, including
applying clips along the way. | 2222 // Now map the bounds to its visible content rect in screen space, including
applying clips along the way. |
2223 LayoutRect visibleContentRect(graphicsLayerBoundsInObjectSpace); | 2223 LayoutRect visibleContentRect(graphicsLayerBoundsInObjectSpace); |
2224 LayoutView* rootView = anchorLayoutObject->view(); | 2224 LayoutView* rootView = anchorLayoutObject->view(); |
2225 while (rootView->frame()->ownerLayoutObject()) | 2225 while (rootView->frame()->ownerLayoutObject()) |
2226 rootView = rootView->frame()->ownerLayoutObject()->view(); | 2226 rootView = rootView->frame()->ownerLayoutObject()->view(); |
2227 anchorLayoutObject->mapToVisibleRectInAncestorSpace(rootView, visibleContent
Rect, 0); | 2227 anchorLayoutObject->mapToVisibleRectInAncestorSpace(rootView, visibleContent
Rect, 0, false); |
2228 visibleContentRect.intersect(LayoutRect(rootView->frameView()->visibleConten
tRect())); | 2228 visibleContentRect.intersect(LayoutRect(rootView->frameView()->visibleConten
tRect())); |
2229 | 2229 |
2230 IntRect enclosingGraphicsLayerBounds(enclosingIntRect(graphicsLayerBounds)); | 2230 IntRect enclosingGraphicsLayerBounds(enclosingIntRect(graphicsLayerBounds)); |
2231 | 2231 |
2232 // Map the visible content rect from screen space to local graphics layer sp
ace. | 2232 // Map the visible content rect from screen space to local graphics layer sp
ace. |
2233 IntRect localInterestRect; | 2233 IntRect localInterestRect; |
2234 // If the visible content rect is empty, then it makes no sense to map it ba
ck since there is nothing to map. | 2234 // If the visible content rect is empty, then it makes no sense to map it ba
ck since there is nothing to map. |
2235 if (!visibleContentRect.isEmpty()) { | 2235 if (!visibleContentRect.isEmpty()) { |
2236 localInterestRect = anchorLayoutObject->absoluteToLocalQuad(FloatRect(vi
sibleContentRect), UseTransforms | TraverseDocumentBoundaries).enclosingBounding
Box(); | 2236 localInterestRect = anchorLayoutObject->absoluteToLocalQuad(FloatRect(vi
sibleContentRect), UseTransforms | TraverseDocumentBoundaries).enclosingBounding
Box(); |
2237 localInterestRect.move(-offsetFromAnchorLayoutObject); | 2237 localInterestRect.move(-offsetFromAnchorLayoutObject); |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2543 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2543 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
2544 name = "Scrolling Contents Layer"; | 2544 name = "Scrolling Contents Layer"; |
2545 } else { | 2545 } else { |
2546 ASSERT_NOT_REACHED(); | 2546 ASSERT_NOT_REACHED(); |
2547 } | 2547 } |
2548 | 2548 |
2549 return name; | 2549 return name; |
2550 } | 2550 } |
2551 | 2551 |
2552 } // namespace blink | 2552 } // namespace blink |
OLD | NEW |