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

Side by Side Diff: Source/core/dom/ElementRareData.h

Issue 1209183004: Expose scroll customization for touch to JS (behind REF). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Don't trigger layout on 0 delta. Created 5 years, 5 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) 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 David Smith <catfish.man@gmail.com> 3 * Copyright (C) 2008 David Smith <catfish.man@gmail.com>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 13 matching lines...) Expand all
24 24
25 #include "core/animation/ElementAnimations.h" 25 #include "core/animation/ElementAnimations.h"
26 #include "core/dom/Attr.h" 26 #include "core/dom/Attr.h"
27 #include "core/dom/DatasetDOMStringMap.h" 27 #include "core/dom/DatasetDOMStringMap.h"
28 #include "core/dom/NamedNodeMap.h" 28 #include "core/dom/NamedNodeMap.h"
29 #include "core/dom/NodeRareData.h" 29 #include "core/dom/NodeRareData.h"
30 #include "core/dom/PseudoElement.h" 30 #include "core/dom/PseudoElement.h"
31 #include "core/dom/custom/CustomElementDefinition.h" 31 #include "core/dom/custom/CustomElementDefinition.h"
32 #include "core/dom/shadow/ElementShadow.h" 32 #include "core/dom/shadow/ElementShadow.h"
33 #include "core/html/ClassList.h" 33 #include "core/html/ClassList.h"
34 #include "core/page/scrolling/ScrollStateCallback.h"
34 #include "core/style/StyleInheritedData.h" 35 #include "core/style/StyleInheritedData.h"
35 #include "platform/heap/Handle.h" 36 #include "platform/heap/Handle.h"
36 #include "wtf/OwnPtr.h" 37 #include "wtf/OwnPtr.h"
37 38
38 namespace blink { 39 namespace blink {
39 40
40 class HTMLElement; 41 class HTMLElement;
41 42
42 class ElementRareData : public NodeRareData { 43 class ElementRareData : public NodeRareData {
43 public: 44 public:
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 uint32_t decrementProxyCount() 115 uint32_t decrementProxyCount()
115 { 116 {
116 ASSERT(m_proxyCount); 117 ASSERT(m_proxyCount);
117 return --m_proxyCount; 118 return --m_proxyCount;
118 } 119 }
119 uint32_t proxyCount() const { return m_proxyCount; } 120 uint32_t proxyCount() const { return m_proxyCount; }
120 121
121 void setCustomElementDefinition(PassRefPtrWillBeRawPtr<CustomElementDefiniti on> definition) { m_customElementDefinition = definition; } 122 void setCustomElementDefinition(PassRefPtrWillBeRawPtr<CustomElementDefiniti on> definition) { m_customElementDefinition = definition; }
122 CustomElementDefinition* customElementDefinition() const { return m_customEl ementDefinition.get(); } 123 CustomElementDefinition* customElementDefinition() const { return m_customEl ementDefinition.get(); }
123 124
125 void setDistributeScroll(ScrollStateCallback* scrollStateCallback) { m_distr ibuteScroll = scrollStateCallback; }
126
127 ScrollStateCallback* getDistributeScroll() { return m_distributeScroll.get() ; }
128
129 void setApplyScroll(ScrollStateCallback* scrollStateCallback) { m_applyScrol l = scrollStateCallback; }
130
131 ScrollStateCallback* getApplyScroll() { return m_applyScroll.get(); }
132
124 AttrNodeList& ensureAttrNodeList(); 133 AttrNodeList& ensureAttrNodeList();
125 AttrNodeList* attrNodeList() { return m_attrNodeList.get(); } 134 AttrNodeList* attrNodeList() { return m_attrNodeList.get(); }
126 void removeAttrNodeList() { m_attrNodeList.clear(); } 135 void removeAttrNodeList() { m_attrNodeList.clear(); }
127 136
128 DECLARE_TRACE_AFTER_DISPATCH(); 137 DECLARE_TRACE_AFTER_DISPATCH();
129 138
130 private: 139 private:
131 short m_tabindex; 140 short m_tabindex;
132 // As m_proxyCount usually doesn't exceed 10bits (1024), if you want to add some booleans you 141 // As m_proxyCount usually doesn't exceed 10bits (1024), if you want to add some booleans you
133 // can steal some bits from m_proxyCount by using bitfields to prevent Eleme ntRareData bloat. 142 // can steal some bits from m_proxyCount by using bitfields to prevent Eleme ntRareData bloat.
(...skipping 11 matching lines...) Expand all
145 OwnPtrWillBeMember<InlineCSSStyleDeclaration> m_cssomWrapper; 154 OwnPtrWillBeMember<InlineCSSStyleDeclaration> m_cssomWrapper;
146 155
147 RefPtr<ComputedStyle> m_computedStyle; 156 RefPtr<ComputedStyle> m_computedStyle;
148 RefPtrWillBeMember<CustomElementDefinition> m_customElementDefinition; 157 RefPtrWillBeMember<CustomElementDefinition> m_customElementDefinition;
149 158
150 RefPtrWillBeMember<PseudoElement> m_generatedBefore; 159 RefPtrWillBeMember<PseudoElement> m_generatedBefore;
151 RefPtrWillBeMember<PseudoElement> m_generatedAfter; 160 RefPtrWillBeMember<PseudoElement> m_generatedAfter;
152 RefPtrWillBeMember<PseudoElement> m_generatedFirstLetter; 161 RefPtrWillBeMember<PseudoElement> m_generatedFirstLetter;
153 RefPtrWillBeMember<PseudoElement> m_backdrop; 162 RefPtrWillBeMember<PseudoElement> m_backdrop;
154 163
164 PersistentWillBeMember<ScrollStateCallback> m_applyScroll;
165 PersistentWillBeMember<ScrollStateCallback> m_distributeScroll;
tdresser 2015/07/06 20:43:01 We need to find somewhere else to stash these, as
Rick Byers 2015/07/07 21:24:40 Can we instead have a map somewhere (per Document?
tdresser 2015/07/13 17:36:52 Per Document / Framehost would introduce a fair bi
haraken 2015/07/13 23:43:07 A static map is fine. See how CustomElementObserve
166
155 explicit ElementRareData(LayoutObject*); 167 explicit ElementRareData(LayoutObject*);
156 }; 168 };
157 169
158 inline LayoutSize defaultMinimumSizeForResizing() 170 inline LayoutSize defaultMinimumSizeForResizing()
159 { 171 {
160 return LayoutSize(LayoutUnit::max(), LayoutUnit::max()); 172 return LayoutSize(LayoutUnit::max(), LayoutUnit::max());
161 } 173 }
162 174
163 inline ElementRareData::ElementRareData(LayoutObject* layoutObject) 175 inline ElementRareData::ElementRareData(LayoutObject* layoutObject)
164 : NodeRareData(layoutObject) 176 : NodeRareData(layoutObject)
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 case FIRST_LETTER: 245 case FIRST_LETTER:
234 return m_generatedFirstLetter.get(); 246 return m_generatedFirstLetter.get();
235 default: 247 default:
236 return 0; 248 return 0;
237 } 249 }
238 } 250 }
239 251
240 } // namespace 252 } // namespace
241 253
242 #endif // ElementRareData_h 254 #endif // ElementRareData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698