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

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

Issue 2328633003: A container of out-of-flow positioned descendants should be an offsetParent. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/dom/Element/offset-parent-will-change.html ('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) 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. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 2938 matching lines...) Expand 10 before | Expand all | Expand 10 after
2949 // TODO(kochi): If |base| or |node| is nested deep in shadow roots, this loop may 2949 // TODO(kochi): If |base| or |node| is nested deep in shadow roots, this loop may
2950 // get expensive, as isUnclosedNodeOf() can take up to O(N+M) time (N an d M are depths). 2950 // get expensive, as isUnclosedNodeOf() can take up to O(N+M) time (N an d M are depths).
2951 if (base && (node->isClosedShadowHiddenFrom(*base) || (node->isInShadowT ree() && node->containingShadowRoot()->type() == ShadowRootType::UserAgent))) { 2951 if (base && (node->isClosedShadowHiddenFrom(*base) || (node->isInShadowT ree() && node->containingShadowRoot()->type() == ShadowRootType::UserAgent))) {
2952 // If 'position: fixed' node is found while traversing up, terminate the loop and 2952 // If 'position: fixed' node is found while traversing up, terminate the loop and
2953 // return null. 2953 // return null.
2954 if (ancestor->isFixedPositioned()) 2954 if (ancestor->isFixedPositioned())
2955 return nullptr; 2955 return nullptr;
2956 continue; 2956 continue;
2957 } 2957 }
2958 2958
2959 if (ancestor->isPositioned()) 2959 if (ancestor->canContainAbsolutePositionObjects())
2960 break; 2960 break;
2961 2961
2962 if (isHTMLBodyElement(*node)) 2962 if (isHTMLBodyElement(*node))
2963 break; 2963 break;
2964 2964
2965 if (!isPositioned() && (isHTMLTableElement(*node) || isHTMLTableCellElem ent(*node))) 2965 if (!isPositioned() && (isHTMLTableElement(*node) || isHTMLTableCellElem ent(*node)))
2966 break; 2966 break;
2967 2967
2968 // Webkit specific extension where offsetParent stops at zoom level chan ges. 2968 // Webkit specific extension where offsetParent stops at zoom level chan ges.
2969 if (effectiveZoom != ancestor->style()->effectiveZoom()) 2969 if (effectiveZoom != ancestor->style()->effectiveZoom())
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
3269 const blink::LayoutObject* root = object1; 3269 const blink::LayoutObject* root = object1;
3270 while (root->parent()) 3270 while (root->parent())
3271 root = root->parent(); 3271 root = root->parent();
3272 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3272 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3273 } else { 3273 } else {
3274 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3274 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3275 } 3275 }
3276 } 3276 }
3277 3277
3278 #endif 3278 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/dom/Element/offset-parent-will-change.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698