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

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

Issue 2072473003: Change CSS containment should invalidate layout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: correct LayoutObject::canContainAbsolutePositionObjects Created 4 years, 6 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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 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) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 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 944 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 // logical relationship to the original element. 955 // logical relationship to the original element.
956 // 956 //
957 // LayoutBlocks are the one that handle laying out positioned elements, 957 // LayoutBlocks are the one that handle laying out positioned elements,
958 // thus this function is important during layout, to insert the positioned 958 // thus this function is important during layout, to insert the positioned
959 // elements into the correct LayoutBlock. 959 // elements into the correct LayoutBlock.
960 // 960 //
961 // See container() for the function that returns the containing block. 961 // See container() for the function that returns the containing block.
962 // See LayoutBlock.h for some extra explanations on containing blocks. 962 // See LayoutBlock.h for some extra explanations on containing blocks.
963 LayoutBlock* containingBlock() const; 963 LayoutBlock* containingBlock() const;
964 964
965 bool canContainAbsolutePositionObjects() const 965 bool canContainAbsolutePositionObjects() const { return m_style->canContainA bsolutePositionObjects() || canContainFixedPositionObjects(); }
966 { 966 bool canContainFixedPositionObjects() const { return isLayoutView() || isSVG ForeignObject() || (isLayoutBlock() && m_style->canContainFixedPositionObjects() ); }
967 return isPositioned() || canContainFixedPositionObjects();
968 }
969
970 bool canContainFixedPositionObjects() const
971 {
972 return isLayoutView() || ((hasTransformRelatedProperty() || style()->con tainsPaint()) && isLayoutBlock()) || isSVGForeignObject();
973 }
974 967
975 // Convert the given local point to absolute coordinates 968 // Convert the given local point to absolute coordinates
976 // FIXME: Temporary. If UseTransforms is true, take transforms into account. Eventually localToAbsolute() will always be transform-aware. 969 // FIXME: Temporary. If UseTransforms is true, take transforms into account. Eventually localToAbsolute() will always be transform-aware.
977 FloatPoint localToAbsolute(const FloatPoint& localPoint = FloatPoint(), MapC oordinatesFlags = 0) const; 970 FloatPoint localToAbsolute(const FloatPoint& localPoint = FloatPoint(), MapC oordinatesFlags = 0) const;
978 971
979 // If the LayoutBoxModelObject ancestor is non-null, the input point is in t he space of the ancestor. 972 // If the LayoutBoxModelObject ancestor is non-null, the input point is in t he space of the ancestor.
980 // Otherwise: 973 // Otherwise:
981 // If TraverseDocumentBoundaries is specified, the input point is in the s pace of the local root frame. 974 // If TraverseDocumentBoundaries is specified, the input point is in the s pace of the local root frame.
982 // Otherwise, the input point is in the space of the containing frame. 975 // Otherwise, the input point is in the space of the containing frame.
983 FloatPoint ancestorToLocal(LayoutBoxModelObject*, const FloatPoint&, MapCoor dinatesFlags = 0) const; 976 FloatPoint ancestorToLocal(LayoutBoxModelObject*, const FloatPoint&, MapCoor dinatesFlags = 0) const;
(...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after
2202 void showTree(const blink::LayoutObject*); 2195 void showTree(const blink::LayoutObject*);
2203 void showLineTree(const blink::LayoutObject*); 2196 void showLineTree(const blink::LayoutObject*);
2204 void showLayoutTree(const blink::LayoutObject* object1); 2197 void showLayoutTree(const blink::LayoutObject* object1);
2205 // We don't make object2 an optional parameter so that showLayoutTree 2198 // We don't make object2 an optional parameter so that showLayoutTree
2206 // can be called from gdb easily. 2199 // can be called from gdb easily.
2207 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2); 2200 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2);
2208 2201
2209 #endif 2202 #endif
2210 2203
2211 #endif // LayoutObject_h 2204 #endif // LayoutObject_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.cpp ('k') | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698