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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 1955703004: Don't apply container flip when computing offset to transformed ancestor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/LayoutObject.h ('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) 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 886 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 PaintLayer* curr = parent(); 897 PaintLayer* curr = parent();
898 while (curr && !curr->isRootLayer() && !curr->layoutObject()->hasTransformRe latedProperty()) 898 while (curr && !curr->isRootLayer() && !curr->layoutObject()->hasTransformRe latedProperty())
899 curr = curr->parent(); 899 curr = curr->parent();
900 900
901 return curr; 901 return curr;
902 } 902 }
903 903
904 LayoutPoint PaintLayer::computeOffsetFromTransformedAncestor() const 904 LayoutPoint PaintLayer::computeOffsetFromTransformedAncestor() const
905 { 905 {
906 TransformState transformState(TransformState::ApplyTransformDirection, Float Point()); 906 TransformState transformState(TransformState::ApplyTransformDirection, Float Point());
907 // FIXME: add a test that checks flipped writing mode and ApplyContainerFlip are correct. 907 layoutObject()->mapLocalToAncestor(transformAncestor() ? transformAncestor() ->layoutObject() : nullptr, transformState, 0);
908 layoutObject()->mapLocalToAncestor(transformAncestor() ? transformAncestor() ->layoutObject() : nullptr, transformState, ApplyContainerFlip);
909 transformState.flatten(); 908 transformState.flatten();
910 return LayoutPoint(transformState.lastPlanarPoint()); 909 return LayoutPoint(transformState.lastPlanarPoint());
911 } 910 }
912 911
913 PaintLayer* PaintLayer::compositingContainer() const 912 PaintLayer* PaintLayer::compositingContainer() const
914 { 913 {
915 if (!stackingNode()->isStacked()) 914 if (!stackingNode()->isStacked())
916 return parent(); 915 return parent();
917 if (PaintLayerStackingNode* ancestorStackingNode = stackingNode()->ancestorS tackingContextNode()) 916 if (PaintLayerStackingNode* ancestorStackingNode = stackingNode()->ancestorS tackingContextNode())
918 return ancestorStackingNode->layer(); 917 return ancestorStackingNode->layer();
(...skipping 1994 matching lines...) Expand 10 before | Expand all | Expand 10 after
2913 2912
2914 void showLayerTree(const blink::LayoutObject* layoutObject) 2913 void showLayerTree(const blink::LayoutObject* layoutObject)
2915 { 2914 {
2916 if (!layoutObject) { 2915 if (!layoutObject) {
2917 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2916 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2918 return; 2917 return;
2919 } 2918 }
2920 showLayerTree(layoutObject->enclosingLayer()); 2919 showLayerTree(layoutObject->enclosingLayer());
2921 } 2920 }
2922 #endif 2921 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698