Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 1640363003: Account for writing-mode flip of the composited element for interest rects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2238 matching lines...) Expand 10 before | Expand all | Expand 10 after
2249 offsetFromAnchorLayoutObject = m_squashedLayers[0].offsetFromLayoutObjec t; 2249 offsetFromAnchorLayoutObject = m_squashedLayers[0].offsetFromLayoutObjec t;
2250 } else { 2250 } else {
2251 ASSERT(graphicsLayer == m_graphicsLayer || graphicsLayer == m_scrollingC ontentsLayer); 2251 ASSERT(graphicsLayer == m_graphicsLayer || graphicsLayer == m_scrollingC ontentsLayer);
2252 anchorLayoutObject = m_owningLayer.layoutObject(); 2252 anchorLayoutObject = m_owningLayer.layoutObject();
2253 offsetFromAnchorLayoutObject = graphicsLayer->offsetFromLayoutObject(); 2253 offsetFromAnchorLayoutObject = graphicsLayer->offsetFromLayoutObject();
2254 } 2254 }
2255 2255
2256 // Start with the bounds of the graphics layer in the space of the anchor La youtObject. 2256 // Start with the bounds of the graphics layer in the space of the anchor La youtObject.
2257 FloatRect graphicsLayerBoundsInObjectSpace(graphicsLayerBounds); 2257 FloatRect graphicsLayerBoundsInObjectSpace(graphicsLayerBounds);
2258 graphicsLayerBoundsInObjectSpace.move(offsetFromAnchorLayoutObject); 2258 graphicsLayerBoundsInObjectSpace.move(offsetFromAnchorLayoutObject);
2259 // The object space means including writing mode flip.
2260 if (anchorLayoutObject->isBox())
2261 toLayoutBox(anchorLayoutObject)->flipForWritingMode(graphicsLayerBoundsI nObjectSpace);
2259 2262
2260 // Now map the bounds to its visible content rect in screen space, including applying clips along the way. 2263 // Now map the bounds to its visible content rect in screen space, including applying clips along the way.
2261 LayoutRect visibleContentRect(graphicsLayerBoundsInObjectSpace); 2264 LayoutRect visibleContentRect(graphicsLayerBoundsInObjectSpace);
2262 LayoutView* rootView = anchorLayoutObject->view(); 2265 LayoutView* rootView = anchorLayoutObject->view();
2263 while (rootView->frame()->ownerLayoutObject()) 2266 while (rootView->frame()->ownerLayoutObject())
2264 rootView = rootView->frame()->ownerLayoutObject()->view(); 2267 rootView = rootView->frame()->ownerLayoutObject()->view();
2265 anchorLayoutObject->mapToVisibleRectInAncestorSpace(rootView, visibleContent Rect, 0); 2268 anchorLayoutObject->mapToVisibleRectInAncestorSpace(rootView, visibleContent Rect, 0);
2266 visibleContentRect.intersect(LayoutRect(rootView->frameView()->visibleConten tRect())); 2269 visibleContentRect.intersect(LayoutRect(rootView->frameView()->visibleConten tRect()));
2267 2270
2268 // Map the visible content rect from screen space to local graphics layer sp ace. 2271 // Map the visible content rect from screen space to local graphics layer sp ace.
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
2582 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { 2585 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) {
2583 name = "Scrolling Block Selection Layer"; 2586 name = "Scrolling Block Selection Layer";
2584 } else { 2587 } else {
2585 ASSERT_NOT_REACHED(); 2588 ASSERT_NOT_REACHED();
2586 } 2589 }
2587 2590
2588 return name; 2591 return name;
2589 } 2592 }
2590 2593
2591 } // namespace blink 2594 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698