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

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

Issue 2073563002: Rework mapToVisualRectInAncestorSpace to handle flipped blocks correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix flipped blocks for tables. Created 4 years, 5 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 | « third_party/WebKit/Source/core/layout/VisualRectMappingTest.cpp ('k') | no next file » | 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 2281 matching lines...) Expand 10 before | Expand all | Expand 10 after
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. 2301 // The object space means including writing mode flip.
2302 if (anchorLayoutObject->isBox()) 2302 if (anchorLayoutObject->isBox() && !anchorLayoutObject->isLayoutView())
chrishtr 2016/07/08 19:54:51 Why this change?
wkorman 2016/07/08 23:55:50 Good point, it looks like perhaps we can as you su
2303 toLayoutBox(anchorLayoutObject)->flipForWritingMode(graphicsLayerBoundsI nObjectSpace); 2303 toLayoutBox(anchorLayoutObject)->flipForWritingMode(graphicsLayerBoundsI nObjectSpace);
2304 2304
2305 // Now map the bounds to its visible content rect in screen space, including applying clips along the way. 2305 // Now map the bounds to its visible content rect in screen space, including applying clips along the way.
2306 LayoutRect visibleContentRect(graphicsLayerBoundsInObjectSpace); 2306 LayoutRect visibleContentRect(graphicsLayerBoundsInObjectSpace);
2307 LayoutView* rootView = anchorLayoutObject->view(); 2307 LayoutView* rootView = anchorLayoutObject->view();
2308 while (rootView->frame()->ownerLayoutObject()) 2308 while (rootView->frame()->ownerLayoutObject())
2309 rootView = rootView->frame()->ownerLayoutObject()->view(); 2309 rootView = rootView->frame()->ownerLayoutObject()->view();
2310 anchorLayoutObject->mapToVisualRectInAncestorSpace(rootView, visibleContentR ect); 2310 anchorLayoutObject->mapToVisualRectInAncestorSpace(rootView, visibleContentR ect);
2311 visibleContentRect.intersect(LayoutRect(rootView->frameView()->visibleConten tRect())); 2311 visibleContentRect.intersect(LayoutRect(rootView->frameView()->visibleConten tRect()));
2312 2312
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
2669 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { 2669 } else if (graphicsLayer == m_scrollingContentsLayer.get()) {
2670 name = "Scrolling Contents Layer"; 2670 name = "Scrolling Contents Layer";
2671 } else { 2671 } else {
2672 ASSERT_NOT_REACHED(); 2672 ASSERT_NOT_REACHED();
2673 } 2673 }
2674 2674
2675 return name; 2675 return name;
2676 } 2676 }
2677 2677
2678 } // namespace blink 2678 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/VisualRectMappingTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698