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

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

Issue 2115803002: Clean up naming in ComputedStyle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 DataRef<StyleInheritedData> inherited; 153 DataRef<StyleInheritedData> inherited;
154 154
155 // list of associated pseudo styles 155 // list of associated pseudo styles
156 std::unique_ptr<PseudoStyleCache> m_cachedPseudoStyles; 156 std::unique_ptr<PseudoStyleCache> m_cachedPseudoStyles;
157 157
158 DataRef<SVGComputedStyle> m_svgStyle; 158 DataRef<SVGComputedStyle> m_svgStyle;
159 159
160 // !START SYNC!: Keep this in sync with the copy constructor in ComputedStyle.cp p and implicitlyInherited() in StyleResolver.cpp 160 // !START SYNC!: Keep this in sync with the copy constructor in ComputedStyle.cp p and implicitlyInherited() in StyleResolver.cpp
161 161
162 // inherit 162 // inherit
163 struct InheritedFlags { 163 struct InheritedData {
164 bool operator==(const InheritedFlags& other) const 164 bool operator==(const InheritedData& other) const
165 { 165 {
166 return (_empty_cells == other._empty_cells) 166 return (m_emptyCells == other.m_emptyCells)
167 && (_caption_side == other._caption_side) 167 && (m_captionSide == other.m_captionSide)
168 && (_list_style_type == other._list_style_type) 168 && (m_listStyleType == other.m_listStyleType)
169 && (_list_style_position == other._list_style_position) 169 && (m_listStylePosition == other.m_listStylePosition)
170 && (_visibility == other._visibility) 170 && (m_visibility == other.m_visibility)
171 && (_text_align == other._text_align) 171 && (m_textAlign == other.m_textAlign)
172 && (_text_transform == other._text_transform) 172 && (m_textTransform == other.m_textTransform)
173 && (m_textUnderline == other.m_textUnderline) 173 && (m_textUnderline == other.m_textUnderline)
174 && (_cursor_style == other._cursor_style) 174 && (m_cursorStyle == other.m_cursorStyle)
175 && (_direction == other._direction) 175 && (m_direction == other.m_direction)
176 && (_white_space == other._white_space) 176 && (m_whiteSpace == other.m_whiteSpace)
177 && (_border_collapse == other._border_collapse) 177 && (m_borderCollapse == other.m_borderCollapse)
178 && (_box_direction == other._box_direction) 178 && (m_boxDirection == other.m_boxDirection)
179 && (m_rtlOrdering == other.m_rtlOrdering) 179 && (m_rtlOrdering == other.m_rtlOrdering)
180 && (m_printColorAdjust == other.m_printColorAdjust) 180 && (m_printColorAdjust == other.m_printColorAdjust)
181 && (_pointerEvents == other._pointerEvents) 181 && (m_pointerEvents == other.m_pointerEvents)
182 && (_insideLink == other._insideLink) 182 && (m_insideLink == other.m_insideLink)
183 && (m_writingMode == other.m_writingMode); 183 && (m_writingMode == other.m_writingMode);
184 } 184 }
185 185
186 bool operator!=(const InheritedFlags& other) const { return !(*this == o ther); } 186 bool operator!=(const InheritedData& other) const { return !(*this == ot her); }
187 187
188 unsigned _empty_cells : 1; // EEmptyCells 188 unsigned m_emptyCells : 1; // EEmptyCells
189 unsigned _caption_side : 2; // ECaptionSide 189 unsigned m_captionSide : 2; // ECaptionSide
190 unsigned _list_style_type : 7; // EListStyleType 190 unsigned m_listStyleType : 7; // EListStyleType
191 unsigned _list_style_position : 1; // EListStylePosition 191 unsigned m_listStylePosition : 1; // EListStylePosition
192 unsigned _visibility : 2; // EVisibility 192 unsigned m_visibility : 2; // EVisibility
193 unsigned _text_align : 4; // ETextAlign 193 unsigned m_textAlign : 4; // ETextAlign
194 unsigned _text_transform : 2; // ETextTransform 194 unsigned m_textTransform : 2; // ETextTransform
195 unsigned m_textUnderline : 1; 195 unsigned m_textUnderline : 1;
196 unsigned _cursor_style : 6; // ECursor 196 unsigned m_cursorStyle : 6; // ECursor
197 unsigned _direction : 1; // TextDirection 197 unsigned m_direction : 1; // TextDirection
198 unsigned _white_space : 3; // EWhiteSpace 198 unsigned m_whiteSpace : 3; // EWhiteSpace
199 unsigned _border_collapse : 1; // EBorderCollapse 199 unsigned m_borderCollapse : 1; // EBorderCollapse
200 unsigned _box_direction : 1; // EBoxDirection (CSS3 box_direction proper ty, flexible box layout module) 200 unsigned m_boxDirection : 1; // EBoxDirection (CSS3 box_direction proper ty, flexible box layout module)
201 // 32 bits 201 // 32 bits
202 202
203 // non CSS2 inherited 203 // non CSS2 inherited
204 unsigned m_rtlOrdering : 1; // Order 204 unsigned m_rtlOrdering : 1; // Order
205 unsigned m_printColorAdjust : PrintColorAdjustBits; 205 unsigned m_printColorAdjust : PrintColorAdjustBits;
206 unsigned _pointerEvents : 4; // EPointerEvents 206 unsigned m_pointerEvents : 4; // EPointerEvents
207 unsigned _insideLink : 2; // EInsideLink 207 unsigned m_insideLink : 2; // EInsideLink
208 208
209 // CSS Text Layout Module Level 3: Vertical writing support 209 // CSS Text Layout Module Level 3: Vertical writing support
210 unsigned m_writingMode : 2; // WritingMode 210 unsigned m_writingMode : 2; // WritingMode
211 // 42 bits 211 // 42 bits
212 } inherited_flags; 212 } inherited_data;
213 213
214 // don't inherit 214 // don't inherit
215 struct NonInheritedFlags { 215 struct NonInheritedData {
216 // Compare computed styles, differences in other flags should not cause an inequality. 216 // Compare computed styles, differences in other flags should not cause an inequality.
217 bool operator==(const NonInheritedFlags& other) const 217 bool operator==(const NonInheritedData& other) const
218 { 218 {
219 return effectiveDisplay == other.effectiveDisplay 219 return m_effectiveDisplay == other.m_effectiveDisplay
220 && originalDisplay == other.originalDisplay 220 && m_originalDisplay == other.m_originalDisplay
221 && overflowX == other.overflowX 221 && m_overflowX == other.m_overflowX
222 && overflowY == other.overflowY 222 && m_overflowY == other.m_overflowY
223 && verticalAlign == other.verticalAlign 223 && m_verticalAlign == other.m_verticalAlign
224 && clear == other.clear 224 && m_clear == other.m_clear
225 && position == other.position 225 && m_position == other.m_position
226 && floating == other.floating 226 && m_floating == other.m_floating
227 && tableLayout == other.tableLayout 227 && m_tableLayout == other.m_tableLayout
228 && unicodeBidi == other.unicodeBidi 228 && m_unicodeBidi == other.m_unicodeBidi
229 // hasViewportUnits 229 // hasViewportUnits
230 && breakBefore == other.breakBefore 230 && m_breakBefore == other.m_breakBefore
231 && breakAfter == other.breakAfter 231 && m_breakAfter == other.m_breakAfter
232 && breakInside == other.breakInside; 232 && m_breakInside == other.m_breakInside;
233 // styleType 233 // styleType
234 // pseudoBits 234 // pseudoBits
235 // explicitInheritance 235 // explicitInheritance
236 // unique 236 // unique
237 // emptyState 237 // emptyState
238 // affectedByFocus 238 // affectedByFocus
239 // affectedByHover 239 // affectedByHover
240 // affectedByActive 240 // affectedByActive
241 // affectedByDrag 241 // affectedByDrag
242 // isLink 242 // isLink
243 } 243 }
244 244
245 bool operator!=(const NonInheritedFlags& other) const { return !(*this = = other); } 245 bool operator!=(const NonInheritedData& other) const { return !(*this == other); }
246 246
247 unsigned effectiveDisplay : 5; // EDisplay 247 unsigned m_effectiveDisplay : 5; // EDisplay
248 unsigned originalDisplay : 5; // EDisplay 248 unsigned m_originalDisplay : 5; // EDisplay
249 unsigned overflowX : 3; // EOverflow 249 unsigned m_overflowX : 3; // EOverflow
250 unsigned overflowY : 3; // EOverflow 250 unsigned m_overflowY : 3; // EOverflow
251 unsigned verticalAlign : 4; // EVerticalAlign 251 unsigned m_verticalAlign : 4; // EVerticalAlign
252 unsigned clear : 2; // EClear 252 unsigned m_clear : 2; // EClear
253 unsigned position : 3; // EPosition 253 unsigned m_position : 3; // EPosition
254 unsigned floating : 2; // EFloat 254 unsigned m_floating : 2; // EFloat
255 unsigned tableLayout : 1; // ETableLayout 255 unsigned m_tableLayout : 1; // ETableLayout
256 unsigned unicodeBidi : 3; // EUnicodeBidi 256 unsigned m_unicodeBidi : 3; // EUnicodeBidi
257 257
258 // This is set if we used viewport units when resolving a length. 258 // This is set if we used viewport units when resolving a length.
259 // It is mutable so we can pass around const ComputedStyles to resolve l engths. 259 // It is mutable so we can pass around const ComputedStyles to resolve l engths.
260 mutable unsigned hasViewportUnits : 1; 260 mutable unsigned m_hasViewportUnits : 1;
261 261
262 // 32 bits 262 // 32 bits
263 263
264 unsigned breakBefore : 4; // EBreak 264 unsigned m_breakBefore : 4; // EBreak
265 unsigned breakAfter : 4; // EBreak 265 unsigned m_breakAfter : 4; // EBreak
266 unsigned breakInside : 2; // EBreak 266 unsigned m_breakInside : 2; // EBreak
267 267
268 unsigned styleType : 6; // PseudoId 268 unsigned m_styleType : 6; // PseudoId
269 unsigned pseudoBits : 8; 269 unsigned m_pseudoBits : 8;
270 unsigned explicitInheritance : 1; // Explicitly inherits a non-inherited property 270 unsigned m_explicitInheritance : 1; // Explicitly inherits a non-inherit ed property
271 unsigned variableReference : 1; // A non-inherited property references a variable. 271 unsigned m_variableReference : 1; // A non-inherited property references a variable.
272 unsigned unique : 1; // Style can not be shared. 272 unsigned m_unique : 1; // Style can not be shared.
273 273
274 unsigned emptyState : 1; 274 unsigned m_emptyState : 1;
275 275
276 unsigned affectedByFocus : 1; 276 unsigned m_affectedByFocus : 1;
277 unsigned affectedByHover : 1; 277 unsigned m_affectedByHover : 1;
278 unsigned affectedByActive : 1; 278 unsigned m_affectedByActive : 1;
279 unsigned affectedByDrag : 1; 279 unsigned m_affectedByDrag : 1;
280 280
281 // 64 bits 281 // 64 bits
282 282
283 unsigned isLink : 1; 283 unsigned m_isLink : 1;
284 284
285 mutable unsigned hasRemUnits : 1; 285 mutable unsigned m_hasRemUnits : 1;
286 // If you add more style bits here, you will also need to update Compute dStyle::copyNonInheritedFromCached() 286 // If you add more style bits here, you will also need to update Compute dStyle::copyNonInheritedFromCached()
287 // 66 bits 287 // 66 bits
288 } noninherited_flags; 288 } noninherited_data;
289 289
290 // !END SYNC! 290 // !END SYNC!
291 291
292 protected: 292 protected:
293 void setBitDefaults() 293 void setBitDefaults()
294 { 294 {
295 inherited_flags._empty_cells = initialEmptyCells(); 295 inherited_data.m_emptyCells = initialEmptyCells();
296 inherited_flags._caption_side = initialCaptionSide(); 296 inherited_data.m_captionSide = initialCaptionSide();
297 inherited_flags._list_style_type = initialListStyleType(); 297 inherited_data.m_listStyleType = initialListStyleType();
298 inherited_flags._list_style_position = initialListStylePosition(); 298 inherited_data.m_listStylePosition = initialListStylePosition();
299 inherited_flags._visibility = initialVisibility(); 299 inherited_data.m_visibility = initialVisibility();
300 inherited_flags._text_align = initialTextAlign(); 300 inherited_data.m_textAlign = initialTextAlign();
301 inherited_flags._text_transform = initialTextTransform(); 301 inherited_data.m_textTransform = initialTextTransform();
302 inherited_flags.m_textUnderline = false; 302 inherited_data.m_textUnderline = false;
303 inherited_flags._cursor_style = initialCursor(); 303 inherited_data.m_cursorStyle = initialCursor();
304 inherited_flags._direction = initialDirection(); 304 inherited_data.m_direction = initialDirection();
305 inherited_flags._white_space = initialWhiteSpace(); 305 inherited_data.m_whiteSpace = initialWhiteSpace();
306 inherited_flags._border_collapse = initialBorderCollapse(); 306 inherited_data.m_borderCollapse = initialBorderCollapse();
307 inherited_flags.m_rtlOrdering = initialRTLOrdering(); 307 inherited_data.m_rtlOrdering = initialRTLOrdering();
308 inherited_flags._box_direction = initialBoxDirection(); 308 inherited_data.m_boxDirection = initialBoxDirection();
309 inherited_flags.m_printColorAdjust = initialPrintColorAdjust(); 309 inherited_data.m_printColorAdjust = initialPrintColorAdjust();
310 inherited_flags._pointerEvents = initialPointerEvents(); 310 inherited_data.m_pointerEvents = initialPointerEvents();
311 inherited_flags._insideLink = NotInsideLink; 311 inherited_data.m_insideLink = NotInsideLink;
312 inherited_flags.m_writingMode = initialWritingMode(); 312 inherited_data.m_writingMode = initialWritingMode();
313 313
314 noninherited_flags.effectiveDisplay = noninherited_flags.originalDisplay = initialDisplay(); 314 noninherited_data.m_effectiveDisplay = noninherited_data.m_originalDispl ay = initialDisplay();
315 noninherited_flags.overflowX = initialOverflowX(); 315 noninherited_data.m_overflowX = initialOverflowX();
316 noninherited_flags.overflowY = initialOverflowY(); 316 noninherited_data.m_overflowY = initialOverflowY();
317 noninherited_flags.verticalAlign = initialVerticalAlign(); 317 noninherited_data.m_verticalAlign = initialVerticalAlign();
318 noninherited_flags.clear = initialClear(); 318 noninherited_data.m_clear = initialClear();
319 noninherited_flags.position = initialPosition(); 319 noninherited_data.m_position = initialPosition();
320 noninherited_flags.floating = initialFloating(); 320 noninherited_data.m_floating = initialFloating();
321 noninherited_flags.tableLayout = initialTableLayout(); 321 noninherited_data.m_tableLayout = initialTableLayout();
322 noninherited_flags.unicodeBidi = initialUnicodeBidi(); 322 noninherited_data.m_unicodeBidi = initialUnicodeBidi();
323 noninherited_flags.breakBefore = initialBreakBefore(); 323 noninherited_data.m_breakBefore = initialBreakBefore();
324 noninherited_flags.breakAfter = initialBreakAfter(); 324 noninherited_data.m_breakAfter = initialBreakAfter();
325 noninherited_flags.breakInside = initialBreakInside(); 325 noninherited_data.m_breakInside = initialBreakInside();
326 noninherited_flags.styleType = PseudoIdNone; 326 noninherited_data.m_styleType = PseudoIdNone;
327 noninherited_flags.pseudoBits = 0; 327 noninherited_data.m_pseudoBits = 0;
328 noninherited_flags.explicitInheritance = false; 328 noninherited_data.m_explicitInheritance = false;
329 noninherited_flags.variableReference = false; 329 noninherited_data.m_variableReference = false;
330 noninherited_flags.unique = false; 330 noninherited_data.m_unique = false;
331 noninherited_flags.emptyState = false; 331 noninherited_data.m_emptyState = false;
332 noninherited_flags.hasViewportUnits = false; 332 noninherited_data.m_hasViewportUnits = false;
333 noninherited_flags.affectedByFocus = false; 333 noninherited_data.m_affectedByFocus = false;
334 noninherited_flags.affectedByHover = false; 334 noninherited_data.m_affectedByHover = false;
335 noninherited_flags.affectedByActive = false; 335 noninherited_data.m_affectedByActive = false;
336 noninherited_flags.affectedByDrag = false; 336 noninherited_data.m_affectedByDrag = false;
337 noninherited_flags.isLink = false; 337 noninherited_data.m_isLink = false;
338 noninherited_flags.hasRemUnits = false; 338 noninherited_data.m_hasRemUnits = false;
339 } 339 }
340 340
341 private: 341 private:
342 ALWAYS_INLINE ComputedStyle(); 342 ALWAYS_INLINE ComputedStyle();
343 343
344 enum InitialStyleTag { 344 enum InitialStyleTag {
345 InitialStyle 345 InitialStyle
346 }; 346 };
347 ALWAYS_INLINE explicit ComputedStyle(InitialStyleTag); 347 ALWAYS_INLINE explicit ComputedStyle(InitialStyleTag);
348 ALWAYS_INLINE ComputedStyle(const ComputedStyle&); 348 ALWAYS_INLINE ComputedStyle(const ComputedStyle&);
(...skipping 27 matching lines...) Expand all
376 StyleDifference visualInvalidationDiff(const ComputedStyle&) const; 376 StyleDifference visualInvalidationDiff(const ComputedStyle&) const;
377 377
378 enum IsAtShadowBoundary { 378 enum IsAtShadowBoundary {
379 AtShadowBoundary, 379 AtShadowBoundary,
380 NotAtShadowBoundary, 380 NotAtShadowBoundary,
381 }; 381 };
382 382
383 void inheritFrom(const ComputedStyle& inheritParent, IsAtShadowBoundary = No tAtShadowBoundary); 383 void inheritFrom(const ComputedStyle& inheritParent, IsAtShadowBoundary = No tAtShadowBoundary);
384 void copyNonInheritedFromCached(const ComputedStyle&); 384 void copyNonInheritedFromCached(const ComputedStyle&);
385 385
386 PseudoId styleType() const { return static_cast<PseudoId>(noninherited_flags .styleType); } 386 PseudoId styleType() const { return static_cast<PseudoId>(noninherited_data. m_styleType); }
387 void setStyleType(PseudoId styleType) { noninherited_flags.styleType = style Type; } 387 void setStyleType(PseudoId styleType) { noninherited_data.m_styleType = styl eType; }
388 388
389 ComputedStyle* getCachedPseudoStyle(PseudoId) const; 389 ComputedStyle* getCachedPseudoStyle(PseudoId) const;
390 ComputedStyle* addCachedPseudoStyle(PassRefPtr<ComputedStyle>); 390 ComputedStyle* addCachedPseudoStyle(PassRefPtr<ComputedStyle>);
391 void removeCachedPseudoStyle(PseudoId); 391 void removeCachedPseudoStyle(PseudoId);
392 392
393 const PseudoStyleCache* cachedPseudoStyles() const { return m_cachedPseudoSt yles.get(); } 393 const PseudoStyleCache* cachedPseudoStyles() const { return m_cachedPseudoSt yles.get(); }
394 394
395 void setHasViewportUnits(bool hasViewportUnits = true) const { noninherited_ flags.hasViewportUnits = hasViewportUnits; } 395 void setHasViewportUnits(bool hasViewportUnits = true) const { noninherited_ data.m_hasViewportUnits = hasViewportUnits; }
396 bool hasViewportUnits() const { return noninherited_flags.hasViewportUnits; } 396 bool hasViewportUnits() const { return noninherited_data.m_hasViewportUnits; }
397 397
398 void setHasRemUnits() const { noninherited_flags.hasRemUnits = true; } 398 void setHasRemUnits() const { noninherited_data.m_hasRemUnits = true; }
399 bool hasRemUnits() const { return noninherited_flags.hasRemUnits; } 399 bool hasRemUnits() const { return noninherited_data.m_hasRemUnits; }
400 400
401 bool affectedByFocus() const { return noninherited_flags.affectedByFocus; } 401 bool affectedByFocus() const { return noninherited_data.m_affectedByFocus; }
402 bool affectedByHover() const { return noninherited_flags.affectedByHover; } 402 bool affectedByHover() const { return noninherited_data.m_affectedByHover; }
403 bool affectedByActive() const { return noninherited_flags.affectedByActive; } 403 bool affectedByActive() const { return noninherited_data.m_affectedByActive; }
404 bool affectedByDrag() const { return noninherited_flags.affectedByDrag; } 404 bool affectedByDrag() const { return noninherited_data.m_affectedByDrag; }
405 405
406 void setAffectedByFocus() { noninherited_flags.affectedByFocus = true; } 406 void setAffectedByFocus() { noninherited_data.m_affectedByFocus = true; }
407 void setAffectedByHover() { noninherited_flags.affectedByHover = true; } 407 void setAffectedByHover() { noninherited_data.m_affectedByHover = true; }
408 void setAffectedByActive() { noninherited_flags.affectedByActive = true; } 408 void setAffectedByActive() { noninherited_data.m_affectedByActive = true; }
409 void setAffectedByDrag() { noninherited_flags.affectedByDrag = true; } 409 void setAffectedByDrag() { noninherited_data.m_affectedByDrag = true; }
410 410
411 bool operator==(const ComputedStyle& other) const; 411 bool operator==(const ComputedStyle& other) const;
412 bool operator!=(const ComputedStyle& other) const { return !(*this == other) ; } 412 bool operator!=(const ComputedStyle& other) const { return !(*this == other) ; }
413 bool isFloating() const { return noninherited_flags.floating != NoFloat; } 413 bool isFloating() const { return noninherited_data.m_floating != NoFloat; }
414 bool hasMargin() const { return surround->margin.nonZero(); } 414 bool hasMargin() const { return surround->margin.nonZero(); }
415 bool hasBorderFill() const { return surround->border.hasBorderFill(); } 415 bool hasBorderFill() const { return surround->border.hasBorderFill(); }
416 bool hasBorder() const { return surround->border.hasBorder(); } 416 bool hasBorder() const { return surround->border.hasBorder(); }
417 bool hasBorderDecoration() const { return hasBorder() || hasBorderFill(); } 417 bool hasBorderDecoration() const { return hasBorder() || hasBorderFill(); }
418 bool hasPadding() const { return surround->padding.nonZero(); } 418 bool hasPadding() const { return surround->padding.nonZero(); }
419 bool hasMarginBeforeQuirk() const { return marginBefore().quirk(); } 419 bool hasMarginBeforeQuirk() const { return marginBefore().quirk(); }
420 bool hasMarginAfterQuirk() const { return marginAfter().quirk(); } 420 bool hasMarginAfterQuirk() const { return marginAfter().quirk(); }
421 421
422 bool hasBackgroundImage() const { return m_background->background().hasImage (); } 422 bool hasBackgroundImage() const { return m_background->background().hasImage (); }
423 bool hasFixedBackgroundImage() const { return m_background->background().has FixedImage(); } 423 bool hasFixedBackgroundImage() const { return m_background->background().has FixedImage(); }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 // of creating stacking contexts. 461 // of creating stacking contexts.
462 bool hasNonInitialOpacity() const { return hasOpacity() || hasWillChangeOpac ityHint() || hasCurrentOpacityAnimation(); } 462 bool hasNonInitialOpacity() const { return hasOpacity() || hasWillChangeOpac ityHint() || hasCurrentOpacityAnimation(); }
463 463
464 // Returns whether this style contains any grouping property as defined by [ css-transforms]. 464 // Returns whether this style contains any grouping property as defined by [ css-transforms].
465 // The main purpose of this is to adjust the used value of transform-style p roperty. 465 // The main purpose of this is to adjust the used value of transform-style p roperty.
466 // Note: We currently don't include every grouping property on the spec to m aintain 466 // Note: We currently don't include every grouping property on the spec to m aintain
467 // backward compatibility. 467 // backward compatibility.
468 // [css-transforms] https://drafts.csswg.org/css-transforms/#grouping-proper ty-values 468 // [css-transforms] https://drafts.csswg.org/css-transforms/#grouping-proper ty-values
469 bool hasGroupingProperty() const { return !isOverflowVisible() || hasFilterI nducingProperty() || hasNonInitialOpacity(); } 469 bool hasGroupingProperty() const { return !isOverflowVisible() || hasFilterI nducingProperty() || hasNonInitialOpacity(); }
470 470
471 Order rtlOrdering() const { return static_cast<Order>(inherited_flags.m_rtlO rdering); } 471 Order rtlOrdering() const { return static_cast<Order>(inherited_data.m_rtlOr dering); }
472 void setRTLOrdering(Order o) { inherited_flags.m_rtlOrdering = o; } 472 void setRTLOrdering(Order o) { inherited_data.m_rtlOrdering = o; }
473 473
474 bool isStyleAvailable() const; 474 bool isStyleAvailable() const;
475 475
476 bool hasAnyPublicPseudoStyles() const; 476 bool hasAnyPublicPseudoStyles() const;
477 bool hasPseudoStyle(PseudoId) const; 477 bool hasPseudoStyle(PseudoId) const;
478 void setHasPseudoStyle(PseudoId); 478 void setHasPseudoStyle(PseudoId);
479 bool hasUniquePseudoStyle() const; 479 bool hasUniquePseudoStyle() const;
480 bool hasPseudoElementStyle() const; 480 bool hasPseudoElementStyle() const;
481 481
482 bool canContainAbsolutePositionObjects() const { return position() != Static Position; } 482 bool canContainAbsolutePositionObjects() const { return position() != Static Position; }
483 bool canContainFixedPositionObjects() const { return hasTransformRelatedProp erty() || containsPaint();} 483 bool canContainFixedPositionObjects() const { return hasTransformRelatedProp erty() || containsPaint();}
484 484
485 // attribute getter methods 485 // attribute getter methods
486 486
487 EDisplay display() const { return static_cast<EDisplay>(noninherited_flags.e ffectiveDisplay); } 487 EDisplay display() const { return static_cast<EDisplay>(noninherited_data.m_ effectiveDisplay); }
488 EDisplay originalDisplay() const { return static_cast<EDisplay>(noninherited _flags.originalDisplay); } 488 EDisplay originalDisplay() const { return static_cast<EDisplay>(noninherited _data.m_originalDisplay); }
489 489
490 const Length& left() const { return surround->offset.left(); } 490 const Length& left() const { return surround->offset.left(); }
491 const Length& right() const { return surround->offset.right(); } 491 const Length& right() const { return surround->offset.right(); }
492 const Length& top() const { return surround->offset.top(); } 492 const Length& top() const { return surround->offset.top(); }
493 const Length& bottom() const { return surround->offset.bottom(); } 493 const Length& bottom() const { return surround->offset.bottom(); }
494 494
495 // Accessors for positioned object edges that take into account writing mode . 495 // Accessors for positioned object edges that take into account writing mode .
496 const Length& logicalLeft() const { return surround->offset.logicalLeft(getW ritingMode()); } 496 const Length& logicalLeft() const { return surround->offset.logicalLeft(getW ritingMode()); }
497 const Length& logicalRight() const { return surround->offset.logicalRight(ge tWritingMode()); } 497 const Length& logicalRight() const { return surround->offset.logicalRight(ge tWritingMode()); }
498 const Length& logicalTop() const { return surround->offset.before(getWriting Mode()); } 498 const Length& logicalTop() const { return surround->offset.before(getWriting Mode()); }
499 const Length& logicalBottom() const { return surround->offset.after(getWriti ngMode()); } 499 const Length& logicalBottom() const { return surround->offset.after(getWriti ngMode()); }
500 500
501 // Whether or not a positioned element requires normal flow x/y to be comput ed 501 // Whether or not a positioned element requires normal flow x/y to be comput ed
502 // to determine its position. 502 // to determine its position.
503 bool hasAutoLeftAndRight() const { return left().isAuto() && right().isAuto( ); } 503 bool hasAutoLeftAndRight() const { return left().isAuto() && right().isAuto( ); }
504 bool hasAutoTopAndBottom() const { return top().isAuto() && bottom().isAuto( ); } 504 bool hasAutoTopAndBottom() const { return top().isAuto() && bottom().isAuto( ); }
505 bool hasStaticInlinePosition(bool horizontal) const { return horizontal ? ha sAutoLeftAndRight() : hasAutoTopAndBottom(); } 505 bool hasStaticInlinePosition(bool horizontal) const { return horizontal ? ha sAutoLeftAndRight() : hasAutoTopAndBottom(); }
506 bool hasStaticBlockPosition(bool horizontal) const { return horizontal ? has AutoTopAndBottom() : hasAutoLeftAndRight(); } 506 bool hasStaticBlockPosition(bool horizontal) const { return horizontal ? has AutoTopAndBottom() : hasAutoLeftAndRight(); }
507 507
508 EPosition position() const { return static_cast<EPosition>(noninherited_flag s.position); } 508 EPosition position() const { return static_cast<EPosition>(noninherited_data .m_position); }
509 bool hasOutOfFlowPosition() const { return position() == AbsolutePosition || position() == FixedPosition; } 509 bool hasOutOfFlowPosition() const { return position() == AbsolutePosition || position() == FixedPosition; }
510 bool hasInFlowPosition() const { return position() == RelativePosition || po sition() == StickyPosition; } 510 bool hasInFlowPosition() const { return position() == RelativePosition || po sition() == StickyPosition; }
511 bool hasViewportConstrainedPosition() const { return position() == FixedPosi tion || position() == StickyPosition; } 511 bool hasViewportConstrainedPosition() const { return position() == FixedPosi tion || position() == StickyPosition; }
512 EFloat floating() const { return static_cast<EFloat>(noninherited_flags.floa ting); } 512 EFloat floating() const { return static_cast<EFloat>(noninherited_data.m_flo ating); }
513 513
514 const Length& width() const { return m_box->width(); } 514 const Length& width() const { return m_box->width(); }
515 const Length& height() const { return m_box->height(); } 515 const Length& height() const { return m_box->height(); }
516 const Length& minWidth() const { return m_box->minWidth(); } 516 const Length& minWidth() const { return m_box->minWidth(); }
517 const Length& maxWidth() const { return m_box->maxWidth(); } 517 const Length& maxWidth() const { return m_box->maxWidth(); }
518 const Length& minHeight() const { return m_box->minHeight(); } 518 const Length& minHeight() const { return m_box->minHeight(); }
519 const Length& maxHeight() const { return m_box->maxHeight(); } 519 const Length& maxHeight() const { return m_box->maxHeight(); }
520 520
521 const Length& logicalWidth() const { return isHorizontalWritingMode() ? widt h() : height(); } 521 const Length& logicalWidth() const { return isHorizontalWritingMode() ? widt h() : height(); }
522 const Length& logicalHeight() const { return isHorizontalWritingMode() ? hei ght() : width(); } 522 const Length& logicalHeight() const { return isHorizontalWritingMode() ? hei ght() : width(); }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 { 569 {
570 if (m_background->outline().style() == BorderStyleNone) 570 if (m_background->outline().style() == BorderStyleNone)
571 return 0; 571 return 0;
572 return m_background->outline().width(); 572 return m_background->outline().width();
573 } 573 }
574 bool hasOutline() const { return outlineWidth() > 0 && outlineStyle() > Bord erStyleHidden; } 574 bool hasOutline() const { return outlineWidth() > 0 && outlineStyle() > Bord erStyleHidden; }
575 EBorderStyle outlineStyle() const { return m_background->outline().style(); } 575 EBorderStyle outlineStyle() const { return m_background->outline().style(); }
576 OutlineIsAuto outlineStyleIsAuto() const { return static_cast<OutlineIsAuto> (m_background->outline().isAuto()); } 576 OutlineIsAuto outlineStyleIsAuto() const { return static_cast<OutlineIsAuto> (m_background->outline().isAuto()); }
577 int outlineOutsetExtent() const; 577 int outlineOutsetExtent() const;
578 578
579 EOverflow overflowX() const { return static_cast<EOverflow>(noninherited_fla gs.overflowX); } 579 EOverflow overflowX() const { return static_cast<EOverflow>(noninherited_dat a.m_overflowX); }
580 EOverflow overflowY() const { return static_cast<EOverflow>(noninherited_fla gs.overflowY); } 580 EOverflow overflowY() const { return static_cast<EOverflow>(noninherited_dat a.m_overflowY); }
581 // It's sufficient to just check one direction, since it's illegal to have v isible on only one overflow value. 581 // It's sufficient to just check one direction, since it's illegal to have v isible on only one overflow value.
582 bool isOverflowVisible() const { ASSERT(overflowX() != OverflowVisible || ov erflowX() == overflowY()); return overflowX() == OverflowVisible; } 582 bool isOverflowVisible() const { ASSERT(overflowX() != OverflowVisible || ov erflowX() == overflowY()); return overflowX() == OverflowVisible; }
583 bool isOverflowPaged() const { return overflowY() == OverflowPagedX || overf lowY() == OverflowPagedY; } 583 bool isOverflowPaged() const { return overflowY() == OverflowPagedX || overf lowY() == OverflowPagedY; }
584 584
585 EVisibility visibility() const { return static_cast<EVisibility>(inherited_f lags._visibility); } 585 EVisibility visibility() const { return static_cast<EVisibility>(inherited_d ata.m_visibility); }
586 EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(no ninherited_flags.verticalAlign); } 586 EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(no ninherited_data.m_verticalAlign); }
587 const Length& getVerticalAlignLength() const { return m_box->verticalAlign() ; } 587 const Length& getVerticalAlignLength() const { return m_box->verticalAlign() ; }
588 588
589 const Length& clipLeft() const { return visual->clip.left(); } 589 const Length& clipLeft() const { return visual->clip.left(); }
590 const Length& clipRight() const { return visual->clip.right(); } 590 const Length& clipRight() const { return visual->clip.right(); }
591 const Length& clipTop() const { return visual->clip.top(); } 591 const Length& clipTop() const { return visual->clip.top(); }
592 const Length& clipBottom() const { return visual->clip.bottom(); } 592 const Length& clipBottom() const { return visual->clip.bottom(); }
593 const LengthBox& clip() const { return visual->clip; } 593 const LengthBox& clip() const { return visual->clip; }
594 bool hasAutoClip() const { return visual->hasAutoClip; } 594 bool hasAutoClip() const { return visual->hasAutoClip; }
595 595
596 EUnicodeBidi unicodeBidi() const { return static_cast<EUnicodeBidi>(noninher ited_flags.unicodeBidi); } 596 EUnicodeBidi unicodeBidi() const { return static_cast<EUnicodeBidi>(noninher ited_data.m_unicodeBidi); }
597 597
598 EClear clear() const { return static_cast<EClear>(noninherited_flags.clear); } 598 EClear clear() const { return static_cast<EClear>(noninherited_data.m_clear) ; }
599 ETableLayout tableLayout() const { return static_cast<ETableLayout>(noninher ited_flags.tableLayout); } 599 ETableLayout tableLayout() const { return static_cast<ETableLayout>(noninher ited_data.m_tableLayout); }
600 bool isFixedTableLayout() const { return tableLayout() == TableLayoutFixed & & !logicalWidth().isAuto(); } 600 bool isFixedTableLayout() const { return tableLayout() == TableLayoutFixed & & !logicalWidth().isAuto(); }
601 601
602 const Font& font() const; 602 const Font& font() const;
603 const FontMetrics& getFontMetrics() const; 603 const FontMetrics& getFontMetrics() const;
604 const FontDescription& getFontDescription() const; 604 const FontDescription& getFontDescription() const;
605 float specifiedFontSize() const; 605 float specifiedFontSize() const;
606 float computedFontSize() const; 606 float computedFontSize() const;
607 int fontSize() const; 607 int fontSize() const;
608 float fontSizeAdjust() const; 608 float fontSizeAdjust() const;
609 bool hasFontSizeAdjust() const; 609 bool hasFontSizeAdjust() const;
610 FontWeight fontWeight() const; 610 FontWeight fontWeight() const;
611 FontStretch fontStretch() const; 611 FontStretch fontStretch() const;
612 612
613 float textAutosizingMultiplier() const { return inherited->textAutosizingMul tiplier; } 613 float textAutosizingMultiplier() const { return inherited->textAutosizingMul tiplier; }
614 614
615 const Length& textIndent() const { return rareInheritedData->indent; } 615 const Length& textIndent() const { return rareInheritedData->indent; }
616 TextIndentLine getTextIndentLine() const { return static_cast<TextIndentLine >(rareInheritedData->m_textIndentLine); } 616 TextIndentLine getTextIndentLine() const { return static_cast<TextIndentLine >(rareInheritedData->m_textIndentLine); }
617 TextIndentType getTextIndentType() const { return static_cast<TextIndentType >(rareInheritedData->m_textIndentType); } 617 TextIndentType getTextIndentType() const { return static_cast<TextIndentType >(rareInheritedData->m_textIndentType); }
618 ETextAlign textAlign() const { return static_cast<ETextAlign>(inherited_flag s._text_align); } 618 ETextAlign textAlign() const { return static_cast<ETextAlign>(inherited_data .m_textAlign); }
619 TextAlignLast getTextAlignLast() const { return static_cast<TextAlignLast>(r areInheritedData->m_textAlignLast); } 619 TextAlignLast getTextAlignLast() const { return static_cast<TextAlignLast>(r areInheritedData->m_textAlignLast); }
620 TextJustify getTextJustify() const { return static_cast<TextJustify>(rareInh eritedData->m_textJustify); } 620 TextJustify getTextJustify() const { return static_cast<TextJustify>(rareInh eritedData->m_textJustify); }
621 ETextTransform textTransform() const { return static_cast<ETextTransform>(in herited_flags._text_transform); } 621 ETextTransform textTransform() const { return static_cast<ETextTransform>(in herited_data.m_textTransform); }
622 TextDecoration textDecorationsInEffect() const; 622 TextDecoration textDecorationsInEffect() const;
623 const Vector<AppliedTextDecoration>& appliedTextDecorations() const; 623 const Vector<AppliedTextDecoration>& appliedTextDecorations() const;
624 TextDecoration getTextDecoration() const { return static_cast<TextDecoration >(visual->textDecoration); } 624 TextDecoration getTextDecoration() const { return static_cast<TextDecoration >(visual->textDecoration); }
625 TextUnderlinePosition getTextUnderlinePosition() const { return static_cast< TextUnderlinePosition>(rareInheritedData->m_textUnderlinePosition); } 625 TextUnderlinePosition getTextUnderlinePosition() const { return static_cast< TextUnderlinePosition>(rareInheritedData->m_textUnderlinePosition); }
626 TextDecorationStyle getTextDecorationStyle() const { return static_cast<Text DecorationStyle>(rareNonInheritedData->m_textDecorationStyle); } 626 TextDecorationStyle getTextDecorationStyle() const { return static_cast<Text DecorationStyle>(rareNonInheritedData->m_textDecorationStyle); }
627 float wordSpacing() const; 627 float wordSpacing() const;
628 float letterSpacing() const; 628 float letterSpacing() const;
629 StyleVariableData* variables() const; 629 StyleVariableData* variables() const;
630 630
631 void setVariable(const AtomicString&, PassRefPtr<CSSVariableData>); 631 void setVariable(const AtomicString&, PassRefPtr<CSSVariableData>);
632 void removeVariable(const AtomicString&); 632 void removeVariable(const AtomicString&);
633 633
634 float zoom() const { return visual->m_zoom; } 634 float zoom() const { return visual->m_zoom; }
635 float effectiveZoom() const { return rareInheritedData->m_effectiveZoom; } 635 float effectiveZoom() const { return rareInheritedData->m_effectiveZoom; }
636 636
637 TextDirection direction() const { return static_cast<TextDirection>(inherite d_flags._direction); } 637 TextDirection direction() const { return static_cast<TextDirection>(inherite d_data.m_direction); }
638 bool isLeftToRightDirection() const { return direction() == LTR; } 638 bool isLeftToRightDirection() const { return direction() == LTR; }
639 bool selfOrAncestorHasDirAutoAttribute() const { return rareInheritedData->m _selfOrAncestorHasDirAutoAttribute; } 639 bool selfOrAncestorHasDirAutoAttribute() const { return rareInheritedData->m _selfOrAncestorHasDirAutoAttribute; }
640 640
641 const Length& specifiedLineHeight() const; 641 const Length& specifiedLineHeight() const;
642 Length lineHeight() const; 642 Length lineHeight() const;
643 int computedLineHeight() const; 643 int computedLineHeight() const;
644 644
645 EWhiteSpace whiteSpace() const { return static_cast<EWhiteSpace>(inherited_f lags._white_space); } 645 EWhiteSpace whiteSpace() const { return static_cast<EWhiteSpace>(inherited_d ata.m_whiteSpace); }
646 static bool autoWrap(EWhiteSpace ws) 646 static bool autoWrap(EWhiteSpace ws)
647 { 647 {
648 // Nowrap and pre don't automatically wrap. 648 // Nowrap and pre don't automatically wrap.
649 return ws != NOWRAP && ws != PRE; 649 return ws != NOWRAP && ws != PRE;
650 } 650 }
651 651
652 bool autoWrap() const 652 bool autoWrap() const
653 { 653 {
654 return autoWrap(whiteSpace()); 654 return autoWrap(whiteSpace());
655 } 655 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 FillLayer& accessMaskLayers() { return rareNonInheritedData.access()->m_mask ; } 707 FillLayer& accessMaskLayers() { return rareNonInheritedData.access()->m_mask ; }
708 const FillLayer& maskLayers() const { return rareNonInheritedData->m_mask; } 708 const FillLayer& maskLayers() const { return rareNonInheritedData->m_mask; }
709 709
710 const NinePieceImage& maskBoxImage() const { return rareNonInheritedData->m_ maskBoxImage; } 710 const NinePieceImage& maskBoxImage() const { return rareNonInheritedData->m_ maskBoxImage; }
711 StyleImage* maskBoxImageSource() const { return rareNonInheritedData->m_mask BoxImage.image(); } 711 StyleImage* maskBoxImageSource() const { return rareNonInheritedData->m_mask BoxImage.image(); }
712 const LengthBox& maskBoxImageSlices() const { return rareNonInheritedData->m _maskBoxImage.imageSlices(); } 712 const LengthBox& maskBoxImageSlices() const { return rareNonInheritedData->m _maskBoxImage.imageSlices(); }
713 bool maskBoxImageSlicesFill() const { return rareNonInheritedData->m_maskBox Image.fill(); } 713 bool maskBoxImageSlicesFill() const { return rareNonInheritedData->m_maskBox Image.fill(); }
714 const BorderImageLengthBox& maskBoxImageWidth() const { return rareNonInheri tedData->m_maskBoxImage.borderSlices(); } 714 const BorderImageLengthBox& maskBoxImageWidth() const { return rareNonInheri tedData->m_maskBoxImage.borderSlices(); }
715 const BorderImageLengthBox& maskBoxImageOutset() const { return rareNonInher itedData->m_maskBoxImage.outset(); } 715 const BorderImageLengthBox& maskBoxImageOutset() const { return rareNonInher itedData->m_maskBoxImage.outset(); }
716 716
717 EBorderCollapse borderCollapse() const { return static_cast<EBorderCollapse> (inherited_flags._border_collapse); } 717 EBorderCollapse borderCollapse() const { return static_cast<EBorderCollapse> (inherited_data.m_borderCollapse); }
718 short horizontalBorderSpacing() const; 718 short horizontalBorderSpacing() const;
719 short verticalBorderSpacing() const; 719 short verticalBorderSpacing() const;
720 EEmptyCells emptyCells() const { return static_cast<EEmptyCells>(inherited_f lags._empty_cells); } 720 EEmptyCells emptyCells() const { return static_cast<EEmptyCells>(inherited_d ata.m_emptyCells); }
721 ECaptionSide captionSide() const { return static_cast<ECaptionSide>(inherite d_flags._caption_side); } 721 ECaptionSide captionSide() const { return static_cast<ECaptionSide>(inherite d_data.m_captionSide); }
722 722
723 EListStyleType listStyleType() const { return static_cast<EListStyleType>(in herited_flags._list_style_type); } 723 EListStyleType listStyleType() const { return static_cast<EListStyleType>(in herited_data.m_listStyleType); }
724 StyleImage* listStyleImage() const; 724 StyleImage* listStyleImage() const;
725 EListStylePosition listStylePosition() const { return static_cast<EListStyle Position>(inherited_flags._list_style_position); } 725 EListStylePosition listStylePosition() const { return static_cast<EListStyle Position>(inherited_data.m_listStylePosition); }
726 726
727 const Length& marginTop() const { return surround->margin.top(); } 727 const Length& marginTop() const { return surround->margin.top(); }
728 const Length& marginBottom() const { return surround->margin.bottom(); } 728 const Length& marginBottom() const { return surround->margin.bottom(); }
729 const Length& marginLeft() const { return surround->margin.left(); } 729 const Length& marginLeft() const { return surround->margin.left(); }
730 const Length& marginRight() const { return surround->margin.right(); } 730 const Length& marginRight() const { return surround->margin.right(); }
731 const Length& marginBefore() const { return surround->margin.before(getWriti ngMode()); } 731 const Length& marginBefore() const { return surround->margin.before(getWriti ngMode()); }
732 const Length& marginAfter() const { return surround->margin.after(getWriting Mode()); } 732 const Length& marginAfter() const { return surround->margin.after(getWriting Mode()); }
733 const Length& marginStart() const { return surround->margin.start(getWriting Mode(), direction()); } 733 const Length& marginStart() const { return surround->margin.start(getWriting Mode(), direction()); }
734 const Length& marginEnd() const { return surround->margin.end(getWritingMode (), direction()); } 734 const Length& marginEnd() const { return surround->margin.end(getWritingMode (), direction()); }
735 const Length& marginOver() const { return surround->margin.over(getWritingMo de()); } 735 const Length& marginOver() const { return surround->margin.over(getWritingMo de()); }
736 const Length& marginUnder() const { return surround->margin.under(getWriting Mode()); } 736 const Length& marginUnder() const { return surround->margin.under(getWriting Mode()); }
737 const Length& marginStartUsing(const ComputedStyle* otherStyle) const { retu rn surround->margin.start(otherStyle->getWritingMode(), otherStyle->direction()) ; } 737 const Length& marginStartUsing(const ComputedStyle* otherStyle) const { retu rn surround->margin.start(otherStyle->getWritingMode(), otherStyle->direction()) ; }
738 const Length& marginEndUsing(const ComputedStyle* otherStyle) const { return surround->margin.end(otherStyle->getWritingMode(), otherStyle->direction()); } 738 const Length& marginEndUsing(const ComputedStyle* otherStyle) const { return surround->margin.end(otherStyle->getWritingMode(), otherStyle->direction()); }
739 const Length& marginBeforeUsing(const ComputedStyle* otherStyle) const { ret urn surround->margin.before(otherStyle->getWritingMode()); } 739 const Length& marginBeforeUsing(const ComputedStyle* otherStyle) const { ret urn surround->margin.before(otherStyle->getWritingMode()); }
740 const Length& marginAfterUsing(const ComputedStyle* otherStyle) const { retu rn surround->margin.after(otherStyle->getWritingMode()); } 740 const Length& marginAfterUsing(const ComputedStyle* otherStyle) const { retu rn surround->margin.after(otherStyle->getWritingMode()); }
741 741
742 const LengthBox& paddingBox() const { return surround->padding; } 742 const LengthBox& paddingBox() const { return surround->padding; }
743 const Length& paddingTop() const { return surround->padding.top(); } 743 const Length& paddingTop() const { return surround->padding.top(); }
744 const Length& paddingBottom() const { return surround->padding.bottom(); } 744 const Length& paddingBottom() const { return surround->padding.bottom(); }
745 const Length& paddingLeft() const { return surround->padding.left(); } 745 const Length& paddingLeft() const { return surround->padding.left(); }
746 const Length& paddingRight() const { return surround->padding.right(); } 746 const Length& paddingRight() const { return surround->padding.right(); }
747 const Length& paddingBefore() const { return surround->padding.before(getWri tingMode()); } 747 const Length& paddingBefore() const { return surround->padding.before(getWri tingMode()); }
748 const Length& paddingAfter() const { return surround->padding.after(getWriti ngMode()); } 748 const Length& paddingAfter() const { return surround->padding.after(getWriti ngMode()); }
749 const Length& paddingStart() const { return surround->padding.start(getWriti ngMode(), direction()); } 749 const Length& paddingStart() const { return surround->padding.start(getWriti ngMode(), direction()); }
750 const Length& paddingEnd() const { return surround->padding.end(getWritingMo de(), direction()); } 750 const Length& paddingEnd() const { return surround->padding.end(getWritingMo de(), direction()); }
751 const Length& paddingOver() const { return surround->padding.over(getWriting Mode()); } 751 const Length& paddingOver() const { return surround->padding.over(getWriting Mode()); }
752 const Length& paddingUnder() const { return surround->padding.under(getWriti ngMode()); } 752 const Length& paddingUnder() const { return surround->padding.under(getWriti ngMode()); }
753 753
754 ECursor cursor() const { return static_cast<ECursor>(inherited_flags._cursor _style); } 754 ECursor cursor() const { return static_cast<ECursor>(inherited_data.m_cursor Style); }
755 CursorList* cursors() const { return rareInheritedData->cursorData.get(); } 755 CursorList* cursors() const { return rareInheritedData->cursorData.get(); }
756 756
757 EInsideLink insideLink() const { return static_cast<EInsideLink>(inherited_f lags._insideLink); } 757 EInsideLink insideLink() const { return static_cast<EInsideLink>(inherited_d ata.m_insideLink); }
758 bool isLink() const { return noninherited_flags.isLink; } 758 bool isLink() const { return noninherited_data.m_isLink; }
759 759
760 short widows() const { return rareInheritedData->widows; } 760 short widows() const { return rareInheritedData->widows; }
761 short orphans() const { return rareInheritedData->orphans; } 761 short orphans() const { return rareInheritedData->orphans; }
762 EBreak breakAfter() const { return static_cast<EBreak>(noninherited_flags.br eakAfter); } 762 EBreak breakAfter() const { return static_cast<EBreak>(noninherited_data.m_b reakAfter); }
763 EBreak breakBefore() const { return static_cast<EBreak>(noninherited_flags.b reakBefore); } 763 EBreak breakBefore() const { return static_cast<EBreak>(noninherited_data.m_ breakBefore); }
764 EBreak breakInside() const { return static_cast<EBreak>(noninherited_flags.b reakInside); } 764 EBreak breakInside() const { return static_cast<EBreak>(noninherited_data.m_ breakInside); }
765 765
766 TextSizeAdjust getTextSizeAdjust() const { return rareInheritedData->m_textS izeAdjust; } 766 TextSizeAdjust getTextSizeAdjust() const { return rareInheritedData->m_textS izeAdjust; }
767 767
768 // CSS3 Getter Methods 768 // CSS3 Getter Methods
769 769
770 int outlineOffset() const 770 int outlineOffset() const
771 { 771 {
772 if (m_background->outline().style() == BorderStyleNone) 772 if (m_background->outline().style() == BorderStyleNone)
773 return 0; 773 return 0;
774 return m_background->outline().offset(); 774 return m_background->outline().offset();
775 } 775 }
776 776
777 ShadowList* textShadow() const { return rareInheritedData->textShadow.get(); } 777 ShadowList* textShadow() const { return rareInheritedData->textShadow.get(); }
778 778
779 float textStrokeWidth() const { return rareInheritedData->textStrokeWidth; } 779 float textStrokeWidth() const { return rareInheritedData->textStrokeWidth; }
780 float opacity() const { return rareNonInheritedData->opacity; } 780 float opacity() const { return rareNonInheritedData->opacity; }
781 bool hasOpacity() const { return opacity() < 1.0f; } 781 bool hasOpacity() const { return opacity() < 1.0f; }
782 ControlPart appearance() const { return static_cast<ControlPart>(rareNonInhe ritedData->m_appearance); } 782 ControlPart appearance() const { return static_cast<ControlPart>(rareNonInhe ritedData->m_appearance); }
783 EBoxAlignment boxAlign() const { return static_cast<EBoxAlignment>(rareNonIn heritedData->m_deprecatedFlexibleBox->align); } 783 EBoxAlignment boxAlign() const { return static_cast<EBoxAlignment>(rareNonIn heritedData->m_deprecatedFlexibleBox->align); }
784 EBoxDirection boxDirection() const { return static_cast<EBoxDirection>(inher ited_flags._box_direction); } 784 EBoxDirection boxDirection() const { return static_cast<EBoxDirection>(inher ited_data.m_boxDirection); }
785 float boxFlex() const { return rareNonInheritedData->m_deprecatedFlexibleBox ->flex; } 785 float boxFlex() const { return rareNonInheritedData->m_deprecatedFlexibleBox ->flex; }
786 unsigned boxFlexGroup() const { return rareNonInheritedData->m_deprecatedFle xibleBox->flexGroup; } 786 unsigned boxFlexGroup() const { return rareNonInheritedData->m_deprecatedFle xibleBox->flexGroup; }
787 EBoxLines boxLines() const { return static_cast<EBoxLines>(rareNonInheritedD ata->m_deprecatedFlexibleBox->lines); } 787 EBoxLines boxLines() const { return static_cast<EBoxLines>(rareNonInheritedD ata->m_deprecatedFlexibleBox->lines); }
788 unsigned boxOrdinalGroup() const { return rareNonInheritedData->m_deprecated FlexibleBox->ordinalGroup; } 788 unsigned boxOrdinalGroup() const { return rareNonInheritedData->m_deprecated FlexibleBox->ordinalGroup; }
789 EBoxOrient boxOrient() const { return static_cast<EBoxOrient>(rareNonInherit edData->m_deprecatedFlexibleBox->orient); } 789 EBoxOrient boxOrient() const { return static_cast<EBoxOrient>(rareNonInherit edData->m_deprecatedFlexibleBox->orient); }
790 EBoxPack boxPack() const { return static_cast<EBoxPack>(rareNonInheritedData ->m_deprecatedFlexibleBox->pack); } 790 EBoxPack boxPack() const { return static_cast<EBoxPack>(rareNonInheritedData ->m_deprecatedFlexibleBox->pack); }
791 791
792 int order() const { return rareNonInheritedData->m_order; } 792 int order() const { return rareNonInheritedData->m_order; }
793 const Vector<String>& callbackSelectors() const { return rareNonInheritedDat a->m_callbackSelectors; } 793 const Vector<String>& callbackSelectors() const { return rareNonInheritedDat a->m_callbackSelectors; }
794 float flexGrow() const { return rareNonInheritedData->m_flexibleBox->m_flexG row; } 794 float flexGrow() const { return rareNonInheritedData->m_flexibleBox->m_flexG row; }
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 uint8_t snapHeightPosition() const { return rareInheritedData->m_snapHeightP osition; } 960 uint8_t snapHeightPosition() const { return rareInheritedData->m_snapHeightP osition; }
961 uint8_t snapHeightUnit() const { return rareInheritedData->m_snapHeightUnit; } 961 uint8_t snapHeightUnit() const { return rareInheritedData->m_snapHeightUnit; }
962 962
963 TabSize getTabSize() const { return rareInheritedData->m_tabSize; } 963 TabSize getTabSize() const { return rareInheritedData->m_tabSize; }
964 964
965 RespectImageOrientationEnum respectImageOrientation() const { return static_ cast<RespectImageOrientationEnum>(rareInheritedData->m_respectImageOrientation); } 965 RespectImageOrientationEnum respectImageOrientation() const { return static_ cast<RespectImageOrientationEnum>(rareInheritedData->m_respectImageOrientation); }
966 966
967 // End CSS3 Getters 967 // End CSS3 Getters
968 968
969 // Apple-specific property getter methods 969 // Apple-specific property getter methods
970 EPointerEvents pointerEvents() const { return static_cast<EPointerEvents>(in herited_flags._pointerEvents); } 970 EPointerEvents pointerEvents() const { return static_cast<EPointerEvents>(in herited_data.m_pointerEvents); }
971 const CSSAnimationData* animations() const { return rareNonInheritedData->m_ animations.get(); } 971 const CSSAnimationData* animations() const { return rareNonInheritedData->m_ animations.get(); }
972 const CSSTransitionData* transitions() const { return rareNonInheritedData-> m_transitions.get(); } 972 const CSSTransitionData* transitions() const { return rareNonInheritedData-> m_transitions.get(); }
973 973
974 CSSAnimationData& accessAnimations(); 974 CSSAnimationData& accessAnimations();
975 CSSTransitionData& accessTransitions(); 975 CSSTransitionData& accessTransitions();
976 976
977 ETransformStyle3D transformStyle3D() const { return static_cast<ETransformSt yle3D>(rareNonInheritedData->m_transformStyle3D); } 977 ETransformStyle3D transformStyle3D() const { return static_cast<ETransformSt yle3D>(rareNonInheritedData->m_transformStyle3D); }
978 ETransformStyle3D usedTransformStyle3D() const { return hasGroupingProperty( ) ? TransformStyle3DFlat : transformStyle3D(); } 978 ETransformStyle3D usedTransformStyle3D() const { return hasGroupingProperty( ) ? TransformStyle3DFlat : transformStyle3D(); }
979 bool preserves3D() const { return usedTransformStyle3D() != TransformStyle3D Flat; } 979 bool preserves3D() const { return usedTransformStyle3D() != TransformStyle3D Flat; }
980 980
(...skipping 15 matching lines...) Expand all
996 bool isRunningOpacityAnimationOnCompositor() const { return rareNonInherited Data->m_runningOpacityAnimationOnCompositor; } 996 bool isRunningOpacityAnimationOnCompositor() const { return rareNonInherited Data->m_runningOpacityAnimationOnCompositor; }
997 bool isRunningTransformAnimationOnCompositor() const { return rareNonInherit edData->m_runningTransformAnimationOnCompositor; } 997 bool isRunningTransformAnimationOnCompositor() const { return rareNonInherit edData->m_runningTransformAnimationOnCompositor; }
998 bool isRunningFilterAnimationOnCompositor() const { return rareNonInheritedD ata->m_runningFilterAnimationOnCompositor; } 998 bool isRunningFilterAnimationOnCompositor() const { return rareNonInheritedD ata->m_runningFilterAnimationOnCompositor; }
999 bool isRunningBackdropFilterAnimationOnCompositor() const { return rareNonIn heritedData->m_runningBackdropFilterAnimationOnCompositor; } 999 bool isRunningBackdropFilterAnimationOnCompositor() const { return rareNonIn heritedData->m_runningBackdropFilterAnimationOnCompositor; }
1000 bool isRunningAnimationOnCompositor() const { return isRunningOpacityAnimati onOnCompositor() || isRunningTransformAnimationOnCompositor() || isRunningFilter AnimationOnCompositor() || isRunningBackdropFilterAnimationOnCompositor(); } 1000 bool isRunningAnimationOnCompositor() const { return isRunningOpacityAnimati onOnCompositor() || isRunningTransformAnimationOnCompositor() || isRunningFilter AnimationOnCompositor() || isRunningBackdropFilterAnimationOnCompositor(); }
1001 1001
1002 const LineClampValue& lineClamp() const { return rareNonInheritedData->lineC lamp; } 1002 const LineClampValue& lineClamp() const { return rareNonInheritedData->lineC lamp; }
1003 Color tapHighlightColor() const { return rareInheritedData->tapHighlightColo r; } 1003 Color tapHighlightColor() const { return rareInheritedData->tapHighlightColo r; }
1004 ETextSecurity textSecurity() const { return static_cast<ETextSecurity>(rareI nheritedData->textSecurity); } 1004 ETextSecurity textSecurity() const { return static_cast<ETextSecurity>(rareI nheritedData->textSecurity); }
1005 1005
1006 WritingMode getWritingMode() const { return static_cast<WritingMode>(inherit ed_flags.m_writingMode); } 1006 WritingMode getWritingMode() const { return static_cast<WritingMode>(inherit ed_data.m_writingMode); }
1007 bool isHorizontalWritingMode() const { return blink::isHorizontalWritingMode (getWritingMode()); } 1007 bool isHorizontalWritingMode() const { return blink::isHorizontalWritingMode (getWritingMode()); }
1008 bool isFlippedLinesWritingMode() const { return blink::isFlippedLinesWriting Mode(getWritingMode()); } 1008 bool isFlippedLinesWritingMode() const { return blink::isFlippedLinesWriting Mode(getWritingMode()); }
1009 bool isFlippedBlocksWritingMode() const { return blink::isFlippedBlocksWriti ngMode(getWritingMode()); } 1009 bool isFlippedBlocksWritingMode() const { return blink::isFlippedBlocksWriti ngMode(getWritingMode()); }
1010 1010
1011 EImageRendering imageRendering() const { return static_cast<EImageRendering> (rareInheritedData->m_imageRendering); } 1011 EImageRendering imageRendering() const { return static_cast<EImageRendering> (rareInheritedData->m_imageRendering); }
1012 1012
1013 ESpeak speak() const { return static_cast<ESpeak>(rareInheritedData->speak); } 1013 ESpeak speak() const { return static_cast<ESpeak>(rareInheritedData->speak); }
1014 1014
1015 FilterOperations& mutableFilter() { return rareNonInheritedData.access()->m_ filter.access()->m_operations; } 1015 FilterOperations& mutableFilter() { return rareNonInheritedData.access()->m_ filter.access()->m_operations; }
1016 const FilterOperations& filter() const { return rareNonInheritedData->m_filt er->m_operations; } 1016 const FilterOperations& filter() const { return rareNonInheritedData->m_filt er->m_operations; }
(...skipping 26 matching lines...) Expand all
1043 const Vector<CSSPropertyID>& willChangeProperties() const { return rareNonIn heritedData->m_willChange->m_properties; } 1043 const Vector<CSSPropertyID>& willChangeProperties() const { return rareNonIn heritedData->m_willChange->m_properties; }
1044 bool willChangeContents() const { return rareNonInheritedData->m_willChange- >m_contents; } 1044 bool willChangeContents() const { return rareNonInheritedData->m_willChange- >m_contents; }
1045 bool willChangeScrollPosition() const { return rareNonInheritedData->m_willC hange->m_scrollPosition; } 1045 bool willChangeScrollPosition() const { return rareNonInheritedData->m_willC hange->m_scrollPosition; }
1046 bool hasWillChangeCompositingHint() const; 1046 bool hasWillChangeCompositingHint() const;
1047 bool hasWillChangeOpacityHint() const { return willChangeProperties().contai ns(CSSPropertyOpacity); } 1047 bool hasWillChangeOpacityHint() const { return willChangeProperties().contai ns(CSSPropertyOpacity); }
1048 bool hasWillChangeTransformHint() const; 1048 bool hasWillChangeTransformHint() const;
1049 bool subtreeWillChangeContents() const { return rareInheritedData->m_subtree WillChangeContents; } 1049 bool subtreeWillChangeContents() const { return rareInheritedData->m_subtree WillChangeContents; }
1050 1050
1051 // attribute setter methods 1051 // attribute setter methods
1052 1052
1053 void setDisplay(EDisplay v) { noninherited_flags.effectiveDisplay = v; } 1053 void setDisplay(EDisplay v) { noninherited_data.m_effectiveDisplay = v; }
1054 void setOriginalDisplay(EDisplay v) { noninherited_flags.originalDisplay = v ; } 1054 void setOriginalDisplay(EDisplay v) { noninherited_data.m_originalDisplay = v; }
1055 void setPosition(EPosition v) { noninherited_flags.position = v; } 1055 void setPosition(EPosition v) { noninherited_data.m_position = v; }
1056 void setFloating(EFloat v) { noninherited_flags.floating = v; } 1056 void setFloating(EFloat v) { noninherited_data.m_floating = v; }
1057 1057
1058 void setLeft(const Length& v) { SET_VAR(surround, offset.m_left, v); } 1058 void setLeft(const Length& v) { SET_VAR(surround, offset.m_left, v); }
1059 void setRight(const Length& v) { SET_VAR(surround, offset.m_right, v); } 1059 void setRight(const Length& v) { SET_VAR(surround, offset.m_right, v); }
1060 void setTop(const Length& v) { SET_VAR(surround, offset.m_top, v); } 1060 void setTop(const Length& v) { SET_VAR(surround, offset.m_top, v); }
1061 void setBottom(const Length& v) { SET_VAR(surround, offset.m_bottom, v); } 1061 void setBottom(const Length& v) { SET_VAR(surround, offset.m_bottom, v); }
1062 1062
1063 void setWidth(const Length& v) { SET_VAR(m_box, m_width, v); } 1063 void setWidth(const Length& v) { SET_VAR(m_box, m_width, v); }
1064 void setHeight(const Length& v) { SET_VAR(m_box, m_height, v); } 1064 void setHeight(const Length& v) { SET_VAR(m_box, m_height, v); }
1065 1065
1066 void setLogicalWidth(const Length& v) 1066 void setLogicalWidth(const Length& v)
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 if (!otherStyle) 1167 if (!otherStyle)
1168 return !hasOutline(); 1168 return !hasOutline();
1169 return m_background->outline().visuallyEqual(otherStyle->m_background->o utline()); 1169 return m_background->outline().visuallyEqual(otherStyle->m_background->o utline());
1170 } 1170 }
1171 void setOutlineFromStyle(const ComputedStyle& o) 1171 void setOutlineFromStyle(const ComputedStyle& o)
1172 { 1172 {
1173 ASSERT(!isOutlineEquivalent(&o)); 1173 ASSERT(!isOutlineEquivalent(&o));
1174 m_background.access()->m_outline = o.m_background->m_outline; 1174 m_background.access()->m_outline = o.m_background->m_outline;
1175 } 1175 }
1176 1176
1177 void setOverflowX(EOverflow v) { noninherited_flags.overflowX = v; } 1177 void setOverflowX(EOverflow v) { noninherited_data.m_overflowX = v; }
1178 void setOverflowY(EOverflow v) { noninherited_flags.overflowY = v; } 1178 void setOverflowY(EOverflow v) { noninherited_data.m_overflowY = v; }
1179 void setVisibility(EVisibility v) { inherited_flags._visibility = v; } 1179 void setVisibility(EVisibility v) { inherited_data.m_visibility = v; }
1180 void setVerticalAlign(EVerticalAlign v) { noninherited_flags.verticalAlign = v; } 1180 void setVerticalAlign(EVerticalAlign v) { noninherited_data.m_verticalAlign = v; }
1181 void setVerticalAlignLength(const Length& length) { setVerticalAlign(Vertica lAlignLength); SET_VAR(m_box, m_verticalAlign, length); } 1181 void setVerticalAlignLength(const Length& length) { setVerticalAlign(Vertica lAlignLength); SET_VAR(m_box, m_verticalAlign, length); }
1182 1182
1183 void setHasAutoClip() { SET_VAR(visual, hasAutoClip, true); SET_VAR(visual, clip, ComputedStyle::initialClip()); } 1183 void setHasAutoClip() { SET_VAR(visual, hasAutoClip, true); SET_VAR(visual, clip, ComputedStyle::initialClip()); }
1184 void setClip(const LengthBox& box) { SET_VAR(visual, hasAutoClip, false); SE T_VAR(visual, clip, box); } 1184 void setClip(const LengthBox& box) { SET_VAR(visual, hasAutoClip, false); SE T_VAR(visual, clip, box); }
1185 1185
1186 void setUnicodeBidi(EUnicodeBidi b) { noninherited_flags.unicodeBidi = b; } 1186 void setUnicodeBidi(EUnicodeBidi b) { noninherited_data.m_unicodeBidi = b; }
1187 1187
1188 void setClear(EClear v) { noninherited_flags.clear = v; } 1188 void setClear(EClear v) { noninherited_data.m_clear = v; }
1189 void setTableLayout(ETableLayout v) { noninherited_flags.tableLayout = v; } 1189 void setTableLayout(ETableLayout v) { noninherited_data.m_tableLayout = v; }
1190 1190
1191 bool setFontDescription(const FontDescription&); 1191 bool setFontDescription(const FontDescription&);
1192 void setFont(const Font&); 1192 void setFont(const Font&);
1193 1193
1194 void setTextAutosizingMultiplier(float); 1194 void setTextAutosizingMultiplier(float);
1195 1195
1196 void setColor(const Color&); 1196 void setColor(const Color&);
1197 void setTextIndent(const Length& v) { SET_VAR(rareInheritedData, indent, v); } 1197 void setTextIndent(const Length& v) { SET_VAR(rareInheritedData, indent, v); }
1198 void setTextIndentLine(TextIndentLine v) { SET_VAR(rareInheritedData, m_text IndentLine, v); } 1198 void setTextIndentLine(TextIndentLine v) { SET_VAR(rareInheritedData, m_text IndentLine, v); }
1199 void setTextIndentType(TextIndentType v) { SET_VAR(rareInheritedData, m_text IndentType, v); } 1199 void setTextIndentType(TextIndentType v) { SET_VAR(rareInheritedData, m_text IndentType, v); }
1200 void setTextAlign(ETextAlign v) { inherited_flags._text_align = v; } 1200 void setTextAlign(ETextAlign v) { inherited_data.m_textAlign = v; }
1201 void setTextAlignLast(TextAlignLast v) { SET_VAR(rareInheritedData, m_textAl ignLast, v); } 1201 void setTextAlignLast(TextAlignLast v) { SET_VAR(rareInheritedData, m_textAl ignLast, v); }
1202 void setTextJustify(TextJustify v) { SET_VAR(rareInheritedData, m_textJustif y, v); } 1202 void setTextJustify(TextJustify v) { SET_VAR(rareInheritedData, m_textJustif y, v); }
1203 void setTextTransform(ETextTransform v) { inherited_flags._text_transform = v; } 1203 void setTextTransform(ETextTransform v) { inherited_data.m_textTransform = v ; }
1204 void applyTextDecorations(); 1204 void applyTextDecorations();
1205 void clearAppliedTextDecorations(); 1205 void clearAppliedTextDecorations();
1206 void setTextDecoration(TextDecoration v) { SET_VAR(visual, textDecoration, v ); } 1206 void setTextDecoration(TextDecoration v) { SET_VAR(visual, textDecoration, v ); }
1207 void setTextUnderlinePosition(TextUnderlinePosition v) { SET_VAR(rareInherit edData, m_textUnderlinePosition, v); } 1207 void setTextUnderlinePosition(TextUnderlinePosition v) { SET_VAR(rareInherit edData, m_textUnderlinePosition, v); }
1208 void setTextDecorationStyle(TextDecorationStyle v) { SET_VAR(rareNonInherite dData, m_textDecorationStyle, v); } 1208 void setTextDecorationStyle(TextDecorationStyle v) { SET_VAR(rareNonInherite dData, m_textDecorationStyle, v); }
1209 void setDirection(TextDirection v) { inherited_flags._direction = v; } 1209 void setDirection(TextDirection v) { inherited_data.m_direction = v; }
1210 void setSelfOrAncestorHasDirAutoAttribute(bool v) { SET_VAR(rareInheritedDat a, m_selfOrAncestorHasDirAutoAttribute, v); } 1210 void setSelfOrAncestorHasDirAutoAttribute(bool v) { SET_VAR(rareInheritedDat a, m_selfOrAncestorHasDirAutoAttribute, v); }
1211 void setLineHeight(const Length& specifiedLineHeight); 1211 void setLineHeight(const Length& specifiedLineHeight);
1212 bool setZoom(float); 1212 bool setZoom(float);
1213 bool setEffectiveZoom(float); 1213 bool setEffectiveZoom(float);
1214 void clearMultiCol(); 1214 void clearMultiCol();
1215 1215
1216 void setImageRendering(EImageRendering v) { SET_VAR(rareInheritedData, m_ima geRendering, v); } 1216 void setImageRendering(EImageRendering v) { SET_VAR(rareInheritedData, m_ima geRendering, v); }
1217 1217
1218 void setWhiteSpace(EWhiteSpace v) { inherited_flags._white_space = v; } 1218 void setWhiteSpace(EWhiteSpace v) { inherited_data.m_whiteSpace = v; }
1219 1219
1220 // FIXME: Remove these two and replace them with respective FontBuilder call s. 1220 // FIXME: Remove these two and replace them with respective FontBuilder call s.
1221 void setWordSpacing(float); 1221 void setWordSpacing(float);
1222 void setLetterSpacing(float); 1222 void setLetterSpacing(float);
1223 1223
1224 void adjustBackgroundLayers() 1224 void adjustBackgroundLayers()
1225 { 1225 {
1226 if (backgroundLayers().next()) { 1226 if (backgroundLayers().next()) {
1227 accessBackgroundLayers().cullEmptyLayers(); 1227 accessBackgroundLayers().cullEmptyLayers();
1228 accessBackgroundLayers().fillUnsetProperties(); 1228 accessBackgroundLayers().fillUnsetProperties();
(...skipping 20 matching lines...) Expand all
1249 } 1249 }
1250 void setMaskBoxImageWidth(const BorderImageLengthBox& slices) 1250 void setMaskBoxImageWidth(const BorderImageLengthBox& slices)
1251 { 1251 {
1252 rareNonInheritedData.access()->m_maskBoxImage.setBorderSlices(slices); 1252 rareNonInheritedData.access()->m_maskBoxImage.setBorderSlices(slices);
1253 } 1253 }
1254 void setMaskBoxImageOutset(const BorderImageLengthBox& outset) 1254 void setMaskBoxImageOutset(const BorderImageLengthBox& outset)
1255 { 1255 {
1256 rareNonInheritedData.access()->m_maskBoxImage.setOutset(outset); 1256 rareNonInheritedData.access()->m_maskBoxImage.setOutset(outset);
1257 } 1257 }
1258 1258
1259 void setBorderCollapse(EBorderCollapse collapse) { inherited_flags._border_c ollapse = collapse; } 1259 void setBorderCollapse(EBorderCollapse collapse) { inherited_data.m_borderCo llapse = collapse; }
1260 void setHorizontalBorderSpacing(short); 1260 void setHorizontalBorderSpacing(short);
1261 void setVerticalBorderSpacing(short); 1261 void setVerticalBorderSpacing(short);
1262 void setEmptyCells(EEmptyCells v) { inherited_flags._empty_cells = v; } 1262 void setEmptyCells(EEmptyCells v) { inherited_data.m_emptyCells = v; }
1263 void setCaptionSide(ECaptionSide v) { inherited_flags._caption_side = v; } 1263 void setCaptionSide(ECaptionSide v) { inherited_data.m_captionSide = v; }
1264 1264
1265 void setListStyleType(EListStyleType v) { inherited_flags._list_style_type = v; } 1265 void setListStyleType(EListStyleType v) { inherited_data.m_listStyleType = v ; }
1266 void setListStyleImage(StyleImage*); 1266 void setListStyleImage(StyleImage*);
1267 void setListStylePosition(EListStylePosition v) { inherited_flags._list_styl e_position = v; } 1267 void setListStylePosition(EListStylePosition v) { inherited_data.m_listStyle Position = v; }
1268 1268
1269 void setMarginTop(const Length& v) { SET_VAR(surround, margin.m_top, v); } 1269 void setMarginTop(const Length& v) { SET_VAR(surround, margin.m_top, v); }
1270 void setMarginBottom(const Length& v) { SET_VAR(surround, margin.m_bottom, v ); } 1270 void setMarginBottom(const Length& v) { SET_VAR(surround, margin.m_bottom, v ); }
1271 void setMarginLeft(const Length& v) { SET_VAR(surround, margin.m_left, v); } 1271 void setMarginLeft(const Length& v) { SET_VAR(surround, margin.m_left, v); }
1272 void setMarginRight(const Length& v) { SET_VAR(surround, margin.m_right, v); } 1272 void setMarginRight(const Length& v) { SET_VAR(surround, margin.m_right, v); }
1273 void setMarginStart(const Length&); 1273 void setMarginStart(const Length&);
1274 void setMarginEnd(const Length&); 1274 void setMarginEnd(const Length&);
1275 1275
1276 void resetPadding() { SET_VAR(surround, padding, LengthBox(Fixed)); } 1276 void resetPadding() { SET_VAR(surround, padding, LengthBox(Fixed)); }
1277 void setPaddingBox(const LengthBox& b) { SET_VAR(surround, padding, b); } 1277 void setPaddingBox(const LengthBox& b) { SET_VAR(surround, padding, b); }
1278 void setPaddingTop(const Length& v) { SET_VAR(surround, padding.m_top, v); } 1278 void setPaddingTop(const Length& v) { SET_VAR(surround, padding.m_top, v); }
1279 void setPaddingBottom(const Length& v) { SET_VAR(surround, padding.m_bottom, v); } 1279 void setPaddingBottom(const Length& v) { SET_VAR(surround, padding.m_bottom, v); }
1280 void setPaddingLeft(const Length& v) { SET_VAR(surround, padding.m_left, v); } 1280 void setPaddingLeft(const Length& v) { SET_VAR(surround, padding.m_left, v); }
1281 void setPaddingRight(const Length& v) { SET_VAR(surround, padding.m_right, v ); } 1281 void setPaddingRight(const Length& v) { SET_VAR(surround, padding.m_right, v ); }
1282 1282
1283 void setCursor(ECursor c) { inherited_flags._cursor_style = c; } 1283 void setCursor(ECursor c) { inherited_data.m_cursorStyle = c; }
1284 void addCursor(StyleImage*, bool hotSpotSpecified, const IntPoint& hotSpot = IntPoint()); 1284 void addCursor(StyleImage*, bool hotSpotSpecified, const IntPoint& hotSpot = IntPoint());
1285 void setCursorList(CursorList*); 1285 void setCursorList(CursorList*);
1286 void clearCursorList(); 1286 void clearCursorList();
1287 1287
1288 void setInsideLink(EInsideLink insideLink) { inherited_flags._insideLink = i nsideLink; } 1288 void setInsideLink(EInsideLink insideLink) { inherited_data.m_insideLink = i nsideLink; }
1289 void setIsLink(bool b) { noninherited_flags.isLink = b; } 1289 void setIsLink(bool b) { noninherited_data.m_isLink = b; }
1290 1290
1291 PrintColorAdjust getPrintColorAdjust() const { return static_cast<PrintColor Adjust>(inherited_flags.m_printColorAdjust); } 1291 PrintColorAdjust getPrintColorAdjust() const { return static_cast<PrintColor Adjust>(inherited_data.m_printColorAdjust); }
1292 void setPrintColorAdjust(PrintColorAdjust value) { inherited_flags.m_printCo lorAdjust = value; } 1292 void setPrintColorAdjust(PrintColorAdjust value) { inherited_data.m_printCol orAdjust = value; }
1293 1293
1294 // A stacking context is painted atomically and defines a stacking order, wh ereas 1294 // A stacking context is painted atomically and defines a stacking order, wh ereas
1295 // a containing stacking context defines in which order the stacking context s 1295 // a containing stacking context defines in which order the stacking context s
1296 // below are painted. In Blink, a stacking context is defined by non-auto 1296 // below are painted. In Blink, a stacking context is defined by non-auto
1297 // z-index'. This invariant is enforced by the logic in StyleAdjuster 1297 // z-index'. This invariant is enforced by the logic in StyleAdjuster
1298 // See CSS 2.1, Appendix E (https://www.w3.org/TR/CSS21/zindex.html) for mor e details. 1298 // See CSS 2.1, Appendix E (https://www.w3.org/TR/CSS21/zindex.html) for mor e details.
1299 bool isStackingContext() const { return !hasAutoZIndex(); } 1299 bool isStackingContext() const { return !hasAutoZIndex(); }
1300 1300
1301 // Stacking contexts and positioned elements[1] are stacked (sorted in negZO rderList 1301 // Stacking contexts and positioned elements[1] are stacked (sorted in negZO rderList
1302 // and posZOrderList) in their enclosing stacking contexts. 1302 // and posZOrderList) in their enclosing stacking contexts.
1303 // 1303 //
1304 // [1] According to CSS2.1, Appendix E.2.8 (https://www.w3.org/TR/CSS21/zind ex.html), 1304 // [1] According to CSS2.1, Appendix E.2.8 (https://www.w3.org/TR/CSS21/zind ex.html),
1305 // positioned elements with 'z-index: auto' are "treated as if it created a new 1305 // positioned elements with 'z-index: auto' are "treated as if it created a new
1306 // stacking context" and z-ordered together with other elements with 'z-inde x: 0'. 1306 // stacking context" and z-ordered together with other elements with 'z-inde x: 0'.
1307 // The difference of them from normal stacking contexts is that they don't d etermine 1307 // The difference of them from normal stacking contexts is that they don't d etermine
1308 // the stacking of the elements underneath them. 1308 // the stacking of the elements underneath them.
1309 // (Note: There are also other elements treated as stacking context during p ainting, 1309 // (Note: There are also other elements treated as stacking context during p ainting,
1310 // but not managed in stacks. See ObjectPainter::paintAllPhasesAtomically(). ) 1310 // but not managed in stacks. See ObjectPainter::paintAllPhasesAtomically(). )
1311 bool isStacked() const { return isStackingContext() || position() != StaticP osition; } 1311 bool isStacked() const { return isStackingContext() || position() != StaticP osition; }
1312 1312
1313 bool hasAutoZIndex() const { return m_box->hasAutoZIndex(); } 1313 bool hasAutoZIndex() const { return m_box->hasAutoZIndex(); }
1314 void setHasAutoZIndex() { SET_VAR(m_box, m_hasAutoZIndex, true); SET_VAR(m_b ox, m_zIndex, 0); } 1314 void setHasAutoZIndex() { SET_VAR(m_box, m_hasAutoZIndex, true); SET_VAR(m_b ox, m_zIndex, 0); }
1315 int zIndex() const { return m_box->zIndex(); } 1315 int zIndex() const { return m_box->zIndex(); }
1316 void setZIndex(int v) { SET_VAR(m_box, m_hasAutoZIndex, false); SET_VAR(m_bo x, m_zIndex, v); } 1316 void setZIndex(int v) { SET_VAR(m_box, m_hasAutoZIndex, false); SET_VAR(m_bo x, m_zIndex, v); }
1317 void setWidows(short w) { SET_VAR(rareInheritedData, widows, w); } 1317 void setWidows(short w) { SET_VAR(rareInheritedData, widows, w); }
1318 void setOrphans(short o) { SET_VAR(rareInheritedData, orphans, o); } 1318 void setOrphans(short o) { SET_VAR(rareInheritedData, orphans, o); }
1319 void setBreakAfter(EBreak b) { ASSERT(b <= BreakValueLastAllowedForBreakAfte rAndBefore); noninherited_flags.breakAfter = b; } 1319 void setBreakAfter(EBreak b) { DCHECK_LE(b, BreakValueLastAllowedForBreakAft erAndBefore); noninherited_data.m_breakAfter = b; }
1320 void setBreakBefore(EBreak b) { ASSERT(b <= BreakValueLastAllowedForBreakAft erAndBefore); noninherited_flags.breakBefore = b; } 1320 void setBreakBefore(EBreak b) { DCHECK_LE(b, BreakValueLastAllowedForBreakAf terAndBefore); noninherited_data.m_breakBefore = b; }
1321 void setBreakInside(EBreak b) { ASSERT(b <= BreakValueLastAllowedForBreakIns ide); noninherited_flags.breakInside = b; } 1321 void setBreakInside(EBreak b) { DCHECK_LE(b, BreakValueLastAllowedForBreakIn side); noninherited_data.m_breakInside = b; }
1322 1322
1323 void setTextSizeAdjust(TextSizeAdjust sizeAdjust) { SET_VAR(rareInheritedDat a, m_textSizeAdjust, sizeAdjust); } 1323 void setTextSizeAdjust(TextSizeAdjust sizeAdjust) { SET_VAR(rareInheritedDat a, m_textSizeAdjust, sizeAdjust); }
1324 1324
1325 // CSS3 Setters 1325 // CSS3 Setters
1326 void setOutlineOffset(int v) { SET_VAR(m_background, m_outline.m_offset, v); } 1326 void setOutlineOffset(int v) { SET_VAR(m_background, m_outline.m_offset, v); }
1327 void setTextShadow(PassRefPtr<ShadowList>); 1327 void setTextShadow(PassRefPtr<ShadowList>);
1328 void setTextStrokeColor(const StyleColor& c) { SET_VAR_WITH_SETTER(rareInher itedData, textStrokeColor, setTextStrokeColor, c); } 1328 void setTextStrokeColor(const StyleColor& c) { SET_VAR_WITH_SETTER(rareInher itedData, textStrokeColor, setTextStrokeColor, c); }
1329 void setTextStrokeWidth(float w) { SET_VAR(rareInheritedData, textStrokeWidt h, w); } 1329 void setTextStrokeWidth(float w) { SET_VAR(rareInheritedData, textStrokeWidt h, w); }
1330 void setTextFillColor(const StyleColor& c) { SET_VAR_WITH_SETTER(rareInherit edData, textFillColor, setTextFillColor, c); } 1330 void setTextFillColor(const StyleColor& c) { SET_VAR_WITH_SETTER(rareInherit edData, textFillColor, setTextFillColor, c); }
1331 void setOpacity(float f) { float v = clampTo<float>(f, 0, 1); SET_VAR(rareNo nInheritedData, opacity, v); } 1331 void setOpacity(float f) { float v = clampTo<float>(f, 0, 1); SET_VAR(rareNo nInheritedData, opacity, v); }
1332 void setAppearance(ControlPart a) { SET_VAR(rareNonInheritedData, m_appearan ce, a); } 1332 void setAppearance(ControlPart a) { SET_VAR(rareNonInheritedData, m_appearan ce, a); }
1333 // For valid values of box-align see http://www.w3.org/TR/2009/WD-css3-flexb ox-20090723/#alignment 1333 // For valid values of box-align see http://www.w3.org/TR/2009/WD-css3-flexb ox-20090723/#alignment
1334 void setBoxAlign(EBoxAlignment a) { SET_NESTED_VAR(rareNonInheritedData, m_d eprecatedFlexibleBox, align, a); } 1334 void setBoxAlign(EBoxAlignment a) { SET_NESTED_VAR(rareNonInheritedData, m_d eprecatedFlexibleBox, align, a); }
1335 void setBoxDecorationBreak(EBoxDecorationBreak b) { SET_VAR(m_box, m_boxDeco rationBreak, b); } 1335 void setBoxDecorationBreak(EBoxDecorationBreak b) { SET_VAR(m_box, m_boxDeco rationBreak, b); }
1336 void setBoxDirection(EBoxDirection d) { inherited_flags._box_direction = d; } 1336 void setBoxDirection(EBoxDirection d) { inherited_data.m_boxDirection = d; }
1337 void setBoxFlex(float f) { SET_NESTED_VAR(rareNonInheritedData, m_deprecated FlexibleBox, flex, f); } 1337 void setBoxFlex(float f) { SET_NESTED_VAR(rareNonInheritedData, m_deprecated FlexibleBox, flex, f); }
1338 void setBoxFlexGroup(unsigned fg) { SET_NESTED_VAR(rareNonInheritedData, m_d eprecatedFlexibleBox, flexGroup, fg); } 1338 void setBoxFlexGroup(unsigned fg) { SET_NESTED_VAR(rareNonInheritedData, m_d eprecatedFlexibleBox, flexGroup, fg); }
1339 void setBoxLines(EBoxLines l) { SET_NESTED_VAR(rareNonInheritedData, m_depre catedFlexibleBox, lines, l); } 1339 void setBoxLines(EBoxLines l) { SET_NESTED_VAR(rareNonInheritedData, m_depre catedFlexibleBox, lines, l); }
1340 void setBoxOrdinalGroup(unsigned og) { SET_NESTED_VAR(rareNonInheritedData, m_deprecatedFlexibleBox, ordinalGroup, og); } 1340 void setBoxOrdinalGroup(unsigned og) { SET_NESTED_VAR(rareNonInheritedData, m_deprecatedFlexibleBox, ordinalGroup, og); }
1341 void setBoxOrient(EBoxOrient o) { SET_NESTED_VAR(rareNonInheritedData, m_dep recatedFlexibleBox, orient, o); } 1341 void setBoxOrient(EBoxOrient o) { SET_NESTED_VAR(rareNonInheritedData, m_dep recatedFlexibleBox, orient, o); }
1342 void setBoxPack(EBoxPack p) { SET_NESTED_VAR(rareNonInheritedData, m_depreca tedFlexibleBox, pack, p); } 1342 void setBoxPack(EBoxPack p) { SET_NESTED_VAR(rareNonInheritedData, m_depreca tedFlexibleBox, pack, p); }
1343 void setBoxShadow(PassRefPtr<ShadowList>); 1343 void setBoxShadow(PassRefPtr<ShadowList>);
1344 void setBoxReflect(PassRefPtr<StyleReflection> reflect) { if (rareNonInherit edData->m_boxReflect != reflect) rareNonInheritedData.access()->m_boxReflect = r eflect; } 1344 void setBoxReflect(PassRefPtr<StyleReflection> reflect) { if (rareNonInherit edData->m_boxReflect != reflect) rareNonInheritedData.access()->m_boxReflect = r eflect; }
1345 void setBoxSizing(EBoxSizing s) { SET_VAR(m_box, m_boxSizing, s); } 1345 void setBoxSizing(EBoxSizing s) { SET_VAR(m_box, m_boxSizing, s); }
1346 void setContain(Containment contain) { SET_VAR(rareNonInheritedData, m_conta in, contain); } 1346 void setContain(Containment contain) { SET_VAR(rareNonInheritedData, m_conta in, contain); }
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 void setTabSize(TabSize size) { SET_VAR(rareInheritedData, m_tabSize, size); } 1467 void setTabSize(TabSize size) { SET_VAR(rareInheritedData, m_tabSize, size); }
1468 1468
1469 void setRespectImageOrientation(RespectImageOrientationEnum v) { SET_VAR(rar eInheritedData, m_respectImageOrientation, v); } 1469 void setRespectImageOrientation(RespectImageOrientationEnum v) { SET_VAR(rar eInheritedData, m_respectImageOrientation, v); }
1470 1470
1471 // End CSS3 Setters 1471 // End CSS3 Setters
1472 1472
1473 void setWrapFlow(WrapFlow wrapFlow) { SET_VAR(rareNonInheritedData, m_wrapFl ow, wrapFlow); } 1473 void setWrapFlow(WrapFlow wrapFlow) { SET_VAR(rareNonInheritedData, m_wrapFl ow, wrapFlow); }
1474 void setWrapThrough(WrapThrough wrapThrough) { SET_VAR(rareNonInheritedData, m_wrapThrough, wrapThrough); } 1474 void setWrapThrough(WrapThrough wrapThrough) { SET_VAR(rareNonInheritedData, m_wrapThrough, wrapThrough); }
1475 1475
1476 // Apple-specific property setters 1476 // Apple-specific property setters
1477 void setPointerEvents(EPointerEvents p) { inherited_flags._pointerEvents = p ; } 1477 void setPointerEvents(EPointerEvents p) { inherited_data.m_pointerEvents = p ; }
1478 1478
1479 void setTransformStyle3D(ETransformStyle3D b) { SET_VAR(rareNonInheritedData , m_transformStyle3D, b); } 1479 void setTransformStyle3D(ETransformStyle3D b) { SET_VAR(rareNonInheritedData , m_transformStyle3D, b); }
1480 void setBackfaceVisibility(EBackfaceVisibility b) { SET_VAR(rareNonInherited Data, m_backfaceVisibility, b); } 1480 void setBackfaceVisibility(EBackfaceVisibility b) { SET_VAR(rareNonInherited Data, m_backfaceVisibility, b); }
1481 void setPerspective(float p) { SET_VAR(rareNonInheritedData, m_perspective, p); } 1481 void setPerspective(float p) { SET_VAR(rareNonInheritedData, m_perspective, p); }
1482 void setPerspectiveOriginX(const Length& v) { setPerspectiveOrigin(LengthPoi nt(v, perspectiveOriginY())); } 1482 void setPerspectiveOriginX(const Length& v) { setPerspectiveOrigin(LengthPoi nt(v, perspectiveOriginY())); }
1483 void setPerspectiveOriginY(const Length& v) { setPerspectiveOrigin(LengthPoi nt(perspectiveOriginX(), v)); } 1483 void setPerspectiveOriginY(const Length& v) { setPerspectiveOrigin(LengthPoi nt(perspectiveOriginX(), v)); }
1484 void setPerspectiveOrigin(const LengthPoint& p) { SET_VAR(rareNonInheritedDa ta, m_perspectiveOrigin, p); } 1484 void setPerspectiveOrigin(const LengthPoint& p) { SET_VAR(rareNonInheritedDa ta, m_perspectiveOrigin, p); }
1485 void setPageSize(const FloatSize& s) { SET_VAR(rareNonInheritedData, m_pageS ize, s); } 1485 void setPageSize(const FloatSize& s) { SET_VAR(rareNonInheritedData, m_pageS ize, s); }
1486 void setPageSizeType(PageSizeType t) { SET_VAR(rareNonInheritedData, m_pageS izeType, t); } 1486 void setPageSizeType(PageSizeType t) { SET_VAR(rareNonInheritedData, m_pageS izeType, t); }
1487 void resetPageSizeType() { SET_VAR(rareNonInheritedData, m_pageSizeType, PAG E_SIZE_AUTO); } 1487 void resetPageSizeType() { SET_VAR(rareNonInheritedData, m_pageSizeType, PAG E_SIZE_AUTO); }
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1606 CounterDirectiveMap& accessCounterDirectives(); 1606 CounterDirectiveMap& accessCounterDirectives();
1607 const CounterDirectives getCounterDirectives(const AtomicString& identifier) const; 1607 const CounterDirectives getCounterDirectives(const AtomicString& identifier) const;
1608 void clearIncrementDirectives(); 1608 void clearIncrementDirectives();
1609 void clearResetDirectives(); 1609 void clearResetDirectives();
1610 1610
1611 QuotesData* quotes() const { return rareInheritedData->quotes.get(); } 1611 QuotesData* quotes() const { return rareInheritedData->quotes.get(); }
1612 void setQuotes(PassRefPtr<QuotesData>); 1612 void setQuotes(PassRefPtr<QuotesData>);
1613 1613
1614 const AtomicString& hyphenString() const; 1614 const AtomicString& hyphenString() const;
1615 1615
1616 bool inheritedNotEqual(const ComputedStyle&) const; 1616 bool inheritedEqual(const ComputedStyle&) const;
1617 bool nonInheritedEqual(const ComputedStyle&) const;
1618 bool loadingCustomFontsEqual(const ComputedStyle&) const;
1617 bool inheritedDataShared(const ComputedStyle&) const; 1619 bool inheritedDataShared(const ComputedStyle&) const;
1618 1620
1619 bool isDisplayReplacedType() const { return isDisplayReplacedType(display()) ; } 1621 bool isDisplayReplacedType() const { return isDisplayReplacedType(display()) ; }
1620 bool isDisplayInlineType() const { return isDisplayInlineType(display()); } 1622 bool isDisplayInlineType() const { return isDisplayInlineType(display()); }
1621 bool isOriginalDisplayInlineType() const { return isDisplayInlineType(origin alDisplay()); } 1623 bool isOriginalDisplayInlineType() const { return isDisplayInlineType(origin alDisplay()); }
1622 bool isDisplayFlexibleOrGridBox() const { return isDisplayFlexibleBox(displa y()) || isDisplayGridBox(display()); } 1624 bool isDisplayFlexibleOrGridBox() const { return isDisplayFlexibleBox(displa y()) || isDisplayGridBox(display()); }
1623 bool isDisplayFlexibleBox() const { return isDisplayFlexibleBox(display()); } 1625 bool isDisplayFlexibleBox() const { return isDisplayFlexibleBox(display()); }
1624 1626
1625 1627
1626 bool setWritingMode(WritingMode v) 1628 bool setWritingMode(WritingMode v)
1627 { 1629 {
1628 if (v == getWritingMode()) 1630 if (v == getWritingMode())
1629 return false; 1631 return false;
1630 1632
1631 inherited_flags.m_writingMode = v; 1633 inherited_data.m_writingMode = v;
1632 return true; 1634 return true;
1633 } 1635 }
1634 1636
1635 // A unique style is one that has matches something that makes it impossible to share. 1637 // A unique style is one that has matches something that makes it impossible to share.
1636 bool unique() const { return noninherited_flags.unique; } 1638 bool unique() const { return noninherited_data.m_unique; }
1637 void setUnique() { noninherited_flags.unique = true; } 1639 void setUnique() { noninherited_data.m_unique = true; }
1638 1640
1639 bool isSharable() const; 1641 bool isSharable() const;
1640 1642
1641 bool emptyState() const { return noninherited_flags.emptyState; } 1643 bool emptyState() const { return noninherited_data.m_emptyState; }
1642 void setEmptyState(bool b) { setUnique(); noninherited_flags.emptyState = b; } 1644 void setEmptyState(bool b) { setUnique(); noninherited_data.m_emptyState = b ; }
1643 1645
1644 Color visitedDependentColor(int colorProperty) const; 1646 Color visitedDependentColor(int colorProperty) const;
1645 1647
1646 void setHasExplicitlyInheritedProperties() { noninherited_flags.explicitInhe ritance = true; } 1648 void setHasExplicitlyInheritedProperties() { noninherited_data.m_explicitInh eritance = true; }
1647 bool hasExplicitlyInheritedProperties() const { return noninherited_flags.ex plicitInheritance; } 1649 bool hasExplicitlyInheritedProperties() const { return noninherited_data.m_e xplicitInheritance; }
1648 1650
1649 void setHasVariableReferenceFromNonInheritedProperty() { noninherited_flags. variableReference = true; } 1651 void setHasVariableReferenceFromNonInheritedProperty() { noninherited_data.m _variableReference = true; }
1650 bool hasVariableReferenceFromNonInheritedProperty() const { return noninheri ted_flags.variableReference; } 1652 bool hasVariableReferenceFromNonInheritedProperty() const { return noninheri ted_data.m_variableReference; }
1651 1653
1652 bool hasChildDependentFlags() const { return emptyState() || hasExplicitlyIn heritedProperties(); } 1654 bool hasChildDependentFlags() const { return emptyState() || hasExplicitlyIn heritedProperties(); }
1653 void copyChildDependentFlagsFrom(const ComputedStyle&); 1655 void copyChildDependentFlagsFrom(const ComputedStyle&);
1654 1656
1655 bool hasBoxDecorations() const 1657 bool hasBoxDecorations() const
1656 { 1658 {
1657 return hasBorderDecoration() 1659 return hasBorderDecoration()
1658 || hasBorderRadius() 1660 || hasBorderRadius()
1659 || hasOutline() 1661 || hasOutline()
1660 || hasAppearance() 1662 || hasAppearance()
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1875 void setVisitedLinkBorderRightColor(const StyleColor& v) { SET_VAR(rareNonIn heritedData, m_visitedLinkBorderRightColor, v); } 1877 void setVisitedLinkBorderRightColor(const StyleColor& v) { SET_VAR(rareNonIn heritedData, m_visitedLinkBorderRightColor, v); }
1876 void setVisitedLinkBorderBottomColor(const StyleColor& v) { SET_VAR(rareNonI nheritedData, m_visitedLinkBorderBottomColor, v); } 1878 void setVisitedLinkBorderBottomColor(const StyleColor& v) { SET_VAR(rareNonI nheritedData, m_visitedLinkBorderBottomColor, v); }
1877 void setVisitedLinkBorderTopColor(const StyleColor& v) { SET_VAR(rareNonInhe ritedData, m_visitedLinkBorderTopColor, v); } 1879 void setVisitedLinkBorderTopColor(const StyleColor& v) { SET_VAR(rareNonInhe ritedData, m_visitedLinkBorderTopColor, v); }
1878 void setVisitedLinkOutlineColor(const StyleColor& v) { SET_VAR(rareNonInheri tedData, m_visitedLinkOutlineColor, v); } 1880 void setVisitedLinkOutlineColor(const StyleColor& v) { SET_VAR(rareNonInheri tedData, m_visitedLinkOutlineColor, v); }
1879 void setVisitedLinkColumnRuleColor(const StyleColor& v) { SET_NESTED_VAR(rar eNonInheritedData, m_multiCol, m_visitedLinkColumnRuleColor, v); } 1881 void setVisitedLinkColumnRuleColor(const StyleColor& v) { SET_NESTED_VAR(rar eNonInheritedData, m_multiCol, m_visitedLinkColumnRuleColor, v); }
1880 void setVisitedLinkTextDecorationColor(const StyleColor& v) { SET_VAR(rareNo nInheritedData, m_visitedLinkTextDecorationColor, v); } 1882 void setVisitedLinkTextDecorationColor(const StyleColor& v) { SET_VAR(rareNo nInheritedData, m_visitedLinkTextDecorationColor, v); }
1881 void setVisitedLinkTextEmphasisColor(const StyleColor& v) { SET_VAR_WITH_SET TER(rareInheritedData, visitedLinkTextEmphasisColor, setVisitedLinkTextEmphasisC olor, v); } 1883 void setVisitedLinkTextEmphasisColor(const StyleColor& v) { SET_VAR_WITH_SET TER(rareInheritedData, visitedLinkTextEmphasisColor, setVisitedLinkTextEmphasisC olor, v); }
1882 void setVisitedLinkTextFillColor(const StyleColor& v) { SET_VAR_WITH_SETTER( rareInheritedData, visitedLinkTextFillColor, setVisitedLinkTextFillColor, v); } 1884 void setVisitedLinkTextFillColor(const StyleColor& v) { SET_VAR_WITH_SETTER( rareInheritedData, visitedLinkTextFillColor, setVisitedLinkTextFillColor, v); }
1883 void setVisitedLinkTextStrokeColor(const StyleColor& v) { SET_VAR_WITH_SETTE R(rareInheritedData, visitedLinkTextStrokeColor, setVisitedLinkTextStrokeColor, v); } 1885 void setVisitedLinkTextStrokeColor(const StyleColor& v) { SET_VAR_WITH_SETTE R(rareInheritedData, visitedLinkTextStrokeColor, setVisitedLinkTextStrokeColor, v); }
1884 1886
1885 void inheritUnicodeBidiFrom(const ComputedStyle& parent) { noninherited_flag s.unicodeBidi = parent.noninherited_flags.unicodeBidi; } 1887 void inheritUnicodeBidiFrom(const ComputedStyle& parent) { noninherited_data .m_unicodeBidi = parent.noninherited_data.m_unicodeBidi; }
1886 1888
1887 bool isDisplayFlexibleBox(EDisplay display) const 1889 bool isDisplayFlexibleBox(EDisplay display) const
1888 { 1890 {
1889 return display == FLEX || display == INLINE_FLEX; 1891 return display == FLEX || display == INLINE_FLEX;
1890 } 1892 }
1891 1893
1892 bool isDisplayGridBox(EDisplay display) const 1894 bool isDisplayGridBox(EDisplay display) const
1893 { 1895 {
1894 return display == GRID || display == INLINE_GRID; 1896 return display == GRID || display == INLINE_GRID;
1895 } 1897 }
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
2022 { 2024 {
2023 if (compareEqual(rareInheritedData->m_textOrientation, textOrientation)) 2025 if (compareEqual(rareInheritedData->m_textOrientation, textOrientation))
2024 return false; 2026 return false;
2025 2027
2026 rareInheritedData.access()->m_textOrientation = textOrientation; 2028 rareInheritedData.access()->m_textOrientation = textOrientation;
2027 return true; 2029 return true;
2028 } 2030 }
2029 2031
2030 inline bool ComputedStyle::hasAnyPublicPseudoStyles() const 2032 inline bool ComputedStyle::hasAnyPublicPseudoStyles() const
2031 { 2033 {
2032 return PublicPseudoIdMask & noninherited_flags.pseudoBits; 2034 return PublicPseudoIdMask & noninherited_data.m_pseudoBits;
2033 } 2035 }
2034 2036
2035 inline bool ComputedStyle::hasPseudoStyle(PseudoId pseudo) const 2037 inline bool ComputedStyle::hasPseudoStyle(PseudoId pseudo) const
2036 { 2038 {
2037 ASSERT(pseudo > PseudoIdNone); 2039 ASSERT(pseudo > PseudoIdNone);
2038 ASSERT(pseudo < FirstInternalPseudoId); 2040 ASSERT(pseudo < FirstInternalPseudoId);
2039 return (1 << (pseudo - 1)) & noninherited_flags.pseudoBits; 2041 return (1 << (pseudo - 1)) & noninherited_data.m_pseudoBits;
2040 } 2042 }
2041 2043
2042 inline void ComputedStyle::setHasPseudoStyle(PseudoId pseudo) 2044 inline void ComputedStyle::setHasPseudoStyle(PseudoId pseudo)
2043 { 2045 {
2044 ASSERT(pseudo > PseudoIdNone); 2046 ASSERT(pseudo > PseudoIdNone);
2045 ASSERT(pseudo < FirstInternalPseudoId); 2047 ASSERT(pseudo < FirstInternalPseudoId);
2046 noninherited_flags.pseudoBits |= 1 << (pseudo - 1); 2048 noninherited_data.m_pseudoBits |= 1 << (pseudo - 1);
2047 } 2049 }
2048 2050
2049 inline bool ComputedStyle::hasPseudoElementStyle() const 2051 inline bool ComputedStyle::hasPseudoElementStyle() const
2050 { 2052 {
2051 return noninherited_flags.pseudoBits & ElementPseudoIdMask; 2053 return noninherited_data.m_pseudoBits & ElementPseudoIdMask;
2052 } 2054 }
2053 2055
2054 } // namespace blink 2056 } // namespace blink
2055 2057
2056 #endif // ComputedStyle_h 2058 #endif // ComputedStyle_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698