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

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

Issue 1820483002: Untangle multicol coordinate space conversion from offsetFromContainer(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address code review comment. Created 4 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 bool isFixedPos = !isInline && style()->position() == FixedPosition; 858 bool isFixedPos = !isInline && style()->position() == FixedPosition;
859 bool hasTransform = !isInline && hasLayer() && layer()->transform(); 859 bool hasTransform = !isInline && hasLayer() && layer()->transform();
860 860
861 LayoutSize adjustmentForSkippedAncestor; 861 LayoutSize adjustmentForSkippedAncestor;
862 if (ancestorSkipped) { 862 if (ancestorSkipped) {
863 // There can't be a transform between paintInvalidationContainer and anc estorToStopAt, because transforms create containers, so it should be safe 863 // There can't be a transform between paintInvalidationContainer and anc estorToStopAt, because transforms create containers, so it should be safe
864 // to just subtract the delta between the ancestor and ancestorToStopAt. 864 // to just subtract the delta between the ancestor and ancestorToStopAt.
865 adjustmentForSkippedAncestor = -ancestorToStopAt->offsetFromAncestorCont ainer(container); 865 adjustmentForSkippedAncestor = -ancestorToStopAt->offsetFromAncestorCont ainer(container);
866 } 866 }
867 867
868 bool offsetDependsOnPoint = false; 868 LayoutSize containerOffset = offsetFromContainer(container);
869 LayoutSize containerOffset = offsetFromContainer(container, LayoutPoint(), & offsetDependsOnPoint); 869 bool offsetDependsOnPoint;
870 if (container->isLayoutFlowThread()) {
871 containerOffset += container->columnOffset(toLayoutPoint(containerOffset ));
872 offsetDependsOnPoint = true;
873 } else {
874 offsetDependsOnPoint = container->style()->isFlippedBlocksWritingMode() && container->isBox();
875 }
870 876
871 bool preserve3D = container->style()->preserves3D() || style()->preserves3D( ); 877 bool preserve3D = container->style()->preserves3D() || style()->preserves3D( );
872 GeometryInfoFlags flags = 0; 878 GeometryInfoFlags flags = 0;
873 if (preserve3D) 879 if (preserve3D)
874 flags |= AccumulatingTransform; 880 flags |= AccumulatingTransform;
875 if (offsetDependsOnPoint) 881 if (offsetDependsOnPoint)
876 flags |= IsNonUniform; 882 flags |= IsNonUniform;
877 if (isFixedPos) 883 if (isFixedPos)
878 flags |= IsFixedPosition; 884 flags |= IsFixedPosition;
879 if (hasTransform) 885 if (hasTransform)
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 if (rootElementStyle->hasBackground()) 966 if (rootElementStyle->hasBackground())
961 return false; 967 return false;
962 968
963 if (node() != document().firstBodyElement()) 969 if (node() != document().firstBodyElement())
964 return false; 970 return false;
965 971
966 return true; 972 return true;
967 } 973 }
968 974
969 } // namespace blink 975 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutInline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698