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

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

Issue 1490063002: Implement Paint Containment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years 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 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 bool preferredLogicalWidthsDirty() const { return m_bitfields.preferredLogic alWidthsDirty(); } 690 bool preferredLogicalWidthsDirty() const { return m_bitfields.preferredLogic alWidthsDirty(); }
691 691
692 bool needsOverflowRecalcAfterStyleChange() const { return m_bitfields.selfNe edsOverflowRecalcAfterStyleChange() || m_bitfields.childNeedsOverflowRecalcAfter StyleChange(); } 692 bool needsOverflowRecalcAfterStyleChange() const { return m_bitfields.selfNe edsOverflowRecalcAfterStyleChange() || m_bitfields.childNeedsOverflowRecalcAfter StyleChange(); }
693 bool selfNeedsOverflowRecalcAfterStyleChange() const { return m_bitfields.se lfNeedsOverflowRecalcAfterStyleChange(); } 693 bool selfNeedsOverflowRecalcAfterStyleChange() const { return m_bitfields.se lfNeedsOverflowRecalcAfterStyleChange(); }
694 bool childNeedsOverflowRecalcAfterStyleChange() const { return m_bitfields.c hildNeedsOverflowRecalcAfterStyleChange(); } 694 bool childNeedsOverflowRecalcAfterStyleChange() const { return m_bitfields.c hildNeedsOverflowRecalcAfterStyleChange(); }
695 695
696 bool isSelectionBorder() const; 696 bool isSelectionBorder() const;
697 697
698 bool hasClip() const { return isOutOfFlowPositioned() && !style()->hasAutoCl ip(); } 698 bool hasClip() const { return isOutOfFlowPositioned() && !style()->hasAutoCl ip(); }
699 bool hasOverflowClip() const { return m_bitfields.hasOverflowClip(); } 699 bool hasOverflowClip() const { return m_bitfields.hasOverflowClip(); }
700 bool hasClipOrOverflowClip() const { return hasClip() || hasOverflowClip(); } 700 bool hasClipRelatedProperty() const { return hasClip() || hasOverflowClip() || style()->containsPaint(); }
701 701
702 bool hasTransformRelatedProperty() const { return m_bitfields.hasTransformRe latedProperty(); } 702 bool hasTransformRelatedProperty() const { return m_bitfields.hasTransformRe latedProperty(); }
703 bool hasMask() const { return style() && style()->hasMask(); } 703 bool hasMask() const { return style() && style()->hasMask(); }
704 bool hasClipPath() const { return style() && style()->clipPath(); } 704 bool hasClipPath() const { return style() && style()->clipPath(); }
705 bool hasHiddenBackface() const { return style() && style()->backfaceVisibili ty() == BackfaceVisibilityHidden; } 705 bool hasHiddenBackface() const { return style() && style()->backfaceVisibili ty() == BackfaceVisibilityHidden; }
706 706
707 bool hasFilter() const { return style() && style()->hasFilter(); } 707 bool hasFilter() const { return style() && style()->hasFilter(); }
708 bool hasBackdropFilter() const { return style() && style()->hasBackdropFilte r(); } 708 bool hasBackdropFilter() const { return style() && style()->hasBackdropFilte r(); }
709 709
710 bool hasShapeOutside() const { return style() && style()->shapeOutside(); } 710 bool hasShapeOutside() const { return style() && style()->shapeOutside(); }
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 // LayoutBlocks are the one that handle laying out positioned elements, 922 // LayoutBlocks are the one that handle laying out positioned elements,
923 // thus this function is important during layout, to insert the positioned 923 // thus this function is important during layout, to insert the positioned
924 // elements into the correct LayoutBlock. 924 // elements into the correct LayoutBlock.
925 // 925 //
926 // See container() for the function that returns the containing block. 926 // See container() for the function that returns the containing block.
927 // See LayoutBlock.h for some extra explanations on containing blocks. 927 // See LayoutBlock.h for some extra explanations on containing blocks.
928 LayoutBlock* containingBlock() const; 928 LayoutBlock* containingBlock() const;
929 929
930 bool canContainFixedPositionObjects() const 930 bool canContainFixedPositionObjects() const
931 { 931 {
932 return isLayoutView() || (hasTransformRelatedProperty() && isLayoutBlock ()) || isSVGForeignObject(); 932 return isLayoutView() || (hasTransformRelatedProperty() && isLayoutBlock ()) || isSVGForeignObject() || style()->containsPaint();
933 } 933 }
934 934
935 // Convert the given local point to absolute coordinates 935 // Convert the given local point to absolute coordinates
936 // FIXME: Temporary. If UseTransforms is true, take transforms into account. Eventually localToAbsolute() will always be transform-aware. 936 // FIXME: Temporary. If UseTransforms is true, take transforms into account. Eventually localToAbsolute() will always be transform-aware.
937 FloatPoint localToAbsolute(const FloatPoint& localPoint = FloatPoint(), MapC oordinatesFlags = 0) const; 937 FloatPoint localToAbsolute(const FloatPoint& localPoint = FloatPoint(), MapC oordinatesFlags = 0) const;
938 FloatPoint absoluteToLocal(const FloatPoint&, MapCoordinatesFlags = 0) const ; 938 FloatPoint absoluteToLocal(const FloatPoint&, MapCoordinatesFlags = 0) const ;
939 939
940 // Convert a local quad to absolute coordinates, taking transforms into acco unt. 940 // Convert a local quad to absolute coordinates, taking transforms into acco unt.
941 FloatQuad localToAbsoluteQuad(const FloatQuad& quad, MapCoordinatesFlags mod e = 0, bool* wasFixed = nullptr) const 941 FloatQuad localToAbsoluteQuad(const FloatQuad& quad, MapCoordinatesFlags mod e = 0, bool* wasFixed = nullptr) const
942 { 942 {
(...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after
2043 void showTree(const blink::LayoutObject*); 2043 void showTree(const blink::LayoutObject*);
2044 void showLineTree(const blink::LayoutObject*); 2044 void showLineTree(const blink::LayoutObject*);
2045 void showLayoutTree(const blink::LayoutObject* object1); 2045 void showLayoutTree(const blink::LayoutObject* object1);
2046 // We don't make object2 an optional parameter so that showLayoutTree 2046 // We don't make object2 an optional parameter so that showLayoutTree
2047 // can be called from gdb easily. 2047 // can be called from gdb easily.
2048 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2); 2048 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2);
2049 2049
2050 #endif 2050 #endif
2051 2051
2052 #endif // LayoutObject_h 2052 #endif // LayoutObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698