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

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

Issue 2394053004: Clear scroll anchor on all parent scrollers from ScrollAnchor::clear (Closed)
Patch Set: rebase and fix merge Created 4 years, 2 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 1642 matching lines...) Expand 10 before | Expand all | Expand 10 after
1653 friend class LayoutObject; 1653 friend class LayoutObject;
1654 MutableForPainting(const LayoutObject& layoutObject) 1654 MutableForPainting(const LayoutObject& layoutObject)
1655 : m_layoutObject(const_cast<LayoutObject&>(layoutObject)) {} 1655 : m_layoutObject(const_cast<LayoutObject&>(layoutObject)) {}
1656 1656
1657 LayoutObject& m_layoutObject; 1657 LayoutObject& m_layoutObject;
1658 }; 1658 };
1659 MutableForPainting getMutableForPainting() const { 1659 MutableForPainting getMutableForPainting() const {
1660 return MutableForPainting(*this); 1660 return MutableForPainting(*this);
1661 } 1661 }
1662 1662
1663 void setIsScrollAnchorObject() { m_bitfields.setIsScrollAnchorObject(true); } 1663 void setIsScrollAnchorObject(bool value) {
skobes 2016/10/10 21:34:35 We want external callers to use maybeClearIsScroll
ymalik 2016/10/11 19:54:22 The reason I added this is because when we're clea
skobes 2016/10/11 20:51:40 Ah, good point. If ScrollAnchor is doing the clea
ymalik 2016/10/11 22:52:57 Done. I used a bool instead of enum because its ea
1664 m_bitfields.setIsScrollAnchorObject(value);
1665 }
1664 // Clears the IsScrollAnchorObject bit, unless any ScrollAnchor still refers t o us. 1666 // Clears the IsScrollAnchorObject bit, unless any ScrollAnchor still refers t o us.
1665 void maybeClearIsScrollAnchorObject(); 1667 void maybeClearIsScrollAnchorObject();
1668 // Clears the scroll anchor on all scrollableAreas that are in the ancestor
1669 // chain of this LayoutObject.
1670 void clearScrollAnchors();
skobes 2016/10/10 21:34:35 Sharing the tree-walking code is nice but I'm not
ymalik 2016/10/11 19:54:22 Done.
1666 1671
1667 bool scrollAnchorDisablingStyleChanged() { 1672 bool scrollAnchorDisablingStyleChanged() {
1668 return m_bitfields.scrollAnchorDisablingStyleChanged(); 1673 return m_bitfields.scrollAnchorDisablingStyleChanged();
1669 } 1674 }
1670 void setScrollAnchorDisablingStyleChanged(bool changed) { 1675 void setScrollAnchorDisablingStyleChanged(bool changed) {
1671 m_bitfields.setScrollAnchorDisablingStyleChanged(changed); 1676 m_bitfields.setScrollAnchorDisablingStyleChanged(changed);
1672 } 1677 }
1673 1678
1674 void clearChildNeedsOverflowRecalcAfterStyleChange() { 1679 void clearChildNeedsOverflowRecalcAfterStyleChange() {
1675 m_bitfields.setChildNeedsOverflowRecalcAfterStyleChange(false); 1680 m_bitfields.setChildNeedsOverflowRecalcAfterStyleChange(false);
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
2491 CORE_EXPORT void showLineTree(const blink::LayoutObject*); 2496 CORE_EXPORT void showLineTree(const blink::LayoutObject*);
2492 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); 2497 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1);
2493 // We don't make object2 an optional parameter so that showLayoutTree 2498 // We don't make object2 an optional parameter so that showLayoutTree
2494 // can be called from gdb easily. 2499 // can be called from gdb easily.
2495 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, 2500 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1,
2496 const blink::LayoutObject* object2); 2501 const blink::LayoutObject* object2);
2497 2502
2498 #endif 2503 #endif
2499 2504
2500 #endif // LayoutObject_h 2505 #endif // LayoutObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698