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

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

Issue 2647533002: Force compositing inputs to be clean for getBoundingClientRect (Closed)
Patch Set: For discussion; only do compositing update when in sticky subtree Created 3 years, 11 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 * Copyright (C) 2003, 2006, 2007, 2009 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2006, 2007, 2009 Apple Inc. All rights reserved.
5 * Copyright (C) 2010 Google Inc. All rights reserved. 5 * Copyright (C) 2010 Google Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 int pixelSnappedOffsetTop(const Element* parent) const { 171 int pixelSnappedOffsetTop(const Element* parent) const {
172 return roundToInt(offsetTop(parent)); 172 return roundToInt(offsetTop(parent));
173 } 173 }
174 virtual int pixelSnappedOffsetWidth(const Element*) const; 174 virtual int pixelSnappedOffsetWidth(const Element*) const;
175 virtual int pixelSnappedOffsetHeight(const Element*) const; 175 virtual int pixelSnappedOffsetHeight(const Element*) const;
176 176
177 bool hasSelfPaintingLayer() const; 177 bool hasSelfPaintingLayer() const;
178 PaintLayer* layer() const { return m_layer.get(); } 178 PaintLayer* layer() const { return m_layer.get(); }
179 PaintLayerScrollableArea* getScrollableArea() const; 179 PaintLayerScrollableArea* getScrollableArea() const;
180 180
181 bool isInStickySubtree() const { return m_isInStickySubtree; }
182
181 virtual void updateFromStyle(); 183 virtual void updateFromStyle();
182 184
183 // The type of PaintLayer to instantiate. Any value returned from this 185 // The type of PaintLayer to instantiate. Any value returned from this
184 // function other than NoPaintLayer will populate |m_layer|. 186 // function other than NoPaintLayer will populate |m_layer|.
185 virtual PaintLayerType layerTypeRequired() const = 0; 187 virtual PaintLayerType layerTypeRequired() const = 0;
186 188
187 // This will work on inlines to return the bounding box of all of the lines' 189 // This will work on inlines to return the bounding box of all of the lines'
188 // border boxes. 190 // border boxes.
189 virtual IntRect borderBoundingBox() const = 0; 191 virtual IntRect borderBoundingBox() const = 0;
190 192
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 if (!m_rareData) 521 if (!m_rareData)
520 m_rareData = WTF::makeUnique<LayoutBoxModelObjectRareData>(); 522 m_rareData = WTF::makeUnique<LayoutBoxModelObjectRareData>();
521 return *m_rareData.get(); 523 return *m_rareData.get();
522 } 524 }
523 525
524 // The PaintLayer associated with this object. |m_layer| can be nullptr 526 // The PaintLayer associated with this object. |m_layer| can be nullptr
525 // depending on the return value of layerTypeRequired(). 527 // depending on the return value of layerTypeRequired().
526 std::unique_ptr<PaintLayer> m_layer; 528 std::unique_ptr<PaintLayer> m_layer;
527 529
528 std::unique_ptr<LayoutBoxModelObjectRareData> m_rareData; 530 std::unique_ptr<LayoutBoxModelObjectRareData> m_rareData;
531
532 bool m_isInStickySubtree;
529 }; 533 };
530 534
531 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBoxModelObject, isBoxModelObject()); 535 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBoxModelObject, isBoxModelObject());
532 536
533 } // namespace blink 537 } // namespace blink
534 538
535 #endif // LayoutBoxModelObject_h 539 #endif // LayoutBoxModelObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698