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

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyle.h

Issue 2825343003: Clean compositing inputs for location APIs for sticky-affected elements. (Closed)
Patch Set: Address reviewer comments Created 3 years, 7 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 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
6 * rights reserved. 6 * rights reserved.
7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
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 1652 matching lines...) Expand 10 before | Expand all | Expand 10 after
1663 void SetWillChangeContents(bool b) { 1663 void SetWillChangeContents(bool b) {
1664 SET_NESTED_VAR(rare_non_inherited_data_, will_change_, contents_, b); 1664 SET_NESTED_VAR(rare_non_inherited_data_, will_change_, contents_, b);
1665 } 1665 }
1666 void SetWillChangeScrollPosition(bool b) { 1666 void SetWillChangeScrollPosition(bool b) {
1667 SET_NESTED_VAR(rare_non_inherited_data_, will_change_, scroll_position_, b); 1667 SET_NESTED_VAR(rare_non_inherited_data_, will_change_, scroll_position_, b);
1668 } 1668 }
1669 void SetSubtreeWillChangeContents(bool b) { 1669 void SetSubtreeWillChangeContents(bool b) {
1670 SET_VAR(rare_inherited_data_, subtree_will_change_contents_, b); 1670 SET_VAR(rare_inherited_data_, subtree_will_change_contents_, b);
1671 } 1671 }
1672 1672
1673 // sticky, TODO(smcgruer): Move?
1674 bool IsInStickySubtree() const {
1675 return rare_inherited_data_->is_in_sticky_subtree_;
1676 }
1677 void SetIsInStickySubtree(bool b) {
1678 SET_VAR(rare_inherited_data_, is_in_sticky_subtree_, b);
flackr 2017/04/26 15:08:00 Does setting this property, even if to false, mean
smcgruer 2017/04/26 17:45:45 As discussed, SET_VAR only creates a new rare inhe
1679 }
1680
1673 // z-index 1681 // z-index
1674 int ZIndex() const { return box_->ZIndex(); } 1682 int ZIndex() const { return box_->ZIndex(); }
1675 bool HasAutoZIndex() const { return box_->HasAutoZIndex(); } 1683 bool HasAutoZIndex() const { return box_->HasAutoZIndex(); }
1676 void SetZIndex(int v) { 1684 void SetZIndex(int v) {
1677 SET_VAR(box_, has_auto_z_index_, false); 1685 SET_VAR(box_, has_auto_z_index_, false);
1678 SET_VAR(box_, z_index_, v); 1686 SET_VAR(box_, z_index_, v);
1679 } 1687 }
1680 void SetHasAutoZIndex() { 1688 void SetHasAutoZIndex() {
1681 SET_VAR(box_, has_auto_z_index_, true); 1689 SET_VAR(box_, has_auto_z_index_, true);
1682 SET_VAR(box_, z_index_, 0); 1690 SET_VAR(box_, z_index_, 0);
(...skipping 2058 matching lines...) Expand 10 before | Expand all | Expand 10 after
3741 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); 3749 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId)));
3742 } 3750 }
3743 3751
3744 inline bool ComputedStyle::HasPseudoElementStyle() const { 3752 inline bool ComputedStyle::HasPseudoElementStyle() const {
3745 return PseudoBitsInternal() & kElementPseudoIdMask; 3753 return PseudoBitsInternal() & kElementPseudoIdMask;
3746 } 3754 }
3747 3755
3748 } // namespace blink 3756 } // namespace blink
3749 3757
3750 #endif // ComputedStyle_h 3758 #endif // ComputedStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698