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

Side by Side Diff: Source/core/paint/DeprecatedPaintLayer.cpp

Issue 1316163002: Make the LayoutRect->FloatRect constructor explicit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 1543 matching lines...) Expand 10 before | Expand all | Expand 10 after
1554 { 1554 {
1555 RefPtr<HitTestingTransformState> transformState; 1555 RefPtr<HitTestingTransformState> transformState;
1556 LayoutPoint offset; 1556 LayoutPoint offset;
1557 if (containerTransformState) { 1557 if (containerTransformState) {
1558 // If we're already computing transform state, then it's relative to the container (which we know is non-null). 1558 // If we're already computing transform state, then it's relative to the container (which we know is non-null).
1559 transformState = HitTestingTransformState::create(*containerTransformSta te); 1559 transformState = HitTestingTransformState::create(*containerTransformSta te);
1560 convertToLayerCoords(containerLayer, offset); 1560 convertToLayerCoords(containerLayer, offset);
1561 } else { 1561 } else {
1562 // If this is the first time we need to make transform state, then base it off of hitTestLocation, 1562 // If this is the first time we need to make transform state, then base it off of hitTestLocation,
1563 // which is relative to rootLayer. 1563 // which is relative to rootLayer.
1564 transformState = HitTestingTransformState::create(hitTestLocation.transf ormedPoint(), hitTestLocation.transformedRect(), FloatQuad(hitTestRect)); 1564 transformState = HitTestingTransformState::create(hitTestLocation.transf ormedPoint(), hitTestLocation.transformedRect(), FloatQuad(FloatRect(hitTestRect )));
1565 convertToLayerCoords(rootLayer, offset); 1565 convertToLayerCoords(rootLayer, offset);
1566 } 1566 }
1567 offset.moveBy(translationOffset); 1567 offset.moveBy(translationOffset);
1568 1568
1569 LayoutObject* containerLayoutObject = containerLayer ? containerLayer->layou tObject() : 0; 1569 LayoutObject* containerLayoutObject = containerLayer ? containerLayer->layou tObject() : 0;
1570 if (layoutObject()->shouldUseTransformFromContainer(containerLayoutObject)) { 1570 if (layoutObject()->shouldUseTransformFromContainer(containerLayoutObject)) {
1571 TransformationMatrix containerTransform; 1571 TransformationMatrix containerTransform;
1572 layoutObject()->getTransformFromContainer(containerLayoutObject, toLayou tSize(offset), containerTransform); 1572 layoutObject()->getTransformFromContainer(containerLayoutObject, toLayou tSize(offset), containerTransform);
1573 transformState->applyTransform(containerTransform, HitTestingTransformSt ate::AccumulateTransform); 1573 transformState->applyTransform(containerTransform, HitTestingTransformSt ate::AccumulateTransform);
1574 } else { 1574 } else {
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
2158 if (isRootLayer()) 2158 if (isRootLayer())
2159 return LayoutRect(m_layoutObject->view()->unscaledDocumentRect()); 2159 return LayoutRect(m_layoutObject->view()->unscaledDocumentRect());
2160 2160
2161 // The layer created for the LayoutFlowThread is just a helper for painting and hit-testing, 2161 // The layer created for the LayoutFlowThread is just a helper for painting and hit-testing,
2162 // and should not contribute to the bounding box. The LayoutMultiColumnSets will contribute 2162 // and should not contribute to the bounding box. The LayoutMultiColumnSets will contribute
2163 // the correct size for the layout content of the multicol container. 2163 // the correct size for the layout content of the multicol container.
2164 if (layoutObject()->isLayoutFlowThread()) 2164 if (layoutObject()->isLayoutFlowThread())
2165 return LayoutRect(); 2165 return LayoutRect();
2166 2166
2167 LayoutRect result = clipper().localClipRect(); 2167 LayoutRect result = clipper().localClipRect();
2168 if (result == LayoutRect::infiniteIntRect()) { 2168 if (IntRect(result) == LayoutRect::infiniteIntRect()) {
jbroman 2015/08/26 19:06:43 I don't know what this method is doing right now,
chrishtr 2015/08/26 20:53:51 Fixed this, and the one I already committed that w
2169 LayoutPoint origin; 2169 LayoutPoint origin;
2170 result = physicalBoundingBox(ancestorLayer, &origin); 2170 result = physicalBoundingBox(ancestorLayer, &origin);
2171 2171
2172 const_cast<DeprecatedPaintLayer*>(this)->stackingNode()->updateLayerList sIfNeeded(); 2172 const_cast<DeprecatedPaintLayer*>(this)->stackingNode()->updateLayerList sIfNeeded();
2173 2173
2174 // Reflections are implemented with Layers that hang off of the reflecte d layer. However, 2174 // Reflections are implemented with Layers that hang off of the reflecte d layer. However,
2175 // the reflection layer subtree does not include the subtree of the pare nt Layer, so 2175 // the reflection layer subtree does not include the subtree of the pare nt Layer, so
2176 // a recursive computation of stacking children yields no results. This breaks cases when there are stacking 2176 // a recursive computation of stacking children yields no results. This breaks cases when there are stacking
2177 // children of the parent, that need to be included in reflected composi ted bounds. 2177 // children of the parent, that need to be included in reflected composi ted bounds.
2178 // Fix this by including composited bounds of stacking children of the r eflected Layer. 2178 // Fix this by including composited bounds of stacking children of the r eflected Layer.
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
2671 2671
2672 void showLayerTree(const blink::LayoutObject* layoutObject) 2672 void showLayerTree(const blink::LayoutObject* layoutObject)
2673 { 2673 {
2674 if (!layoutObject) { 2674 if (!layoutObject) {
2675 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2675 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2676 return; 2676 return;
2677 } 2677 }
2678 showLayerTree(layoutObject->enclosingLayer()); 2678 showLayerTree(layoutObject->enclosingLayer());
2679 } 2679 }
2680 #endif 2680 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698