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

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

Issue 2825343003: Clean compositing inputs for location APIs for sticky-affected elements. (Closed)
Patch Set: Created 3 years, 8 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 177
178 bool HasSelfPaintingLayer() const; 178 bool HasSelfPaintingLayer() const;
179 PaintLayer* Layer() const { 179 PaintLayer* Layer() const {
180 return GetRarePaintData() ? GetRarePaintData()->Layer() : nullptr; 180 return GetRarePaintData() ? GetRarePaintData()->Layer() : nullptr;
181 } 181 }
182 // The type of PaintLayer to instantiate. Any value returned from this 182 // The type of PaintLayer to instantiate. Any value returned from this
183 // function other than NoPaintLayer will lead to a PaintLayer being created. 183 // function other than NoPaintLayer will lead to a PaintLayer being created.
184 virtual PaintLayerType LayerTypeRequired() const = 0; 184 virtual PaintLayerType LayerTypeRequired() const = 0;
185 PaintLayerScrollableArea* GetScrollableArea() const; 185 PaintLayerScrollableArea* GetScrollableArea() const;
186 186
187 bool IsInStickySubtree() const { return is_in_sticky_subtree_; }
188
187 virtual void UpdateFromStyle(); 189 virtual void UpdateFromStyle();
188 190
189 // This will work on inlines to return the bounding box of all of the lines' 191 // This will work on inlines to return the bounding box of all of the lines'
190 // border boxes. 192 // border boxes.
191 virtual IntRect BorderBoundingBox() const = 0; 193 virtual IntRect BorderBoundingBox() const = 0;
192 194
193 virtual LayoutRect VisualOverflowRect() const = 0; 195 virtual LayoutRect VisualOverflowRect() const = 0;
194 196
195 // Checks if this box, or any of it's descendants, or any of it's 197 // Checks if this box, or any of it's descendants, or any of it's
196 // continuations, will take up space in the layout of the page. 198 // continuations, will take up space in the layout of the page.
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 LayoutUnit ComputedCSSPadding(const Length&) const; 541 LayoutUnit ComputedCSSPadding(const Length&) const;
540 bool IsBoxModelObject() const final { return true; } 542 bool IsBoxModelObject() const final { return true; }
541 543
542 LayoutBoxModelObjectRareData& EnsureRareData() { 544 LayoutBoxModelObjectRareData& EnsureRareData() {
543 if (!rare_data_) 545 if (!rare_data_)
544 rare_data_ = WTF::MakeUnique<LayoutBoxModelObjectRareData>(); 546 rare_data_ = WTF::MakeUnique<LayoutBoxModelObjectRareData>();
545 return *rare_data_.get(); 547 return *rare_data_.get();
546 } 548 }
547 549
548 std::unique_ptr<LayoutBoxModelObjectRareData> rare_data_; 550 std::unique_ptr<LayoutBoxModelObjectRareData> rare_data_;
551
552 bool is_in_sticky_subtree_;
549 }; 553 };
550 554
551 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBoxModelObject, IsBoxModelObject()); 555 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBoxModelObject, IsBoxModelObject());
552 556
553 } // namespace blink 557 } // namespace blink
554 558
555 #endif // LayoutBoxModelObject_h 559 #endif // LayoutBoxModelObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698