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/LayoutObject.cpp

Issue 2636253002: Handle nested position:sticky elements (Closed)
Patch Set: Remove accidental leftover whitespace Created 3 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
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) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2009 Google Inc. All rights reserved. 8 * Copyright (C) 2009 Google Inc. All rights reserved.
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 2055 matching lines...) Expand 10 before | Expand all | Expand 10 after
2066 IntPoint centerPoint = roundedIntPoint(transformState.mappedPoint()); 2066 IntPoint centerPoint = roundedIntPoint(transformState.mappedPoint());
2067 transformState.move(toLayoutBox(container)->flipForWritingMode( 2067 transformState.move(toLayoutBox(container)->flipForWritingMode(
2068 LayoutPoint(centerPoint)) - 2068 LayoutPoint(centerPoint)) -
2069 centerPoint); 2069 centerPoint);
2070 } 2070 }
2071 mode &= ~ApplyContainerFlip; 2071 mode &= ~ApplyContainerFlip;
2072 } 2072 }
2073 } 2073 }
2074 2074
2075 LayoutSize containerOffset = offsetFromContainer(container); 2075 LayoutSize containerOffset = offsetFromContainer(container);
2076 if (isBoxModelObject() && isStickyPositioned() && (mode & IgnoreSticky)) {
2077 containerOffset -= toLayoutBoxModelObject(this)->offsetForInFlowPosition();
flackr 2017/01/31 18:33:00 It is a little unfortunate to calculate this offse
smcgruer 2017/01/31 20:42:16 Done.
2078 }
2079
2076 if (isLayoutFlowThread()) { 2080 if (isLayoutFlowThread()) {
2077 // So far the point has been in flow thread coordinates (i.e. as if 2081 // So far the point has been in flow thread coordinates (i.e. as if
2078 // everything in the fragmentation context lived in one tall single column). 2082 // everything in the fragmentation context lived in one tall single column).
2079 // Convert it to a visual point now, since we're about to escape the flow 2083 // Convert it to a visual point now, since we're about to escape the flow
2080 // thread. 2084 // thread.
2081 containerOffset += columnOffset(LayoutPoint(transformState.mappedPoint())); 2085 containerOffset += columnOffset(LayoutPoint(transformState.mappedPoint()));
2082 } 2086 }
2083 2087
2084 // Text objects just copy their parent's computed style, so we need to ignore 2088 // Text objects just copy their parent's computed style, so we need to ignore
2085 // them. 2089 // them.
(...skipping 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after
3492 const blink::LayoutObject* root = object1; 3496 const blink::LayoutObject* root = object1;
3493 while (root->parent()) 3497 while (root->parent())
3494 root = root->parent(); 3498 root = root->parent();
3495 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3499 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3496 } else { 3500 } else {
3497 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3501 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3498 } 3502 }
3499 } 3503 }
3500 3504
3501 #endif 3505 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698