Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h |
| diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h |
| index 59776ede1a329eefd15c45a7eaef833f5a3c1cfe..d7a127c8ae9312693a97ccb091c8d5c9f3bcc2da 100644 |
| --- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h |
| +++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h |
| @@ -175,7 +175,7 @@ public: |
| ~PreventRelayoutScope(); |
| static bool relayoutIsPrevented() { return s_count; } |
| - static void setNeedsLayout(LayoutObject&); |
| + static void setBoxNeedsLayout(PaintLayerScrollableArea&, bool hadHorizontalScrollbar, bool hadVerticalScrollbar); |
|
skobes
2016/06/23 18:19:18
This API is super confusing, if the box needs layo
szager1
2016/06/23 19:05:31
There are two things going on here:
- Does the bo
|
| static bool relayoutNeeded() { return s_count == 0 && s_relayoutNeeded; } |
| static void resetRelayoutNeeded(); |
| @@ -183,7 +183,7 @@ public: |
| static int s_count; |
| static SubtreeLayoutScope* s_layoutScope; |
| static bool s_relayoutNeeded; |
| - static WTF::Vector<LayoutObject*>* s_needsRelayout; |
| + static PersistentHeapVector<Member<PaintLayerScrollableArea>>* s_needsRelayout; |
| }; |
| // If a FreezeScrollbarScope object is alive, updateAfterLayout() will not |
| @@ -410,6 +410,12 @@ public: |
| bool needsScrollPositionClamp() const { return m_needsScrollPositionClamp; } |
| void setNeedsScrollPositionClamp(bool val) { m_needsScrollPositionClamp = val; } |
| + bool needsRelayout() const { return m_needsRelayout; } |
| + void setNeedsRelayout(bool val) { m_needsRelayout = val; } |
| + bool hadHorizontalScrollbarBeforeRelayout() const { return m_hadHorizontalScrollbarBeforeRelayout; } |
|
skobes
2016/06/23 18:19:18
Do these need to be public? Add comments please.
szager1
2016/06/23 19:05:31
I could use a friend declaration to give PreventRe
|
| + void setHadHorizontalScrollbarBeforeRelayout(bool val) { m_hadHorizontalScrollbarBeforeRelayout = val; } |
| + bool hadVerticalScrollbarBeforeRelayout() const { return m_hadVerticalScrollbarBeforeRelayout; } |
| + void setHadVerticalScrollbarBeforeRelayout(bool val) { m_hadVerticalScrollbarBeforeRelayout = val; } |
| StickyConstraintsMap& stickyConstraintsMap() { return ensureRareData().m_stickyConstraintsMap; } |
| void invalidateAllStickyConstraints(); |
| @@ -468,15 +474,15 @@ private: |
| PaintLayer& m_layer; |
| + PaintLayer* m_nextTopmostScrollChild; |
| + PaintLayer* m_topmostScrollChild; |
| + |
| // Keeps track of whether the layer is currently resizing, so events can cause resizing to start and stop. |
| unsigned m_inResizeMode : 1; |
| unsigned m_scrollsOverflow : 1; |
| unsigned m_inOverflowRelayout : 1; |
| - PaintLayer* m_nextTopmostScrollChild; |
| - PaintLayer* m_topmostScrollChild; |
| - |
| // FIXME: once cc can handle composited scrolling with clip paths, we will |
| // no longer need this bit. |
| unsigned m_needsCompositedScrolling : 1; |
| @@ -488,6 +494,9 @@ private: |
| unsigned m_rebuildVerticalScrollbarLayer : 1; |
| unsigned m_needsScrollPositionClamp : 1; |
| + unsigned m_needsRelayout : 1; |
|
skobes
2016/06/23 18:19:18
Please add comments explaining what this means. H
szager1
2016/06/23 19:05:31
I added comments to the getters/setters.
|
| + unsigned m_hadHorizontalScrollbarBeforeRelayout : 1; |
| + unsigned m_hadVerticalScrollbarBeforeRelayout : 1; |
| // The width/height of our scrolled area. |
| // This is OverflowModel's layout overflow translated to physical |