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

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

Issue 2213223004: Revert of Add a fast-path for independent inherited properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@computedstyle_cleanup_rename_final_member_fields
Patch Set: Created 4 years, 4 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 r ights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 std::unique_ptr<PseudoStyleCache> m_cachedPseudoStyles; 157 std::unique_ptr<PseudoStyleCache> m_cachedPseudoStyles;
158 158
159 DataRef<SVGComputedStyle> m_svgStyle; 159 DataRef<SVGComputedStyle> m_svgStyle;
160 160
161 // !START SYNC!: Keep this in sync with the copy constructor in ComputedStyle.cp p and implicitlyInherited() in StyleResolver.cpp 161 // !START SYNC!: Keep this in sync with the copy constructor in ComputedStyle.cp p and implicitlyInherited() in StyleResolver.cpp
162 162
163 // inherit 163 // inherit
164 struct InheritedData { 164 struct InheritedData {
165 bool operator==(const InheritedData& other) const 165 bool operator==(const InheritedData& other) const
166 { 166 {
167 return compareEqualIndependent(other)
168 && compareEqualNonIndependent(other);
169 }
170
171 bool operator!=(const InheritedData& other) const { return !(*this == ot her); }
172
173 inline bool compareEqualIndependent(const InheritedData& other) const
174 {
175 // These must match the properties tagged 'independent' in
176 // CSSProperties.in.
177 // TODO(sashab): Generate this function.
178 return (m_visibility == other.m_visibility)
179 && (m_pointerEvents == other.m_pointerEvents);
180 }
181
182 inline bool compareEqualNonIndependent(const InheritedData& other) const
183 {
184 return (m_emptyCells == other.m_emptyCells) 167 return (m_emptyCells == other.m_emptyCells)
185 && (m_captionSide == other.m_captionSide) 168 && (m_captionSide == other.m_captionSide)
186 && (m_listStyleType == other.m_listStyleType) 169 && (m_listStyleType == other.m_listStyleType)
187 && (m_listStylePosition == other.m_listStylePosition) 170 && (m_listStylePosition == other.m_listStylePosition)
171 && (m_visibility == other.m_visibility)
188 && (m_textAlign == other.m_textAlign) 172 && (m_textAlign == other.m_textAlign)
189 && (m_textTransform == other.m_textTransform) 173 && (m_textTransform == other.m_textTransform)
190 && (m_textUnderline == other.m_textUnderline) 174 && (m_textUnderline == other.m_textUnderline)
191 && (m_cursorStyle == other.m_cursorStyle) 175 && (m_cursorStyle == other.m_cursorStyle)
192 && (m_direction == other.m_direction) 176 && (m_direction == other.m_direction)
193 && (m_whiteSpace == other.m_whiteSpace) 177 && (m_whiteSpace == other.m_whiteSpace)
194 && (m_borderCollapse == other.m_borderCollapse) 178 && (m_borderCollapse == other.m_borderCollapse)
195 && (m_boxDirection == other.m_boxDirection) 179 && (m_boxDirection == other.m_boxDirection)
196 && (m_rtlOrdering == other.m_rtlOrdering) 180 && (m_rtlOrdering == other.m_rtlOrdering)
197 && (m_printColorAdjust == other.m_printColorAdjust) 181 && (m_printColorAdjust == other.m_printColorAdjust)
182 && (m_pointerEvents == other.m_pointerEvents)
198 && (m_insideLink == other.m_insideLink) 183 && (m_insideLink == other.m_insideLink)
199 && (m_writingMode == other.m_writingMode); 184 && (m_writingMode == other.m_writingMode);
200 } 185 }
201 186
187 bool operator!=(const InheritedData& other) const { return !(*this == ot her); }
188
202 unsigned m_emptyCells : 1; // EEmptyCells 189 unsigned m_emptyCells : 1; // EEmptyCells
203 unsigned m_captionSide : 2; // ECaptionSide 190 unsigned m_captionSide : 2; // ECaptionSide
204 unsigned m_listStyleType : 7; // EListStyleType 191 unsigned m_listStyleType : 7; // EListStyleType
205 unsigned m_listStylePosition : 1; // EListStylePosition 192 unsigned m_listStylePosition : 1; // EListStylePosition
206 unsigned m_visibility : 2; // EVisibility 193 unsigned m_visibility : 2; // EVisibility
207 unsigned m_textAlign : 4; // ETextAlign 194 unsigned m_textAlign : 4; // ETextAlign
208 unsigned m_textTransform : 2; // ETextTransform 195 unsigned m_textTransform : 2; // ETextTransform
209 unsigned m_textUnderline : 1; 196 unsigned m_textUnderline : 1;
210 unsigned m_cursorStyle : 6; // ECursor 197 unsigned m_cursorStyle : 6; // ECursor
211 unsigned m_direction : 1; // TextDirection 198 unsigned m_direction : 1; // TextDirection
212 unsigned m_whiteSpace : 3; // EWhiteSpace 199 unsigned m_whiteSpace : 3; // EWhiteSpace
213 unsigned m_borderCollapse : 1; // EBorderCollapse 200 unsigned m_borderCollapse : 1; // EBorderCollapse
214 unsigned m_boxDirection : 1; // EBoxDirection (CSS3 box_direction proper ty, flexible box layout module) 201 unsigned m_boxDirection : 1; // EBoxDirection (CSS3 box_direction proper ty, flexible box layout module)
215 // 32 bits 202 // 32 bits
216 203
217 // non CSS2 inherited 204 // non CSS2 inherited
218 unsigned m_rtlOrdering : 1; // Order 205 unsigned m_rtlOrdering : 1; // Order
219 unsigned m_printColorAdjust : PrintColorAdjustBits; 206 unsigned m_printColorAdjust : PrintColorAdjustBits;
220 unsigned m_pointerEvents : 4; // EPointerEvents 207 unsigned m_pointerEvents : 4; // EPointerEvents
221 unsigned m_insideLink : 2; // EInsideLink 208 unsigned m_insideLink : 2; // EInsideLink
222 209
223 // CSS Text Layout Module Level 3: Vertical writing support 210 // CSS Text Layout Module Level 3: Vertical writing support
224 unsigned m_writingMode : 2; // WritingMode 211 unsigned m_writingMode : 2; // WritingMode
225 // 42 bits 212 // 42 bits
226 } m_inheritedData; 213 } m_inheritedData;
227 214
228 // don't inherit 215 // don't inherit
229 struct NonInheritedData { 216 struct NonInheritedData {
230 // Compare computed styles, differences in inherited bits or other flags 217 // Compare computed styles, differences in other flags should not cause an inequality.
231 // should not cause an inequality.
232 bool operator==(const NonInheritedData& other) const 218 bool operator==(const NonInheritedData& other) const
233 { 219 {
234 return m_effectiveDisplay == other.m_effectiveDisplay 220 return m_effectiveDisplay == other.m_effectiveDisplay
235 && m_originalDisplay == other.m_originalDisplay 221 && m_originalDisplay == other.m_originalDisplay
236 && m_overflowAnchor == other.m_overflowAnchor 222 && m_overflowAnchor == other.m_overflowAnchor
237 && m_overflowX == other.m_overflowX 223 && m_overflowX == other.m_overflowX
238 && m_overflowY == other.m_overflowY 224 && m_overflowY == other.m_overflowY
239 && m_verticalAlign == other.m_verticalAlign 225 && m_verticalAlign == other.m_verticalAlign
240 && m_clear == other.m_clear 226 && m_clear == other.m_clear
241 && m_position == other.m_position 227 && m_position == other.m_position
242 && m_floating == other.m_floating 228 && m_floating == other.m_floating
243 && m_tableLayout == other.m_tableLayout 229 && m_tableLayout == other.m_tableLayout
244 && m_unicodeBidi == other.m_unicodeBidi 230 && m_unicodeBidi == other.m_unicodeBidi
245 // hasViewportUnits 231 // hasViewportUnits
246 && m_breakBefore == other.m_breakBefore 232 && m_breakBefore == other.m_breakBefore
247 && m_breakAfter == other.m_breakAfter 233 && m_breakAfter == other.m_breakAfter
248 && m_breakInside == other.m_breakInside; 234 && m_breakInside == other.m_breakInside;
249 // styleType 235 // styleType
250 // pseudoBits 236 // pseudoBits
251 // explicitInheritance 237 // explicitInheritance
252 // unique 238 // unique
253 // emptyState 239 // emptyState
254 // affectedByFocus 240 // affectedByFocus
255 // affectedByHover 241 // affectedByHover
256 // affectedByActive 242 // affectedByActive
257 // affectedByDrag 243 // affectedByDrag
258 // isLink 244 // isLink
259 // isInherited flags
260 } 245 }
261 246
262 bool operator!=(const NonInheritedData& other) const { return !(*this == other); } 247 bool operator!=(const NonInheritedData& other) const { return !(*this == other); }
263 248
264 unsigned m_effectiveDisplay : 5; // EDisplay 249 unsigned m_effectiveDisplay : 5; // EDisplay
265 unsigned m_originalDisplay : 5; // EDisplay 250 unsigned m_originalDisplay : 5; // EDisplay
266 unsigned m_overflowAnchor : 2; // EOverflowAnchor 251 unsigned m_overflowAnchor : 2; // EOverflowAnchor
267 unsigned m_overflowX : 3; // EOverflow 252 unsigned m_overflowX : 3; // EOverflow
268 unsigned m_overflowY : 3; // EOverflow 253 unsigned m_overflowY : 3; // EOverflow
269 unsigned m_verticalAlign : 4; // EVerticalAlign 254 unsigned m_verticalAlign : 4; // EVerticalAlign
(...skipping 24 matching lines...) Expand all
294 unsigned m_affectedByFocus : 1; 279 unsigned m_affectedByFocus : 1;
295 unsigned m_affectedByHover : 1; 280 unsigned m_affectedByHover : 1;
296 unsigned m_affectedByActive : 1; 281 unsigned m_affectedByActive : 1;
297 unsigned m_affectedByDrag : 1; 282 unsigned m_affectedByDrag : 1;
298 283
299 // 64 bits 284 // 64 bits
300 285
301 unsigned m_isLink : 1; 286 unsigned m_isLink : 1;
302 287
303 mutable unsigned m_hasRemUnits : 1; 288 mutable unsigned m_hasRemUnits : 1;
304
305
306 // For each independent inherited property, store a 1 if the stored
307 // value was inherited from its parent, or 0 if it is explicitly set on
308 // this element.
309 // Eventually, all properties will have a bit in here to store whether
310 // they were inherited from their parent or not.
311 // Although two ComputedStyles are equal if their nonInheritedData is
312 // equal regardless of the isInherited flags, this struct is stored next
313 // to the existing flags to take advantage of packing as much as possibl e.
314 // TODO(sashab): Move these flags closer to inheritedData so that it's
315 // clear which inherited properties have a flag stored and which don't.
316 // Keep this list of fields in sync with:
317 // - setBitDefaults()
318 // - The ComputedStyle setter, which must take an extra boolean paramete r and set this
319 // - propagateIndependentInheritedProperties() in ComputedStyle.cpp
320 // - The compareEqual() methods in the corresponding class
321 // InheritedFlags
322 unsigned m_isPointerEventsInherited : 1;
323 unsigned m_isVisibilityInherited : 1;
324
325 // If you add more style bits here, you will also need to update Compute dStyle::copyNonInheritedFromCached() 289 // If you add more style bits here, you will also need to update Compute dStyle::copyNonInheritedFromCached()
326 // 68 bits 290 // 66 bits
327 } m_nonInheritedData; 291 } m_nonInheritedData;
328 292
329 // !END SYNC! 293 // !END SYNC!
330 294
331 void setBitDefaults() 295 void setBitDefaults()
332 { 296 {
333 m_inheritedData.m_emptyCells = initialEmptyCells(); 297 m_inheritedData.m_emptyCells = initialEmptyCells();
334 m_inheritedData.m_captionSide = initialCaptionSide(); 298 m_inheritedData.m_captionSide = initialCaptionSide();
335 m_inheritedData.m_listStyleType = initialListStyleType(); 299 m_inheritedData.m_listStyleType = initialListStyleType();
336 m_inheritedData.m_listStylePosition = initialListStylePosition(); 300 m_inheritedData.m_listStylePosition = initialListStylePosition();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 m_nonInheritedData.m_variableReference = false; 332 m_nonInheritedData.m_variableReference = false;
369 m_nonInheritedData.m_unique = false; 333 m_nonInheritedData.m_unique = false;
370 m_nonInheritedData.m_emptyState = false; 334 m_nonInheritedData.m_emptyState = false;
371 m_nonInheritedData.m_hasViewportUnits = false; 335 m_nonInheritedData.m_hasViewportUnits = false;
372 m_nonInheritedData.m_affectedByFocus = false; 336 m_nonInheritedData.m_affectedByFocus = false;
373 m_nonInheritedData.m_affectedByHover = false; 337 m_nonInheritedData.m_affectedByHover = false;
374 m_nonInheritedData.m_affectedByActive = false; 338 m_nonInheritedData.m_affectedByActive = false;
375 m_nonInheritedData.m_affectedByDrag = false; 339 m_nonInheritedData.m_affectedByDrag = false;
376 m_nonInheritedData.m_isLink = false; 340 m_nonInheritedData.m_isLink = false;
377 m_nonInheritedData.m_hasRemUnits = false; 341 m_nonInheritedData.m_hasRemUnits = false;
378
379 // All independently inherited properties default to being inherited.
380 m_nonInheritedData.m_isPointerEventsInherited = true;
381 m_nonInheritedData.m_isVisibilityInherited = true;
382 } 342 }
383 343
384 private: 344 private:
385 // TODO(sashab): Move these to the bottom of ComputedStyle. 345 // TODO(sashab): Move these to the bottom of ComputedStyle.
386 ALWAYS_INLINE ComputedStyle(); 346 ALWAYS_INLINE ComputedStyle();
387 347
388 enum InitialStyleTag { 348 enum InitialStyleTag {
389 InitialStyle 349 InitialStyle
390 }; 350 };
391 ALWAYS_INLINE explicit ComputedStyle(InitialStyleTag); 351 ALWAYS_INLINE explicit ComputedStyle(InitialStyleTag);
(...skipping 10 matching lines...) Expand all
402 public: 362 public:
403 static PassRefPtr<ComputedStyle> create(); 363 static PassRefPtr<ComputedStyle> create();
404 static PassRefPtr<ComputedStyle> createAnonymousStyleWithDisplay(const Compu tedStyle& parentStyle, EDisplay); 364 static PassRefPtr<ComputedStyle> createAnonymousStyleWithDisplay(const Compu tedStyle& parentStyle, EDisplay);
405 static PassRefPtr<ComputedStyle> clone(const ComputedStyle&); 365 static PassRefPtr<ComputedStyle> clone(const ComputedStyle&);
406 static const ComputedStyle& initialStyle() { return mutableInitialStyle(); } 366 static const ComputedStyle& initialStyle() { return mutableInitialStyle(); }
407 static void invalidateInitialStyle(); 367 static void invalidateInitialStyle();
408 368
409 // Computes how the style change should be propagated down the tree. 369 // Computes how the style change should be propagated down the tree.
410 static StyleRecalcChange stylePropagationDiff(const ComputedStyle* oldStyle, const ComputedStyle* newStyle); 370 static StyleRecalcChange stylePropagationDiff(const ComputedStyle* oldStyle, const ComputedStyle* newStyle);
411 371
412 // Copies the values of any independent inherited properties from the parent
413 // that are not explicitly set in this style.
414 void propagateIndependentInheritedProperties(const ComputedStyle& parentStyl e);
415
416 ContentPosition resolvedJustifyContentPosition(const StyleContentAlignmentDa ta& normalValueBehavior) const; 372 ContentPosition resolvedJustifyContentPosition(const StyleContentAlignmentDa ta& normalValueBehavior) const;
417 ContentDistributionType resolvedJustifyContentDistribution(const StyleConten tAlignmentData& normalValueBehavior) const; 373 ContentDistributionType resolvedJustifyContentDistribution(const StyleConten tAlignmentData& normalValueBehavior) const;
418 ContentPosition resolvedAlignContentPosition(const StyleContentAlignmentData & normalValueBehavior) const; 374 ContentPosition resolvedAlignContentPosition(const StyleContentAlignmentData & normalValueBehavior) const;
419 ContentDistributionType resolvedAlignContentDistribution(const StyleContentA lignmentData& normalValueBehavior) const; 375 ContentDistributionType resolvedAlignContentDistribution(const StyleContentA lignmentData& normalValueBehavior) const;
420 const StyleSelfAlignmentData resolvedAlignment(const ComputedStyle& parentSt yle, ItemPosition resolvedAutoPositionForLayoutObject) const; 376 const StyleSelfAlignmentData resolvedAlignment(const ComputedStyle& parentSt yle, ItemPosition resolvedAutoPositionForLayoutObject) const;
421 static ItemPosition resolveAlignment(const ComputedStyle& parentStyle, const ComputedStyle& childStyle, ItemPosition resolvedAutoPositionForLayoutObject); 377 static ItemPosition resolveAlignment(const ComputedStyle& parentStyle, const ComputedStyle& childStyle, ItemPosition resolvedAutoPositionForLayoutObject);
422 static ItemPosition resolveJustification(const ComputedStyle& parentStyle, c onst ComputedStyle& childStyle, ItemPosition resolvedAutoPositionForLayoutObject ); 378 static ItemPosition resolveJustification(const ComputedStyle& parentStyle, c onst ComputedStyle& childStyle, ItemPosition resolvedAutoPositionForLayoutObject );
423 379
424 StyleDifference visualInvalidationDiff(const ComputedStyle&) const; 380 StyleDifference visualInvalidationDiff(const ComputedStyle&) const;
425 381
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after
1431 1387
1432 // overflow-wrap (aka word-wrap) 1388 // overflow-wrap (aka word-wrap)
1433 static EOverflowWrap initialOverflowWrap() { return NormalOverflowWrap; } 1389 static EOverflowWrap initialOverflowWrap() { return NormalOverflowWrap; }
1434 EOverflowWrap overflowWrap() const { return static_cast<EOverflowWrap>(m_rar eInheritedData->overflowWrap); } 1390 EOverflowWrap overflowWrap() const { return static_cast<EOverflowWrap>(m_rar eInheritedData->overflowWrap); }
1435 void setOverflowWrap(EOverflowWrap b) { SET_VAR(m_rareInheritedData, overflo wWrap, b); } 1391 void setOverflowWrap(EOverflowWrap b) { SET_VAR(m_rareInheritedData, overflo wWrap, b); }
1436 1392
1437 // pointer-events 1393 // pointer-events
1438 static EPointerEvents initialPointerEvents() { return PE_AUTO; } 1394 static EPointerEvents initialPointerEvents() { return PE_AUTO; }
1439 EPointerEvents pointerEvents() const { return static_cast<EPointerEvents>(m_ inheritedData.m_pointerEvents); } 1395 EPointerEvents pointerEvents() const { return static_cast<EPointerEvents>(m_ inheritedData.m_pointerEvents); }
1440 void setPointerEvents(EPointerEvents p) { m_inheritedData.m_pointerEvents = p; } 1396 void setPointerEvents(EPointerEvents p) { m_inheritedData.m_pointerEvents = p; }
1441 void setPointerEventsIsInherited(bool isInherited) { m_nonInheritedData.m_is PointerEventsInherited = isInherited; }
1442 1397
1443 // quotes 1398 // quotes
1444 static QuotesData* initialQuotes() { return 0; } 1399 static QuotesData* initialQuotes() { return 0; }
1445 QuotesData* quotes() const { return m_rareInheritedData->quotes.get(); } 1400 QuotesData* quotes() const { return m_rareInheritedData->quotes.get(); }
1446 void setQuotes(PassRefPtr<QuotesData>); 1401 void setQuotes(PassRefPtr<QuotesData>);
1447 1402
1448 // snap-height 1403 // snap-height
1449 uint8_t snapHeightPosition() const { return m_rareInheritedData->m_snapHeigh tPosition; } 1404 uint8_t snapHeightPosition() const { return m_rareInheritedData->m_snapHeigh tPosition; }
1450 uint8_t snapHeightUnit() const { return m_rareInheritedData->m_snapHeightUni t; } 1405 uint8_t snapHeightUnit() const { return m_rareInheritedData->m_snapHeightUni t; }
1451 void setSnapHeightPosition(uint8_t position) { SET_VAR(m_rareInheritedData, m_snapHeightPosition, position); } 1406 void setSnapHeightPosition(uint8_t position) { SET_VAR(m_rareInheritedData, m_snapHeightPosition, position); }
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
1509 1464
1510 // text-transform (aka -epub-text-transform) 1465 // text-transform (aka -epub-text-transform)
1511 static ETextTransform initialTextTransform() { return TTNONE; } 1466 static ETextTransform initialTextTransform() { return TTNONE; }
1512 ETextTransform textTransform() const { return static_cast<ETextTransform>(m_ inheritedData.m_textTransform); } 1467 ETextTransform textTransform() const { return static_cast<ETextTransform>(m_ inheritedData.m_textTransform); }
1513 void setTextTransform(ETextTransform v) { m_inheritedData.m_textTransform = v; } 1468 void setTextTransform(ETextTransform v) { m_inheritedData.m_textTransform = v; }
1514 1469
1515 // visibility 1470 // visibility
1516 static EVisibility initialVisibility() { return VISIBLE; } 1471 static EVisibility initialVisibility() { return VISIBLE; }
1517 EVisibility visibility() const { return static_cast<EVisibility>(m_inherited Data.m_visibility); } 1472 EVisibility visibility() const { return static_cast<EVisibility>(m_inherited Data.m_visibility); }
1518 void setVisibility(EVisibility v) { m_inheritedData.m_visibility = v; } 1473 void setVisibility(EVisibility v) { m_inheritedData.m_visibility = v; }
1519 void setVisibilityIsInherited(bool isInherited) { m_nonInheritedData.m_isVis ibilityInherited = isInherited; }
1520 1474
1521 // white-space inherited 1475 // white-space inherited
1522 static EWhiteSpace initialWhiteSpace() { return NORMAL; } 1476 static EWhiteSpace initialWhiteSpace() { return NORMAL; }
1523 EWhiteSpace whiteSpace() const { return static_cast<EWhiteSpace>(m_inherited Data.m_whiteSpace); } 1477 EWhiteSpace whiteSpace() const { return static_cast<EWhiteSpace>(m_inherited Data.m_whiteSpace); }
1524 void setWhiteSpace(EWhiteSpace v) { m_inheritedData.m_whiteSpace = v; } 1478 void setWhiteSpace(EWhiteSpace v) { m_inheritedData.m_whiteSpace = v; }
1525 1479
1526 // word-break inherited (aka -epub-word-break) 1480 // word-break inherited (aka -epub-word-break)
1527 static EWordBreak initialWordBreak() { return NormalWordBreak; } 1481 static EWordBreak initialWordBreak() { return NormalWordBreak; }
1528 EWordBreak wordBreak() const { return static_cast<EWordBreak>(m_rareInherite dData->wordBreak); } 1482 EWordBreak wordBreak() const { return static_cast<EWordBreak>(m_rareInherite dData->wordBreak); }
1529 void setWordBreak(EWordBreak b) { SET_VAR(m_rareInheritedData, wordBreak, b) ; } 1483 void setWordBreak(EWordBreak b) { SET_VAR(m_rareInheritedData, wordBreak, b) ; }
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
1752 // stroke-width 1706 // stroke-width
1753 const UnzoomedLength& strokeWidth() const { return svgStyle().strokeWidth(); } 1707 const UnzoomedLength& strokeWidth() const { return svgStyle().strokeWidth(); }
1754 void setStrokeWidth(const UnzoomedLength& w) { accessSVGStyle().setStrokeWid th(w); } 1708 void setStrokeWidth(const UnzoomedLength& w) { accessSVGStyle().setStrokeWid th(w); }
1755 1709
1756 // Comparison operators 1710 // Comparison operators
1757 bool operator==(const ComputedStyle& other) const; 1711 bool operator==(const ComputedStyle& other) const;
1758 bool operator!=(const ComputedStyle& other) const { return !(*this == other) ; } 1712 bool operator!=(const ComputedStyle& other) const { return !(*this == other) ; }
1759 1713
1760 bool inheritedEqual(const ComputedStyle&) const; 1714 bool inheritedEqual(const ComputedStyle&) const;
1761 bool nonInheritedEqual(const ComputedStyle&) const; 1715 bool nonInheritedEqual(const ComputedStyle&) const;
1762 inline bool independentInheritedEqual(const ComputedStyle&) const;
1763 inline bool nonIndependentInheritedEqual(const ComputedStyle&) const;
1764 bool loadingCustomFontsEqual(const ComputedStyle&) const; 1716 bool loadingCustomFontsEqual(const ComputedStyle&) const;
1765 bool inheritedDataShared(const ComputedStyle&) const; 1717 bool inheritedDataShared(const ComputedStyle&) const;
1766 1718
1767 bool hasChildDependentFlags() const { return emptyState() || hasExplicitlyIn heritedProperties(); } 1719 bool hasChildDependentFlags() const { return emptyState() || hasExplicitlyIn heritedProperties(); }
1768 void copyChildDependentFlagsFrom(const ComputedStyle&); 1720 void copyChildDependentFlagsFrom(const ComputedStyle&);
1769 1721
1770 // Counters. 1722 // Counters.
1771 const CounterDirectiveMap* counterDirectives() const; 1723 const CounterDirectiveMap* counterDirectives() const;
1772 CounterDirectiveMap& accessCounterDirectives(); 1724 CounterDirectiveMap& accessCounterDirectives();
1773 const CounterDirectives getCounterDirectives(const AtomicString& identifier) const; 1725 const CounterDirectives getCounterDirectives(const AtomicString& identifier) const;
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
2602 } 2554 }
2603 2555
2604 inline bool ComputedStyle::hasPseudoElementStyle() const 2556 inline bool ComputedStyle::hasPseudoElementStyle() const
2605 { 2557 {
2606 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; 2558 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask;
2607 } 2559 }
2608 2560
2609 } // namespace blink 2561 } // namespace blink
2610 2562
2611 #endif // ComputedStyle_h 2563 #endif // ComputedStyle_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.h ('k') | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698