Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 132 friend class StyleBuilderFunctions; // Sets color styles | 132 friend class StyleBuilderFunctions; // Sets color styles |
| 133 friend class CachedUAStyle; // Saves Border/Background information for later comparison. | 133 friend class CachedUAStyle; // Saves Border/Background information for later comparison. |
| 134 friend class ColorPropertyFunctions; // Accesses visited and unvisited color s. | 134 friend class ColorPropertyFunctions; // Accesses visited and unvisited color s. |
| 135 | 135 |
| 136 // FIXME: When we stop resolving currentColor at style time, these can be re moved. | 136 // FIXME: When we stop resolving currentColor at style time, these can be re moved. |
| 137 friend class CSSToStyleMap; | 137 friend class CSSToStyleMap; |
| 138 friend class FilterOperationResolver; | 138 friend class FilterOperationResolver; |
| 139 friend class StyleBuilderConverter; | 139 friend class StyleBuilderConverter; |
| 140 friend class StyleResolverState; | 140 friend class StyleResolverState; |
| 141 friend class StyleResolver; | 141 friend class StyleResolver; |
| 142 | |
| 142 protected: | 143 protected: |
|
nainar
2016/07/25 07:43:27
remove inserted new line here
sashab
2016/07/26 00:38:08
Done
| |
| 143 | |
| 144 // non-inherited attributes | 144 // non-inherited attributes |
| 145 DataRef<StyleBoxData> m_box; | 145 DataRef<StyleBoxData> m_box; |
| 146 DataRef<StyleVisualData> m_visual; | 146 DataRef<StyleVisualData> m_visual; |
| 147 DataRef<StyleBackgroundData> m_background; | 147 DataRef<StyleBackgroundData> m_background; |
| 148 DataRef<StyleSurroundData> m_surround; | 148 DataRef<StyleSurroundData> m_surround; |
| 149 DataRef<StyleRareNonInheritedData> m_rareNonInheritedData; | 149 DataRef<StyleRareNonInheritedData> m_rareNonInheritedData; |
| 150 | 150 |
| 151 // inherited attributes | 151 // inherited attributes |
| 152 DataRef<StyleRareInheritedData> m_rareInheritedData; | 152 DataRef<StyleRareInheritedData> m_rareInheritedData; |
| 153 DataRef<StyleInheritedData> m_styleInheritedData; | 153 DataRef<StyleInheritedData> m_styleInheritedData; |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 284 | 284 |
| 285 unsigned m_isLink : 1; | 285 unsigned m_isLink : 1; |
| 286 | 286 |
| 287 mutable unsigned m_hasRemUnits : 1; | 287 mutable unsigned m_hasRemUnits : 1; |
| 288 // If you add more style bits here, you will also need to update Compute dStyle::copyNonInheritedFromCached() | 288 // If you add more style bits here, you will also need to update Compute dStyle::copyNonInheritedFromCached() |
| 289 // 66 bits | 289 // 66 bits |
| 290 } m_nonInheritedData; | 290 } m_nonInheritedData; |
| 291 | 291 |
| 292 // !END SYNC! | 292 // !END SYNC! |
| 293 | 293 |
| 294 protected: | |
| 295 void setBitDefaults() | 294 void setBitDefaults() |
| 296 { | 295 { |
| 297 m_inheritedData.m_emptyCells = initialEmptyCells(); | 296 m_inheritedData.m_emptyCells = initialEmptyCells(); |
| 298 m_inheritedData.m_captionSide = initialCaptionSide(); | 297 m_inheritedData.m_captionSide = initialCaptionSide(); |
| 299 m_inheritedData.m_listStyleType = initialListStyleType(); | 298 m_inheritedData.m_listStyleType = initialListStyleType(); |
| 300 m_inheritedData.m_listStylePosition = initialListStylePosition(); | 299 m_inheritedData.m_listStylePosition = initialListStylePosition(); |
| 301 m_inheritedData.m_visibility = initialVisibility(); | 300 m_inheritedData.m_visibility = initialVisibility(); |
| 302 m_inheritedData.m_textAlign = initialTextAlign(); | 301 m_inheritedData.m_textAlign = initialTextAlign(); |
| 303 m_inheritedData.m_textTransform = initialTextTransform(); | 302 m_inheritedData.m_textTransform = initialTextTransform(); |
| 304 m_inheritedData.m_textUnderline = false; | 303 m_inheritedData.m_textUnderline = false; |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 335 m_nonInheritedData.m_hasViewportUnits = false; | 334 m_nonInheritedData.m_hasViewportUnits = false; |
| 336 m_nonInheritedData.m_affectedByFocus = false; | 335 m_nonInheritedData.m_affectedByFocus = false; |
| 337 m_nonInheritedData.m_affectedByHover = false; | 336 m_nonInheritedData.m_affectedByHover = false; |
| 338 m_nonInheritedData.m_affectedByActive = false; | 337 m_nonInheritedData.m_affectedByActive = false; |
| 339 m_nonInheritedData.m_affectedByDrag = false; | 338 m_nonInheritedData.m_affectedByDrag = false; |
| 340 m_nonInheritedData.m_isLink = false; | 339 m_nonInheritedData.m_isLink = false; |
| 341 m_nonInheritedData.m_hasRemUnits = false; | 340 m_nonInheritedData.m_hasRemUnits = false; |
| 342 } | 341 } |
| 343 | 342 |
| 344 private: | 343 private: |
| 344 // TODO(sashab): Move these to the bottom of ComputedStyle. | |
| 345 ALWAYS_INLINE ComputedStyle(); | 345 ALWAYS_INLINE ComputedStyle(); |
| 346 | 346 |
| 347 enum InitialStyleTag { | 347 enum InitialStyleTag { |
| 348 InitialStyle | 348 InitialStyle |
| 349 }; | 349 }; |
| 350 ALWAYS_INLINE explicit ComputedStyle(InitialStyleTag); | 350 ALWAYS_INLINE explicit ComputedStyle(InitialStyleTag); |
| 351 ALWAYS_INLINE ComputedStyle(const ComputedStyle&); | 351 ALWAYS_INLINE ComputedStyle(const ComputedStyle&); |
| 352 | 352 |
| 353 static PassRefPtr<ComputedStyle> createInitialStyle(); | 353 static PassRefPtr<ComputedStyle> createInitialStyle(); |
| 354 static inline ComputedStyle& mutableInitialStyle() | 354 static inline ComputedStyle& mutableInitialStyle() |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 388 | 388 |
| 389 PseudoId styleType() const { return static_cast<PseudoId>(m_nonInheritedData .m_styleType); } | 389 PseudoId styleType() const { return static_cast<PseudoId>(m_nonInheritedData .m_styleType); } |
| 390 void setStyleType(PseudoId styleType) { m_nonInheritedData.m_styleType = sty leType; } | 390 void setStyleType(PseudoId styleType) { m_nonInheritedData.m_styleType = sty leType; } |
| 391 | 391 |
| 392 ComputedStyle* getCachedPseudoStyle(PseudoId) const; | 392 ComputedStyle* getCachedPseudoStyle(PseudoId) const; |
| 393 ComputedStyle* addCachedPseudoStyle(PassRefPtr<ComputedStyle>); | 393 ComputedStyle* addCachedPseudoStyle(PassRefPtr<ComputedStyle>); |
| 394 void removeCachedPseudoStyle(PseudoId); | 394 void removeCachedPseudoStyle(PseudoId); |
| 395 | 395 |
| 396 const PseudoStyleCache* cachedPseudoStyles() const { return m_cachedPseudoSt yles.get(); } | 396 const PseudoStyleCache* cachedPseudoStyles() const { return m_cachedPseudoSt yles.get(); } |
| 397 | 397 |
| 398 void setHasViewportUnits(bool hasViewportUnits = true) const { m_nonInherite dData.m_hasViewportUnits = hasViewportUnits; } | 398 /** |
| 399 bool hasViewportUnits() const { return m_nonInheritedData.m_hasViewportUnits ; } | 399 * ComputedStyle properties |
| 400 | 400 * |
| 401 void setHasRemUnits() const { m_nonInheritedData.m_hasRemUnits = true; } | 401 * Each property stored in ComputedStyle is made up of fields. Fields have |
| 402 bool hasRemUnits() const { return m_nonInheritedData.m_hasRemUnits; } | 402 * initial value functions, getters and setters. A field is preferably a |
| 403 | 403 * basic data type or enum, but can be any type. A set of fields should be |
| 404 bool affectedByFocus() const { return m_nonInheritedData.m_affectedByFocus; } | 404 * preceded by the property the field is stored for. |
| 405 bool affectedByHover() const { return m_nonInheritedData.m_affectedByHover; } | 405 * |
| 406 bool affectedByActive() const { return m_nonInheritedData.m_affectedByActive ; } | 406 * Field method naming should be done like so: |
| 407 bool affectedByDrag() const { return m_nonInheritedData.m_affectedByDrag; } | 407 * // name-of-property |
| 408 | 408 * static int initialNameOfProperty(); |
| 409 void setAffectedByFocus() { m_nonInheritedData.m_affectedByFocus = true; } | 409 * int nameOfProperty() const; |
| 410 void setAffectedByHover() { m_nonInheritedData.m_affectedByHover = true; } | 410 * void setNameOfProperty(int); |
| 411 void setAffectedByActive() { m_nonInheritedData.m_affectedByActive = true; } | 411 * If the property has multiple fields, add the field name to the end of the |
| 412 void setAffectedByDrag() { m_nonInheritedData.m_affectedByDrag = true; } | 412 * method name. |
| 413 | 413 * |
| 414 bool operator==(const ComputedStyle& other) const; | 414 * Avoid nested types by splitting up fields where possible, e.g.: |
| 415 bool operator!=(const ComputedStyle& other) const { return !(*this == other) ; } | 415 * int getBorderTopWidth(); |
| 416 bool isFloating() const { return m_nonInheritedData.m_floating != NoFloat; } | 416 * int getBorderBottomWidth(); |
| 417 bool hasMargin() const { return m_surround->margin.nonZero(); } | 417 * int getBorderLeftWidth(); |
| 418 bool hasBorderFill() const { return m_surround->border.hasBorderFill(); } | 418 * int getBorderRightWidth(); |
| 419 bool hasBorder() const { return m_surround->border.hasBorder(); } | 419 * is preferable to: |
| 420 bool hasBorderDecoration() const { return hasBorder() || hasBorderFill(); } | 420 * BorderWidths getBorderWidths(); |
| 421 bool hasPadding() const { return m_surround->padding.nonZero(); } | 421 * |
| 422 bool hasMarginBeforeQuirk() const { return marginBefore().quirk(); } | 422 * Utility functions should go in a separate section at the end of the |
| 423 bool hasMarginAfterQuirk() const { return marginAfter().quirk(); } | 423 * class, and be kept to a minimum. |
| 424 | 424 */ |
| 425 | |
| 426 // Non-Inherited properties. | |
| 427 | |
| 428 // Content alignment properties. | |
| 429 static StyleContentAlignmentData initialContentAlignment() { return StyleCon tentAlignmentData(ContentPositionNormal, ContentDistributionDefault, OverflowAli gnmentDefault); } | |
| 430 // align-content (aka -webkit-align-content) | |
|
nainar
2016/07/25 07:43:27
insert new line before
sashab
2016/07/26 00:38:06
Done
| |
| 431 const StyleContentAlignmentData& alignContent() const { return m_rareNonInhe ritedData->m_alignContent; } | |
| 432 ContentPosition alignContentPosition() const { return m_rareNonInheritedData ->m_alignContent.position(); } | |
| 433 ContentDistributionType alignContentDistribution() const { return m_rareNonI nheritedData->m_alignContent.distribution(); } | |
| 434 OverflowAlignment alignContentOverflowAlignment() const { return m_rareNonIn heritedData->m_alignContent.overflow(); } | |
| 435 void setAlignContent(const StyleContentAlignmentData& data) { SET_VAR(m_rare NonInheritedData, m_alignContent, data); } | |
| 436 void setAlignContentPosition(ContentPosition position) { m_rareNonInheritedD ata.access()->m_alignContent.setPosition(position); } | |
| 437 void setAlignContentDistribution(ContentDistributionType distribution) { m_r areNonInheritedData.access()->m_alignContent.setDistribution(distribution); } | |
| 438 void setAlignContentOverflow(OverflowAlignment overflow) { m_rareNonInherite dData.access()->m_alignContent.setOverflow(overflow); } | |
| 439 // justify-content (aka -webkit-justify-content) | |
|
nainar
2016/07/25 07:43:22
insert new line before
sashab
2016/07/26 00:38:09
Done
| |
| 440 const StyleContentAlignmentData& justifyContent() const { return m_rareNonIn heritedData->m_justifyContent; } | |
| 441 ContentPosition justifyContentPosition() const { return m_rareNonInheritedDa ta->m_justifyContent.position(); } | |
| 442 ContentDistributionType justifyContentDistribution() const { return m_rareNo nInheritedData->m_justifyContent.distribution(); } | |
| 443 OverflowAlignment justifyContentOverflowAlignment() const { return m_rareNon InheritedData->m_justifyContent.overflow(); } | |
| 444 void setJustifyContent(const StyleContentAlignmentData& data) { SET_VAR(m_ra reNonInheritedData, m_justifyContent, data); } | |
| 445 void setJustifyContentPosition(ContentPosition position) { m_rareNonInherite dData.access()->m_justifyContent.setPosition(position); } | |
| 446 void setJustifyContentDistribution(ContentDistributionType distribution) { m _rareNonInheritedData.access()->m_justifyContent.setDistribution(distribution); } | |
| 447 void setJustifyContentOverflow(OverflowAlignment overflow) { m_rareNonInheri tedData.access()->m_justifyContent.setOverflow(overflow); } | |
| 448 | |
| 449 // Alignment properties. | |
| 450 static StyleSelfAlignmentData initialSelfAlignment() { return StyleSelfAlign mentData(ItemPositionAuto, OverflowAlignmentDefault); } | |
| 451 // align-items (aka -webkit-align-items) | |
| 452 const StyleSelfAlignmentData& alignItems() const { return m_rareNonInherited Data->m_alignItems; } | |
| 453 ItemPosition alignItemsPosition() const { return m_rareNonInheritedData->m_a lignItems.position(); } | |
| 454 OverflowAlignment alignItemsOverflowAlignment() const { return m_rareNonInhe ritedData->m_alignItems.overflow(); } | |
| 455 void setAlignItems(const StyleSelfAlignmentData& data) { SET_VAR(m_rareNonIn heritedData, m_alignItems, data); } | |
| 456 void setAlignItemsPosition(ItemPosition position) { m_rareNonInheritedData.a ccess()->m_alignItems.setPosition(position); } | |
| 457 void setAlignItemsOverflow(OverflowAlignment overflow) { m_rareNonInheritedD ata.access()->m_alignItems.setOverflow(overflow); } | |
| 458 | |
| 459 // align-self (aka -webkit-align-self) | |
| 460 const StyleSelfAlignmentData& alignSelf() const { return m_rareNonInheritedD ata->m_alignSelf; } | |
| 461 ItemPosition alignSelfPosition() const { return m_rareNonInheritedData->m_al ignSelf.position(); } | |
| 462 OverflowAlignment alignSelfOverflowAlignment() const { return m_rareNonInher itedData->m_alignSelf.overflow(); } | |
| 463 void setAlignSelf(const StyleSelfAlignmentData& data) { SET_VAR(m_rareNonInh eritedData, m_alignSelf, data); } | |
| 464 void setAlignSelfPosition(ItemPosition position) { m_rareNonInheritedData.ac cess()->m_alignSelf.setPosition(position); } | |
| 465 void setAlignSelfOverflow(OverflowAlignment overflow) { m_rareNonInheritedDa ta.access()->m_alignSelf.setOverflow(overflow); } | |
| 466 | |
| 467 // Filter properties. | |
| 468 | |
| 469 // backdrop-filter | |
| 470 static const FilterOperations& initialBackdropFilter(); | |
| 471 const FilterOperations& backdropFilter() const { return m_rareNonInheritedDa ta->m_backdropFilter->m_operations; } | |
| 472 FilterOperations& mutableBackdropFilter() { return m_rareNonInheritedData.ac cess()->m_backdropFilter.access()->m_operations; } | |
| 473 bool hasBackdropFilter() const { return !m_rareNonInheritedData->m_backdropF ilter->m_operations.operations().isEmpty(); } | |
| 474 void setBackdropFilter(const FilterOperations& ops) { SET_NESTED_VAR(m_rareN onInheritedData, m_backdropFilter, m_operations, ops); } | |
| 475 | |
| 476 // filter (aka -webkit-filter) | |
| 477 static const FilterOperations& initialFilter(); | |
| 478 FilterOperations& mutableFilter() { return m_rareNonInheritedData.access()-> m_filter.access()->m_operations; } | |
| 479 const FilterOperations& filter() const { return m_rareNonInheritedData->m_fi lter->m_operations; } | |
| 480 bool hasFilter() const { return !m_rareNonInheritedData->m_filter->m_operati ons.operations().isEmpty(); } | |
| 481 void setFilter(const FilterOperations& ops) { SET_NESTED_VAR(m_rareNonInheri tedData, m_filter, m_operations, ops); } | |
| 482 | |
| 483 // backface-visibility (aka -webkit-backface-visibility) | |
| 484 static EBackfaceVisibility initialBackfaceVisibility() { return BackfaceVisi bilityVisible; } | |
| 485 EBackfaceVisibility backfaceVisibility() const { return static_cast<EBackfac eVisibility>(m_rareNonInheritedData->m_backfaceVisibility); } | |
| 486 void setBackfaceVisibility(EBackfaceVisibility b) { SET_VAR(m_rareNonInherit edData, m_backfaceVisibility, b); } | |
| 487 | |
| 488 // Background properties. | |
| 489 // background-color | |
| 490 static Color initialBackgroundColor() { return Color::transparent; } | |
| 491 void setBackgroundColor(const StyleColor& v) { SET_VAR(m_background, m_color , v); } | |
| 492 | |
| 493 // background-image | |
| 425 bool hasBackgroundImage() const { return m_background->background().hasImage (); } | 494 bool hasBackgroundImage() const { return m_background->background().hasImage (); } |
| 426 bool hasFixedBackgroundImage() const { return m_background->background().has FixedImage(); } | 495 bool hasFixedBackgroundImage() const { return m_background->background().has FixedImage(); } |
| 427 | |
| 428 bool hasEntirelyFixedBackground() const; | 496 bool hasEntirelyFixedBackground() const; |
| 429 | 497 |
| 430 bool hasAppearance() const { return appearance() != NoControlPart; } | 498 // background-clip |
| 431 | 499 EFillBox backgroundClip() const { return static_cast<EFillBox>(m_background- >background().clip()); } |
| 432 bool hasBackgroundRelatedColorReferencingCurrentColor() const | 500 |
| 433 { | 501 // Border properties. |
| 434 if (backgroundColor().isCurrentColor() || visitedLinkBackgroundColor().i sCurrentColor()) | 502 // -webkit-border-image |
| 435 return true; | 503 static NinePieceImage initialNinePieceImage() { return NinePieceImage(); } |
| 436 if (!boxShadow()) | 504 const NinePieceImage& borderImage() const { return m_surround->border.image( ); } |
| 437 return false; | 505 void setBorderImage(const NinePieceImage& b) { SET_VAR(m_surround, border.m_ image, b); } |
| 438 return shadowListHasCurrentColor(boxShadow()); | 506 // border-image-repeat |
|
nainar
2016/07/25 07:43:20
why mention it if there are no methods here
also
sashab
2016/07/26 00:38:06
Done
| |
| 439 } | 507 // border-image-slice |
|
nainar
2016/07/25 07:43:26
insert new line before
sashab
2016/07/26 00:38:11
Done
| |
| 440 | 508 const LengthBox& borderImageSlices() const { return m_surround->border.image ().imageSlices(); } |
| 441 bool hasBackground() const | 509 void setBorderImageSlices(const LengthBox&); |
| 442 { | 510 // border-image-source |
|
nainar
2016/07/25 07:43:23
insert new line before
sashab
2016/07/26 00:38:08
Done
| |
| 443 Color color = visitedDependentColor(CSSPropertyBackgroundColor); | 511 static StyleImage* initialBorderImageSource() { return 0; } |
| 444 if (color.alpha()) | 512 StyleImage* borderImageSource() const { return m_surround->border.image().im age(); } |
| 445 return true; | 513 void setBorderImageSource(StyleImage*); |
| 446 return hasBackgroundImage(); | 514 // border-image-width |
|
nainar
2016/07/25 07:43:19
insert new line before
sashab
2016/07/26 00:38:11
Done
| |
| 447 } | 515 const BorderImageLengthBox& borderImageWidth() const { return m_surround->bo rder.image().borderSlices(); } |
| 448 | 516 void setBorderImageWidth(const BorderImageLengthBox&); |
| 449 LayoutRectOutsets imageOutsets(const NinePieceImage&) const; | 517 // border-image-outset |
|
nainar
2016/07/25 07:43:26
insert new line before
sashab
2016/07/26 00:38:07
Done
| |
| 450 bool hasBorderImageOutsets() const | 518 const BorderImageLengthBox& borderImageOutset() const { return m_surround->b order.image().outset(); } |
| 451 { | 519 void setBorderImageOutset(const BorderImageLengthBox&); |
| 452 return borderImage().hasImage() && borderImage().outset().nonZero(); | 520 |
| 453 } | 521 // Border width properties. |
| 454 LayoutRectOutsets borderImageOutsets() const | 522 static unsigned initialBorderWidth() { return 3; } |
| 455 { | 523 // border-top-width |
|
nainar
2016/07/25 07:43:19
insert new line before
sashab
2016/07/26 00:38:08
Done
| |
| 456 return imageOutsets(borderImage()); | 524 int borderTopWidth() const { return m_surround->border.borderTopWidth(); } |
| 457 } | 525 void setBorderTopWidth(unsigned v) { SET_VAR(m_surround, border.m_top.m_widt h, v); } |
| 458 | 526 // border-bottom-width |
|
nainar
2016/07/25 07:43:19
insert new line before
sashab
2016/07/26 00:38:11
Done
| |
| 459 // Returns |true| if any property that renders using filter operations is | 527 int borderBottomWidth() const { return m_surround->border.borderBottomWidth( ); } |
| 460 // used (including, but not limited to, 'filter'). | 528 void setBorderBottomWidth(unsigned v) { SET_VAR(m_surround, border.m_bottom. m_width, v); } |
| 461 bool hasFilterInducingProperty() const { return hasFilter() || (RuntimeEnabl edFeatures::cssBoxReflectFilterEnabled() && hasBoxReflect()); } | 529 // border-left-width |
|
nainar
2016/07/25 07:43:22
insert new line before
sashab
2016/07/26 00:38:10
Done
| |
| 462 | 530 int borderLeftWidth() const { return m_surround->border.borderLeftWidth(); } |
| 463 // Returns |true| if opacity should be considered to have non-initial value for the purpose | 531 void setBorderLeftWidth(unsigned v) { SET_VAR(m_surround, border.m_left.m_wi dth, v); } |
| 464 // of creating stacking contexts. | 532 // border-right-width |
|
nainar
2016/07/25 07:43:26
insert new line before
sashab
2016/07/26 00:38:09
Done
| |
| 465 bool hasNonInitialOpacity() const { return hasOpacity() || hasWillChangeOpac ityHint() || hasCurrentOpacityAnimation(); } | 533 int borderRightWidth() const { return m_surround->border.borderRightWidth(); } |
| 466 | 534 void setBorderRightWidth(unsigned v) { SET_VAR(m_surround, border.m_right.m_ width, v); } |
| 467 // Returns whether this style contains any grouping property as defined by [ css-transforms]. | 535 |
| 468 // The main purpose of this is to adjust the used value of transform-style p roperty. | 536 // Border style properties. |
| 469 // Note: We currently don't include every grouping property on the spec to m aintain | 537 static EBorderStyle initialBorderStyle() { return BorderStyleNone; } |
| 470 // backward compatibility. | 538 // border-top-style |
| 471 // [css-transforms] https://drafts.csswg.org/css-transforms/#grouping-proper ty-values | 539 EBorderStyle borderTopStyle() const { return m_surround->border.top().style( ); } |
| 472 bool hasGroupingProperty() const { return !isOverflowVisible() || hasFilterI nducingProperty() || hasNonInitialOpacity(); } | 540 void setBorderTopStyle(EBorderStyle v) { SET_VAR(m_surround, border.m_top.m_ style, v); } |
| 473 | 541 // border-right-style |
|
nainar
2016/07/25 07:43:21
insert new line before
sashab
2016/07/26 00:38:09
Done
| |
| 474 Order rtlOrdering() const { return static_cast<Order>(m_inheritedData.m_rtlO rdering); } | 542 EBorderStyle borderRightStyle() const { return m_surround->border.right().st yle(); } |
| 475 void setRTLOrdering(Order o) { m_inheritedData.m_rtlOrdering = o; } | 543 void setBorderRightStyle(EBorderStyle v) { SET_VAR(m_surround, border.m_righ t.m_style, v); } |
| 476 | 544 // border-left-style |
|
nainar
2016/07/25 07:43:24
insert new line before
sashab
2016/07/26 00:38:13
Done
| |
| 477 bool isStyleAvailable() const; | 545 EBorderStyle borderLeftStyle() const { return m_surround->border.left().styl e(); } |
| 478 | 546 void setBorderLeftStyle(EBorderStyle v) { SET_VAR(m_surround, border.m_left. m_style, v); } |
| 479 bool hasAnyPublicPseudoStyles() const; | 547 // border-bottom-style |
|
nainar
2016/07/25 07:43:23
insert new line before
sashab
2016/07/26 00:38:10
Done
| |
| 480 bool hasPseudoStyle(PseudoId) const; | 548 EBorderStyle borderBottomStyle() const { return m_surround->border.bottom(). style(); } |
| 481 void setHasPseudoStyle(PseudoId); | 549 void setBorderBottomStyle(EBorderStyle v) { SET_VAR(m_surround, border.m_bot tom.m_style, v); } |
| 482 bool hasUniquePseudoStyle() const; | 550 |
| 483 bool hasPseudoElementStyle() const; | 551 // Border color properties. |
| 484 | 552 // border-left-color |
| 485 bool canContainAbsolutePositionObjects() const { return position() != Static Position; } | 553 void setBorderLeftColor(const StyleColor& v) { SET_BORDERVALUE_COLOR(m_surro und, border.m_left, v); } |
| 486 bool canContainFixedPositionObjects() const { return hasTransformRelatedProp erty() || containsPaint();} | 554 // border-right-color |
|
nainar
2016/07/25 07:43:21
insert new line before
sashab
2016/07/26 00:38:12
Done
| |
| 487 | 555 void setBorderRightColor(const StyleColor& v) { SET_BORDERVALUE_COLOR(m_surr ound, border.m_right, v); } |
| 488 // attribute getter methods | 556 // border-top-color |
|
nainar
2016/07/25 07:43:20
insert new line before
sashab
2016/07/26 00:38:11
Done
| |
| 489 | 557 void setBorderTopColor(const StyleColor& v) { SET_BORDERVALUE_COLOR(m_surrou nd, border.m_top, v); } |
| 558 // border-bottom-color | |
|
nainar
2016/07/25 07:43:25
insert new line before
sashab
2016/07/26 00:38:11
Done
| |
| 559 void setBorderBottomColor(const StyleColor& v) { SET_BORDERVALUE_COLOR(m_sur round, border.m_bottom, v); } | |
| 560 | |
| 561 // Border radius properties. | |
| 562 static LengthSize initialBorderRadius() { return LengthSize(Length(0, Fixed) , Length(0, Fixed)); } | |
| 563 // border-top-left-radius (aka -webkit-border-top-left-radius) | |
|
nainar
2016/07/25 07:43:27
insert new line before
sashab
2016/07/26 00:38:12
Done
| |
| 564 const LengthSize& borderTopLeftRadius() const { return m_surround->border.to pLeft(); } | |
| 565 void setBorderTopLeftRadius(const LengthSize& s) { SET_VAR(m_surround, borde r.m_topLeft, s); } | |
| 566 // border-top-right-radius (aka -webkit-border-top-right-radius) | |
|
nainar
2016/07/25 07:43:23
insert new line before
sashab
2016/07/26 00:38:07
Done
sashab
2016/07/26 00:38:09
Done
| |
| 567 const LengthSize& borderTopRightRadius() const { return m_surround->border.t opRight(); } | |
| 568 void setBorderTopRightRadius(const LengthSize& s) { SET_VAR(m_surround, bord er.m_topRight, s); } | |
| 569 // border-bottom-left-radius (aka -webkit-border-bottom-left-radius) | |
|
nainar
2016/07/25 07:43:24
insert new line before
sashab
2016/07/26 00:38:11
Done
| |
| 570 const LengthSize& borderBottomLeftRadius() const { return m_surround->border .bottomLeft(); } | |
| 571 void setBorderBottomLeftRadius(const LengthSize& s) { SET_VAR(m_surround, bo rder.m_bottomLeft, s); } | |
| 572 // border-bottom-right-radius (aka -webkit-border-bottom-right-radius) | |
|
nainar
2016/07/25 07:43:20
insert new line before
sashab
2016/07/26 00:38:12
Done
| |
| 573 const LengthSize& borderBottomRightRadius() const { return m_surround->borde r.bottomRight(); } | |
| 574 void setBorderBottomRightRadius(const LengthSize& s) { SET_VAR(m_surround, b order.m_bottomRight, s); } | |
| 575 | |
| 576 // Offset properties. | |
| 577 static Length initialOffset() { return Length(); } | |
| 578 // left | |
|
nainar
2016/07/25 07:43:19
insert new line before
sashab
2016/07/26 00:38:07
Done
| |
| 579 const Length& left() const { return m_surround->offset.left(); } | |
| 580 void setLeft(const Length& v) { SET_VAR(m_surround, offset.m_left, v); } | |
| 581 // right | |
|
nainar
2016/07/25 07:43:20
insert new line before
sashab
2016/07/26 00:38:08
Done
| |
| 582 const Length& right() const { return m_surround->offset.right(); } | |
| 583 void setRight(const Length& v) { SET_VAR(m_surround, offset.m_right, v); } | |
| 584 // top | |
|
nainar
2016/07/25 07:43:24
insert new line before
sashab
2016/07/26 00:38:12
Done
| |
| 585 const Length& top() const { return m_surround->offset.top(); } | |
| 586 void setTop(const Length& v) { SET_VAR(m_surround, offset.m_top, v); } | |
| 587 // bottom | |
|
nainar
2016/07/25 07:43:20
insert new line before
sashab
2016/07/26 00:38:10
Done
| |
| 588 const Length& bottom() const { return m_surround->offset.bottom(); } | |
| 589 void setBottom(const Length& v) { SET_VAR(m_surround, offset.m_bottom, v); } | |
| 590 | |
| 591 // box-shadow (aka -webkit-box-shadow) | |
| 592 static ShadowList* initialBoxShadow() { return 0; } | |
| 593 ShadowList* boxShadow() const { return m_rareNonInheritedData->m_boxShadow.g et(); } | |
| 594 void setBoxShadow(PassRefPtr<ShadowList>); | |
| 595 | |
| 596 // box-sizing (aka -webkit-box-sizing) | |
| 597 static EBoxSizing initialBoxSizing() { return BoxSizingContentBox; } | |
| 598 EBoxSizing boxSizing() const { return m_box->boxSizing(); } | |
| 599 void setBoxSizing(EBoxSizing s) { SET_VAR(m_box, m_boxSizing, s); } | |
| 600 | |
| 601 // clear | |
| 602 static EClear initialClear() { return ClearNone; } | |
| 603 void setClear(EClear v) { m_nonInheritedData.m_clear = v; } | |
|
nainar
2016/07/25 07:43:22
reverse order of clear() and setClear()
| |
| 604 EClear clear() const { return static_cast<EClear>(m_nonInheritedData.m_clear ); } | |
| 605 | |
| 606 // Page break properties. | |
| 607 // break-after (shorthand for page-break-after and -webkit-column-break-afte r) | |
| 608 static EBreak initialBreakAfter() { return BreakAuto; } | |
| 609 EBreak breakAfter() const { return static_cast<EBreak>(m_nonInheritedData.m_ breakAfter); } | |
| 610 void setBreakAfter(EBreak b) { DCHECK_LE(b, BreakValueLastAllowedForBreakAft erAndBefore); m_nonInheritedData.m_breakAfter = b; } | |
| 611 // break-before (shorthand for page-break-before and -webkit-column-break-be fore) | |
|
nainar
2016/07/25 07:43:21
insert new line before
sashab
2016/07/26 00:38:12
Done
| |
| 612 static EBreak initialBreakBefore() { return BreakAuto; } | |
| 613 EBreak breakBefore() const { return static_cast<EBreak>(m_nonInheritedData.m _breakBefore); } | |
| 614 void setBreakBefore(EBreak b) { DCHECK_LE(b, BreakValueLastAllowedForBreakAf terAndBefore); m_nonInheritedData.m_breakBefore = b; } | |
| 615 // break-inside (shorthand for page-break-inside and -webkit-column-break-in side) | |
|
nainar
2016/07/25 07:43:18
insert new line before
sashab
2016/07/26 00:38:06
Done
| |
| 616 static EBreak initialBreakInside() { return BreakAuto; } | |
| 617 EBreak breakInside() const { return static_cast<EBreak>(m_nonInheritedData.m _breakInside); } | |
| 618 void setBreakInside(EBreak b) { DCHECK_LE(b, BreakValueLastAllowedForBreakIn side); m_nonInheritedData.m_breakInside = b; } | |
| 619 | |
| 620 // clip | |
| 621 static LengthBox initialClip() { return LengthBox(); } | |
| 622 const LengthBox& clip() const { return m_visual->clip; } | |
| 623 void setClip(const LengthBox& box) { SET_VAR(m_visual, hasAutoClip, false); SET_VAR(m_visual, clip, box); } | |
| 624 bool hasAutoClip() const { return m_visual->hasAutoClip; } | |
| 625 void setHasAutoClip() { SET_VAR(m_visual, hasAutoClip, true); SET_VAR(m_visu al, clip, ComputedStyle::initialClip()); } | |
| 626 | |
| 627 // Column properties. | |
| 628 // column-count (aka -webkit-column-count) | |
| 629 static unsigned short initialColumnCount() { return 1; } | |
| 630 unsigned short columnCount() const { return m_rareNonInheritedData->m_multiC ol->m_count; } | |
| 631 void setColumnCount(unsigned short c) { SET_NESTED_VAR(m_rareNonInheritedDat a, m_multiCol, m_autoCount, false); SET_NESTED_VAR(m_rareNonInheritedData, m_mul tiCol, m_count, c); } | |
| 632 bool hasAutoColumnCount() const { return m_rareNonInheritedData->m_multiCol- >m_autoCount; } | |
| 633 void setHasAutoColumnCount() { SET_NESTED_VAR(m_rareNonInheritedData, m_mult iCol, m_autoCount, true); SET_NESTED_VAR(m_rareNonInheritedData, m_multiCol, m_c ount, initialColumnCount()); } | |
| 634 // column-fill | |
|
nainar
2016/07/25 07:43:27
insert new line before
sashab
2016/07/26 00:38:07
Done
| |
| 635 static ColumnFill initialColumnFill() { return ColumnFillBalance; } | |
| 636 ColumnFill getColumnFill() const { return static_cast<ColumnFill>(m_rareNonI nheritedData->m_multiCol->m_fill); } | |
| 637 void setColumnFill(ColumnFill columnFill) { SET_NESTED_VAR(m_rareNonInherite dData, m_multiCol, m_fill, columnFill); } | |
| 638 // column-gap (aka -webkit-column-gap) | |
|
nainar
2016/07/25 07:43:18
insert new line before
sashab
2016/07/26 00:38:13
Done
| |
| 639 float columnGap() const { return m_rareNonInheritedData->m_multiCol->m_gap; } | |
| 640 void setColumnGap(float f) { SET_NESTED_VAR(m_rareNonInheritedData, m_multiC ol, m_normalGap, false); SET_NESTED_VAR(m_rareNonInheritedData, m_multiCol, m_ga p, f); } | |
| 641 bool hasNormalColumnGap() const { return m_rareNonInheritedData->m_multiCol- >m_normalGap; } | |
| 642 void setHasNormalColumnGap() { SET_NESTED_VAR(m_rareNonInheritedData, m_mult iCol, m_normalGap, true); SET_NESTED_VAR(m_rareNonInheritedData, m_multiCol, m_g ap, 0); } | |
| 643 // column-rule (aka -webkit-column-rule) longhands=column-rule-width;column- rule-style;column-rule-color | |
|
nainar
2016/07/25 07:43:24
insert new line before
sashab
2016/07/26 00:38:11
Done, also removed this line
| |
| 644 // column-rule-color (aka -webkit-column-rule-color) | |
| 645 void setColumnRuleColor(const StyleColor& c) { SET_BORDERVALUE_COLOR(m_rareN onInheritedData.access()->m_multiCol, m_rule, c); } | |
| 646 // column-rule-style (aka -webkit-column-rule-style) type_name=EBorderStyle, initial=initialBorderStyle | |
|
nainar
2016/07/25 07:43:24
insert new line before
sashab
2016/07/26 00:38:08
Done
| |
| 647 EBorderStyle columnRuleStyle() const { return m_rareNonInheritedData->m_mult iCol->m_rule.style(); } | |
| 648 void setColumnRuleStyle(EBorderStyle b) { SET_NESTED_VAR(m_rareNonInheritedD ata, m_multiCol, m_rule.m_style, b); } | |
| 649 // column-rule-width (aka -webkit-column-rule-width) | |
|
nainar
2016/07/25 07:43:23
insert new line before
sashab
2016/07/26 00:38:08
Done
| |
| 650 static unsigned short initialColumnRuleWidth() { return 3; } | |
| 651 unsigned short columnRuleWidth() const { return m_rareNonInheritedData->m_mu ltiCol->ruleWidth(); } | |
| 652 void setColumnRuleWidth(unsigned short w) { SET_NESTED_VAR(m_rareNonInherite dData, m_multiCol, m_rule.m_width, w); } | |
| 653 // column-span (aka -webkit-column-span) | |
|
nainar
2016/07/25 07:43:27
insert new line before
sashab
2016/07/26 00:38:13
Done
| |
| 654 static ColumnSpan initialColumnSpan() { return ColumnSpanNone; } | |
| 655 ColumnSpan getColumnSpan() const { return static_cast<ColumnSpan>(m_rareNonI nheritedData->m_multiCol->m_columnSpan); } | |
|
nainar
2016/07/25 07:43:24
submit an earlier patch that changes this to colum
sashab
2016/07/26 00:38:12
There are lots of these, will do these in a later
| |
| 656 void setColumnSpan(ColumnSpan columnSpan) { SET_NESTED_VAR(m_rareNonInherite dData, m_multiCol, m_columnSpan, columnSpan); } | |
| 657 // column-width (aka -webkit-column-width) | |
|
nainar
2016/07/25 07:43:19
insert new line before
sashab
2016/07/26 00:38:06
Done
| |
| 658 void setColumnWidth(float f) { SET_NESTED_VAR(m_rareNonInheritedData, m_mult iCol, m_autoWidth, false); SET_NESTED_VAR(m_rareNonInheritedData, m_multiCol, m_ width, f); } | |
|
nainar
2016/07/25 07:43:24
change order of setColumnWidth() and columnWidth()
sashab
2016/07/26 00:38:06
Done
| |
| 659 float columnWidth() const { return m_rareNonInheritedData->m_multiCol->m_wid th; } | |
| 660 bool hasAutoColumnWidth() const { return m_rareNonInheritedData->m_multiCol- >m_autoWidth; } | |
| 661 void setHasAutoColumnWidth() { SET_NESTED_VAR(m_rareNonInheritedData, m_mult iCol, m_autoWidth, true); SET_NESTED_VAR(m_rareNonInheritedData, m_multiCol, m_w idth, 0); } | |
| 662 | |
| 663 // contain | |
| 664 static Containment initialContain() { return ContainsNone; } | |
| 665 void setContain(Containment contain) { SET_VAR(m_rareNonInheritedData, m_con tain, contain); } | |
|
nainar
2016/07/25 07:43:26
reverse order of contain() and setContain()
sashab
2016/07/26 00:38:07
Done
| |
| 666 Containment contain() const { return static_cast<Containment>(m_rareNonInher itedData->m_contain); } | |
| 667 | |
| 668 // content | |
| 669 bool hasContent() const { return contentData(); } | |
|
nainar
2016/07/25 07:43:18
bring to end - add all misc functions to end
sashab
2016/07/26 00:38:13
Done!! Ty so much
| |
| 670 ContentData* contentData() const { return m_rareNonInheritedData->m_content. get(); } | |
| 671 void setContent(ContentData*); | |
| 672 | |
| 673 // display | |
| 674 static EDisplay initialDisplay() { return INLINE; } | |
| 490 EDisplay display() const { return static_cast<EDisplay>(m_nonInheritedData.m _effectiveDisplay); } | 675 EDisplay display() const { return static_cast<EDisplay>(m_nonInheritedData.m _effectiveDisplay); } |
| 491 EDisplay originalDisplay() const { return static_cast<EDisplay>(m_nonInherit edData.m_originalDisplay); } | 676 EDisplay originalDisplay() const { return static_cast<EDisplay>(m_nonInherit edData.m_originalDisplay); } |
| 492 | 677 void setDisplay(EDisplay v) { m_nonInheritedData.m_effectiveDisplay = v; } |
| 493 const Length& left() const { return m_surround->offset.left(); } | 678 void setOriginalDisplay(EDisplay v) { m_nonInheritedData.m_originalDisplay = v; } |
| 494 const Length& right() const { return m_surround->offset.right(); } | 679 |
| 495 const Length& top() const { return m_surround->offset.top(); } | 680 // Flex properties. |
| 496 const Length& bottom() const { return m_surround->offset.bottom(); } | 681 // flex-basis (aka -webkit-flex-basis) |
| 497 | 682 static Length initialFlexBasis() { return Length(Auto); } |
| 498 // Accessors for positioned object edges that take into account writing mode . | 683 const Length& flexBasis() const { return m_rareNonInheritedData->m_flexibleB ox->m_flexBasis; } |
| 499 const Length& logicalLeft() const { return m_surround->offset.logicalLeft(ge tWritingMode()); } | 684 void setFlexBasis(const Length& length) { SET_NESTED_VAR(m_rareNonInheritedD ata, m_flexibleBox, m_flexBasis, length); } |
| 500 const Length& logicalRight() const { return m_surround->offset.logicalRight( getWritingMode()); } | 685 // flex-direction (aka -webkit-flex-direction) |
|
nainar
2016/07/25 07:43:27
insert new line before
sashab
2016/07/26 00:38:10
Done
| |
| 501 const Length& logicalTop() const { return m_surround->offset.before(getWriti ngMode()); } | 686 static EFlexDirection initialFlexDirection() { return FlowRow; } |
| 502 const Length& logicalBottom() const { return m_surround->offset.after(getWri tingMode()); } | 687 EFlexDirection flexDirection() const { return static_cast<EFlexDirection>(m_ rareNonInheritedData->m_flexibleBox->m_flexDirection); } |
| 503 | 688 void setFlexDirection(EFlexDirection direction) { SET_NESTED_VAR(m_rareNonIn heritedData, m_flexibleBox, m_flexDirection, direction); } |
| 504 // Whether or not a positioned element requires normal flow x/y to be comput ed | 689 // flex-grow (aka -webkit-flex-grow) |
|
nainar
2016/07/25 07:43:19
insert new line before
sashab
2016/07/26 00:38:07
Done
| |
| 505 // to determine its position. | 690 static float initialFlexGrow() { return 0; } |
| 506 bool hasAutoLeftAndRight() const { return left().isAuto() && right().isAuto( ); } | 691 float flexGrow() const { return m_rareNonInheritedData->m_flexibleBox->m_fle xGrow; } |
| 507 bool hasAutoTopAndBottom() const { return top().isAuto() && bottom().isAuto( ); } | 692 void setFlexGrow(float f) { SET_NESTED_VAR(m_rareNonInheritedData, m_flexibl eBox, m_flexGrow, f); } |
| 508 bool hasStaticInlinePosition(bool horizontal) const { return horizontal ? ha sAutoLeftAndRight() : hasAutoTopAndBottom(); } | 693 // flex-shrink (aka -webkit-flex-shrink) |
|
nainar
2016/07/25 07:43:19
insert new line before
sashab
2016/07/26 00:38:06
Done
| |
| 509 bool hasStaticBlockPosition(bool horizontal) const { return horizontal ? has AutoTopAndBottom() : hasAutoLeftAndRight(); } | 694 static float initialFlexShrink() { return 1; } |
| 510 | 695 float flexShrink() const { return m_rareNonInheritedData->m_flexibleBox->m_f lexShrink; } |
| 511 EPosition position() const { return static_cast<EPosition>(m_nonInheritedDat a.m_position); } | 696 void setFlexShrink(float f) { SET_NESTED_VAR(m_rareNonInheritedData, m_flexi bleBox, m_flexShrink, f); } |
| 512 bool hasOutOfFlowPosition() const { return position() == AbsolutePosition || position() == FixedPosition; } | 697 // flex-wrap (aka -webkit-flex-wrap) |
|
nainar
2016/07/25 07:43:26
insert new line before
sashab
2016/07/26 00:38:12
Done
| |
| 513 bool hasInFlowPosition() const { return position() == RelativePosition || po sition() == StickyPosition; } | 698 static EFlexWrap initialFlexWrap() { return FlexNoWrap; } |
| 514 bool hasViewportConstrainedPosition() const { return position() == FixedPosi tion || position() == StickyPosition; } | 699 EFlexWrap flexWrap() const { return static_cast<EFlexWrap>(m_rareNonInherite dData->m_flexibleBox->m_flexWrap); } |
| 700 void setFlexWrap(EFlexWrap w) { SET_NESTED_VAR(m_rareNonInheritedData, m_fle xibleBox, m_flexWrap, w); } | |
| 701 // -webkit-box-flex type_name=float | |
|
nainar
2016/07/25 07:43:23
insert new line before
sashab
2016/07/26 00:38:07
Done
| |
| 702 static float initialBoxFlex() { return 0.0f; } | |
| 703 float boxFlex() const { return m_rareNonInheritedData->m_deprecatedFlexibleB ox->flex; } | |
| 704 void setBoxFlex(float f) { SET_NESTED_VAR(m_rareNonInheritedData, m_deprecat edFlexibleBox, flex, f); } | |
| 705 // -webkit-box-flex-group type_name=unsigned int | |
|
nainar
2016/07/25 07:43:25
insert new line before
sashab
2016/07/26 00:38:09
Done
| |
| 706 static unsigned initialBoxFlexGroup() { return 1; } | |
| 707 unsigned boxFlexGroup() const { return m_rareNonInheritedData->m_deprecatedF lexibleBox->flexGroup; } | |
| 708 void setBoxFlexGroup(unsigned fg) { SET_NESTED_VAR(m_rareNonInheritedData, m _deprecatedFlexibleBox, flexGroup, fg); } | |
| 709 // -webkit-box-align | |
|
nainar
2016/07/25 07:43:27
insert new line before
sashab
2016/07/26 00:38:06
Done
| |
| 710 // For valid values of box-align see http://www.w3.org/TR/2009/WD-css3-flexb ox-20090723/#alignment | |
| 711 static EBoxAlignment initialBoxAlign() { return BSTRETCH; } | |
| 712 EBoxAlignment boxAlign() const { return static_cast<EBoxAlignment>(m_rareNon InheritedData->m_deprecatedFlexibleBox->align); } | |
| 713 void setBoxAlign(EBoxAlignment a) { SET_NESTED_VAR(m_rareNonInheritedData, m _deprecatedFlexibleBox, align, a); } | |
| 714 // -webkit-box-decoration-break | |
|
nainar
2016/07/25 07:43:25
insert new line before
sashab
2016/07/26 00:38:08
Done
| |
| 715 static EBoxDecorationBreak initialBoxDecorationBreak() { return BoxDecoratio nBreakSlice; } | |
| 716 EBoxDecorationBreak boxDecorationBreak() const { return m_box->boxDecoration Break(); } | |
| 717 void setBoxDecorationBreak(EBoxDecorationBreak b) { SET_VAR(m_box, m_boxDeco rationBreak, b); } | |
| 718 // -webkit-box-lines | |
|
nainar
2016/07/25 07:43:27
insert new line before
sashab
2016/07/26 00:38:08
Done
| |
| 719 static EBoxLines initialBoxLines() { return SINGLE; } | |
| 720 EBoxLines boxLines() const { return static_cast<EBoxLines>(m_rareNonInherite dData->m_deprecatedFlexibleBox->lines); } | |
| 721 void setBoxLines(EBoxLines lines) { SET_NESTED_VAR(m_rareNonInheritedData, m _deprecatedFlexibleBox, lines, lines); } | |
| 722 // -webkit-box-ordinal-group | |
|
nainar
2016/07/25 07:43:21
insert new line before
sashab
2016/07/26 00:38:09
Done
| |
| 723 static unsigned initialBoxOrdinalGroup() { return 1; } | |
| 724 unsigned boxOrdinalGroup() const { return m_rareNonInheritedData->m_deprecat edFlexibleBox->ordinalGroup; } | |
| 725 void setBoxOrdinalGroup(unsigned og) { SET_NESTED_VAR(m_rareNonInheritedData , m_deprecatedFlexibleBox, ordinalGroup, og); } | |
| 726 // -webkit-box-orient | |
|
nainar
2016/07/25 07:43:19
insert new line before
sashab
2016/07/26 00:38:11
Done
| |
| 727 static EBoxOrient initialBoxOrient() { return HORIZONTAL; } | |
| 728 EBoxOrient boxOrient() const { return static_cast<EBoxOrient>(m_rareNonInher itedData->m_deprecatedFlexibleBox->orient); } | |
| 729 void setBoxOrient(EBoxOrient o) { SET_NESTED_VAR(m_rareNonInheritedData, m_d eprecatedFlexibleBox, orient, o); } | |
| 730 // -webkit-box-pack | |
|
nainar
2016/07/25 07:43:22
insert new line before
sashab
2016/07/26 00:38:10
Done
| |
| 731 static EBoxPack initialBoxPack() { return BoxPackStart; } | |
| 732 EBoxPack boxPack() const { return static_cast<EBoxPack>(m_rareNonInheritedDa ta->m_deprecatedFlexibleBox->pack); } | |
| 733 void setBoxPack(EBoxPack p) { SET_NESTED_VAR(m_rareNonInheritedData, m_depre catedFlexibleBox, pack, p); } | |
| 734 // -webkit-box-reflect | |
|
nainar
2016/07/25 07:43:20
insert new line before
sashab
2016/07/26 00:38:10
Done
| |
| 735 static StyleReflection* initialBoxReflect() { return 0; } | |
| 736 StyleReflection* boxReflect() const { return m_rareNonInheritedData->m_boxRe flect.get(); } | |
| 737 void setBoxReflect(PassRefPtr<StyleReflection> reflect) | |
| 738 { | |
| 739 if (m_rareNonInheritedData->m_boxReflect != reflect) | |
| 740 m_rareNonInheritedData.access()->m_boxReflect = reflect; | |
| 741 } | |
| 742 | |
| 743 // float | |
| 744 static EFloat initialFloating() { return NoFloat; } | |
| 515 EFloat floating() const { return static_cast<EFloat>(m_nonInheritedData.m_fl oating); } | 745 EFloat floating() const { return static_cast<EFloat>(m_nonInheritedData.m_fl oating); } |
| 516 | 746 void setFloating(EFloat v) { m_nonInheritedData.m_floating = v; } |
| 747 | |
| 748 // Grid properties. | |
| 749 static Vector<GridTrackSize> initialGridAutoRepeatTracks() { return Vector<G ridTrackSize>(); /* none */ } | |
| 750 static size_t initialGridAutoRepeatInsertionPoint() { return 0; } | |
| 751 static AutoRepeatType initialGridAutoRepeatType() { return NoAutoRepeat; } | |
| 752 static NamedGridLinesMap initialNamedGridColumnLines() { return NamedGridLin esMap(); } | |
| 753 static NamedGridLinesMap initialNamedGridRowLines() { return NamedGridLinesM ap(); } | |
| 754 static OrderedNamedGridLines initialOrderedNamedGridColumnLines() { return O rderedNamedGridLines(); } | |
| 755 static OrderedNamedGridLines initialOrderedNamedGridRowLines() { return Orde redNamedGridLines(); } | |
| 756 static NamedGridAreaMap initialNamedGridArea() { return NamedGridAreaMap(); } | |
| 757 static size_t initialNamedGridAreaCount() { return 0; } | |
| 758 // grid-auto-columns | |
|
nainar
2016/07/25 07:43:25
insert new line before
sashab
2016/07/26 00:38:09
Done
| |
| 759 static Vector<GridTrackSize> initialGridAutoColumns(); | |
| 760 const Vector<GridTrackSize>& gridAutoColumns() const { return m_rareNonInher itedData->m_grid->m_gridAutoColumns; } | |
| 761 void setGridAutoColumns(const Vector<GridTrackSize>& trackSizeList) { SET_NE STED_VAR(m_rareNonInheritedData, m_grid, m_gridAutoColumns, trackSizeList); } | |
| 762 // grid-auto-flow | |
|
nainar
2016/07/25 07:43:20
insert new line before
sashab
2016/07/26 00:38:11
Done
| |
| 763 static GridAutoFlow initialGridAutoFlow() { return AutoFlowRow; } | |
| 764 void setGridAutoFlow(GridAutoFlow flow) { SET_NESTED_VAR(m_rareNonInheritedD ata, m_grid, m_gridAutoFlow, flow); } | |
| 765 // grid-auto-rows | |
|
nainar
2016/07/25 07:43:26
insert new line before
sashab
2016/07/26 00:38:09
Done
| |
| 766 static Vector<GridTrackSize> initialGridAutoRows(); | |
| 767 const Vector<GridTrackSize>& gridAutoRows() const { return m_rareNonInherite dData->m_grid->m_gridAutoRows; } | |
| 768 void setGridAutoRows(const Vector<GridTrackSize>& trackSizeList) { SET_NESTE D_VAR(m_rareNonInheritedData, m_grid, m_gridAutoRows, trackSizeList); } | |
| 769 // grid-column-gap | |
|
nainar
2016/07/25 07:43:22
insert new line before
sashab
2016/07/26 00:38:09
Done, and removed newline below
| |
| 770 static Length initialGridColumnGap() { return Length(Fixed); } | |
| 771 | |
| 772 const Length& gridColumnGap() const { return m_rareNonInheritedData->m_grid- >m_gridColumnGap; } | |
| 773 void setGridColumnGap(const Length& v) { SET_NESTED_VAR(m_rareNonInheritedDa ta, m_grid, m_gridColumnGap, v); } | |
| 774 // grid-column-start | |
|
nainar
2016/07/25 07:43:27
insert new line before
sashab
2016/07/26 00:38:10
Done
| |
| 775 static GridPosition initialGridColumnStart() { return GridPosition(); /* aut o */ } | |
| 776 const GridPosition& gridColumnStart() const { return m_rareNonInheritedData- >m_gridItem->m_gridColumnStart; } | |
| 777 void setGridColumnStart(const GridPosition& columnStartPosition) { SET_NESTE D_VAR(m_rareNonInheritedData, m_gridItem, m_gridColumnStart, columnStartPosition ); } | |
| 778 // grid-column-end | |
|
nainar
2016/07/25 07:43:18
insert new line before
sashab
2016/07/26 00:38:08
Done
| |
| 779 static GridPosition initialGridColumnEnd() { return GridPosition(); /* auto */ } | |
| 780 const GridPosition& gridColumnEnd() const { return m_rareNonInheritedData->m _gridItem->m_gridColumnEnd; } | |
| 781 void setGridColumnEnd(const GridPosition& columnEndPosition) { SET_NESTED_VA R(m_rareNonInheritedData, m_gridItem, m_gridColumnEnd, columnEndPosition); } | |
| 782 // grid-row-gap | |
|
nainar
2016/07/25 07:43:25
insert new line before
sashab
2016/07/26 00:38:07
Done
| |
| 783 static Length initialGridRowGap() { return Length(Fixed); } | |
| 784 const Length& gridRowGap() const { return m_rareNonInheritedData->m_grid->m_ gridRowGap; } | |
| 785 void setGridRowGap(const Length& v) { SET_NESTED_VAR(m_rareNonInheritedData, m_grid, m_gridRowGap, v); } | |
| 786 // grid-row-start | |
|
nainar
2016/07/25 07:43:20
insert new line before
sashab
2016/07/26 00:38:09
Done
| |
| 787 static GridPosition initialGridRowStart() { return GridPosition(); /* auto */ } | |
| 788 const GridPosition& gridRowStart() const { return m_rareNonInheritedData->m_ gridItem->m_gridRowStart; } | |
| 789 void setGridRowStart(const GridPosition& rowStartPosition) { SET_NESTED_VAR( m_rareNonInheritedData, m_gridItem, m_gridRowStart, rowStartPosition); } | |
| 790 // grid-row-end | |
|
nainar
2016/07/25 07:43:18
insert new line before
nainar
2016/07/25 07:43:20
insert new line before
sashab
2016/07/26 00:38:06
Done Done ;)
| |
| 791 static GridPosition initialGridRowEnd() { return GridPosition(); /* auto */ } | |
| 792 const GridPosition& gridRowEnd() const { return m_rareNonInheritedData->m_gr idItem->m_gridRowEnd; } | |
| 793 void setGridRowEnd(const GridPosition& rowEndPosition) { SET_NESTED_VAR(m_ra reNonInheritedData, m_gridItem, m_gridRowEnd, rowEndPosition); } | |
| 794 // grid-template-areas | |
|
nainar
2016/07/25 07:43:23
why have this here when there are no methods?
sashab
2016/07/26 00:38:07
Done
| |
| 795 // grid-template-columns | |
| 796 static Vector<GridTrackSize> initialGridTemplateColumns() { return Vector<Gr idTrackSize>(); /* none */ } | |
| 797 const Vector<GridTrackSize>& gridTemplateColumns() const { return m_rareNonI nheritedData->m_grid->m_gridTemplateColumns; } | |
| 798 void setGridTemplateColumns(const Vector<GridTrackSize>& lengths) { SET_NEST ED_VAR(m_rareNonInheritedData, m_grid, m_gridTemplateColumns, lengths); } | |
| 799 // grid-template-rows | |
|
nainar
2016/07/25 07:43:26
insert new line before
sashab
2016/07/26 00:38:07
Done
| |
| 800 static Vector<GridTrackSize> initialGridTemplateRows() { return Vector<GridT rackSize>(); /* none */ } | |
| 801 const Vector<GridTrackSize>& gridTemplateRows() const { return m_rareNonInhe ritedData->m_grid->m_gridTemplateRows; } | |
| 802 void setGridTemplateRows(const Vector<GridTrackSize>& lengths) { SET_NESTED_ VAR(m_rareNonInheritedData, m_grid, m_gridTemplateRows, lengths); } | |
| 803 | |
| 804 // justify-self | |
| 805 const StyleSelfAlignmentData& justifySelf() const { return m_rareNonInherite dData->m_justifySelf; } | |
| 806 void setJustifySelf(const StyleSelfAlignmentData& data) { SET_VAR(m_rareNonI nheritedData, m_justifySelf, data); } | |
| 807 // justify-items | |
|
nainar
2016/07/25 07:43:18
insert new line before
sashab
2016/07/26 00:38:08
Done
| |
| 808 const StyleSelfAlignmentData& justifyItems() const { return m_rareNonInherit edData->m_justifyItems; } | |
| 809 void setJustifyItems(const StyleSelfAlignmentData& data) { SET_VAR(m_rareNon InheritedData, m_justifyItems, data); } | |
| 810 | |
| 811 | |
| 812 // Width/height properties. | |
| 813 static Length initialSize() { return Length(); } | |
| 814 // width | |
|
nainar
2016/07/25 07:43:21
insert new line before
sashab
2016/07/26 00:38:11
Done
| |
| 517 const Length& width() const { return m_box->width(); } | 815 const Length& width() const { return m_box->width(); } |
| 816 void setWidth(const Length& v) { SET_VAR(m_box, m_width, v); } | |
| 817 // height | |
|
nainar
2016/07/25 07:43:20
insert new line before
sashab
2016/07/26 00:38:11
Done
| |
| 518 const Length& height() const { return m_box->height(); } | 818 const Length& height() const { return m_box->height(); } |
| 819 void setHeight(const Length& v) { SET_VAR(m_box, m_height, v); } | |
| 820 | |
| 821 static Length initialMaxSize() { return Length(MaxSizeNone); } | |
| 822 // max-width | |
|
nainar
2016/07/25 07:43:19
insert new line before
sashab
2016/07/26 00:38:12
Done, and moved initializer up to top
| |
| 823 const Length& maxWidth() const { return m_box->maxWidth(); } | |
| 824 void setMaxWidth(const Length& v) { SET_VAR(m_box, m_maxWidth, v); } | |
| 825 // max-height | |
|
nainar
2016/07/25 07:43:24
insert new line before
sashab
2016/07/26 00:38:06
Done
| |
| 826 const Length& maxHeight() const { return m_box->maxHeight(); } | |
| 827 void setMaxHeight(const Length& v) { SET_VAR(m_box, m_maxHeight, v); } | |
| 828 | |
| 829 static Length initialMinSize() { return Length(); } | |
| 830 // min-width | |
|
nainar
2016/07/25 07:43:26
insert new line before
sashab
2016/07/26 00:38:08
Done, and moved initializer up to top
| |
| 519 const Length& minWidth() const { return m_box->minWidth(); } | 831 const Length& minWidth() const { return m_box->minWidth(); } |
| 520 const Length& maxWidth() const { return m_box->maxWidth(); } | 832 void setMinWidth(const Length& v) { SET_VAR(m_box, m_minWidth, v); } |
| 833 // min-height | |
|
nainar
2016/07/25 07:43:27
insert new line before
sashab
2016/07/26 00:38:10
Done
| |
| 521 const Length& minHeight() const { return m_box->minHeight(); } | 834 const Length& minHeight() const { return m_box->minHeight(); } |
| 522 const Length& maxHeight() const { return m_box->maxHeight(); } | 835 void setMinHeight(const Length& v) { SET_VAR(m_box, m_minHeight, v); } |
| 523 | 836 |
| 524 const Length& logicalWidth() const { return isHorizontalWritingMode() ? widt h() : height(); } | 837 // image-orientation |
| 525 const Length& logicalHeight() const { return isHorizontalWritingMode() ? hei ght() : width(); } | 838 static RespectImageOrientationEnum initialRespectImageOrientation() { return DoNotRespectImageOrientation; } |
| 526 const Length& logicalMinWidth() const { return isHorizontalWritingMode() ? m inWidth() : minHeight(); } | 839 RespectImageOrientationEnum respectImageOrientation() const { return static_ cast<RespectImageOrientationEnum>(m_rareInheritedData->m_respectImageOrientation ); } |
| 527 const Length& logicalMaxWidth() const { return isHorizontalWritingMode() ? m axWidth() : maxHeight(); } | 840 void setRespectImageOrientation(RespectImageOrientationEnum v) { SET_VAR(m_r areInheritedData, m_respectImageOrientation, v); } |
| 528 const Length& logicalMinHeight() const { return isHorizontalWritingMode() ? minHeight() : minWidth(); } | 841 |
| 529 const Length& logicalMaxHeight() const { return isHorizontalWritingMode() ? maxHeight() : maxWidth(); } | 842 // image-rendering |
| 530 | 843 static EImageRendering initialImageRendering() { return ImageRenderingAuto; } |
| 531 const BorderData& border() const { return m_surround->border; } | 844 EImageRendering imageRendering() const { return static_cast<EImageRendering> (m_rareInheritedData->m_imageRendering); } |
| 532 const BorderValue& borderLeft() const { return m_surround->border.left(); } | 845 void setImageRendering(EImageRendering v) { SET_VAR(m_rareInheritedData, m_i mageRendering, v); } |
| 533 const BorderValue& borderRight() const { return m_surround->border.right(); } | 846 |
| 534 const BorderValue& borderTop() const { return m_surround->border.top(); } | 847 // isolation |
| 535 const BorderValue& borderBottom() const { return m_surround->border.bottom() ; } | 848 static EIsolation initialIsolation() { return IsolationAuto; } |
| 536 | 849 EIsolation isolation() const { return static_cast<EIsolation>(m_rareNonInher itedData->m_isolation); } |
| 537 const BorderValue& borderBefore() const; | 850 void setIsolation(EIsolation v) { m_rareNonInheritedData.access()->m_isolati on = v; } |
| 538 const BorderValue& borderAfter() const; | 851 |
| 539 const BorderValue& borderStart() const; | 852 // Margin properties. |
| 540 const BorderValue& borderEnd() const; | 853 static Length initialMargin() { return Length(Fixed); } |
| 541 | 854 // margin-top |
|
nainar
2016/07/25 07:43:19
insert new line before
sashab
2016/07/26 00:38:12
Done
| |
| 542 const NinePieceImage& borderImage() const { return m_surround->border.image( ); } | 855 const Length& marginTop() const { return m_surround->margin.top(); } |
| 543 StyleImage* borderImageSource() const { return m_surround->border.image().im age(); } | 856 void setMarginTop(const Length& v) { SET_VAR(m_surround, margin.m_top, v); } |
| 544 const LengthBox& borderImageSlices() const { return m_surround->border.image ().imageSlices(); } | 857 // margin-bottom |
|
nainar
2016/07/25 07:43:25
insert new line before
sashab
2016/07/26 00:38:10
Done
| |
| 545 bool borderImageSlicesFill() const { return m_surround->border.image().fill( ); } | 858 const Length& marginBottom() const { return m_surround->margin.bottom(); } |
| 546 const BorderImageLengthBox& borderImageWidth() const { return m_surround->bo rder.image().borderSlices(); } | 859 void setMarginBottom(const Length& v) { SET_VAR(m_surround, margin.m_bottom, v); } |
| 547 const BorderImageLengthBox& borderImageOutset() const { return m_surround->b order.image().outset(); } | 860 // margin-left |
|
nainar
2016/07/25 07:43:25
insert new line before
sashab
2016/07/26 00:38:09
Done
| |
| 548 | 861 const Length& marginLeft() const { return m_surround->margin.left(); } |
| 549 const LengthSize& borderTopLeftRadius() const { return m_surround->border.to pLeft(); } | 862 void setMarginLeft(const Length& v) { SET_VAR(m_surround, margin.m_left, v); } |
| 550 const LengthSize& borderTopRightRadius() const { return m_surround->border.t opRight(); } | 863 // margin-right |
|
nainar
2016/07/25 07:43:23
insert new line before
sashab
2016/07/26 00:38:12
Done
| |
| 551 const LengthSize& borderBottomLeftRadius() const { return m_surround->border .bottomLeft(); } | 864 const Length& marginRight() const { return m_surround->margin.right(); } |
| 552 const LengthSize& borderBottomRightRadius() const { return m_surround->borde r.bottomRight(); } | 865 void setMarginRight(const Length& v) { SET_VAR(m_surround, margin.m_right, v ); } |
| 553 bool hasBorderRadius() const { return m_surround->border.hasBorderRadius(); } | 866 |
| 554 | 867 // -webkit-margin-before-collapse (aka -webkit-margin-top-collapse) |
| 555 int borderLeftWidth() const { return m_surround->border.borderLeftWidth(); } | 868 static EMarginCollapse initialMarginBeforeCollapse() { return MarginCollapse Collapse; } |
| 556 EBorderStyle borderLeftStyle() const { return m_surround->border.left().styl e(); } | 869 EMarginCollapse marginAfterCollapse() const { return static_cast<EMarginColl apse>(m_rareNonInheritedData->marginAfterCollapse); } |
| 557 int borderRightWidth() const { return m_surround->border.borderRightWidth(); } | 870 void setMarginBeforeCollapse(EMarginCollapse c) { SET_VAR(m_rareNonInherited Data, marginBeforeCollapse, c); } |
| 558 EBorderStyle borderRightStyle() const { return m_surround->border.right().st yle(); } | 871 // -webkit-margin-after-collapse (aka -webkit-margin-bottom-collapse) |
|
nainar
2016/07/25 07:43:20
insert new line before
sashab
2016/07/26 00:38:12
Done
| |
| 559 int borderTopWidth() const { return m_surround->border.borderTopWidth(); } | 872 static EMarginCollapse initialMarginAfterCollapse() { return MarginCollapseC ollapse; } |
| 560 EBorderStyle borderTopStyle() const { return m_surround->border.top().style( ); } | 873 EMarginCollapse marginBeforeCollapse() const { return static_cast<EMarginCol lapse>(m_rareNonInheritedData->marginBeforeCollapse); } |
| 561 int borderBottomWidth() const { return m_surround->border.borderBottomWidth( ); } | 874 void setMarginAfterCollapse(EMarginCollapse c) { SET_VAR(m_rareNonInheritedD ata, marginAfterCollapse, c); } |
| 562 EBorderStyle borderBottomStyle() const { return m_surround->border.bottom(). style(); } | 875 |
| 563 | 876 // mix-blend-mode |
| 564 int borderBeforeWidth() const; | 877 static WebBlendMode initialBlendMode() { return WebBlendModeNormal; } |
| 565 int borderAfterWidth() const; | 878 WebBlendMode blendMode() const { return static_cast<WebBlendMode>(m_rareNonI nheritedData->m_effectiveBlendMode); } |
| 566 int borderStartWidth() const; | 879 void setBlendMode(WebBlendMode v) { m_rareNonInheritedData.access()->m_effec tiveBlendMode = v; } |
| 567 int borderEndWidth() const; | 880 |
| 568 int borderOverWidth() const; | 881 // motion-path |
| 569 int borderUnderWidth() const; | 882 static StylePath* initialMotionPath() { return nullptr; } |
| 570 | 883 StylePath* motionPath() const { return m_rareNonInheritedData->m_transform-> m_motion.m_path.get(); } |
| 884 void setMotionPath(PassRefPtr<StylePath>); | |
| 885 // motion-offset | |
|
nainar
2016/07/25 07:43:23
insert new line before
sashab
2016/07/26 00:38:11
Done
| |
| 886 static Length initialMotionOffset() { return Length(0, Fixed); } | |
| 887 const Length& motionOffset() const { return m_rareNonInheritedData->m_transf orm->m_motion.m_offset; } | |
| 888 void setMotionOffset(const Length& motionOffset) { SET_NESTED_VAR(m_rareNonI nheritedData, m_transform, m_motion.m_offset, motionOffset); } | |
| 889 // motion-rotation | |
|
nainar
2016/07/25 07:43:18
insert new line before
sashab
2016/07/26 00:38:09
Done
| |
| 890 static StyleMotionRotation initialMotionRotation() { return StyleMotionRotat ion(0, MotionRotationAuto); } | |
| 891 const StyleMotionRotation& motionRotation() const { return m_rareNonInherite dData->m_transform->m_motion.m_rotation; } | |
| 892 void setMotionRotation(const StyleMotionRotation& motionRotation) { SET_NEST ED_VAR(m_rareNonInheritedData, m_transform, m_motion.m_rotation, motionRotation) ; } | |
| 893 | |
| 894 // object-fit | |
| 895 static ObjectFit initialObjectFit() { return ObjectFitFill; } | |
| 896 ObjectFit getObjectFit() const { return static_cast<ObjectFit>(m_rareNonInhe ritedData->m_objectFit); } | |
|
nainar
2016/07/25 07:43:23
getObjectFit() -> objectFit() in an earlier patch
sashab
2016/07/26 00:38:07
added TODO, will do in later patch :)
| |
| 897 void setObjectFit(ObjectFit f) { SET_VAR(m_rareNonInheritedData, m_objectFit , f); } | |
| 898 // object-position | |
|
nainar
2016/07/25 07:43:26
insert new line before
sashab
2016/07/26 00:38:07
Done
| |
| 899 static LengthPoint initialObjectPosition() { return LengthPoint(Length(50.0, Percent), Length(50.0, Percent)); } | |
| 900 LengthPoint objectPosition() const { return m_rareNonInheritedData->m_object Position; } | |
| 901 void setObjectPosition(LengthPoint position) { SET_VAR(m_rareNonInheritedDat a, m_objectPosition, position); } | |
| 902 | |
| 903 // opacity (aka -webkit-opacity) | |
| 904 static float initialOpacity() { return 1.0f; } | |
| 905 float opacity() const { return m_rareNonInheritedData->opacity; } | |
| 906 void setOpacity(float f) { float v = clampTo<float>(f, 0, 1); SET_VAR(m_rare NonInheritedData, opacity, v); } | |
| 907 | |
| 908 // order (aka -webkit-order) | |
| 909 static int initialOrder() { return 0; } | |
| 910 int order() const { return m_rareNonInheritedData->m_order; } | |
| 911 // We restrict the smallest value to int min + 2 because we use int min and int min + 1 as special values in a hash set. | |
|
nainar
2016/07/25 07:43:19
delete line
sashab
2016/07/26 00:38:10
?? No newline here, and this comment is informativ
| |
| 912 void setOrder(int o) { SET_VAR(m_rareNonInheritedData, m_order, max(std::num eric_limits<int>::min() + 2, o)); } | |
| 913 | |
| 914 // Outline properties. | |
| 915 // outline-color | |
| 916 void setOutlineColor(const StyleColor& v) { SET_BORDERVALUE_COLOR(m_backgrou nd, m_outline, v); } | |
| 917 // outline-style | |
| 918 static OutlineIsAuto initialOutlineStyleIsAuto() { return OutlineIsAutoOff; } | |
|
nainar
2016/07/25 07:43:19
move to after setOutlineStyle()
sashab
2016/07/26 00:38:10
Nice!! Done
| |
| 919 EBorderStyle outlineStyle() const { return m_background->outline().style(); } | |
| 920 void setOutlineStyle(EBorderStyle v) { SET_VAR(m_background, m_outline.m_sty le, v); } | |
| 921 OutlineIsAuto outlineStyleIsAuto() const { return static_cast<OutlineIsAuto> (m_background->outline().isAuto()); } | |
| 922 void setOutlineStyleIsAuto(OutlineIsAuto isAuto) { SET_VAR(m_background, m_o utline.m_isAuto, isAuto); } | |
| 923 // outline-width | |
|
nainar
2016/07/25 07:43:21
insert new line before
sashab
2016/07/26 00:38:10
Done
| |
| 924 static unsigned short initialOutlineWidth() { return 3; } | |
| 925 void setOutlineWidth(unsigned short v) { SET_VAR(m_background, m_outline.m_w idth, v); } | |
| 571 int outlineWidth() const | 926 int outlineWidth() const |
|
nainar
2016/07/25 07:43:18
move to before setOutlineWidth()
sashab
2016/07/26 00:38:06
Done
| |
| 572 { | 927 { |
| 573 if (m_background->outline().style() == BorderStyleNone) | 928 if (m_background->outline().style() == BorderStyleNone) |
| 574 return 0; | 929 return 0; |
| 575 return m_background->outline().width(); | 930 return m_background->outline().width(); |
| 576 } | 931 } |
| 577 bool hasOutline() const { return outlineWidth() > 0 && outlineStyle() > Bord erStyleHidden; } | 932 // outline-offset |
| 578 EBorderStyle outlineStyle() const { return m_background->outline().style(); } | 933 static int initialOutlineOffset() { return 0; } |
| 579 OutlineIsAuto outlineStyleIsAuto() const { return static_cast<OutlineIsAuto> (m_background->outline().isAuto()); } | |
| 580 int outlineOutsetExtent() const; | |
| 581 | |
| 582 EOverflowAnchor overflowAnchor() const { return static_cast<EOverflowAnchor> (m_nonInheritedData.m_overflowAnchor); } | |
| 583 EOverflow overflowX() const { return static_cast<EOverflow>(m_nonInheritedDa ta.m_overflowX); } | |
| 584 EOverflow overflowY() const { return static_cast<EOverflow>(m_nonInheritedDa ta.m_overflowY); } | |
| 585 // It's sufficient to just check one direction, since it's illegal to have v isible on only one overflow value. | |
| 586 bool isOverflowVisible() const { ASSERT(overflowX() != OverflowVisible || ov erflowX() == overflowY()); return overflowX() == OverflowVisible; } | |
| 587 bool isOverflowPaged() const { return overflowY() == OverflowPagedX || overf lowY() == OverflowPagedY; } | |
| 588 | |
| 589 EVisibility visibility() const { return static_cast<EVisibility>(m_inherited Data.m_visibility); } | |
| 590 EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(m_ nonInheritedData.m_verticalAlign); } | |
| 591 const Length& getVerticalAlignLength() const { return m_box->verticalAlign() ; } | |
| 592 | |
| 593 const Length& clipLeft() const { return m_visual->clip.left(); } | |
| 594 const Length& clipRight() const { return m_visual->clip.right(); } | |
| 595 const Length& clipTop() const { return m_visual->clip.top(); } | |
| 596 const Length& clipBottom() const { return m_visual->clip.bottom(); } | |
| 597 const LengthBox& clip() const { return m_visual->clip; } | |
| 598 bool hasAutoClip() const { return m_visual->hasAutoClip; } | |
| 599 | |
| 600 EUnicodeBidi unicodeBidi() const { return static_cast<EUnicodeBidi>(m_nonInh eritedData.m_unicodeBidi); } | |
| 601 | |
| 602 EClear clear() const { return static_cast<EClear>(m_nonInheritedData.m_clear ); } | |
| 603 ETableLayout tableLayout() const { return static_cast<ETableLayout>(m_nonInh eritedData.m_tableLayout); } | |
| 604 bool isFixedTableLayout() const { return tableLayout() == TableLayoutFixed & & !logicalWidth().isAuto(); } | |
| 605 | |
| 606 const Font& font() const; | |
| 607 const FontMetrics& getFontMetrics() const; | |
| 608 const FontDescription& getFontDescription() const; | |
| 609 float specifiedFontSize() const; | |
| 610 float computedFontSize() const; | |
| 611 int fontSize() const; | |
| 612 float fontSizeAdjust() const; | |
| 613 bool hasFontSizeAdjust() const; | |
| 614 FontWeight fontWeight() const; | |
| 615 FontStretch fontStretch() const; | |
| 616 | |
| 617 float textAutosizingMultiplier() const { return m_styleInheritedData->textAu tosizingMultiplier; } | |
| 618 | |
| 619 const Length& textIndent() const { return m_rareInheritedData->indent; } | |
| 620 TextIndentLine getTextIndentLine() const { return static_cast<TextIndentLine >(m_rareInheritedData->m_textIndentLine); } | |
| 621 TextIndentType getTextIndentType() const { return static_cast<TextIndentType >(m_rareInheritedData->m_textIndentType); } | |
| 622 ETextAlign textAlign() const { return static_cast<ETextAlign>(m_inheritedDat a.m_textAlign); } | |
| 623 TextAlignLast getTextAlignLast() const { return static_cast<TextAlignLast>(m _rareInheritedData->m_textAlignLast); } | |
| 624 TextJustify getTextJustify() const { return static_cast<TextJustify>(m_rareI nheritedData->m_textJustify); } | |
| 625 ETextTransform textTransform() const { return static_cast<ETextTransform>(m_ inheritedData.m_textTransform); } | |
| 626 TextDecoration textDecorationsInEffect() const; | |
| 627 const Vector<AppliedTextDecoration>& appliedTextDecorations() const; | |
| 628 TextDecoration getTextDecoration() const { return static_cast<TextDecoration >(m_visual->textDecoration); } | |
| 629 TextUnderlinePosition getTextUnderlinePosition() const { return static_cast< TextUnderlinePosition>(m_rareInheritedData->m_textUnderlinePosition); } | |
| 630 TextDecorationStyle getTextDecorationStyle() const { return static_cast<Text DecorationStyle>(m_rareNonInheritedData->m_textDecorationStyle); } | |
| 631 float wordSpacing() const; | |
| 632 float letterSpacing() const; | |
| 633 StyleVariableData* variables() const; | |
| 634 | |
| 635 void setVariable(const AtomicString&, PassRefPtr<CSSVariableData>); | |
| 636 void removeVariable(const AtomicString&); | |
| 637 | |
| 638 float zoom() const { return m_visual->m_zoom; } | |
| 639 float effectiveZoom() const { return m_rareInheritedData->m_effectiveZoom; } | |
| 640 | |
| 641 TextDirection direction() const { return static_cast<TextDirection>(m_inheri tedData.m_direction); } | |
| 642 bool isLeftToRightDirection() const { return direction() == LTR; } | |
| 643 bool selfOrAncestorHasDirAutoAttribute() const { return m_rareInheritedData- >m_selfOrAncestorHasDirAutoAttribute; } | |
| 644 | |
| 645 const Length& specifiedLineHeight() const; | |
| 646 Length lineHeight() const; | |
| 647 int computedLineHeight() const; | |
| 648 | |
| 649 EWhiteSpace whiteSpace() const { return static_cast<EWhiteSpace>(m_inherited Data.m_whiteSpace); } | |
| 650 static bool autoWrap(EWhiteSpace ws) | |
| 651 { | |
| 652 // Nowrap and pre don't automatically wrap. | |
| 653 return ws != NOWRAP && ws != PRE; | |
| 654 } | |
| 655 | |
| 656 bool autoWrap() const | |
| 657 { | |
| 658 return autoWrap(whiteSpace()); | |
| 659 } | |
| 660 | |
| 661 static bool preserveNewline(EWhiteSpace ws) | |
| 662 { | |
| 663 // Normal and nowrap do not preserve newlines. | |
| 664 return ws != NORMAL && ws != NOWRAP; | |
| 665 } | |
| 666 | |
| 667 bool preserveNewline() const | |
| 668 { | |
| 669 return preserveNewline(whiteSpace()); | |
| 670 } | |
| 671 | |
| 672 static bool collapseWhiteSpace(EWhiteSpace ws) | |
| 673 { | |
| 674 // Pre and prewrap do not collapse whitespace. | |
| 675 return ws != PRE && ws != PRE_WRAP; | |
| 676 } | |
| 677 | |
| 678 bool collapseWhiteSpace() const | |
| 679 { | |
| 680 return collapseWhiteSpace(whiteSpace()); | |
| 681 } | |
| 682 | |
| 683 bool isCollapsibleWhiteSpace(UChar c) const | |
| 684 { | |
| 685 switch (c) { | |
| 686 case ' ': | |
| 687 case '\t': | |
| 688 return collapseWhiteSpace(); | |
| 689 case '\n': | |
| 690 return !preserveNewline(); | |
| 691 } | |
| 692 return false; | |
| 693 } | |
| 694 | |
| 695 bool breakOnlyAfterWhiteSpace() const | |
| 696 { | |
| 697 return whiteSpace() == PRE_WRAP || getLineBreak() == LineBreakAfterWhite Space; | |
| 698 } | |
| 699 | |
| 700 bool breakWords() const | |
| 701 { | |
| 702 return (wordBreak() == BreakWordBreak || overflowWrap() == BreakOverflow Wrap) | |
| 703 && whiteSpace() != PRE && whiteSpace() != NOWRAP; | |
| 704 } | |
| 705 | |
| 706 EFillBox backgroundClip() const { return static_cast<EFillBox>(m_background- >background().clip()); } | |
| 707 FillLayer& accessBackgroundLayers() { return m_background.access()->m_backgr ound; } | |
| 708 const FillLayer& backgroundLayers() const { return m_background->background( ); } | |
| 709 | |
| 710 StyleImage* maskImage() const { return m_rareNonInheritedData->m_mask.image( ); } | |
| 711 FillLayer& accessMaskLayers() { return m_rareNonInheritedData.access()->m_ma sk; } | |
| 712 const FillLayer& maskLayers() const { return m_rareNonInheritedData->m_mask; } | |
| 713 | |
| 714 const NinePieceImage& maskBoxImage() const { return m_rareNonInheritedData-> m_maskBoxImage; } | |
| 715 StyleImage* maskBoxImageSource() const { return m_rareNonInheritedData->m_ma skBoxImage.image(); } | |
| 716 const LengthBox& maskBoxImageSlices() const { return m_rareNonInheritedData- >m_maskBoxImage.imageSlices(); } | |
| 717 bool maskBoxImageSlicesFill() const { return m_rareNonInheritedData->m_maskB oxImage.fill(); } | |
| 718 const BorderImageLengthBox& maskBoxImageWidth() const { return m_rareNonInhe ritedData->m_maskBoxImage.borderSlices(); } | |
| 719 const BorderImageLengthBox& maskBoxImageOutset() const { return m_rareNonInh eritedData->m_maskBoxImage.outset(); } | |
| 720 | |
| 721 EBorderCollapse borderCollapse() const { return static_cast<EBorderCollapse> (m_inheritedData.m_borderCollapse); } | |
| 722 short horizontalBorderSpacing() const; | |
| 723 short verticalBorderSpacing() const; | |
| 724 EEmptyCells emptyCells() const { return static_cast<EEmptyCells>(m_inherited Data.m_emptyCells); } | |
| 725 ECaptionSide captionSide() const { return static_cast<ECaptionSide>(m_inheri tedData.m_captionSide); } | |
| 726 | |
| 727 EListStyleType listStyleType() const { return static_cast<EListStyleType>(m_ inheritedData.m_listStyleType); } | |
| 728 StyleImage* listStyleImage() const; | |
| 729 EListStylePosition listStylePosition() const { return static_cast<EListStyle Position>(m_inheritedData.m_listStylePosition); } | |
| 730 | |
| 731 const Length& marginTop() const { return m_surround->margin.top(); } | |
| 732 const Length& marginBottom() const { return m_surround->margin.bottom(); } | |
| 733 const Length& marginLeft() const { return m_surround->margin.left(); } | |
| 734 const Length& marginRight() const { return m_surround->margin.right(); } | |
| 735 const Length& marginBefore() const { return m_surround->margin.before(getWri tingMode()); } | |
| 736 const Length& marginAfter() const { return m_surround->margin.after(getWriti ngMode()); } | |
| 737 const Length& marginStart() const { return m_surround->margin.start(getWriti ngMode(), direction()); } | |
| 738 const Length& marginEnd() const { return m_surround->margin.end(getWritingMo de(), direction()); } | |
| 739 const Length& marginOver() const { return m_surround->margin.over(getWriting Mode()); } | |
| 740 const Length& marginUnder() const { return m_surround->margin.under(getWriti ngMode()); } | |
| 741 const Length& marginStartUsing(const ComputedStyle* otherStyle) const { retu rn m_surround->margin.start(otherStyle->getWritingMode(), otherStyle->direction( )); } | |
| 742 const Length& marginEndUsing(const ComputedStyle* otherStyle) const { return m_surround->margin.end(otherStyle->getWritingMode(), otherStyle->direction()); } | |
| 743 const Length& marginBeforeUsing(const ComputedStyle* otherStyle) const { ret urn m_surround->margin.before(otherStyle->getWritingMode()); } | |
| 744 const Length& marginAfterUsing(const ComputedStyle* otherStyle) const { retu rn m_surround->margin.after(otherStyle->getWritingMode()); } | |
| 745 | |
| 746 const LengthBox& paddingBox() const { return m_surround->padding; } | |
| 747 const Length& paddingTop() const { return m_surround->padding.top(); } | |
| 748 const Length& paddingBottom() const { return m_surround->padding.bottom(); } | |
| 749 const Length& paddingLeft() const { return m_surround->padding.left(); } | |
| 750 const Length& paddingRight() const { return m_surround->padding.right(); } | |
| 751 const Length& paddingBefore() const { return m_surround->padding.before(getW ritingMode()); } | |
| 752 const Length& paddingAfter() const { return m_surround->padding.after(getWri tingMode()); } | |
| 753 const Length& paddingStart() const { return m_surround->padding.start(getWri tingMode(), direction()); } | |
| 754 const Length& paddingEnd() const { return m_surround->padding.end(getWriting Mode(), direction()); } | |
| 755 const Length& paddingOver() const { return m_surround->padding.over(getWriti ngMode()); } | |
| 756 const Length& paddingUnder() const { return m_surround->padding.under(getWri tingMode()); } | |
| 757 | |
| 758 ECursor cursor() const { return static_cast<ECursor>(m_inheritedData.m_curso rStyle); } | |
| 759 CursorList* cursors() const { return m_rareInheritedData->cursorData.get(); } | |
| 760 | |
| 761 EInsideLink insideLink() const { return static_cast<EInsideLink>(m_inherited Data.m_insideLink); } | |
| 762 bool isLink() const { return m_nonInheritedData.m_isLink; } | |
| 763 | |
| 764 short widows() const { return m_rareInheritedData->widows; } | |
| 765 short orphans() const { return m_rareInheritedData->orphans; } | |
| 766 EBreak breakAfter() const { return static_cast<EBreak>(m_nonInheritedData.m_ breakAfter); } | |
| 767 EBreak breakBefore() const { return static_cast<EBreak>(m_nonInheritedData.m _breakBefore); } | |
| 768 EBreak breakInside() const { return static_cast<EBreak>(m_nonInheritedData.m _breakInside); } | |
| 769 | |
| 770 TextSizeAdjust getTextSizeAdjust() const { return m_rareInheritedData->m_tex tSizeAdjust; } | |
| 771 | |
| 772 // CSS3 Getter Methods | |
| 773 | |
| 774 int outlineOffset() const | 934 int outlineOffset() const |
| 775 { | 935 { |
| 776 if (m_background->outline().style() == BorderStyleNone) | 936 if (m_background->outline().style() == BorderStyleNone) |
| 777 return 0; | 937 return 0; |
| 778 return m_background->outline().offset(); | 938 return m_background->outline().offset(); |
| 779 } | 939 } |
| 780 | 940 void setOutlineOffset(int v) { SET_VAR(m_background, m_outline.m_offset, v); } |
| 941 | |
| 942 // Overflow properties. | |
| 943 // overflow-anchor | |
| 944 static EOverflowAnchor initialOverflowAnchor() { return AnchorAuto; } | |
| 945 EOverflowAnchor overflowAnchor() const { return static_cast<EOverflowAnchor> (m_nonInheritedData.m_overflowAnchor); } | |
| 946 void setOverflowAnchor(EOverflowAnchor v) { m_nonInheritedData.m_overflowAnc hor = v; } | |
| 947 // overflow-x | |
|
nainar
2016/07/25 07:43:22
insert new line before
sashab
2016/07/26 00:38:12
Done
| |
| 948 static EOverflow initialOverflowX() { return OverflowVisible; } | |
| 949 EOverflow overflowX() const { return static_cast<EOverflow>(m_nonInheritedDa ta.m_overflowX); } | |
| 950 void setOverflowX(EOverflow v) { m_nonInheritedData.m_overflowX = v; } | |
| 951 // overflow-y | |
|
nainar
2016/07/25 07:43:21
insert new line before
sashab
2016/07/26 00:38:11
Done
| |
| 952 static EOverflow initialOverflowY() { return OverflowVisible; } | |
| 953 EOverflow overflowY() const { return static_cast<EOverflow>(m_nonInheritedDa ta.m_overflowY); } | |
| 954 void setOverflowY(EOverflow v) { m_nonInheritedData.m_overflowY = v; } | |
| 955 | |
| 956 // Padding properties. | |
| 957 static Length initialPadding() { return Length(Fixed); } | |
| 958 // padding-bottom | |
|
nainar
2016/07/25 07:43:19
insert new line before
sashab
2016/07/26 00:38:09
Done
| |
| 959 const Length& paddingBottom() const { return m_surround->padding.bottom(); } | |
| 960 void setPaddingBottom(const Length& v) { SET_VAR(m_surround, padding.m_botto m, v); } | |
| 961 // padding-left | |
|
nainar
2016/07/25 07:43:21
insert new line before
sashab
2016/07/26 00:38:08
Done
| |
| 962 const Length& paddingLeft() const { return m_surround->padding.left(); } | |
| 963 void setPaddingLeft(const Length& v) { SET_VAR(m_surround, padding.m_left, v ); } | |
| 964 // padding-right | |
|
nainar
2016/07/25 07:43:22
insert new line before
sashab
2016/07/26 00:38:10
Done
| |
| 965 const Length& paddingRight() const { return m_surround->padding.right(); } | |
| 966 void setPaddingRight(const Length& v) { SET_VAR(m_surround, padding.m_right, v); } | |
| 967 // padding-top | |
|
nainar
2016/07/25 07:43:23
insert new line before
sashab
2016/07/26 00:38:13
Done
| |
| 968 const Length& paddingTop() const { return m_surround->padding.top(); } | |
| 969 void setPaddingTop(const Length& v) { SET_VAR(m_surround, padding.m_top, v); } | |
| 970 | |
| 971 // perspective (aka -webkit-perspective) | |
| 972 static float initialPerspective() { return 0; } | |
| 973 float perspective() const { return m_rareNonInheritedData->m_perspective; } | |
| 974 void setPerspective(float p) { SET_VAR(m_rareNonInheritedData, m_perspective , p); } | |
| 975 // perspective-origin (aka -webkit-perspective-origin) | |
|
nainar
2016/07/25 07:43:25
insert new line before
sashab
2016/07/26 00:38:10
Done
| |
| 976 static LengthPoint initialPerspectiveOrigin() { return LengthPoint(Length(50 .0, Percent), Length(50.0, Percent)); } | |
| 977 const LengthPoint& perspectiveOrigin() const { return m_rareNonInheritedData ->m_perspectiveOrigin; } | |
| 978 void setPerspectiveOrigin(const LengthPoint& p) { SET_VAR(m_rareNonInherited Data, m_perspectiveOrigin, p); } | |
| 979 // -webkit-perspective-origin-x | |
|
nainar
2016/07/25 07:43:20
insert new line before
sashab
2016/07/26 00:38:07
Done
| |
| 980 static Length initialPerspectiveOriginX() { return Length(50.0, Percent); } | |
| 981 const Length& perspectiveOriginX() const { return perspectiveOrigin().x(); } | |
| 982 void setPerspectiveOriginX(const Length& v) { setPerspectiveOrigin(LengthPoi nt(v, perspectiveOriginY())); } | |
| 983 // -webkit-perspective-origin-y | |
|
nainar
2016/07/25 07:43:26
insert new line before
sashab
2016/07/26 00:38:10
Done
| |
| 984 static Length initialPerspectiveOriginY() { return Length(50.0, Percent); } | |
| 985 const Length& perspectiveOriginY() const { return perspectiveOrigin().y(); } | |
| 986 void setPerspectiveOriginY(const Length& v) { setPerspectiveOrigin(LengthPoi nt(perspectiveOriginX(), v)); } | |
| 987 | |
| 988 // position | |
| 989 static EPosition initialPosition() { return StaticPosition; } | |
| 990 EPosition position() const { return static_cast<EPosition>(m_nonInheritedDat a.m_position); } | |
| 991 void setPosition(EPosition v) { m_nonInheritedData.m_position = v; } | |
| 992 | |
| 993 // resize | |
| 994 static EResize initialResize() { return RESIZE_NONE; } | |
| 995 EResize resize() const { return static_cast<EResize>(m_rareNonInheritedData- >m_resize); } | |
| 996 void setResize(EResize r) { SET_VAR(m_rareNonInheritedData, m_resize, r); } | |
| 997 | |
| 998 // Transform properties. | |
| 999 // transform (aka -webkit-transform) | |
| 1000 static EmptyTransformOperations initialTransform() { return EmptyTransformOp erations(); } | |
| 1001 const TransformOperations& transform() const { return m_rareNonInheritedData ->m_transform->m_operations; } | |
| 1002 void setTransform(const TransformOperations& ops) { SET_NESTED_VAR(m_rareNon InheritedData, m_transform, m_operations, ops); } | |
| 1003 // transform-origin (aka -webkit-transform-origin) | |
|
nainar
2016/07/25 07:43:22
insert new line before
sashab
2016/07/26 00:38:08
Done
| |
| 1004 static TransformOrigin initialTransformOrigin() { return TransformOrigin(Len gth(50.0, Percent), Length(50.0, Percent), 0); } | |
| 1005 const TransformOrigin& transformOrigin() const { return m_rareNonInheritedDa ta->m_transform->m_origin; } | |
| 1006 void setTransformOrigin(const TransformOrigin& o) { SET_NESTED_VAR(m_rareNon InheritedData, m_transform, m_origin, o); } | |
| 1007 // transform-style (aka -webkit-transform-style) | |
|
nainar
2016/07/25 07:43:18
insert new line before
sashab
2016/07/26 00:38:13
Done
| |
| 1008 static ETransformStyle3D initialTransformStyle3D() { return TransformStyle3D Flat; } | |
| 1009 ETransformStyle3D transformStyle3D() const { return static_cast<ETransformSt yle3D>(m_rareNonInheritedData->m_transformStyle3D); } | |
| 1010 void setTransformStyle3D(ETransformStyle3D b) { SET_VAR(m_rareNonInheritedDa ta, m_transformStyle3D, b); } | |
| 1011 // -webkit-transform-origin-x | |
|
nainar
2016/07/25 07:43:21
insert new line before
sashab
2016/07/26 00:38:09
Done
| |
| 1012 static Length initialTransformOriginX() { return Length(50.0, Percent); } | |
| 1013 const Length& transformOriginX() const { return transformOrigin().x(); } | |
| 1014 void setTransformOriginX(const Length& v) { setTransformOrigin(TransformOrig in(v, transformOriginY(), transformOriginZ())); } | |
| 1015 // -webkit-transform-origin-y | |
|
nainar
2016/07/25 07:43:21
insert new line before
sashab
2016/07/26 00:38:09
Done
| |
| 1016 static Length initialTransformOriginY() { return Length(50.0, Percent); } | |
| 1017 const Length& transformOriginY() const { return transformOrigin().y(); } | |
| 1018 void setTransformOriginY(const Length& v) { setTransformOrigin(TransformOrig in(transformOriginX(), v, transformOriginZ())); } | |
| 1019 // -webkit-transform-origin-z | |
|
nainar
2016/07/25 07:43:23
insert new line before
sashab
2016/07/26 00:38:07
Done
| |
| 1020 static float initialTransformOriginZ() { return 0; } | |
| 1021 float transformOriginZ() const { return transformOrigin().z(); } | |
| 1022 void setTransformOriginZ(float f) { setTransformOrigin(TransformOrigin(trans formOriginX(), transformOriginY(), f)); } | |
| 1023 | |
| 1024 // Independent transform properties. | |
| 1025 // translate | |
| 1026 static PassRefPtr<TranslateTransformOperation> initialTranslate() { return T ranslateTransformOperation::create(Length(0, Fixed), Length(0, Fixed), 0, Transf ormOperation::Translate3D); } | |
| 1027 TranslateTransformOperation* translate() const { return m_rareNonInheritedDa ta->m_transform->m_translate.get(); } | |
| 1028 void setTranslate(PassRefPtr<TranslateTransformOperation> v) { m_rareNonInhe ritedData.access()->m_transform.access()->m_translate = v; } | |
| 1029 // rotate | |
|
nainar
2016/07/25 07:43:26
insert new line before
sashab
2016/07/26 00:38:11
Done
| |
| 1030 static PassRefPtr<RotateTransformOperation> initialRotate() { return RotateT ransformOperation::create(0, 0, 1, 0, TransformOperation::Rotate3D); } | |
| 1031 RotateTransformOperation* rotate() const { return m_rareNonInheritedData->m_ transform->m_rotate.get(); } | |
| 1032 void setRotate(PassRefPtr<RotateTransformOperation> v) { m_rareNonInheritedD ata.access()->m_transform.access()->m_rotate = v; } | |
| 1033 // scale | |
|
nainar
2016/07/25 07:43:25
insert new line before
sashab
2016/07/26 00:38:11
Done
| |
| 1034 static PassRefPtr<ScaleTransformOperation> initialScale() { return ScaleTran sformOperation::create(1, 1, 1, TransformOperation::Scale3D); } | |
| 1035 ScaleTransformOperation* scale() const { return m_rareNonInheritedData->m_tr ansform->m_scale.get(); } | |
| 1036 void setScale(PassRefPtr<ScaleTransformOperation> v) { m_rareNonInheritedDat a.access()->m_transform.access()->m_scale = v; } | |
| 1037 | |
| 1038 // Scroll properties. | |
| 1039 // scroll-behavior | |
| 1040 static ScrollBehavior initialScrollBehavior() { return ScrollBehaviorAuto; } | |
| 1041 ScrollBehavior getScrollBehavior() const { return static_cast<ScrollBehavior >(m_rareNonInheritedData->m_scrollBehavior); } | |
|
nainar
2016/07/25 07:43:20
rename getScrollBehavior() -> scrollBehavior() in
sashab
2016/07/26 00:38:09
Added TODO
| |
| 1042 void setScrollBehavior(ScrollBehavior b) { SET_VAR(m_rareNonInheritedData, m _scrollBehavior, b); } | |
| 1043 // scroll-snap-coordinate | |
|
nainar
2016/07/25 07:43:25
insert new line before
sashab
2016/07/26 00:38:12
Done
| |
| 1044 static Vector<LengthPoint> initialScrollSnapCoordinate() { return Vector<Len gthPoint>(); } | |
| 1045 const Vector<LengthPoint>& scrollSnapCoordinate() const { return m_rareNonIn heritedData->m_scrollSnap->m_coordinates; } | |
| 1046 void setScrollSnapCoordinate(const Vector<LengthPoint>& b) { SET_NESTED_VAR( m_rareNonInheritedData, m_scrollSnap, m_coordinates, b); } | |
| 1047 // scroll-snap-destination | |
|
nainar
2016/07/25 07:43:21
insert new line before
sashab
2016/07/26 00:38:10
Done
| |
| 1048 static LengthPoint initialScrollSnapDestination() { return LengthPoint(Lengt h(0, Fixed), Length(0, Fixed)); } | |
| 1049 const LengthPoint& scrollSnapDestination() const { return m_rareNonInherited Data->m_scrollSnap->m_destination; } | |
| 1050 void setScrollSnapDestination(const LengthPoint& b) { SET_NESTED_VAR(m_rareN onInheritedData, m_scrollSnap, m_destination, b); } | |
| 1051 // scroll-snap-points-x | |
|
nainar
2016/07/25 07:43:23
insert new line before
sashab
2016/07/26 00:38:07
Done
| |
| 1052 static ScrollSnapPoints initialScrollSnapPointsX() { return ScrollSnapPoints (); } | |
| 1053 const ScrollSnapPoints& scrollSnapPointsX() const { return m_rareNonInherite dData->m_scrollSnap->m_xPoints; } | |
| 1054 void setScrollSnapPointsX(const ScrollSnapPoints& b) { SET_NESTED_VAR(m_rare NonInheritedData, m_scrollSnap, m_xPoints, b); } | |
| 1055 // scroll-snap-points-y | |
|
nainar
2016/07/25 07:43:18
insert new line before
sashab
2016/07/26 00:38:12
Done
| |
| 1056 static ScrollSnapPoints initialScrollSnapPointsY() { return ScrollSnapPoints (); } | |
| 1057 const ScrollSnapPoints& scrollSnapPointsY() const { return m_rareNonInherite dData->m_scrollSnap->m_yPoints; } | |
| 1058 void setScrollSnapPointsY(const ScrollSnapPoints& b) { SET_NESTED_VAR(m_rare NonInheritedData, m_scrollSnap, m_yPoints, b); } | |
| 1059 // scroll-snap-type | |
|
nainar
2016/07/25 07:43:24
insert new line before
sashab
2016/07/26 00:38:07
Done
| |
| 1060 static ScrollSnapType initialScrollSnapType() { return ScrollSnapTypeNone; } | |
| 1061 ScrollSnapType getScrollSnapType() const { return static_cast<ScrollSnapType >(m_rareNonInheritedData->m_scrollSnapType); } | |
|
nainar
2016/07/25 07:43:26
rename getScrollSnapType() -> scrollSnapType() i
sashab
2016/07/26 00:38:12
Added TODO
| |
| 1062 void setScrollSnapType(ScrollSnapType b) { SET_VAR(m_rareNonInheritedData, m _scrollSnapType, b); } | |
| 1063 | |
| 1064 // shape-image-threshold (aka -webkit-shape-image-threshold) | |
| 1065 static float initialShapeImageThreshold() { return 0; } | |
| 1066 float shapeImageThreshold() const { return m_rareNonInheritedData->m_shapeIm ageThreshold; } | |
| 1067 void setShapeImageThreshold(float shapeImageThreshold) | |
| 1068 { | |
| 1069 float clampedShapeImageThreshold = clampTo<float>(shapeImageThreshold, 0 , 1); | |
| 1070 SET_VAR(m_rareNonInheritedData, m_shapeImageThreshold, clampedShapeImage Threshold); | |
| 1071 } | |
| 1072 // shape-margin (aka -webkit-shape-margin) | |
|
nainar
2016/07/25 07:43:23
insert new line before
sashab
2016/07/26 00:38:12
Done
| |
| 1073 static Length initialShapeMargin() { return Length(0, Fixed); } | |
| 1074 const Length& shapeMargin() const { return m_rareNonInheritedData->m_shapeMa rgin; } | |
| 1075 void setShapeMargin(const Length& shapeMargin) { SET_VAR(m_rareNonInheritedD ata, m_shapeMargin, shapeMargin); } | |
| 1076 // shape-outside (aka -webkit-shape-outside) | |
|
nainar
2016/07/25 07:43:21
insert new line before
sashab
2016/07/26 00:38:13
Done
| |
| 1077 static ShapeValue* initialShapeOutside() { return 0; } | |
| 1078 void setShapeOutside(ShapeValue* value) | |
| 1079 { | |
| 1080 if (m_rareNonInheritedData->m_shapeOutside == value) | |
| 1081 return; | |
| 1082 m_rareNonInheritedData.access()->m_shapeOutside = value; | |
| 1083 } | |
| 1084 ShapeValue* shapeOutside() const { return m_rareNonInheritedData->m_shapeOut side.get(); } | |
|
nainar
2016/07/25 07:43:19
put before setShapeOutside()
sashab
2016/07/26 00:38:12
Done
| |
| 1085 | |
| 1086 // size | |
| 1087 const FloatSize& pageSize() const { return m_rareNonInheritedData->m_pageSiz e; } | |
| 1088 PageSizeType getPageSizeType() const { return static_cast<PageSizeType>(m_ra reNonInheritedData->m_pageSizeType); } | |
|
nainar
2016/07/25 07:43:22
rename getPageSizeType() -> pageSizeType() in an e
sashab
2016/07/26 00:38:13
Done
| |
| 1089 void setPageSize(const FloatSize& s) { SET_VAR(m_rareNonInheritedData, m_pag eSize, s); } | |
| 1090 void setPageSizeType(PageSizeType t) { SET_VAR(m_rareNonInheritedData, m_pag eSizeType, t); } | |
| 1091 // table-layout | |
| 1092 static ETableLayout initialTableLayout() { return TableLayoutAuto; } | |
| 1093 ETableLayout tableLayout() const { return static_cast<ETableLayout>(m_nonInh eritedData.m_tableLayout); } | |
| 1094 void setTableLayout(ETableLayout v) { m_nonInheritedData.m_tableLayout = v; } | |
| 1095 | |
| 1096 // Text decoration properties. | |
| 1097 // text-decoration-line | |
| 1098 static TextDecoration initialTextDecoration() { return TextDecorationNone; } | |
| 1099 TextDecoration getTextDecoration() const { return static_cast<TextDecoration >(m_visual->textDecoration); } | |
|
nainar
2016/07/25 07:43:21
rename getTextDecoration() -> textDecoration() in
sashab
2016/07/26 00:38:08
Added todo
| |
| 1100 void setTextDecoration(TextDecoration v) { SET_VAR(m_visual, textDecoration, v); } | |
| 1101 // text-decoration-color | |
|
nainar
2016/07/25 07:43:25
insert new line before
sashab
2016/07/26 00:38:13
Done.
| |
| 1102 void setTextDecorationColor(const StyleColor& c) { SET_VAR(m_rareNonInherite dData, m_textDecorationColor, c); } | |
| 1103 // text-decoration-style | |
|
nainar
2016/07/25 07:43:24
insert new line before
sashab
2016/07/26 00:38:06
Done.
| |
| 1104 static TextDecorationStyle initialTextDecorationStyle() { return TextDecorat ionStyleSolid; } | |
| 1105 TextDecorationStyle getTextDecorationStyle() const { return static_cast<Text DecorationStyle>(m_rareNonInheritedData->m_textDecorationStyle); } | |
|
nainar
2016/07/25 07:43:24
rename getTextDecorationStyle() -> textDecorationS
sashab
2016/07/26 00:38:06
Done.
sashab
2016/07/26 00:38:09
Done.
| |
| 1106 void setTextDecorationStyle(TextDecorationStyle v) { SET_VAR(m_rareNonInheri tedData, m_textDecorationStyle, v); } | |
| 1107 // text-underline-position runtime_flag=CSS3TextDecorations, inherited, type _name=TextUnderlinePosition | |
|
nainar
2016/07/25 07:43:22
insert new line before
sashab
2016/07/26 00:38:06
Done.
| |
| 1108 static TextUnderlinePosition initialTextUnderlinePosition() { return TextUnd erlinePositionAuto; } | |
| 1109 void setTextUnderlinePosition(TextUnderlinePosition v) { SET_VAR(m_rareInher itedData, m_textUnderlinePosition, v); } | |
| 1110 TextUnderlinePosition getTextUnderlinePosition() const { return static_cast< TextUnderlinePosition>(m_rareInheritedData->m_textUnderlinePosition); } | |
|
nainar
2016/07/25 07:43:22
a) switch order with setTextUnderlinePosition
b) g
sashab
2016/07/26 00:38:11
Done Done.
| |
| 1111 | |
| 1112 // text-overflow | |
| 1113 static TextOverflow initialTextOverflow() { return TextOverflowClip; } | |
| 1114 TextOverflow getTextOverflow() const { return static_cast<TextOverflow>(m_ra reNonInheritedData->textOverflow); } | |
|
nainar
2016/07/25 07:43:24
rename getTextOverflow() -> textOverflow() in an e
sashab
2016/07/26 00:38:11
Done.
| |
| 1115 void setTextOverflow(TextOverflow overflow) { SET_VAR(m_rareNonInheritedData , textOverflow, overflow); } | |
| 1116 | |
| 1117 // touch-action | |
| 1118 static TouchAction initialTouchAction() { return TouchActionAuto; } | |
| 1119 TouchAction getTouchAction() const { return static_cast<TouchAction>(m_rareN onInheritedData->m_touchAction); } | |
|
nainar
2016/07/25 07:43:26
rename getTouchAction() -> touchAction() in an ear
sashab
2016/07/26 00:38:10
Done.
| |
| 1120 void setTouchAction(TouchAction t) { SET_VAR(m_rareNonInheritedData, m_touch Action, t); } | |
| 1121 | |
| 1122 // unicode-bidi | |
| 1123 static EUnicodeBidi initialUnicodeBidi() { return UBNormal; } | |
| 1124 EUnicodeBidi unicodeBidi() const { return static_cast<EUnicodeBidi>(m_nonInh eritedData.m_unicodeBidi); } | |
| 1125 void setUnicodeBidi(EUnicodeBidi b) { m_nonInheritedData.m_unicodeBidi = b; } | |
| 1126 | |
| 1127 // vertical-align | |
| 1128 static EVerticalAlign initialVerticalAlign() { return VerticalAlignBaseline; } | |
| 1129 EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(m_ nonInheritedData.m_verticalAlign); } | |
| 1130 const Length& getVerticalAlignLength() const { return m_box->verticalAlign() ; } | |
|
nainar
2016/07/25 07:43:20
rename getVerticalAlignLength() -> verticalAlignLe
sashab
2016/07/26 00:38:12
Done.
| |
| 1131 void setVerticalAlign(EVerticalAlign v) { m_nonInheritedData.m_verticalAlign = v; } | |
| 1132 void setVerticalAlignLength(const Length& length) { setVerticalAlign(Vertica lAlignLength); SET_VAR(m_box, m_verticalAlign, length); } | |
| 1133 | |
| 1134 // Exclusions properties. | |
| 1135 // wrap-flow | |
| 1136 static WrapFlow initialWrapFlow() { return WrapFlowAuto; } | |
| 1137 // wrap-through | |
|
nainar
2016/07/25 07:43:26
insert new line before
sashab
2016/07/26 00:38:11
Done.
| |
| 1138 static WrapThrough initialWrapThrough() { return WrapThroughWrap; } | |
| 1139 | |
| 1140 // will-change | |
| 1141 const Vector<CSSPropertyID>& willChangeProperties() const { return m_rareNon InheritedData->m_willChange->m_properties; } | |
| 1142 bool willChangeContents() const { return m_rareNonInheritedData->m_willChang e->m_contents; } | |
| 1143 bool willChangeScrollPosition() const { return m_rareNonInheritedData->m_wil lChange->m_scrollPosition; } | |
| 1144 bool subtreeWillChangeContents() const { return m_rareInheritedData->m_subtr eeWillChangeContents; } | |
| 1145 void setWillChangeProperties(const Vector<CSSPropertyID>& properties) { SET_ NESTED_VAR(m_rareNonInheritedData, m_willChange, m_properties, properties); } | |
| 1146 void setWillChangeContents(bool b) { SET_NESTED_VAR(m_rareNonInheritedData, m_willChange, m_contents, b); } | |
| 1147 void setWillChangeScrollPosition(bool b) { SET_NESTED_VAR(m_rareNonInherited Data, m_willChange, m_scrollPosition, b); } | |
| 1148 void setSubtreeWillChangeContents(bool b) { SET_VAR(m_rareInheritedData, m_s ubtreeWillChangeContents, b); } | |
| 1149 | |
| 1150 // z-index | |
| 1151 int zIndex() const { return m_box->zIndex(); } | |
| 1152 bool hasAutoZIndex() const { return m_box->hasAutoZIndex(); } | |
| 1153 void setZIndex(int v) { SET_VAR(m_box, m_hasAutoZIndex, false); SET_VAR(m_bo x, m_zIndex, v); } | |
| 1154 void setHasAutoZIndex() { SET_VAR(m_box, m_hasAutoZIndex, true); SET_VAR(m_b ox, m_zIndex, 0); } | |
| 1155 | |
| 1156 // zoom | |
| 1157 static float initialZoom() { return 1.0f; } | |
| 1158 float zoom() const { return m_visual->m_zoom; } | |
| 1159 float effectiveZoom() const { return m_rareInheritedData->m_effectiveZoom; } | |
| 1160 bool setZoom(float); | |
| 1161 bool setEffectiveZoom(float); | |
| 1162 | |
| 1163 // -webkit-app-region | |
| 1164 DraggableRegionMode getDraggableRegionMode() const { return m_rareNonInherit edData->m_draggableRegionMode; } | |
|
nainar
2016/07/25 07:43:24
rename getDraggableRegionMode() -> draggableRegion
sashab
2016/07/26 00:38:06
Done.
| |
| 1165 void setDraggableRegionMode(DraggableRegionMode v) { SET_VAR(m_rareNonInheri tedData, m_draggableRegionMode, v); } | |
| 1166 | |
| 1167 // -webkit-appearance | |
| 1168 static ControlPart initialAppearance() { return NoControlPart; } | |
| 1169 ControlPart appearance() const { return static_cast<ControlPart>(m_rareNonIn heritedData->m_appearance); } | |
| 1170 void setAppearance(ControlPart a) { SET_VAR(m_rareNonInheritedData, m_appear ance, a); } | |
| 1171 | |
| 1172 // -webkit-clip-path | |
| 1173 static ClipPathOperation* initialClipPath() { return 0; } | |
| 1174 ClipPathOperation* clipPath() const { return m_rareNonInheritedData->m_clipP ath.get(); } | |
| 1175 void setClipPath(PassRefPtr<ClipPathOperation> operation) | |
| 1176 { | |
| 1177 if (m_rareNonInheritedData->m_clipPath != operation) | |
| 1178 m_rareNonInheritedData.access()->m_clipPath = operation; | |
| 1179 } | |
| 1180 | |
| 1181 // Mask properties. | |
| 1182 // -webkit-mask-box-image-outset | |
| 1183 const BorderImageLengthBox& maskBoxImageOutset() const { return m_rareNonInh eritedData->m_maskBoxImage.outset(); } | |
| 1184 void setMaskBoxImageOutset(const BorderImageLengthBox& outset) | |
| 1185 { | |
| 1186 m_rareNonInheritedData.access()->m_maskBoxImage.setOutset(outset); | |
| 1187 } | |
| 1188 | |
| 1189 // -webkit-mask-box-image-repeat | |
|
nainar
2016/07/25 07:43:25
why have this here if there are no methods?
sashab
2016/07/26 00:38:10
Done.
| |
| 1190 // -webkit-mask-box-image-slice | |
| 1191 const LengthBox& maskBoxImageSlices() const { return m_rareNonInheritedData- >m_maskBoxImage.imageSlices(); } | |
| 1192 void setMaskBoxImageSlices(const LengthBox& slices) | |
| 1193 { | |
| 1194 m_rareNonInheritedData.access()->m_maskBoxImage.setImageSlices(slices); | |
| 1195 } | |
| 1196 // -webkit-mask-box-image-source | |
|
nainar
2016/07/25 07:43:26
insert new line before
sashab
2016/07/26 00:38:06
Done.
sashab
2016/07/26 00:38:09
Done.
| |
| 1197 static StyleImage* initialMaskBoxImageSource() { return 0; } | |
| 1198 StyleImage* maskBoxImageSource() const { return m_rareNonInheritedData->m_ma skBoxImage.image(); } | |
| 1199 void setMaskBoxImageSource(StyleImage* v) { m_rareNonInheritedData.access()- >m_maskBoxImage.setImage(v); } | |
| 1200 // -webkit-mask-box-image-width | |
|
nainar
2016/07/25 07:43:21
insert new line before
sashab
2016/07/26 00:38:11
Done.
| |
| 1201 const BorderImageLengthBox& maskBoxImageWidth() const { return m_rareNonInhe ritedData->m_maskBoxImage.borderSlices(); } | |
| 1202 void setMaskBoxImageWidth(const BorderImageLengthBox& slices) | |
| 1203 { | |
| 1204 m_rareNonInheritedData.access()->m_maskBoxImage.setBorderSlices(slices); | |
| 1205 } | |
| 1206 | |
| 1207 // Inherited properties. | |
| 1208 | |
| 1209 // border-collapse | |
| 1210 static EBorderCollapse initialBorderCollapse() { return BorderCollapseSepara te; } | |
| 1211 EBorderCollapse borderCollapse() const { return static_cast<EBorderCollapse> (m_inheritedData.m_borderCollapse); } | |
| 1212 void setBorderCollapse(EBorderCollapse collapse) { m_inheritedData.m_borderC ollapse = collapse; } | |
| 1213 | |
| 1214 // Border-spacing properties. | |
| 1215 // -webkit-border-horizontal-spacing | |
| 1216 static short initialHorizontalBorderSpacing() { return 0; } | |
| 1217 short horizontalBorderSpacing() const; | |
| 1218 void setHorizontalBorderSpacing(short); | |
| 1219 // -webkit-border-vertical-spacing | |
| 1220 static short initialVerticalBorderSpacing() { return 0; } | |
| 1221 short verticalBorderSpacing() const; | |
| 1222 void setVerticalBorderSpacing(short); | |
| 1223 | |
| 1224 // caption-side (aka -epub-caption-side) | |
| 1225 static ECaptionSide initialCaptionSide() { return CaptionSideTop; } | |
| 1226 ECaptionSide captionSide() const { return static_cast<ECaptionSide>(m_inheri tedData.m_captionSide); } | |
| 1227 void setCaptionSide(ECaptionSide v) { m_inheritedData.m_captionSide = v; } | |
| 1228 | |
| 1229 // cursor | |
| 1230 static ECursor initialCursor() { return CURSOR_AUTO; } | |
| 1231 ECursor cursor() const { return static_cast<ECursor>(m_inheritedData.m_curso rStyle); } | |
| 1232 void setCursor(ECursor c) { m_inheritedData.m_cursorStyle = c; } | |
| 1233 | |
| 1234 // direction | |
| 1235 static TextDirection initialDirection() { return LTR; } | |
| 1236 TextDirection direction() const { return static_cast<TextDirection>(m_inheri tedData.m_direction); } | |
| 1237 void setDirection(TextDirection v) { m_inheritedData.m_direction = v; } | |
| 1238 | |
| 1239 // empty-cells | |
| 1240 static EEmptyCells initialEmptyCells() { return EmptyCellsShow; } | |
| 1241 EEmptyCells emptyCells() const { return static_cast<EEmptyCells>(m_inherited Data.m_emptyCells); } | |
| 1242 void setEmptyCells(EEmptyCells v) { m_inheritedData.m_emptyCells = v; } | |
| 1243 | |
| 1244 // color | |
| 1245 static Color initialColor() { return Color::black; } | |
| 1246 void setColor(const Color&); | |
| 1247 | |
| 1248 // hyphens | |
| 1249 static Hyphens initialHyphens() { return HyphensManual; } | |
| 1250 Hyphens getHyphens() const { return static_cast<Hyphens>(m_rareInheritedData ->hyphens); } | |
|
nainar
2016/07/25 07:43:25
rename getHyphens() -> hyphens() in an earlier pat
sashab
2016/07/26 00:38:09
Done.
| |
| 1251 void setHyphens(Hyphens h) { SET_VAR(m_rareInheritedData, hyphens, h); } | |
| 1252 // -webkit-hyphenate-character | |
|
nainar
2016/07/25 07:43:20
insert new line before
sashab
2016/07/26 00:38:10
Done.
| |
| 1253 static const AtomicString& initialHyphenationString() { return nullAtom; } | |
| 1254 const AtomicString& hyphenationString() const { return m_rareInheritedData-> hyphenationString; } | |
| 1255 void setHyphenationString(const AtomicString& h) { SET_VAR(m_rareInheritedDa ta, hyphenationString, h); } | |
| 1256 | |
| 1257 // line-height | |
| 1258 static Length initialLineHeight() { return Length(-100.0, Percent); } | |
| 1259 Length lineHeight() const; | |
| 1260 void setLineHeight(const Length& specifiedLineHeight); | |
| 1261 | |
| 1262 // List style properties. | |
| 1263 // list-style-type | |
| 1264 static EListStyleType initialListStyleType() { return Disc; } | |
| 1265 EListStyleType listStyleType() const { return static_cast<EListStyleType>(m_ inheritedData.m_listStyleType); } | |
| 1266 void setListStyleType(EListStyleType v) { m_inheritedData.m_listStyleType = v; } | |
| 1267 // list-style-position | |
|
nainar
2016/07/25 07:43:22
insert new line before
sashab
2016/07/26 00:38:08
Done.
| |
| 1268 static EListStylePosition initialListStylePosition() { return ListStylePosit ionOutside; } | |
| 1269 EListStylePosition listStylePosition() const { return static_cast<EListStyle Position>(m_inheritedData.m_listStylePosition); } | |
| 1270 void setListStylePosition(EListStylePosition v) { m_inheritedData.m_listStyl ePosition = v; } | |
| 1271 // list-style-image | |
|
nainar
2016/07/25 07:43:23
insert new line before
sashab
2016/07/26 00:38:11
Done.
| |
| 1272 static StyleImage* initialListStyleImage() { return 0; } | |
| 1273 StyleImage* listStyleImage() const; | |
| 1274 void setListStyleImage(StyleImage*); | |
| 1275 | |
| 1276 // orphans | |
| 1277 static short initialOrphans() { return 2; } | |
| 1278 short orphans() const { return m_rareInheritedData->orphans; } | |
| 1279 void setOrphans(short o) { SET_VAR(m_rareInheritedData, orphans, o); } | |
| 1280 // widows | |
|
nainar
2016/07/25 07:43:20
insert new line before
sashab
2016/07/26 00:38:08
Done.
| |
| 1281 static short initialWidows() { return 2; } | |
| 1282 short widows() const { return m_rareInheritedData->widows; } | |
| 1283 void setWidows(short w) { SET_VAR(m_rareInheritedData, widows, w); } | |
| 1284 | |
| 1285 // overflow-wrap (aka word-wrap) | |
| 1286 static EOverflowWrap initialOverflowWrap() { return NormalOverflowWrap; } | |
| 1287 EOverflowWrap overflowWrap() const { return static_cast<EOverflowWrap>(m_rar eInheritedData->overflowWrap); } | |
| 1288 void setOverflowWrap(EOverflowWrap b) { SET_VAR(m_rareInheritedData, overflo wWrap, b); } | |
| 1289 | |
| 1290 // pointer-events | |
| 1291 static EPointerEvents initialPointerEvents() { return PE_AUTO; } | |
| 1292 EPointerEvents pointerEvents() const { return static_cast<EPointerEvents>(m_ inheritedData.m_pointerEvents); } | |
| 1293 void setPointerEvents(EPointerEvents p) { m_inheritedData.m_pointerEvents = p; } | |
| 1294 | |
| 1295 // quotes | |
| 1296 static QuotesData* initialQuotes() { return 0; } | |
| 1297 QuotesData* quotes() const { return m_rareInheritedData->quotes.get(); } | |
| 1298 void setQuotes(PassRefPtr<QuotesData>); | |
| 1299 | |
| 1300 // snap-height | |
| 1301 // TODO(sashab): Store these as a single struct. | |
| 1302 uint8_t snapHeightPosition() const { return m_rareInheritedData->m_snapHeigh tPosition; } | |
| 1303 uint8_t snapHeightUnit() const { return m_rareInheritedData->m_snapHeightUni t; } | |
| 1304 void setSnapHeightPosition(uint8_t position) { SET_VAR(m_rareInheritedData, m_snapHeightPosition, position); } | |
| 1305 void setSnapHeightUnit(uint8_t unit) { SET_VAR(m_rareInheritedData, m_snapHe ightUnit, unit); } | |
| 1306 | |
| 1307 // speak | |
| 1308 static ESpeak initialSpeak() { return SpeakNormal; } | |
| 1309 ESpeak speak() const { return static_cast<ESpeak>(m_rareInheritedData->speak ); } | |
| 1310 void setSpeak(ESpeak s) { SET_VAR(m_rareInheritedData, speak, s); } | |
| 1311 | |
| 1312 // tab-size | |
| 1313 static TabSize initialTabSize() { return TabSize(8); } | |
| 1314 TabSize getTabSize() const { return m_rareInheritedData->m_tabSize; } | |
|
nainar
2016/07/25 07:43:23
rename getTabSize() ->tabSize() in an earlier patc
sashab
2016/07/26 00:38:12
Done.
| |
| 1315 void setTabSize(TabSize size) { SET_VAR(m_rareInheritedData, m_tabSize, size ); } | |
| 1316 | |
| 1317 // text-align | |
| 1318 static ETextAlign initialTextAlign() { return TASTART; } | |
| 1319 ETextAlign textAlign() const { return static_cast<ETextAlign>(m_inheritedDat a.m_textAlign); } | |
| 1320 void setTextAlign(ETextAlign v) { m_inheritedData.m_textAlign = v; } | |
| 1321 // text-align-last | |
|
nainar
2016/07/25 07:43:22
insert new line before
sashab
2016/07/26 00:38:11
Done.
| |
| 1322 static TextAlignLast initialTextAlignLast() { return TextAlignLastAuto; } | |
| 1323 TextAlignLast getTextAlignLast() const { return static_cast<TextAlignLast>(m _rareInheritedData->m_textAlignLast); } | |
|
nainar
2016/07/25 07:43:19
rename getTextAlignLast() ->textAlignLast() in an
sashab
2016/07/26 00:38:07
Done.
| |
| 1324 void setTextAlignLast(TextAlignLast v) { SET_VAR(m_rareInheritedData, m_text AlignLast, v); } | |
| 1325 | |
| 1326 // text-combine-upright (aka -webkit-text-combine, -epub-text-combine) | |
| 1327 static TextCombine initialTextCombine() { return TextCombineNone; } | |
| 1328 TextCombine getTextCombine() const { return static_cast<TextCombine>(m_rareI nheritedData->m_textCombine); } | |
|
nainar
2016/07/25 07:43:23
rename getTextCombine() -> textCombine() in an ear
sashab
2016/07/26 00:38:13
Done.
| |
| 1329 void setTextCombine(TextCombine v) { SET_VAR(m_rareInheritedData, m_textComb ine, v); } | |
| 1330 | |
| 1331 // text-indent | |
| 1332 static Length initialTextIndent() { return Length(Fixed); } | |
| 1333 static TextIndentLine initialTextIndentLine() { return TextIndentFirstLine; } | |
| 1334 static TextIndentType initialTextIndentType() { return TextIndentNormal; } | |
| 1335 const Length& textIndent() const { return m_rareInheritedData->indent; } | |
| 1336 TextIndentLine getTextIndentLine() const { return static_cast<TextIndentLine >(m_rareInheritedData->m_textIndentLine); } | |
|
nainar
2016/07/25 07:43:27
rename getTextIndentLine() -> textIndentLine() in
sashab
2016/07/26 00:38:06
Done.
| |
| 1337 TextIndentType getTextIndentType() const { return static_cast<TextIndentType >(m_rareInheritedData->m_textIndentType); } | |
|
nainar
2016/07/25 07:43:20
rename getTextIndentType() -> textIndentType() in
sashab
2016/07/26 00:38:09
Done.
| |
| 1338 void setTextIndent(const Length& v) { SET_VAR(m_rareInheritedData, indent, v ); } | |
| 1339 void setTextIndentLine(TextIndentLine v) { SET_VAR(m_rareInheritedData, m_te xtIndentLine, v); } | |
| 1340 void setTextIndentType(TextIndentType v) { SET_VAR(m_rareInheritedData, m_te xtIndentType, v); } | |
| 1341 | |
| 1342 // text-justify | |
| 1343 static TextJustify initialTextJustify() { return TextJustifyAuto; } | |
| 1344 TextJustify getTextJustify() const { return static_cast<TextJustify>(m_rareI nheritedData->m_textJustify); } | |
|
nainar
2016/07/25 07:43:25
rename getTextJustify() -> textJustify() in an ear
sashab
2016/07/26 00:38:12
Done.
| |
| 1345 void setTextJustify(TextJustify v) { SET_VAR(m_rareInheritedData, m_textJust ify, v); } | |
| 1346 | |
| 1347 // text-orientation (aka -webkit-text-orientation, -epub-text-orientation) | |
| 1348 static TextOrientation initialTextOrientation() { return TextOrientationMixe d; } | |
| 1349 TextOrientation getTextOrientation() const { return static_cast<TextOrientat ion>(m_rareInheritedData->m_textOrientation); } | |
|
nainar
2016/07/25 07:43:20
rename getTextOrientation() -> textOrientation() i
sashab
2016/07/26 00:38:13
Done.
| |
| 1350 bool setTextOrientation(TextOrientation); | |
| 1351 | |
| 1352 // text-shadow | |
| 1353 static ShadowList* initialTextShadow() { return 0; } | |
| 781 ShadowList* textShadow() const { return m_rareInheritedData->textShadow.get( ); } | 1354 ShadowList* textShadow() const { return m_rareInheritedData->textShadow.get( ); } |
| 782 | 1355 void setTextShadow(PassRefPtr<ShadowList>); |
| 1356 | |
| 1357 // text-size-adjust (aka -webkit-text-size-adjust) | |
| 1358 static TextSizeAdjust initialTextSizeAdjust() { return TextSizeAdjust::adjus tAuto(); } | |
| 1359 TextSizeAdjust getTextSizeAdjust() const { return m_rareInheritedData->m_tex tSizeAdjust; } | |
| 1360 void setTextSizeAdjust(TextSizeAdjust sizeAdjust) { SET_VAR(m_rareInheritedD ata, m_textSizeAdjust, sizeAdjust); } | |
| 1361 | |
| 1362 // text-transform (aka -epub-text-transform) | |
| 1363 static ETextTransform initialTextTransform() { return TTNONE; } | |
| 1364 ETextTransform textTransform() const { return static_cast<ETextTransform>(m_ inheritedData.m_textTransform); } | |
| 1365 void setTextTransform(ETextTransform v) { m_inheritedData.m_textTransform = v; } | |
| 1366 | |
| 1367 // visibility | |
| 1368 static EVisibility initialVisibility() { return VISIBLE; } | |
| 1369 void setVisibility(EVisibility v) { m_inheritedData.m_visibility = v; } | |
|
nainar
2016/07/25 07:43:21
put after visibility()
sashab
2016/07/26 00:38:06
Done!! Ty
| |
| 1370 EVisibility visibility() const { return static_cast<EVisibility>(m_inherited Data.m_visibility); } | |
| 1371 | |
| 1372 // white-space inherited | |
| 1373 static EWhiteSpace initialWhiteSpace() { return NORMAL; } | |
| 1374 EWhiteSpace whiteSpace() const { return static_cast<EWhiteSpace>(m_inherited Data.m_whiteSpace); } | |
| 1375 void setWhiteSpace(EWhiteSpace v) { m_inheritedData.m_whiteSpace = v; } | |
| 1376 | |
| 1377 // word-break inherited (aka -epub-word-break) | |
| 1378 static EWordBreak initialWordBreak() { return NormalWordBreak; } | |
| 1379 EWordBreak wordBreak() const { return static_cast<EWordBreak>(m_rareInherite dData->wordBreak); } | |
| 1380 void setWordBreak(EWordBreak b) { SET_VAR(m_rareInheritedData, wordBreak, b) ; } | |
| 1381 | |
| 1382 // -webkit-line-break | |
| 1383 static LineBreak initialLineBreak() { return LineBreakAuto; } | |
| 1384 LineBreak getLineBreak() const { return static_cast<LineBreak>(m_rareInherit edData->lineBreak); } | |
|
nainar
2016/07/25 07:43:23
rename getLineBreak() -> lineBreak() in an earlier
sashab
2016/07/26 00:38:11
Done.
| |
| 1385 void setLineBreak(LineBreak b) { SET_VAR(m_rareInheritedData, lineBreak, b); } | |
| 1386 | |
| 1387 // writing-mode (aka -webkit-writing-mode, -epub-writing-mode) | |
| 1388 static WritingMode initialWritingMode() { return TopToBottomWritingMode; } | |
| 1389 WritingMode getWritingMode() const { return static_cast<WritingMode>(m_inher itedData.m_writingMode); } | |
|
nainar
2016/07/25 07:43:21
rename getWritingMode() -> writingMode() in an ear
sashab
2016/07/26 00:38:12
Done.
| |
| 1390 bool setWritingMode(WritingMode v) | |
| 1391 { | |
| 1392 if (v == getWritingMode()) | |
| 1393 return false; | |
| 1394 | |
| 1395 m_inheritedData.m_writingMode = v; | |
| 1396 return true; | |
| 1397 } | |
| 1398 | |
| 1399 // Text emphasis properties. | |
| 1400 static TextEmphasisFill initialTextEmphasisFill() { return TextEmphasisFillF illed; } | |
| 1401 static TextEmphasisMark initialTextEmphasisMark() { return TextEmphasisMarkN one; } | |
| 1402 static const AtomicString& initialTextEmphasisCustomMark() { return nullAtom ; } | |
| 1403 TextEmphasisFill getTextEmphasisFill() const { return static_cast<TextEmphas isFill>(m_rareInheritedData->textEmphasisFill); } | |
|
nainar
2016/07/25 07:43:25
rename all getTextEmphasis*() -> textEmphasis*() i
sashab
2016/07/26 00:38:07
Done.
| |
| 1404 TextEmphasisMark getTextEmphasisMark() const; | |
| 1405 const AtomicString& textEmphasisCustomMark() const { return m_rareInheritedD ata->textEmphasisCustomMark; } | |
| 1406 const AtomicString& textEmphasisMarkString() const; | |
| 1407 void setTextEmphasisFill(TextEmphasisFill fill) { SET_VAR(m_rareInheritedDat a, textEmphasisFill, fill); } | |
| 1408 void setTextEmphasisMark(TextEmphasisMark mark) { SET_VAR(m_rareInheritedDat a, textEmphasisMark, mark); } | |
| 1409 void setTextEmphasisCustomMark(const AtomicString& mark) { SET_VAR(m_rareInh eritedData, textEmphasisCustomMark, mark); } | |
| 1410 // -webkit-text-emphasis-color (aka -epub-text-emphasis-color) | |
|
nainar
2016/07/25 07:43:22
insert new line before
sashab
2016/07/26 00:38:06
Done.
| |
| 1411 void setTextEmphasisColor(const StyleColor& c) { SET_VAR_WITH_SETTER(m_rareI nheritedData, textEmphasisColor, setTextEmphasisColor, c); } | |
| 1412 // -webkit-text-emphasis-position | |
|
nainar
2016/07/25 07:43:23
insert new line before
sashab
2016/07/26 00:38:09
Done.
| |
| 1413 static TextEmphasisPosition initialTextEmphasisPosition() { return TextEmpha sisPositionOver; } | |
| 1414 TextEmphasisPosition getTextEmphasisPosition() const { return static_cast<Te xtEmphasisPosition>(m_rareInheritedData->textEmphasisPosition); } | |
|
nainar
2016/07/25 07:43:25
rename getTextEmphasisPosition() -> textEmphasisPo
sashab
2016/07/26 00:38:07
Done.
| |
| 1415 void setTextEmphasisPosition(TextEmphasisPosition position) { SET_VAR(m_rare InheritedData, textEmphasisPosition, position); } | |
| 1416 | |
| 1417 // -webkit-box-direction | |
| 1418 static EBoxDirection initialBoxDirection() { return BNORMAL; } | |
| 1419 EBoxDirection boxDirection() const { return static_cast<EBoxDirection>(m_inh eritedData.m_boxDirection); } | |
| 1420 void setBoxDirection(EBoxDirection d) { m_inheritedData.m_boxDirection = d; } | |
| 1421 | |
| 1422 // -webkit-highlight | |
| 1423 static const AtomicString& initialHighlight() { return nullAtom; } | |
| 1424 const AtomicString& highlight() const { return m_rareInheritedData->highligh t; } | |
| 1425 void setHighlight(const AtomicString& h) { SET_VAR(m_rareInheritedData, high light, h); } | |
| 1426 | |
| 1427 // -webkit-line-clamp | |
| 1428 static LineClampValue initialLineClamp() { return LineClampValue(); } | |
| 1429 const LineClampValue& lineClamp() const { return m_rareNonInheritedData->lin eClamp; } | |
| 1430 void setLineClamp(LineClampValue c) { SET_VAR(m_rareNonInheritedData, lineCl amp, c); } | |
| 1431 | |
| 1432 // -webkit-print-color-adjust | |
| 1433 static PrintColorAdjust initialPrintColorAdjust() { return PrintColorAdjustE conomy; } | |
| 1434 PrintColorAdjust getPrintColorAdjust() const { return static_cast<PrintColor Adjust>(m_inheritedData.m_printColorAdjust); } | |
|
nainar
2016/07/25 07:43:24
rename getPrintColorAdjust() -> printColorAdjust()
sashab
2016/07/26 00:38:08
Done.
| |
| 1435 void setPrintColorAdjust(PrintColorAdjust value) { m_inheritedData.m_printCo lorAdjust = value; } | |
| 1436 | |
| 1437 // -webkit-rtl-ordering | |
| 1438 static Order initialRTLOrdering() { return LogicalOrder; } | |
| 1439 Order rtlOrdering() const { return static_cast<Order>(m_inheritedData.m_rtlO rdering); } | |
| 1440 void setRTLOrdering(Order o) { m_inheritedData.m_rtlOrdering = o; } | |
| 1441 | |
| 1442 // -webkit-ruby-position | |
| 1443 static RubyPosition initialRubyPosition() { return RubyPositionBefore; } | |
| 1444 void setRubyPosition(RubyPosition position) { SET_VAR(m_rareInheritedData, m _rubyPosition, position); } | |
| 1445 RubyPosition getRubyPosition() const { return static_cast<RubyPosition>(m_ra reInheritedData->m_rubyPosition); } | |
|
nainar
2016/07/25 07:43:25
a) put this before the setter
b) rename getRubyPos
sashab
2016/07/26 00:38:09
Done.
| |
| 1446 | |
| 1447 // -webkit-tap-highlight-color | |
| 1448 static Color initialTapHighlightColor(); | |
| 1449 void setTapHighlightColor(const Color& c) { SET_VAR(m_rareInheritedData, tap HighlightColor, c); } | |
| 1450 Color tapHighlightColor() const { return m_rareInheritedData->tapHighlightCo lor; } | |
|
nainar
2016/07/25 07:43:22
put this before the setter
sashab
2016/07/26 00:38:07
Done.
| |
| 1451 | |
| 1452 // -webkit-text-fill-color | |
| 1453 void setTextFillColor(const StyleColor& c) { SET_VAR_WITH_SETTER(m_rareInher itedData, textFillColor, setTextFillColor, c); } | |
| 1454 | |
| 1455 // -webkit-text-security | |
| 1456 static ETextSecurity initialTextSecurity() { return TSNONE; } | |
| 1457 ETextSecurity textSecurity() const { return static_cast<ETextSecurity>(m_rar eInheritedData->textSecurity); } | |
| 1458 void setTextSecurity(ETextSecurity aTextSecurity) { SET_VAR(m_rareInheritedD ata, textSecurity, aTextSecurity); } | |
| 1459 | |
| 1460 // -webkit-text-stroke-color | |
| 1461 void setTextStrokeColor(const StyleColor& c) { SET_VAR_WITH_SETTER(m_rareInh eritedData, textStrokeColor, setTextStrokeColor, c); } | |
| 1462 // -webkit-text-stroke-width | |
|
nainar
2016/07/25 07:43:18
insert new line before
sashab
2016/07/26 00:38:07
Done.
sashab
2016/07/26 00:38:08
Done.
| |
| 1463 static float initialTextStrokeWidth() { return 0; } | |
| 783 float textStrokeWidth() const { return m_rareInheritedData->textStrokeWidth; } | 1464 float textStrokeWidth() const { return m_rareInheritedData->textStrokeWidth; } |
| 784 float opacity() const { return m_rareNonInheritedData->opacity; } | 1465 void setTextStrokeWidth(float w) { SET_VAR(m_rareInheritedData, textStrokeWi dth, w); } |
| 785 bool hasOpacity() const { return opacity() < 1.0f; } | 1466 |
| 786 ControlPart appearance() const { return static_cast<ControlPart>(m_rareNonIn heritedData->m_appearance); } | 1467 // -webkit-user-drag |
| 787 EBoxAlignment boxAlign() const { return static_cast<EBoxAlignment>(m_rareNon InheritedData->m_deprecatedFlexibleBox->align); } | 1468 static EUserDrag initialUserDrag() { return DRAG_AUTO; } |
| 788 EBoxDirection boxDirection() const { return static_cast<EBoxDirection>(m_inh eritedData.m_boxDirection); } | 1469 EUserDrag userDrag() const { return static_cast<EUserDrag>(m_rareNonInherite dData->userDrag); } |
| 789 float boxFlex() const { return m_rareNonInheritedData->m_deprecatedFlexibleB ox->flex; } | 1470 void setUserDrag(EUserDrag d) { SET_VAR(m_rareNonInheritedData, userDrag, d) ; } |
| 790 unsigned boxFlexGroup() const { return m_rareNonInheritedData->m_deprecatedF lexibleBox->flexGroup; } | 1471 // -webkit-user-modify |
|
nainar
2016/07/25 07:43:23
insert new line before
sashab
2016/07/26 00:38:08
Done.
| |
| 791 EBoxLines boxLines() const { return static_cast<EBoxLines>(m_rareNonInherite dData->m_deprecatedFlexibleBox->lines); } | 1472 static EUserModify initialUserModify() { return READ_ONLY; } |
| 792 unsigned boxOrdinalGroup() const { return m_rareNonInheritedData->m_deprecat edFlexibleBox->ordinalGroup; } | 1473 EUserModify userModify() const { return static_cast<EUserModify>(m_rareInher itedData->userModify); } |
| 793 EBoxOrient boxOrient() const { return static_cast<EBoxOrient>(m_rareNonInher itedData->m_deprecatedFlexibleBox->orient); } | 1474 void setUserModify(EUserModify u) { SET_VAR(m_rareInheritedData, userModify, u); } |
| 794 EBoxPack boxPack() const { return static_cast<EBoxPack>(m_rareNonInheritedDa ta->m_deprecatedFlexibleBox->pack); } | 1475 // -webkit-user-select |
|
nainar
2016/07/25 07:43:21
insert new line before
sashab
2016/07/26 00:38:10
Done.
| |
| 795 | 1476 static EUserSelect initialUserSelect() { return SELECT_TEXT; } |
| 796 int order() const { return m_rareNonInheritedData->m_order; } | 1477 EUserSelect userSelect() const { return static_cast<EUserSelect>(m_rareInher itedData->userSelect); } |
| 1478 void setUserSelect(EUserSelect s) { SET_VAR(m_rareInheritedData, userSelect, s); } | |
| 1479 | |
| 1480 // Font properties. | |
| 1481 const Font& font() const; | |
| 1482 void setFont(const Font&); | |
| 1483 const FontMetrics& getFontMetrics() const; | |
| 1484 const FontDescription& getFontDescription() const; | |
| 1485 | |
| 1486 // font-size | |
| 1487 int fontSize() const; | |
| 1488 float specifiedFontSize() const; | |
| 1489 float computedFontSize() const; | |
| 1490 // font-size-adjust | |
|
nainar
2016/07/25 07:43:22
insert new line before
sashab
2016/07/26 00:38:11
Done.
| |
| 1491 float fontSizeAdjust() const; | |
| 1492 bool hasFontSizeAdjust() const; | |
| 1493 // font-weight | |
|
nainar
2016/07/25 07:43:24
insert new line before
sashab
2016/07/26 00:38:12
Done.
| |
| 1494 FontWeight fontWeight() const; | |
| 1495 // font-stretch | |
| 1496 FontStretch fontStretch() const; | |
| 1497 bool setFontDescription(const FontDescription&); | |
|
nainar
2016/07/25 07:43:24
insert new line before
sashab
2016/07/26 00:38:10
Done, and moved setfontdescription up to the top
| |
| 1498 | |
| 1499 // -webkit-locale | |
| 1500 const AtomicString& locale() const { return getFontDescription().locale(fals e); } | |
| 1501 | |
| 1502 // FIXME: Remove these two and replace them with respective FontBuilder call s. | |
| 1503 // letter-spacing | |
| 1504 static float initialLetterWordSpacing() { return 0.0f; } | |
|
nainar
2016/07/25 07:43:24
should this be initialLetterSpacing() ?
sashab
2016/07/26 00:38:09
It's used for both. :)
| |
| 1505 float letterSpacing() const; | |
| 1506 void setLetterSpacing(float); | |
| 1507 // word-spacing | |
|
nainar
2016/07/25 07:43:26
insert new line before
sashab
2016/07/26 00:38:13
Done and fixed up FIXME to be clearer.
| |
| 1508 float wordSpacing() const; | |
| 1509 void setWordSpacing(float); | |
| 1510 | |
| 1511 // SVG properties. | |
| 1512 const SVGComputedStyle& svgStyle() const { return *m_svgStyle.get(); } | |
| 1513 SVGComputedStyle& accessSVGStyle() { return *m_svgStyle.access(); } | |
| 1514 | |
| 1515 // baseline-shift | |
| 1516 EBaselineShift baselineShift() const { return svgStyle().baselineShift(); } | |
| 1517 const Length& baselineShiftValue() const { return svgStyle().baselineShiftVa lue(); } | |
| 1518 void setBaselineShiftValue(const Length& value) | |
| 1519 { | |
| 1520 SVGComputedStyle& svgStyle = accessSVGStyle(); | |
| 1521 svgStyle.setBaselineShift(BS_LENGTH); | |
| 1522 svgStyle.setBaselineShiftValue(value); | |
| 1523 } | |
| 1524 | |
| 1525 // cx | |
| 1526 void setCx(const Length& cx) { accessSVGStyle().setCx(cx); } | |
| 1527 // cy | |
| 1528 void setCy(const Length& cy) { accessSVGStyle().setCy(cy); } | |
| 1529 // d | |
| 1530 void setD(PassRefPtr<StylePath> d) { accessSVGStyle().setD(d); } | |
| 1531 // x | |
| 1532 void setX(const Length& x) { accessSVGStyle().setX(x); } | |
| 1533 // y | |
| 1534 void setY(const Length& y) { accessSVGStyle().setY(y); } | |
| 1535 // r | |
| 1536 void setR(const Length& r) { accessSVGStyle().setR(r); } | |
| 1537 // rx | |
| 1538 void setRx(const Length& rx) { accessSVGStyle().setRx(rx); } | |
| 1539 // ry | |
| 1540 void setRy(const Length& ry) { accessSVGStyle().setRy(ry); } | |
|
sashab
2016/07/26 00:38:12
Added newlines before each of these.
| |
| 1541 | |
| 1542 // fill-opacity | |
| 1543 float fillOpacity() const { return svgStyle().fillOpacity(); } | |
| 1544 void setFillOpacity(float f) { accessSVGStyle().setFillOpacity(f); } | |
| 1545 | |
| 1546 // Fill utiltiy functions. | |
| 1547 const SVGPaintType& fillPaintType() const { return svgStyle().fillPaintType( ); } | |
| 1548 Color fillPaintColor() const { return svgStyle().fillPaintColor(); } | |
| 1549 | |
| 1550 // stop-color | |
| 1551 void setStopColor(const Color& c) { accessSVGStyle().setStopColor(c); } | |
| 1552 // flood-color | |
|
nainar
2016/07/25 07:43:25
insert new line before
sashab
2016/07/26 00:38:08
Done.
| |
| 1553 void setFloodColor(const Color& c) { accessSVGStyle().setFloodColor(c); } | |
| 1554 // lighting-color | |
|
nainar
2016/07/25 07:43:21
insert new line before
sashab
2016/07/26 00:38:06
Done.
| |
| 1555 void setLightingColor(const Color& c) { accessSVGStyle().setLightingColor(c) ; } | |
| 1556 | |
| 1557 // flood-opacity | |
| 1558 float floodOpacity() const { return svgStyle().floodOpacity(); } | |
| 1559 void setFloodOpacity(float f) { accessSVGStyle().setFloodOpacity(f); } | |
| 1560 | |
| 1561 // stop-opacity | |
| 1562 float stopOpacity() const { return svgStyle().stopOpacity(); } | |
| 1563 void setStopOpacity(float f) { accessSVGStyle().setStopOpacity(f); } | |
| 1564 | |
| 1565 // stroke | |
| 1566 const SVGPaintType& strokePaintType() const { return svgStyle().strokePaintT ype(); } | |
| 1567 Color strokePaintColor() const { return svgStyle().strokePaintColor(); } | |
| 1568 // stroke-dasharray | |
|
nainar
2016/07/25 07:43:25
insert new line before
sashab
2016/07/26 00:38:12
Done.
| |
| 1569 SVGDashArray* strokeDashArray() const { return svgStyle().strokeDashArray(); } | |
| 1570 void setStrokeDashArray(PassRefPtr<SVGDashArray> array) { accessSVGStyle().s etStrokeDashArray(array); } | |
| 1571 // stroke-dashoffset | |
|
nainar
2016/07/25 07:43:27
insert new line before
sashab
2016/07/26 00:38:08
Done.
| |
| 1572 const Length& strokeDashOffset() const { return svgStyle().strokeDashOffset( ); } | |
| 1573 void setStrokeDashOffset(const Length& d) { accessSVGStyle().setStrokeDashOf fset(d); } | |
| 1574 // stroke-miterlimit | |
|
nainar
2016/07/25 07:43:19
insert new line before
sashab
2016/07/26 00:38:08
Done.
| |
| 1575 float strokeMiterLimit() const { return svgStyle().strokeMiterLimit(); } | |
| 1576 void setStrokeMiterLimit(float f) { accessSVGStyle().setStrokeMiterLimit(f); } | |
| 1577 // stroke-opacity | |
|
nainar
2016/07/25 07:43:26
insert new line before
sashab
2016/07/26 00:38:09
Done.
| |
| 1578 float strokeOpacity() const { return svgStyle().strokeOpacity(); } | |
| 1579 void setStrokeOpacity(float f) { accessSVGStyle().setStrokeOpacity(f); } | |
| 1580 // stroke-width | |
|
nainar
2016/07/25 07:43:19
insert new line before
sashab
2016/07/26 00:38:10
Done.
| |
| 1581 const UnzoomedLength& strokeWidth() const { return svgStyle().strokeWidth(); } | |
| 1582 void setStrokeWidth(const UnzoomedLength& w) { accessSVGStyle().setStrokeWid th(w); } | |
| 1583 | |
| 1584 // Comparison operators | |
| 1585 bool operator==(const ComputedStyle& other) const; | |
| 1586 bool operator!=(const ComputedStyle& other) const { return !(*this == other) ; } | |
| 1587 | |
| 1588 bool inheritedEqual(const ComputedStyle&) const; | |
| 1589 bool nonInheritedEqual(const ComputedStyle&) const; | |
| 1590 bool loadingCustomFontsEqual(const ComputedStyle&) const; | |
| 1591 bool inheritedDataShared(const ComputedStyle&) const; | |
| 1592 | |
| 1593 bool hasChildDependentFlags() const { return emptyState() || hasExplicitlyIn heritedProperties(); } | |
| 1594 void copyChildDependentFlagsFrom(const ComputedStyle&); | |
| 1595 | |
| 1596 // Counters. | |
| 1597 const CounterDirectiveMap* counterDirectives() const; | |
| 1598 CounterDirectiveMap& accessCounterDirectives(); | |
| 1599 const CounterDirectives getCounterDirectives(const AtomicString& identifier) const; | |
| 1600 void clearIncrementDirectives(); | |
| 1601 void clearResetDirectives(); | |
| 1602 | |
| 1603 // Variables. | |
| 1604 static StyleVariableData* initialVariables() { return nullptr; } | |
| 1605 StyleVariableData* variables() const; | |
| 1606 void setVariable(const AtomicString&, PassRefPtr<CSSVariableData>); | |
| 1607 void removeVariable(const AtomicString&); | |
| 1608 void setHasVariableReferenceFromNonInheritedProperty() { m_nonInheritedData. m_variableReference = true; } | |
| 1609 bool hasVariableReferenceFromNonInheritedProperty() const { return m_nonInhe ritedData.m_variableReference; } | |
| 1610 | |
| 1611 // Animations. | |
| 1612 CSSAnimationData& accessAnimations(); | |
| 1613 const CSSAnimationData* animations() const { return m_rareNonInheritedData-> m_animations.get(); } | |
| 1614 | |
| 1615 // Transitions. | |
| 1616 const CSSTransitionData* transitions() const { return m_rareNonInheritedData ->m_transitions.get(); } | |
| 1617 CSSTransitionData& accessTransitions(); | |
| 1618 | |
| 1619 // Callback selectors. | |
| 797 const Vector<String>& callbackSelectors() const { return m_rareNonInheritedD ata->m_callbackSelectors; } | 1620 const Vector<String>& callbackSelectors() const { return m_rareNonInheritedD ata->m_callbackSelectors; } |
| 798 float flexGrow() const { return m_rareNonInheritedData->m_flexibleBox->m_fle xGrow; } | 1621 void addCallbackSelector(const String& selector); |
| 799 float flexShrink() const { return m_rareNonInheritedData->m_flexibleBox->m_f lexShrink; } | 1622 |
| 800 const Length& flexBasis() const { return m_rareNonInheritedData->m_flexibleB ox->m_flexBasis; } | 1623 // Non-property flags. |
| 801 const StyleContentAlignmentData& alignContent() const { return m_rareNonInhe ritedData->m_alignContent; } | 1624 void setHasViewportUnits(bool hasViewportUnits = true) const { m_nonInherite dData.m_hasViewportUnits = hasViewportUnits; } |
|
nainar
2016/07/25 07:43:22
reverse order of getter and setter
sashab
2016/07/26 00:38:10
Done.
| |
| 802 ContentPosition alignContentPosition() const { return m_rareNonInheritedData ->m_alignContent.position(); } | 1625 bool hasViewportUnits() const { return m_nonInheritedData.m_hasViewportUnits ; } |
| 803 ContentDistributionType alignContentDistribution() const { return m_rareNonI nheritedData->m_alignContent.distribution(); } | 1626 |
| 804 OverflowAlignment alignContentOverflowAlignment() const { return m_rareNonIn heritedData->m_alignContent.overflow(); } | 1627 void setHasRemUnits() const { m_nonInheritedData.m_hasRemUnits = true; } |
|
nainar
2016/07/25 07:43:26
reverse order of getter and setter
sashab
2016/07/26 00:38:08
Done.
| |
| 805 const StyleSelfAlignmentData& alignItems() const { return m_rareNonInherited Data->m_alignItems; } | 1628 bool hasRemUnits() const { return m_nonInheritedData.m_hasRemUnits; } |
| 806 ItemPosition alignItemsPosition() const { return m_rareNonInheritedData->m_a lignItems.position(); } | 1629 |
| 807 OverflowAlignment alignItemsOverflowAlignment() const { return m_rareNonInhe ritedData->m_alignItems.overflow(); } | 1630 bool affectedByFocus() const { return m_nonInheritedData.m_affectedByFocus; } |
| 808 const StyleSelfAlignmentData& alignSelf() const { return m_rareNonInheritedD ata->m_alignSelf; } | 1631 bool affectedByHover() const { return m_nonInheritedData.m_affectedByHover; } |
| 809 ItemPosition alignSelfPosition() const { return m_rareNonInheritedData->m_al ignSelf.position(); } | 1632 bool affectedByActive() const { return m_nonInheritedData.m_affectedByActive ; } |
| 810 OverflowAlignment alignSelfOverflowAlignment() const { return m_rareNonInher itedData->m_alignSelf.overflow(); } | 1633 bool affectedByDrag() const { return m_nonInheritedData.m_affectedByDrag; } |
| 811 EFlexDirection flexDirection() const { return static_cast<EFlexDirection>(m_ rareNonInheritedData->m_flexibleBox->m_flexDirection); } | 1634 |
|
nainar
2016/07/25 07:43:22
remove new line
sashab
2016/07/26 00:38:08
Done, also broke these up. :)
| |
| 1635 void setAffectedByFocus() { m_nonInheritedData.m_affectedByFocus = true; } | |
| 1636 void setAffectedByHover() { m_nonInheritedData.m_affectedByHover = true; } | |
| 1637 void setAffectedByActive() { m_nonInheritedData.m_affectedByActive = true; } | |
| 1638 void setAffectedByDrag() { m_nonInheritedData.m_affectedByDrag = true; } | |
| 1639 | |
| 1640 bool emptyState() const { return m_nonInheritedData.m_emptyState; } | |
| 1641 void setEmptyState(bool b) { setUnique(); m_nonInheritedData.m_emptyState = b; } | |
| 1642 | |
| 1643 bool hasInlineTransform() const { return m_rareNonInheritedData->m_hasInline Transform; } | |
| 1644 void setHasInlineTransform(bool b) { SET_VAR(m_rareNonInheritedData, m_hasIn lineTransform, b); } | |
| 1645 | |
| 1646 bool hasCompositorProxy() const { return m_rareNonInheritedData->m_hasCompos itorProxy; } | |
| 1647 void setHasCompositorProxy(bool b) { SET_VAR(m_rareNonInheritedData, m_hasCo mpositorProxy, b); } | |
| 1648 | |
| 1649 bool isLink() const { return m_nonInheritedData.m_isLink; } | |
| 1650 void setIsLink(bool b) { m_nonInheritedData.m_isLink = b; } | |
| 1651 | |
| 1652 EInsideLink insideLink() const { return static_cast<EInsideLink>(m_inherited Data.m_insideLink); } | |
| 1653 void setInsideLink(EInsideLink insideLink) { m_inheritedData.m_insideLink = insideLink; } | |
| 1654 | |
| 1655 void setHasExplicitlyInheritedProperties() { m_nonInheritedData.m_explicitIn heritance = true; } | |
| 1656 bool hasExplicitlyInheritedProperties() const { return m_nonInheritedData.m_ explicitInheritance; } | |
|
nainar
2016/07/25 07:43:24
reverse order with setter
sashab
2016/07/26 00:38:11
Done.
| |
| 1657 | |
| 1658 bool requiresAcceleratedCompositingForExternalReasons(bool b) { return m_rar eNonInheritedData->m_requiresAcceleratedCompositingForExternalReasons; } | |
| 1659 void setRequiresAcceleratedCompositingForExternalReasons(bool b) { SET_VAR(m _rareNonInheritedData, m_requiresAcceleratedCompositingForExternalReasons, b); } | |
| 1660 | |
| 1661 bool hasAuthorBackground() const { return m_rareNonInheritedData->m_hasAutho rBackground; }; | |
| 1662 void setHasAuthorBackground(bool authorBackground) { SET_VAR(m_rareNonInheri tedData, m_hasAuthorBackground, authorBackground); } | |
| 1663 | |
| 1664 bool hasAuthorBorder() const { return m_rareNonInheritedData->m_hasAuthorBor der; }; | |
| 1665 void setHasAuthorBorder(bool authorBorder) { SET_VAR(m_rareNonInheritedData, m_hasAuthorBorder, authorBorder); } | |
| 1666 | |
| 1667 // A stacking context is painted atomically and defines a stacking order, wh ereas | |
| 1668 // a containing stacking context defines in which order the stacking context s | |
| 1669 // below are painted. | |
| 1670 // See CSS 2.1, Appendix E (https://www.w3.org/TR/CSS21/zindex.html) for mor e details. | |
| 1671 bool isStackingContext() const { return m_rareNonInheritedData->m_isStacking Context; } | |
| 1672 void setIsStackingContext(bool b) { SET_VAR(m_rareNonInheritedData, m_isStac kingContext, b); } | |
| 1673 | |
| 1674 // A unique style is one that has matches something that makes it impossible to share. | |
| 1675 bool unique() const { return m_nonInheritedData.m_unique; } | |
| 1676 void setUnique() { m_nonInheritedData.m_unique = true; } | |
| 1677 | |
| 1678 float textAutosizingMultiplier() const { return m_styleInheritedData->textAu tosizingMultiplier; } | |
| 1679 void setTextAutosizingMultiplier(float); | |
| 1680 | |
| 1681 bool selfOrAncestorHasDirAutoAttribute() const { return m_rareInheritedData- >m_selfOrAncestorHasDirAutoAttribute; } | |
| 1682 void setSelfOrAncestorHasDirAutoAttribute(bool v) { SET_VAR(m_rareInheritedD ata, m_selfOrAncestorHasDirAutoAttribute, v); } | |
| 1683 | |
| 1684 // Animation flags. | |
| 1685 bool hasCurrentOpacityAnimation() const { return m_rareNonInheritedData->m_h asCurrentOpacityAnimation; } | |
| 1686 void setHasCurrentOpacityAnimation(bool b = true) { SET_VAR(m_rareNonInherit edData, m_hasCurrentOpacityAnimation, b); } | |
| 1687 | |
| 1688 bool hasCurrentTransformAnimation() const { return m_rareNonInheritedData->m _hasCurrentTransformAnimation; } | |
| 1689 void setHasCurrentTransformAnimation(bool b = true) { SET_VAR(m_rareNonInher itedData, m_hasCurrentTransformAnimation, b); } | |
| 1690 | |
| 1691 bool hasCurrentFilterAnimation() const { return m_rareNonInheritedData->m_ha sCurrentFilterAnimation; } | |
| 1692 void setHasCurrentFilterAnimation(bool b = true) { SET_VAR(m_rareNonInherite dData, m_hasCurrentFilterAnimation, b); } | |
| 1693 | |
| 1694 bool hasCurrentBackdropFilterAnimation() const { return m_rareNonInheritedDa ta->m_hasCurrentBackdropFilterAnimation; } | |
| 1695 void setHasCurrentBackdropFilterAnimation(bool b = true) { SET_VAR(m_rareNon InheritedData, m_hasCurrentBackdropFilterAnimation, b); } | |
| 1696 | |
| 1697 bool isRunningOpacityAnimationOnCompositor() const { return m_rareNonInherit edData->m_runningOpacityAnimationOnCompositor; } | |
| 1698 void setIsRunningOpacityAnimationOnCompositor(bool b = true) { SET_VAR(m_rar eNonInheritedData, m_runningOpacityAnimationOnCompositor, b); } | |
| 1699 | |
| 1700 bool isRunningTransformAnimationOnCompositor() const { return m_rareNonInher itedData->m_runningTransformAnimationOnCompositor; } | |
| 1701 void setIsRunningTransformAnimationOnCompositor(bool b = true) { SET_VAR(m_r areNonInheritedData, m_runningTransformAnimationOnCompositor, b); } | |
| 1702 | |
| 1703 bool isRunningFilterAnimationOnCompositor() const { return m_rareNonInherite dData->m_runningFilterAnimationOnCompositor; } | |
| 1704 void setIsRunningFilterAnimationOnCompositor(bool b = true) { SET_VAR(m_rare NonInheritedData, m_runningFilterAnimationOnCompositor, b); } | |
| 1705 | |
| 1706 bool isRunningBackdropFilterAnimationOnCompositor() const { return m_rareNon InheritedData->m_runningBackdropFilterAnimationOnCompositor; } | |
| 1707 void setIsRunningBackdropFilterAnimationOnCompositor(bool b = true) { SET_VA R(m_rareNonInheritedData, m_runningBackdropFilterAnimationOnCompositor, b); } | |
| 1708 | |
| 1709 // Column utility functions. | |
| 1710 void clearMultiCol(); | |
| 1711 bool specifiesColumns() const { return !hasAutoColumnCount() || !hasAutoColu mnWidth(); } | |
| 1712 bool columnRuleIsTransparent() const { return m_rareNonInheritedData->m_mult iCol->m_rule.isTransparent(); } | |
| 1713 bool columnRuleEquivalent(const ComputedStyle* otherStyle) const; | |
| 1714 void inheritColumnPropertiesFrom(const ComputedStyle& parent) { m_rareNonInh eritedData.access()->m_multiCol = parent.m_rareNonInheritedData->m_multiCol; } | |
| 1715 | |
| 1716 // Flex utility functions. | |
| 812 bool isColumnFlexDirection() const { return flexDirection() == FlowColumn || flexDirection() == FlowColumnReverse; } | 1717 bool isColumnFlexDirection() const { return flexDirection() == FlowColumn || flexDirection() == FlowColumnReverse; } |
| 813 bool isReverseFlexDirection() const { return flexDirection() == FlowRowRever se || flexDirection() == FlowColumnReverse; } | 1718 bool isReverseFlexDirection() const { return flexDirection() == FlowRowRever se || flexDirection() == FlowColumnReverse; } |
| 814 EFlexWrap flexWrap() const { return static_cast<EFlexWrap>(m_rareNonInherite dData->m_flexibleBox->m_flexWrap); } | 1719 bool hasBoxReflect() const { return boxReflect(); } |
| 815 const StyleContentAlignmentData& justifyContent() const { return m_rareNonIn heritedData->m_justifyContent; } | 1720 bool reflectionDataEquivalent(const ComputedStyle* otherStyle) const { retur n m_rareNonInheritedData->reflectionDataEquivalent(*otherStyle->m_rareNonInherit edData); } |
| 816 ContentPosition justifyContentPosition() const { return m_rareNonInheritedDa ta->m_justifyContent.position(); } | 1721 |
| 817 ContentDistributionType justifyContentDistribution() const { return m_rareNo nInheritedData->m_justifyContent.distribution(); } | 1722 // Mask utility functions. |
| 818 OverflowAlignment justifyContentOverflowAlignment() const { return m_rareNon InheritedData->m_justifyContent.overflow(); } | 1723 bool hasMask() const { return m_rareNonInheritedData->m_mask.hasImage() || m _rareNonInheritedData->m_maskBoxImage.hasImage(); } |
| 819 const StyleSelfAlignmentData& justifyItems() const { return m_rareNonInherit edData->m_justifyItems; } | 1724 StyleImage* maskImage() const { return m_rareNonInheritedData->m_mask.image( ); } |
| 820 ItemPosition justifyItemsPosition() const { return m_rareNonInheritedData->m _justifyItems.position(); } | 1725 FillLayer& accessMaskLayers() { return m_rareNonInheritedData.access()->m_ma sk; } |
| 821 OverflowAlignment justifyItemsOverflowAlignment() const { return m_rareNonIn heritedData->m_justifyItems.overflow(); } | 1726 const FillLayer& maskLayers() const { return m_rareNonInheritedData->m_mask; } |
| 822 ItemPositionType justifyItemsPositionType() const { return m_rareNonInherite dData->m_justifyItems.positionType(); } | 1727 const NinePieceImage& maskBoxImage() const { return m_rareNonInheritedData-> m_maskBoxImage; } |
| 823 const StyleSelfAlignmentData& justifySelf() const { return m_rareNonInherite dData->m_justifySelf; } | 1728 bool maskBoxImageSlicesFill() const { return m_rareNonInheritedData->m_maskB oxImage.fill(); } |
| 824 ItemPosition justifySelfPosition() const { return m_rareNonInheritedData->m_ justifySelf.position(); } | 1729 void adjustMaskLayers() |
| 825 OverflowAlignment justifySelfOverflowAlignment() const { return m_rareNonInh eritedData->m_justifySelf.overflow(); } | 1730 { |
| 826 | 1731 if (maskLayers().next()) { |
| 827 const Vector<GridTrackSize>& gridTemplateColumns() const { return m_rareNonI nheritedData->m_grid->m_gridTemplateColumns; } | 1732 accessMaskLayers().cullEmptyLayers(); |
| 828 const Vector<GridTrackSize>& gridTemplateRows() const { return m_rareNonInhe ritedData->m_grid->m_gridTemplateRows; } | 1733 accessMaskLayers().fillUnsetProperties(); |
| 1734 } | |
| 1735 } | |
| 1736 void setMaskBoxImage(const NinePieceImage& b) { SET_VAR(m_rareNonInheritedDa ta, m_maskBoxImage, b); } | |
| 1737 void setMaskBoxImageSlicesFill(bool fill) | |
| 1738 { | |
| 1739 m_rareNonInheritedData.access()->m_maskBoxImage.setFill(fill); | |
| 1740 } | |
| 1741 | |
| 1742 // Text-combine utility functions. | |
| 1743 bool hasTextCombine() const { return getTextCombine() != TextCombineNone; } | |
| 1744 | |
| 1745 // Grid utility functions. | |
| 829 const Vector<GridTrackSize>& gridAutoRepeatColumns() const { return m_rareNo nInheritedData->m_grid->m_gridAutoRepeatColumns; } | 1746 const Vector<GridTrackSize>& gridAutoRepeatColumns() const { return m_rareNo nInheritedData->m_grid->m_gridAutoRepeatColumns; } |
| 830 const Vector<GridTrackSize>& gridAutoRepeatRows() const { return m_rareNonIn heritedData->m_grid->m_gridAutoRepeatRows; } | 1747 const Vector<GridTrackSize>& gridAutoRepeatRows() const { return m_rareNonIn heritedData->m_grid->m_gridAutoRepeatRows; } |
| 831 size_t gridAutoRepeatColumnsInsertionPoint() const { return m_rareNonInherit edData->m_grid->m_autoRepeatColumnsInsertionPoint; } | 1748 size_t gridAutoRepeatColumnsInsertionPoint() const { return m_rareNonInherit edData->m_grid->m_autoRepeatColumnsInsertionPoint; } |
| 832 size_t gridAutoRepeatRowsInsertionPoint() const { return m_rareNonInheritedD ata->m_grid->m_autoRepeatRowsInsertionPoint; } | 1749 size_t gridAutoRepeatRowsInsertionPoint() const { return m_rareNonInheritedD ata->m_grid->m_autoRepeatRowsInsertionPoint; } |
| 833 AutoRepeatType gridAutoRepeatColumnsType() const { return m_rareNonInherite dData->m_grid->m_autoRepeatColumnsType; } | 1750 AutoRepeatType gridAutoRepeatColumnsType() const { return m_rareNonInherite dData->m_grid->m_autoRepeatColumnsType; } |
| 834 AutoRepeatType gridAutoRepeatRowsType() const { return m_rareNonInheritedDa ta->m_grid->m_autoRepeatRowsType; } | 1751 AutoRepeatType gridAutoRepeatRowsType() const { return m_rareNonInheritedDa ta->m_grid->m_autoRepeatRowsType; } |
| 835 const NamedGridLinesMap& namedGridColumnLines() const { return m_rareNonInhe ritedData->m_grid->m_namedGridColumnLines; } | 1752 const NamedGridLinesMap& namedGridColumnLines() const { return m_rareNonInhe ritedData->m_grid->m_namedGridColumnLines; } |
| 836 const NamedGridLinesMap& namedGridRowLines() const { return m_rareNonInherit edData->m_grid->m_namedGridRowLines; } | 1753 const NamedGridLinesMap& namedGridRowLines() const { return m_rareNonInherit edData->m_grid->m_namedGridRowLines; } |
| 837 const OrderedNamedGridLines& orderedNamedGridColumnLines() const { return m_ rareNonInheritedData->m_grid->m_orderedNamedGridColumnLines; } | 1754 const OrderedNamedGridLines& orderedNamedGridColumnLines() const { return m_ rareNonInheritedData->m_grid->m_orderedNamedGridColumnLines; } |
| 838 const OrderedNamedGridLines& orderedNamedGridRowLines() const { return m_rar eNonInheritedData->m_grid->m_orderedNamedGridRowLines; } | 1755 const OrderedNamedGridLines& orderedNamedGridRowLines() const { return m_rar eNonInheritedData->m_grid->m_orderedNamedGridRowLines; } |
| 839 const NamedGridLinesMap& autoRepeatNamedGridColumnLines() const { return m_r areNonInheritedData->m_grid->m_autoRepeatNamedGridColumnLines; } | 1756 const NamedGridLinesMap& autoRepeatNamedGridColumnLines() const { return m_r areNonInheritedData->m_grid->m_autoRepeatNamedGridColumnLines; } |
| 840 const NamedGridLinesMap& autoRepeatNamedGridRowLines() const { return m_rare NonInheritedData->m_grid->m_autoRepeatNamedGridRowLines; } | 1757 const NamedGridLinesMap& autoRepeatNamedGridRowLines() const { return m_rare NonInheritedData->m_grid->m_autoRepeatNamedGridRowLines; } |
| 841 const OrderedNamedGridLines& autoRepeatOrderedNamedGridColumnLines() const { return m_rareNonInheritedData->m_grid->m_autoRepeatOrderedNamedGridColumnLines; } | 1758 const OrderedNamedGridLines& autoRepeatOrderedNamedGridColumnLines() const { return m_rareNonInheritedData->m_grid->m_autoRepeatOrderedNamedGridColumnLines; } |
| 842 const OrderedNamedGridLines& autoRepeatOrderedNamedGridRowLines() const { re turn m_rareNonInheritedData->m_grid->m_autoRepeatOrderedNamedGridRowLines; } | 1759 const OrderedNamedGridLines& autoRepeatOrderedNamedGridRowLines() const { re turn m_rareNonInheritedData->m_grid->m_autoRepeatOrderedNamedGridRowLines; } |
| 843 const NamedGridAreaMap& namedGridArea() const { return m_rareNonInheritedDat a->m_grid->m_namedGridArea; } | 1760 const NamedGridAreaMap& namedGridArea() const { return m_rareNonInheritedDat a->m_grid->m_namedGridArea; } |
| 844 size_t namedGridAreaRowCount() const { return m_rareNonInheritedData->m_grid ->m_namedGridAreaRowCount; } | 1761 size_t namedGridAreaRowCount() const { return m_rareNonInheritedData->m_grid ->m_namedGridAreaRowCount; } |
| 845 size_t namedGridAreaColumnCount() const { return m_rareNonInheritedData->m_g rid->m_namedGridAreaColumnCount; } | 1762 size_t namedGridAreaColumnCount() const { return m_rareNonInheritedData->m_g rid->m_namedGridAreaColumnCount; } |
| 846 GridAutoFlow getGridAutoFlow() const { return static_cast<GridAutoFlow>(m_ra reNonInheritedData->m_grid->m_gridAutoFlow); } | 1763 GridAutoFlow getGridAutoFlow() const { return static_cast<GridAutoFlow>(m_ra reNonInheritedData->m_grid->m_gridAutoFlow); } |
| 847 bool isGridAutoFlowDirectionRow() const { return (m_rareNonInheritedData->m_ grid->m_gridAutoFlow & InternalAutoFlowDirectionRow) == InternalAutoFlowDirectio nRow; } | 1764 bool isGridAutoFlowDirectionRow() const { return (m_rareNonInheritedData->m_ grid->m_gridAutoFlow & InternalAutoFlowDirectionRow) == InternalAutoFlowDirectio nRow; } |
| 848 bool isGridAutoFlowDirectionColumn() const { return (m_rareNonInheritedData- >m_grid->m_gridAutoFlow & InternalAutoFlowDirectionColumn) == InternalAutoFlowDi rectionColumn; } | 1765 bool isGridAutoFlowDirectionColumn() const { return (m_rareNonInheritedData- >m_grid->m_gridAutoFlow & InternalAutoFlowDirectionColumn) == InternalAutoFlowDi rectionColumn; } |
| 849 bool isGridAutoFlowAlgorithmSparse() const { return (m_rareNonInheritedData- >m_grid->m_gridAutoFlow & InternalAutoFlowAlgorithmSparse) == InternalAutoFlowAl gorithmSparse; } | 1766 bool isGridAutoFlowAlgorithmSparse() const { return (m_rareNonInheritedData- >m_grid->m_gridAutoFlow & InternalAutoFlowAlgorithmSparse) == InternalAutoFlowAl gorithmSparse; } |
| 850 bool isGridAutoFlowAlgorithmDense() const { return (m_rareNonInheritedData-> m_grid->m_gridAutoFlow & InternalAutoFlowAlgorithmDense) == InternalAutoFlowAlgo rithmDense; } | 1767 bool isGridAutoFlowAlgorithmDense() const { return (m_rareNonInheritedData-> m_grid->m_gridAutoFlow & InternalAutoFlowAlgorithmDense) == InternalAutoFlowAlgo rithmDense; } |
| 851 const Vector<GridTrackSize>& gridAutoColumns() const { return m_rareNonInher itedData->m_grid->m_gridAutoColumns; } | |
| 852 const Vector<GridTrackSize>& gridAutoRows() const { return m_rareNonInherite dData->m_grid->m_gridAutoRows; } | |
| 853 const Length& gridColumnGap() const { return m_rareNonInheritedData->m_grid- >m_gridColumnGap; } | |
| 854 const Length& gridRowGap() const { return m_rareNonInheritedData->m_grid->m_ gridRowGap; } | |
| 855 | |
| 856 const GridPosition& gridColumnStart() const { return m_rareNonInheritedData- >m_gridItem->m_gridColumnStart; } | |
| 857 const GridPosition& gridColumnEnd() const { return m_rareNonInheritedData->m _gridItem->m_gridColumnEnd; } | |
| 858 const GridPosition& gridRowStart() const { return m_rareNonInheritedData->m_ gridItem->m_gridRowStart; } | |
| 859 const GridPosition& gridRowEnd() const { return m_rareNonInheritedData->m_gr idItem->m_gridRowEnd; } | |
| 860 | |
| 861 ShadowList* boxShadow() const { return m_rareNonInheritedData->m_boxShadow.g et(); } | |
| 862 | |
| 863 EBoxDecorationBreak boxDecorationBreak() const { return m_box->boxDecoration Break(); } | |
| 864 StyleReflection* boxReflect() const { return m_rareNonInheritedData->m_boxRe flect.get(); } | |
| 865 bool hasBoxReflect() const { return boxReflect(); } | |
| 866 bool reflectionDataEquivalent(const ComputedStyle* otherStyle) const { retur n m_rareNonInheritedData->reflectionDataEquivalent(*otherStyle->m_rareNonInherit edData); } | |
| 867 | |
| 868 // FIXME: reflections should belong to this helper function but they are cur rently handled | |
| 869 // through their self-painting layers. So the layout code doesn't account fo r them. | |
| 870 bool hasVisualOverflowingEffect() const { return boxShadow() || hasBorderIma geOutsets() || hasOutline(); } | |
| 871 | |
| 872 Containment contain() const { return static_cast<Containment>(m_rareNonInher itedData->m_contain); } | |
| 873 bool containsPaint() const { return m_rareNonInheritedData->m_contain & Cont ainsPaint; } | |
| 874 bool containsStyle() const { return m_rareNonInheritedData->m_contain & Cont ainsStyle; } | |
| 875 bool containsLayout() const { return m_rareNonInheritedData->m_contain & Con tainsLayout; } | |
| 876 bool containsSize() const { return m_rareNonInheritedData->m_contain & Conta insSize; } | |
| 877 | |
| 878 EBoxSizing boxSizing() const { return m_box->boxSizing(); } | |
| 879 EUserModify userModify() const { return static_cast<EUserModify>(m_rareInher itedData->userModify); } | |
| 880 EUserDrag userDrag() const { return static_cast<EUserDrag>(m_rareNonInherite dData->userDrag); } | |
| 881 EUserSelect userSelect() const { return static_cast<EUserSelect>(m_rareInher itedData->userSelect); } | |
| 882 TextOverflow getTextOverflow() const { return static_cast<TextOverflow>(m_ra reNonInheritedData->textOverflow); } | |
| 883 EMarginCollapse marginBeforeCollapse() const { return static_cast<EMarginCol lapse>(m_rareNonInheritedData->marginBeforeCollapse); } | |
| 884 EMarginCollapse marginAfterCollapse() const { return static_cast<EMarginColl apse>(m_rareNonInheritedData->marginAfterCollapse); } | |
| 885 EWordBreak wordBreak() const { return static_cast<EWordBreak>(m_rareInherite dData->wordBreak); } | |
| 886 EOverflowWrap overflowWrap() const { return static_cast<EOverflowWrap>(m_rar eInheritedData->overflowWrap); } | |
| 887 LineBreak getLineBreak() const { return static_cast<LineBreak>(m_rareInherit edData->lineBreak); } | |
| 888 const AtomicString& highlight() const { return m_rareInheritedData->highligh t; } | |
| 889 Hyphens getHyphens() const { return static_cast<Hyphens>(m_rareInheritedData ->hyphens); } | |
| 890 const AtomicString& hyphenationString() const { return m_rareInheritedData-> hyphenationString; } | |
| 891 const AtomicString& locale() const { return getFontDescription().locale(fals e); } | |
| 892 EResize resize() const { return static_cast<EResize>(m_rareNonInheritedData- >m_resize); } | |
| 893 bool hasInlinePaginationAxis() const | |
| 894 { | |
| 895 // If the pagination axis is parallel with the writing mode inline axis, columns may be laid | |
| 896 // out along the inline axis, just like for regular multicol. Otherwise, we need to lay out | |
| 897 // along the block axis. | |
| 898 if (isOverflowPaged()) | |
| 899 return (overflowY() == OverflowPagedX) == isHorizontalWritingMode(); | |
| 900 return false; | |
| 901 } | |
| 902 float columnWidth() const { return m_rareNonInheritedData->m_multiCol->m_wid th; } | |
| 903 bool hasAutoColumnWidth() const { return m_rareNonInheritedData->m_multiCol- >m_autoWidth; } | |
| 904 unsigned short columnCount() const { return m_rareNonInheritedData->m_multiC ol->m_count; } | |
| 905 bool hasAutoColumnCount() const { return m_rareNonInheritedData->m_multiCol- >m_autoCount; } | |
| 906 bool specifiesColumns() const { return !hasAutoColumnCount() || !hasAutoColu mnWidth(); } | |
| 907 ColumnFill getColumnFill() const { return static_cast<ColumnFill>(m_rareNonI nheritedData->m_multiCol->m_fill); } | |
| 908 float columnGap() const { return m_rareNonInheritedData->m_multiCol->m_gap; } | |
| 909 bool hasNormalColumnGap() const { return m_rareNonInheritedData->m_multiCol- >m_normalGap; } | |
| 910 EBorderStyle columnRuleStyle() const { return m_rareNonInheritedData->m_mult iCol->m_rule.style(); } | |
| 911 unsigned short columnRuleWidth() const { return m_rareNonInheritedData->m_mu ltiCol->ruleWidth(); } | |
| 912 bool columnRuleIsTransparent() const { return m_rareNonInheritedData->m_mult iCol->m_rule.isTransparent(); } | |
| 913 bool columnRuleEquivalent(const ComputedStyle* otherStyle) const; | |
| 914 ColumnSpan getColumnSpan() const { return static_cast<ColumnSpan>(m_rareNonI nheritedData->m_multiCol->m_columnSpan); } | |
| 915 bool hasInlineTransform() const { return m_rareNonInheritedData->m_hasInline Transform; } | |
| 916 bool hasCompositorProxy() const { return m_rareNonInheritedData->m_hasCompos itorProxy; } | |
| 917 const TransformOperations& transform() const { return m_rareNonInheritedData ->m_transform->m_operations; } | |
| 918 const TransformOrigin& transformOrigin() const { return m_rareNonInheritedDa ta->m_transform->m_origin; } | |
| 919 const Length& transformOriginX() const { return transformOrigin().x(); } | |
| 920 const Length& transformOriginY() const { return transformOrigin().y(); } | |
| 921 TranslateTransformOperation* translate() const { return m_rareNonInheritedDa ta->m_transform->m_translate.get(); } | |
| 922 RotateTransformOperation* rotate() const { return m_rareNonInheritedData->m_ transform->m_rotate.get(); } | |
| 923 ScaleTransformOperation* scale() const { return m_rareNonInheritedData->m_tr ansform->m_scale.get(); } | |
| 924 float transformOriginZ() const { return transformOrigin().z(); } | |
| 925 bool has3DTransform() const { return m_rareNonInheritedData->m_transform->ha s3DTransform(); } | |
| 926 bool hasTransform() const { return hasTransformOperations() || hasMotionPath () || hasCurrentTransformAnimation() || translate() || rotate() || scale(); } | |
| 927 bool hasTransformOperations() const { return !m_rareNonInheritedData->m_tran sform->m_operations.operations().isEmpty(); } | |
| 928 bool transformDataEquivalent(const ComputedStyle& otherStyle) const { return m_rareNonInheritedData->m_transform == otherStyle.m_rareNonInheritedData->m_tra nsform; } | |
| 929 | |
| 930 StylePath* motionPath() const { return m_rareNonInheritedData->m_transform-> m_motion.m_path.get(); } | |
| 931 bool hasMotionPath() const { return motionPath(); } | |
| 932 const Length& motionOffset() const { return m_rareNonInheritedData->m_transf orm->m_motion.m_offset; } | |
| 933 const StyleMotionRotation& motionRotation() const { return m_rareNonInherite dData->m_transform->m_motion.m_rotation; } | |
| 934 | |
| 935 TextEmphasisFill getTextEmphasisFill() const { return static_cast<TextEmphas isFill>(m_rareInheritedData->textEmphasisFill); } | |
| 936 TextEmphasisMark getTextEmphasisMark() const; | |
| 937 const AtomicString& textEmphasisCustomMark() const { return m_rareInheritedD ata->textEmphasisCustomMark; } | |
| 938 TextEmphasisPosition getTextEmphasisPosition() const { return static_cast<Te xtEmphasisPosition>(m_rareInheritedData->textEmphasisPosition); } | |
| 939 const AtomicString& textEmphasisMarkString() const; | |
| 940 | |
| 941 RubyPosition getRubyPosition() const { return static_cast<RubyPosition>(m_ra reInheritedData->m_rubyPosition); } | |
| 942 | |
| 943 TextOrientation getTextOrientation() const { return static_cast<TextOrientat ion>(m_rareInheritedData->m_textOrientation); } | |
| 944 | |
| 945 ObjectFit getObjectFit() const { return static_cast<ObjectFit>(m_rareNonInhe ritedData->m_objectFit); } | |
| 946 LengthPoint objectPosition() const { return m_rareNonInheritedData->m_object Position; } | |
| 947 | |
| 948 // Return true if any transform related property (currently transform/motion Path, transformStyle3D, perspective, | |
| 949 // or will-change:transform) indicates that we are transforming. will-change :transform should result in | |
| 950 // the same rendering behavior as having a transform, including the creation of a containing block | |
| 951 // for fixed position descendants. | |
| 952 bool hasTransformRelatedProperty() const { return hasTransform() || preserve s3D() || hasPerspective() || hasWillChangeTransformHint(); } | |
| 953 | |
| 954 enum ApplyTransformOrigin { IncludeTransformOrigin, ExcludeTransformOrigin } ; | |
| 955 enum ApplyMotionPath { IncludeMotionPath, ExcludeMotionPath }; | |
| 956 enum ApplyIndependentTransformProperties { IncludeIndependentTransformProper ties , ExcludeIndependentTransformProperties }; | |
| 957 void applyTransform(TransformationMatrix&, const LayoutSize& borderBoxSize, ApplyTransformOrigin, ApplyMotionPath, ApplyIndependentTransformProperties) cons t; | |
| 958 void applyTransform(TransformationMatrix&, const FloatRect& boundingBox, App lyTransformOrigin, ApplyMotionPath, ApplyIndependentTransformProperties) const; | |
| 959 bool hasMask() const { return m_rareNonInheritedData->m_mask.hasImage() || m _rareNonInheritedData->m_maskBoxImage.hasImage(); } | |
| 960 | |
| 961 TextCombine getTextCombine() const { return static_cast<TextCombine>(m_rareI nheritedData->m_textCombine); } | |
| 962 bool hasTextCombine() const { return getTextCombine() != TextCombineNone; } | |
| 963 | |
| 964 uint8_t snapHeightPosition() const { return m_rareInheritedData->m_snapHeigh tPosition; } | |
| 965 uint8_t snapHeightUnit() const { return m_rareInheritedData->m_snapHeightUni t; } | |
| 966 | |
| 967 TabSize getTabSize() const { return m_rareInheritedData->m_tabSize; } | |
| 968 | |
| 969 RespectImageOrientationEnum respectImageOrientation() const { return static_ cast<RespectImageOrientationEnum>(m_rareInheritedData->m_respectImageOrientation ); } | |
| 970 | |
| 971 // End CSS3 Getters | |
| 972 | |
| 973 // Apple-specific property getter methods | |
| 974 EPointerEvents pointerEvents() const { return static_cast<EPointerEvents>(m_ inheritedData.m_pointerEvents); } | |
| 975 const CSSAnimationData* animations() const { return m_rareNonInheritedData-> m_animations.get(); } | |
| 976 const CSSTransitionData* transitions() const { return m_rareNonInheritedData ->m_transitions.get(); } | |
| 977 | |
| 978 CSSAnimationData& accessAnimations(); | |
| 979 CSSTransitionData& accessTransitions(); | |
| 980 | |
| 981 ETransformStyle3D transformStyle3D() const { return static_cast<ETransformSt yle3D>(m_rareNonInheritedData->m_transformStyle3D); } | |
| 982 ETransformStyle3D usedTransformStyle3D() const { return hasGroupingProperty( ) ? TransformStyle3DFlat : transformStyle3D(); } | |
| 983 bool preserves3D() const { return usedTransformStyle3D() != TransformStyle3D Flat; } | |
| 984 | |
| 985 EBackfaceVisibility backfaceVisibility() const { return static_cast<EBackfac eVisibility>(m_rareNonInheritedData->m_backfaceVisibility); } | |
| 986 float perspective() const { return m_rareNonInheritedData->m_perspective; } | |
| 987 bool hasPerspective() const { return m_rareNonInheritedData->m_perspective > 0; } | |
| 988 const LengthPoint& perspectiveOrigin() const { return m_rareNonInheritedData ->m_perspectiveOrigin; } | |
| 989 const Length& perspectiveOriginX() const { return perspectiveOrigin().x(); } | |
| 990 const Length& perspectiveOriginY() const { return perspectiveOrigin().y(); } | |
| 991 const FloatSize& pageSize() const { return m_rareNonInheritedData->m_pageSiz e; } | |
| 992 PageSizeType getPageSizeType() const { return static_cast<PageSizeType>(m_ra reNonInheritedData->m_pageSizeType); } | |
| 993 | |
| 994 bool hasCurrentOpacityAnimation() const { return m_rareNonInheritedData->m_h asCurrentOpacityAnimation; } | |
| 995 bool hasCurrentTransformAnimation() const { return m_rareNonInheritedData->m _hasCurrentTransformAnimation; } | |
| 996 bool hasCurrentFilterAnimation() const { return m_rareNonInheritedData->m_ha sCurrentFilterAnimation; } | |
| 997 bool hasCurrentBackdropFilterAnimation() const { return m_rareNonInheritedDa ta->m_hasCurrentBackdropFilterAnimation; } | |
| 998 bool shouldCompositeForCurrentAnimations() const { return hasCurrentOpacityA nimation() || hasCurrentTransformAnimation() || hasCurrentFilterAnimation() || h asCurrentBackdropFilterAnimation(); } | |
| 999 | |
| 1000 bool isRunningOpacityAnimationOnCompositor() const { return m_rareNonInherit edData->m_runningOpacityAnimationOnCompositor; } | |
| 1001 bool isRunningTransformAnimationOnCompositor() const { return m_rareNonInher itedData->m_runningTransformAnimationOnCompositor; } | |
| 1002 bool isRunningFilterAnimationOnCompositor() const { return m_rareNonInherite dData->m_runningFilterAnimationOnCompositor; } | |
| 1003 bool isRunningBackdropFilterAnimationOnCompositor() const { return m_rareNon InheritedData->m_runningBackdropFilterAnimationOnCompositor; } | |
| 1004 bool isRunningAnimationOnCompositor() const { return isRunningOpacityAnimati onOnCompositor() || isRunningTransformAnimationOnCompositor() || isRunningFilter AnimationOnCompositor() || isRunningBackdropFilterAnimationOnCompositor(); } | |
| 1005 | |
| 1006 const LineClampValue& lineClamp() const { return m_rareNonInheritedData->lin eClamp; } | |
| 1007 Color tapHighlightColor() const { return m_rareInheritedData->tapHighlightCo lor; } | |
| 1008 ETextSecurity textSecurity() const { return static_cast<ETextSecurity>(m_rar eInheritedData->textSecurity); } | |
| 1009 | |
| 1010 WritingMode getWritingMode() const { return static_cast<WritingMode>(m_inher itedData.m_writingMode); } | |
| 1011 bool isHorizontalWritingMode() const { return blink::isHorizontalWritingMode (getWritingMode()); } | |
| 1012 bool isFlippedLinesWritingMode() const { return blink::isFlippedLinesWriting Mode(getWritingMode()); } | |
| 1013 bool isFlippedBlocksWritingMode() const { return blink::isFlippedBlocksWriti ngMode(getWritingMode()); } | |
| 1014 | |
| 1015 EImageRendering imageRendering() const { return static_cast<EImageRendering> (m_rareInheritedData->m_imageRendering); } | |
| 1016 | |
| 1017 ESpeak speak() const { return static_cast<ESpeak>(m_rareInheritedData->speak ); } | |
| 1018 | |
| 1019 FilterOperations& mutableFilter() { return m_rareNonInheritedData.access()-> m_filter.access()->m_operations; } | |
| 1020 const FilterOperations& filter() const { return m_rareNonInheritedData->m_fi lter->m_operations; } | |
| 1021 bool hasFilter() const { return !m_rareNonInheritedData->m_filter->m_operati ons.operations().isEmpty(); } | |
| 1022 | |
| 1023 FilterOperations& mutableBackdropFilter() { return m_rareNonInheritedData.ac cess()->m_backdropFilter.access()->m_operations; } | |
| 1024 const FilterOperations& backdropFilter() const { return m_rareNonInheritedDa ta->m_backdropFilter->m_operations; } | |
| 1025 bool hasBackdropFilter() const { return !m_rareNonInheritedData->m_backdropF ilter->m_operations.operations().isEmpty(); } | |
| 1026 | |
| 1027 WebBlendMode blendMode() const { return static_cast<WebBlendMode>(m_rareNonI nheritedData->m_effectiveBlendMode); } | |
| 1028 void setBlendMode(WebBlendMode v) { m_rareNonInheritedData.access()->m_effec tiveBlendMode = v; } | |
| 1029 bool hasBlendMode() const { return blendMode() != WebBlendModeNormal; } | |
| 1030 | |
| 1031 EIsolation isolation() const { return static_cast<EIsolation>(m_rareNonInher itedData->m_isolation); } | |
| 1032 void setIsolation(EIsolation v) { m_rareNonInheritedData.access()->m_isolati on = v; } | |
| 1033 bool hasIsolation() const { return isolation() != IsolationAuto; } | |
| 1034 | |
| 1035 bool shouldPlaceBlockDirectionScrollbarOnLogicalLeft() const { return !isLef tToRightDirection() && isHorizontalWritingMode(); } | |
| 1036 | |
| 1037 TouchAction getTouchAction() const { return static_cast<TouchAction>(m_rareN onInheritedData->m_touchAction); } | |
| 1038 | |
| 1039 ScrollBehavior getScrollBehavior() const { return static_cast<ScrollBehavior >(m_rareNonInheritedData->m_scrollBehavior); } | |
| 1040 | |
| 1041 ScrollSnapType getScrollSnapType() const { return static_cast<ScrollSnapType >(m_rareNonInheritedData->m_scrollSnapType); } | |
| 1042 const ScrollSnapPoints& scrollSnapPointsX() const { return m_rareNonInherite dData->m_scrollSnap->m_xPoints; } | |
| 1043 const ScrollSnapPoints& scrollSnapPointsY() const { return m_rareNonInherite dData->m_scrollSnap->m_yPoints; } | |
| 1044 const Vector<LengthPoint>& scrollSnapCoordinate() const { return m_rareNonIn heritedData->m_scrollSnap->m_coordinates; } | |
| 1045 const LengthPoint& scrollSnapDestination() const { return m_rareNonInherited Data->m_scrollSnap->m_destination; } | |
| 1046 | |
| 1047 const Vector<CSSPropertyID>& willChangeProperties() const { return m_rareNon InheritedData->m_willChange->m_properties; } | |
| 1048 bool willChangeContents() const { return m_rareNonInheritedData->m_willChang e->m_contents; } | |
| 1049 bool willChangeScrollPosition() const { return m_rareNonInheritedData->m_wil lChange->m_scrollPosition; } | |
| 1050 bool hasWillChangeCompositingHint() const; | |
| 1051 bool hasWillChangeOpacityHint() const { return willChangeProperties().contai ns(CSSPropertyOpacity); } | |
| 1052 bool hasWillChangeTransformHint() const; | |
| 1053 bool subtreeWillChangeContents() const { return m_rareInheritedData->m_subtr eeWillChangeContents; } | |
| 1054 | |
| 1055 // attribute setter methods | |
| 1056 | |
| 1057 void setDisplay(EDisplay v) { m_nonInheritedData.m_effectiveDisplay = v; } | |
| 1058 void setOriginalDisplay(EDisplay v) { m_nonInheritedData.m_originalDisplay = v; } | |
| 1059 void setPosition(EPosition v) { m_nonInheritedData.m_position = v; } | |
| 1060 void setFloating(EFloat v) { m_nonInheritedData.m_floating = v; } | |
| 1061 | |
| 1062 void setLeft(const Length& v) { SET_VAR(m_surround, offset.m_left, v); } | |
| 1063 void setRight(const Length& v) { SET_VAR(m_surround, offset.m_right, v); } | |
| 1064 void setTop(const Length& v) { SET_VAR(m_surround, offset.m_top, v); } | |
| 1065 void setBottom(const Length& v) { SET_VAR(m_surround, offset.m_bottom, v); } | |
| 1066 | |
| 1067 void setWidth(const Length& v) { SET_VAR(m_box, m_width, v); } | |
| 1068 void setHeight(const Length& v) { SET_VAR(m_box, m_height, v); } | |
| 1069 | |
| 1070 void setLogicalWidth(const Length& v) | |
| 1071 { | |
| 1072 if (isHorizontalWritingMode()) { | |
| 1073 SET_VAR(m_box, m_width, v); | |
| 1074 } else { | |
| 1075 SET_VAR(m_box, m_height, v); | |
| 1076 } | |
| 1077 } | |
| 1078 | |
| 1079 void setLogicalHeight(const Length& v) | |
| 1080 { | |
| 1081 if (isHorizontalWritingMode()) { | |
| 1082 SET_VAR(m_box, m_height, v); | |
| 1083 } else { | |
| 1084 SET_VAR(m_box, m_width, v); | |
| 1085 } | |
| 1086 } | |
| 1087 | |
| 1088 void setMinWidth(const Length& v) { SET_VAR(m_box, m_minWidth, v); } | |
| 1089 void setMaxWidth(const Length& v) { SET_VAR(m_box, m_maxWidth, v); } | |
| 1090 void setMinHeight(const Length& v) { SET_VAR(m_box, m_minHeight, v); } | |
| 1091 void setMaxHeight(const Length& v) { SET_VAR(m_box, m_maxHeight, v); } | |
| 1092 | |
| 1093 DraggableRegionMode getDraggableRegionMode() const { return m_rareNonInherit edData->m_draggableRegionMode; } | |
| 1094 void setDraggableRegionMode(DraggableRegionMode v) { SET_VAR(m_rareNonInheri tedData, m_draggableRegionMode, v); } | |
| 1095 | |
| 1096 void resetBorder() | |
| 1097 { | |
| 1098 resetBorderImage(); | |
| 1099 resetBorderTop(); | |
| 1100 resetBorderRight(); | |
| 1101 resetBorderBottom(); | |
| 1102 resetBorderLeft(); | |
| 1103 resetBorderTopLeftRadius(); | |
| 1104 resetBorderTopRightRadius(); | |
| 1105 resetBorderBottomLeftRadius(); | |
| 1106 resetBorderBottomRightRadius(); | |
| 1107 } | |
| 1108 void resetBorderTop() { SET_VAR(m_surround, border.m_top, BorderValue()); } | |
| 1109 void resetBorderRight() { SET_VAR(m_surround, border.m_right, BorderValue()) ; } | |
| 1110 void resetBorderBottom() { SET_VAR(m_surround, border.m_bottom, BorderValue( )); } | |
| 1111 void resetBorderLeft() { SET_VAR(m_surround, border.m_left, BorderValue()); } | |
| 1112 void resetBorderImage() { SET_VAR(m_surround, border.m_image, NinePieceImage ()); } | |
| 1113 void resetBorderTopLeftRadius() { SET_VAR(m_surround, border.m_topLeft, init ialBorderRadius()); } | |
| 1114 void resetBorderTopRightRadius() { SET_VAR(m_surround, border.m_topRight, in itialBorderRadius()); } | |
| 1115 void resetBorderBottomLeftRadius() { SET_VAR(m_surround, border.m_bottomLeft , initialBorderRadius()); } | |
| 1116 void resetBorderBottomRightRadius() { SET_VAR(m_surround, border.m_bottomRig ht, initialBorderRadius()); } | |
| 1117 | |
| 1118 void setBackgroundColor(const StyleColor& v) { SET_VAR(m_background, m_color , v); } | |
| 1119 | |
| 1120 void setBorderImage(const NinePieceImage& b) { SET_VAR(m_surround, border.m_ image, b); } | |
| 1121 void setBorderImageSource(StyleImage*); | |
| 1122 void setBorderImageSlices(const LengthBox&); | |
| 1123 void setBorderImageSlicesFill(bool); | |
| 1124 void setBorderImageWidth(const BorderImageLengthBox&); | |
| 1125 void setBorderImageOutset(const BorderImageLengthBox&); | |
| 1126 | |
| 1127 void setBorderTopLeftRadius(const LengthSize& s) { SET_VAR(m_surround, borde r.m_topLeft, s); } | |
| 1128 void setBorderTopRightRadius(const LengthSize& s) { SET_VAR(m_surround, bord er.m_topRight, s); } | |
| 1129 void setBorderBottomLeftRadius(const LengthSize& s) { SET_VAR(m_surround, bo rder.m_bottomLeft, s); } | |
| 1130 void setBorderBottomRightRadius(const LengthSize& s) { SET_VAR(m_surround, b order.m_bottomRight, s); } | |
| 1131 | |
| 1132 void setBorderRadius(const LengthSize& s) | |
| 1133 { | |
| 1134 setBorderTopLeftRadius(s); | |
| 1135 setBorderTopRightRadius(s); | |
| 1136 setBorderBottomLeftRadius(s); | |
| 1137 setBorderBottomRightRadius(s); | |
| 1138 } | |
| 1139 void setBorderRadius(const IntSize& s) | |
| 1140 { | |
| 1141 setBorderRadius(LengthSize(Length(s.width(), Fixed), Length(s.height(), Fixed))); | |
| 1142 } | |
| 1143 | |
| 1144 FloatRoundedRect getRoundedBorderFor(const LayoutRect& borderRect, bool incl udeLogicalLeftEdge = true, | |
| 1145 bool includeLogicalRightEdge = true) const; | |
| 1146 FloatRoundedRect getRoundedInnerBorderFor(const LayoutRect& borderRect, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const; | |
| 1147 | |
| 1148 FloatRoundedRect getRoundedInnerBorderFor(const LayoutRect& borderRect, | |
| 1149 const LayoutRectOutsets insets, bool includeLogicalLeftEdge, bool includ eLogicalRightEdge) const; | |
| 1150 | |
| 1151 void setBorderLeftWidth(unsigned v) { SET_VAR(m_surround, border.m_left.m_wi dth, v); } | |
| 1152 void setBorderLeftStyle(EBorderStyle v) { SET_VAR(m_surround, border.m_left. m_style, v); } | |
| 1153 void setBorderLeftColor(const StyleColor& v) { SET_BORDERVALUE_COLOR(m_surro und, border.m_left, v); } | |
| 1154 void setBorderRightWidth(unsigned v) { SET_VAR(m_surround, border.m_right.m_ width, v); } | |
| 1155 void setBorderRightStyle(EBorderStyle v) { SET_VAR(m_surround, border.m_righ t.m_style, v); } | |
| 1156 void setBorderRightColor(const StyleColor& v) { SET_BORDERVALUE_COLOR(m_surr ound, border.m_right, v); } | |
| 1157 void setBorderTopWidth(unsigned v) { SET_VAR(m_surround, border.m_top.m_widt h, v); } | |
| 1158 void setBorderTopStyle(EBorderStyle v) { SET_VAR(m_surround, border.m_top.m_ style, v); } | |
| 1159 void setBorderTopColor(const StyleColor& v) { SET_BORDERVALUE_COLOR(m_surrou nd, border.m_top, v); } | |
| 1160 void setBorderBottomWidth(unsigned v) { SET_VAR(m_surround, border.m_bottom. m_width, v); } | |
| 1161 void setBorderBottomStyle(EBorderStyle v) { SET_VAR(m_surround, border.m_bot tom.m_style, v); } | |
| 1162 void setBorderBottomColor(const StyleColor& v) { SET_BORDERVALUE_COLOR(m_sur round, border.m_bottom, v); } | |
| 1163 | |
| 1164 void setOutlineWidth(unsigned short v) { SET_VAR(m_background, m_outline.m_w idth, v); } | |
| 1165 void setOutlineStyleIsAuto(OutlineIsAuto isAuto) { SET_VAR(m_background, m_o utline.m_isAuto, isAuto); } | |
| 1166 void setOutlineStyle(EBorderStyle v) { SET_VAR(m_background, m_outline.m_sty le, v); } | |
| 1167 void setOutlineColor(const StyleColor& v) { SET_BORDERVALUE_COLOR(m_backgrou nd, m_outline, v); } | |
| 1168 bool isOutlineEquivalent(const ComputedStyle* otherStyle) const | |
| 1169 { | |
| 1170 // No other style, so we don't have an outline then we consider them to be the same. | |
| 1171 if (!otherStyle) | |
| 1172 return !hasOutline(); | |
| 1173 return m_background->outline().visuallyEqual(otherStyle->m_background->o utline()); | |
| 1174 } | |
| 1175 void setOutlineFromStyle(const ComputedStyle& o) | |
| 1176 { | |
| 1177 ASSERT(!isOutlineEquivalent(&o)); | |
| 1178 m_background.access()->m_outline = o.m_background->m_outline; | |
| 1179 } | |
| 1180 | |
| 1181 void setOverflowAnchor(EOverflowAnchor v) { m_nonInheritedData.m_overflowAnc hor = v; } | |
| 1182 void setOverflowX(EOverflow v) { m_nonInheritedData.m_overflowX = v; } | |
| 1183 void setOverflowY(EOverflow v) { m_nonInheritedData.m_overflowY = v; } | |
| 1184 void setVisibility(EVisibility v) { m_inheritedData.m_visibility = v; } | |
| 1185 void setVerticalAlign(EVerticalAlign v) { m_nonInheritedData.m_verticalAlign = v; } | |
| 1186 void setVerticalAlignLength(const Length& length) { setVerticalAlign(Vertica lAlignLength); SET_VAR(m_box, m_verticalAlign, length); } | |
| 1187 | |
| 1188 void setHasAutoClip() { SET_VAR(m_visual, hasAutoClip, true); SET_VAR(m_visu al, clip, ComputedStyle::initialClip()); } | |
| 1189 void setClip(const LengthBox& box) { SET_VAR(m_visual, hasAutoClip, false); SET_VAR(m_visual, clip, box); } | |
| 1190 | |
| 1191 void setUnicodeBidi(EUnicodeBidi b) { m_nonInheritedData.m_unicodeBidi = b; } | |
| 1192 | |
| 1193 void setClear(EClear v) { m_nonInheritedData.m_clear = v; } | |
| 1194 void setTableLayout(ETableLayout v) { m_nonInheritedData.m_tableLayout = v; } | |
| 1195 | |
| 1196 bool setFontDescription(const FontDescription&); | |
| 1197 void setFont(const Font&); | |
| 1198 | |
| 1199 void setTextAutosizingMultiplier(float); | |
| 1200 | |
| 1201 void setColor(const Color&); | |
| 1202 void setTextIndent(const Length& v) { SET_VAR(m_rareInheritedData, indent, v ); } | |
| 1203 void setTextIndentLine(TextIndentLine v) { SET_VAR(m_rareInheritedData, m_te xtIndentLine, v); } | |
| 1204 void setTextIndentType(TextIndentType v) { SET_VAR(m_rareInheritedData, m_te xtIndentType, v); } | |
| 1205 void setTextAlign(ETextAlign v) { m_inheritedData.m_textAlign = v; } | |
| 1206 void setTextAlignLast(TextAlignLast v) { SET_VAR(m_rareInheritedData, m_text AlignLast, v); } | |
| 1207 void setTextJustify(TextJustify v) { SET_VAR(m_rareInheritedData, m_textJust ify, v); } | |
| 1208 void setTextTransform(ETextTransform v) { m_inheritedData.m_textTransform = v; } | |
| 1209 void applyTextDecorations(); | |
| 1210 void clearAppliedTextDecorations(); | |
| 1211 void setTextDecoration(TextDecoration v) { SET_VAR(m_visual, textDecoration, v); } | |
| 1212 void setTextUnderlinePosition(TextUnderlinePosition v) { SET_VAR(m_rareInher itedData, m_textUnderlinePosition, v); } | |
| 1213 void setTextDecorationStyle(TextDecorationStyle v) { SET_VAR(m_rareNonInheri tedData, m_textDecorationStyle, v); } | |
| 1214 void setDirection(TextDirection v) { m_inheritedData.m_direction = v; } | |
| 1215 void setSelfOrAncestorHasDirAutoAttribute(bool v) { SET_VAR(m_rareInheritedD ata, m_selfOrAncestorHasDirAutoAttribute, v); } | |
| 1216 void setLineHeight(const Length& specifiedLineHeight); | |
| 1217 bool setZoom(float); | |
| 1218 bool setEffectiveZoom(float); | |
| 1219 void clearMultiCol(); | |
| 1220 | |
| 1221 void setImageRendering(EImageRendering v) { SET_VAR(m_rareInheritedData, m_i mageRendering, v); } | |
| 1222 | |
| 1223 void setWhiteSpace(EWhiteSpace v) { m_inheritedData.m_whiteSpace = v; } | |
| 1224 | |
| 1225 // FIXME: Remove these two and replace them with respective FontBuilder call s. | |
| 1226 void setWordSpacing(float); | |
| 1227 void setLetterSpacing(float); | |
| 1228 | |
| 1229 void adjustBackgroundLayers() | |
| 1230 { | |
| 1231 if (backgroundLayers().next()) { | |
| 1232 accessBackgroundLayers().cullEmptyLayers(); | |
| 1233 accessBackgroundLayers().fillUnsetProperties(); | |
| 1234 } | |
| 1235 } | |
| 1236 | |
| 1237 void adjustMaskLayers() | |
| 1238 { | |
| 1239 if (maskLayers().next()) { | |
| 1240 accessMaskLayers().cullEmptyLayers(); | |
| 1241 accessMaskLayers().fillUnsetProperties(); | |
| 1242 } | |
| 1243 } | |
| 1244 | |
| 1245 void setMaskBoxImage(const NinePieceImage& b) { SET_VAR(m_rareNonInheritedDa ta, m_maskBoxImage, b); } | |
| 1246 void setMaskBoxImageSource(StyleImage* v) { m_rareNonInheritedData.access()- >m_maskBoxImage.setImage(v); } | |
| 1247 void setMaskBoxImageSlices(const LengthBox& slices) | |
| 1248 { | |
| 1249 m_rareNonInheritedData.access()->m_maskBoxImage.setImageSlices(slices); | |
| 1250 } | |
| 1251 void setMaskBoxImageSlicesFill(bool fill) | |
| 1252 { | |
| 1253 m_rareNonInheritedData.access()->m_maskBoxImage.setFill(fill); | |
| 1254 } | |
| 1255 void setMaskBoxImageWidth(const BorderImageLengthBox& slices) | |
| 1256 { | |
| 1257 m_rareNonInheritedData.access()->m_maskBoxImage.setBorderSlices(slices); | |
| 1258 } | |
| 1259 void setMaskBoxImageOutset(const BorderImageLengthBox& outset) | |
| 1260 { | |
| 1261 m_rareNonInheritedData.access()->m_maskBoxImage.setOutset(outset); | |
| 1262 } | |
| 1263 | |
| 1264 void setBorderCollapse(EBorderCollapse collapse) { m_inheritedData.m_borderC ollapse = collapse; } | |
| 1265 void setHorizontalBorderSpacing(short); | |
| 1266 void setVerticalBorderSpacing(short); | |
| 1267 void setEmptyCells(EEmptyCells v) { m_inheritedData.m_emptyCells = v; } | |
| 1268 void setCaptionSide(ECaptionSide v) { m_inheritedData.m_captionSide = v; } | |
| 1269 | |
| 1270 void setListStyleType(EListStyleType v) { m_inheritedData.m_listStyleType = v; } | |
| 1271 void setListStyleImage(StyleImage*); | |
| 1272 void setListStylePosition(EListStylePosition v) { m_inheritedData.m_listStyl ePosition = v; } | |
| 1273 | |
| 1274 void setMarginTop(const Length& v) { SET_VAR(m_surround, margin.m_top, v); } | |
| 1275 void setMarginBottom(const Length& v) { SET_VAR(m_surround, margin.m_bottom, v); } | |
| 1276 void setMarginLeft(const Length& v) { SET_VAR(m_surround, margin.m_left, v); } | |
| 1277 void setMarginRight(const Length& v) { SET_VAR(m_surround, margin.m_right, v ); } | |
| 1278 void setMarginStart(const Length&); | |
| 1279 void setMarginEnd(const Length&); | |
| 1280 | |
| 1281 void resetPadding() { SET_VAR(m_surround, padding, LengthBox(Fixed)); } | |
| 1282 void setPaddingBox(const LengthBox& b) { SET_VAR(m_surround, padding, b); } | |
| 1283 void setPaddingTop(const Length& v) { SET_VAR(m_surround, padding.m_top, v); } | |
| 1284 void setPaddingBottom(const Length& v) { SET_VAR(m_surround, padding.m_botto m, v); } | |
| 1285 void setPaddingLeft(const Length& v) { SET_VAR(m_surround, padding.m_left, v ); } | |
| 1286 void setPaddingRight(const Length& v) { SET_VAR(m_surround, padding.m_right, v); } | |
| 1287 | |
| 1288 void setCursor(ECursor c) { m_inheritedData.m_cursorStyle = c; } | |
| 1289 void addCursor(StyleImage*, bool hotSpotSpecified, const IntPoint& hotSpot = IntPoint()); | |
| 1290 void setCursorList(CursorList*); | |
| 1291 void clearCursorList(); | |
| 1292 | |
| 1293 void setInsideLink(EInsideLink insideLink) { m_inheritedData.m_insideLink = insideLink; } | |
| 1294 void setIsLink(bool b) { m_nonInheritedData.m_isLink = b; } | |
| 1295 | |
| 1296 PrintColorAdjust getPrintColorAdjust() const { return static_cast<PrintColor Adjust>(m_inheritedData.m_printColorAdjust); } | |
| 1297 void setPrintColorAdjust(PrintColorAdjust value) { m_inheritedData.m_printCo lorAdjust = value; } | |
| 1298 | |
| 1299 // A stacking context is painted atomically and defines a stacking order, wh ereas | |
| 1300 // a containing stacking context defines in which order the stacking context s | |
| 1301 // below are painted. | |
| 1302 // See CSS 2.1, Appendix E (https://www.w3.org/TR/CSS21/zindex.html) for mor e details. | |
| 1303 bool isStackingContext() const { return m_rareNonInheritedData->m_isStacking Context; } | |
| 1304 | |
| 1305 void updateIsStackingContext(bool isDocumentElement, bool isInTopLayer); | |
| 1306 void setIsStackingContext(bool b) { SET_VAR(m_rareNonInheritedData, m_isStac kingContext, b); } | |
| 1307 | |
| 1308 // Stacking contexts and positioned elements[1] are stacked (sorted in negZO rderList | |
| 1309 // and posZOrderList) in their enclosing stacking contexts. | |
| 1310 // | |
| 1311 // [1] According to CSS2.1, Appendix E.2.8 (https://www.w3.org/TR/CSS21/zind ex.html), | |
| 1312 // positioned elements with 'z-index: auto' are "treated as if it created a new | |
| 1313 // stacking context" and z-ordered together with other elements with 'z-inde x: 0'. | |
| 1314 // The difference of them from normal stacking contexts is that they don't d etermine | |
| 1315 // the stacking of the elements underneath them. | |
| 1316 // (Note: There are also other elements treated as stacking context during p ainting, | |
| 1317 // but not managed in stacks. See ObjectPainter::paintAllPhasesAtomically(). ) | |
| 1318 bool isStacked() const { return isStackingContext() || position() != StaticP osition; } | |
| 1319 | |
| 1320 bool hasAutoZIndex() const { return m_box->hasAutoZIndex(); } | |
| 1321 void setHasAutoZIndex() { SET_VAR(m_box, m_hasAutoZIndex, true); SET_VAR(m_b ox, m_zIndex, 0); } | |
| 1322 int zIndex() const { return m_box->zIndex(); } | |
| 1323 void setZIndex(int v) { SET_VAR(m_box, m_hasAutoZIndex, false); SET_VAR(m_bo x, m_zIndex, v); } | |
| 1324 void setWidows(short w) { SET_VAR(m_rareInheritedData, widows, w); } | |
| 1325 void setOrphans(short o) { SET_VAR(m_rareInheritedData, orphans, o); } | |
| 1326 void setBreakAfter(EBreak b) { DCHECK_LE(b, BreakValueLastAllowedForBreakAft erAndBefore); m_nonInheritedData.m_breakAfter = b; } | |
| 1327 void setBreakBefore(EBreak b) { DCHECK_LE(b, BreakValueLastAllowedForBreakAf terAndBefore); m_nonInheritedData.m_breakBefore = b; } | |
| 1328 void setBreakInside(EBreak b) { DCHECK_LE(b, BreakValueLastAllowedForBreakIn side); m_nonInheritedData.m_breakInside = b; } | |
| 1329 | |
| 1330 void setTextSizeAdjust(TextSizeAdjust sizeAdjust) { SET_VAR(m_rareInheritedD ata, m_textSizeAdjust, sizeAdjust); } | |
| 1331 | |
| 1332 // CSS3 Setters | |
| 1333 void setOutlineOffset(int v) { SET_VAR(m_background, m_outline.m_offset, v); } | |
| 1334 void setTextShadow(PassRefPtr<ShadowList>); | |
| 1335 void setTextStrokeColor(const StyleColor& c) { SET_VAR_WITH_SETTER(m_rareInh eritedData, textStrokeColor, setTextStrokeColor, c); } | |
| 1336 void setTextStrokeWidth(float w) { SET_VAR(m_rareInheritedData, textStrokeWi dth, w); } | |
| 1337 void setTextFillColor(const StyleColor& c) { SET_VAR_WITH_SETTER(m_rareInher itedData, textFillColor, setTextFillColor, c); } | |
| 1338 void setOpacity(float f) { float v = clampTo<float>(f, 0, 1); SET_VAR(m_rare NonInheritedData, opacity, v); } | |
| 1339 void setAppearance(ControlPart a) { SET_VAR(m_rareNonInheritedData, m_appear ance, a); } | |
| 1340 // For valid values of box-align see http://www.w3.org/TR/2009/WD-css3-flexb ox-20090723/#alignment | |
| 1341 void setBoxAlign(EBoxAlignment a) { SET_NESTED_VAR(m_rareNonInheritedData, m _deprecatedFlexibleBox, align, a); } | |
| 1342 void setBoxDecorationBreak(EBoxDecorationBreak b) { SET_VAR(m_box, m_boxDeco rationBreak, b); } | |
| 1343 void setBoxDirection(EBoxDirection d) { m_inheritedData.m_boxDirection = d; } | |
| 1344 void setBoxFlex(float f) { SET_NESTED_VAR(m_rareNonInheritedData, m_deprecat edFlexibleBox, flex, f); } | |
| 1345 void setBoxFlexGroup(unsigned fg) { SET_NESTED_VAR(m_rareNonInheritedData, m _deprecatedFlexibleBox, flexGroup, fg); } | |
| 1346 void setBoxLines(EBoxLines lines) { SET_NESTED_VAR(m_rareNonInheritedData, m _deprecatedFlexibleBox, lines, lines); } | |
| 1347 void setBoxOrdinalGroup(unsigned og) { SET_NESTED_VAR(m_rareNonInheritedData , m_deprecatedFlexibleBox, ordinalGroup, og); } | |
| 1348 void setBoxOrient(EBoxOrient o) { SET_NESTED_VAR(m_rareNonInheritedData, m_d eprecatedFlexibleBox, orient, o); } | |
| 1349 void setBoxPack(EBoxPack p) { SET_NESTED_VAR(m_rareNonInheritedData, m_depre catedFlexibleBox, pack, p); } | |
| 1350 void setBoxShadow(PassRefPtr<ShadowList>); | |
| 1351 void setBoxReflect(PassRefPtr<StyleReflection> reflect) | |
| 1352 { | |
| 1353 if (m_rareNonInheritedData->m_boxReflect != reflect) | |
| 1354 m_rareNonInheritedData.access()->m_boxReflect = reflect; | |
| 1355 } | |
| 1356 void setBoxSizing(EBoxSizing s) { SET_VAR(m_box, m_boxSizing, s); } | |
| 1357 void setContain(Containment contain) { SET_VAR(m_rareNonInheritedData, m_con tain, contain); } | |
| 1358 void setFlexGrow(float f) { SET_NESTED_VAR(m_rareNonInheritedData, m_flexibl eBox, m_flexGrow, f); } | |
| 1359 void setFlexShrink(float f) { SET_NESTED_VAR(m_rareNonInheritedData, m_flexi bleBox, m_flexShrink, f); } | |
| 1360 void setFlexBasis(const Length& length) { SET_NESTED_VAR(m_rareNonInheritedD ata, m_flexibleBox, m_flexBasis, length); } | |
| 1361 // We restrict the smallest value to int min + 2 because we use int min and int min + 1 as special values in a hash set. | |
| 1362 void setOrder(int o) { SET_VAR(m_rareNonInheritedData, m_order, max(std::num eric_limits<int>::min() + 2, o)); } | |
| 1363 void addCallbackSelector(const String& selector); | |
| 1364 void setAlignContent(const StyleContentAlignmentData& data) { SET_VAR(m_rare NonInheritedData, m_alignContent, data); } | |
| 1365 void setAlignContentPosition(ContentPosition position) { m_rareNonInheritedD ata.access()->m_alignContent.setPosition(position); } | |
| 1366 void setAlignContentDistribution(ContentDistributionType distribution) { m_r areNonInheritedData.access()->m_alignContent.setDistribution(distribution); } | |
| 1367 void setAlignContentOverflow(OverflowAlignment overflow) { m_rareNonInherite dData.access()->m_alignContent.setOverflow(overflow); } | |
| 1368 void setAlignItems(const StyleSelfAlignmentData& data) { SET_VAR(m_rareNonIn heritedData, m_alignItems, data); } | |
| 1369 void setAlignItemsPosition(ItemPosition position) { m_rareNonInheritedData.a ccess()->m_alignItems.setPosition(position); } | |
| 1370 void setAlignItemsOverflow(OverflowAlignment overflow) { m_rareNonInheritedD ata.access()->m_alignItems.setOverflow(overflow); } | |
| 1371 void setAlignSelf(const StyleSelfAlignmentData& data) { SET_VAR(m_rareNonInh eritedData, m_alignSelf, data); } | |
| 1372 void setAlignSelfPosition(ItemPosition position) { m_rareNonInheritedData.ac cess()->m_alignSelf.setPosition(position); } | |
| 1373 void setAlignSelfOverflow(OverflowAlignment overflow) { m_rareNonInheritedDa ta.access()->m_alignSelf.setOverflow(overflow); } | |
| 1374 void setFlexDirection(EFlexDirection direction) { SET_NESTED_VAR(m_rareNonIn heritedData, m_flexibleBox, m_flexDirection, direction); } | |
| 1375 void setFlexWrap(EFlexWrap w) { SET_NESTED_VAR(m_rareNonInheritedData, m_fle xibleBox, m_flexWrap, w); } | |
| 1376 void setJustifyContent(const StyleContentAlignmentData& data) { SET_VAR(m_ra reNonInheritedData, m_justifyContent, data); } | |
| 1377 void setJustifyContentPosition(ContentPosition position) { m_rareNonInherite dData.access()->m_justifyContent.setPosition(position); } | |
| 1378 void setJustifyContentDistribution(ContentDistributionType distribution) { m _rareNonInheritedData.access()->m_justifyContent.setDistribution(distribution); } | |
| 1379 void setJustifyContentOverflow(OverflowAlignment overflow) { m_rareNonInheri tedData.access()->m_justifyContent.setOverflow(overflow); } | |
| 1380 void setJustifyItems(const StyleSelfAlignmentData& data) { SET_VAR(m_rareNon InheritedData, m_justifyItems, data); } | |
| 1381 void setJustifyItemsPosition(ItemPosition position) { m_rareNonInheritedData .access()->m_justifyItems.setPosition(position); } | |
| 1382 void setJustifyItemsOverflow(OverflowAlignment overflow) { m_rareNonInherite dData.access()->m_justifyItems.setOverflow(overflow); } | |
| 1383 void setJustifyItemsPositionType(ItemPositionType positionType) { m_rareNonI nheritedData.access()->m_justifyItems.setPositionType(positionType); } | |
| 1384 void setJustifySelf(const StyleSelfAlignmentData& data) { SET_VAR(m_rareNonI nheritedData, m_justifySelf, data); } | |
| 1385 void setJustifySelfPosition(ItemPosition position) { m_rareNonInheritedData. access()->m_justifySelf.setPosition(position); } | |
| 1386 void setJustifySelfOverflow(OverflowAlignment overflow) { m_rareNonInherited Data.access()->m_justifySelf.setOverflow(overflow); } | |
| 1387 void setGridAutoColumns(const Vector<GridTrackSize>& trackSizeList) { SET_NE STED_VAR(m_rareNonInheritedData, m_grid, m_gridAutoColumns, trackSizeList); } | |
| 1388 void setGridAutoRows(const Vector<GridTrackSize>& trackSizeList) { SET_NESTE D_VAR(m_rareNonInheritedData, m_grid, m_gridAutoRows, trackSizeList); } | |
| 1389 void setGridTemplateColumns(const Vector<GridTrackSize>& lengths) { SET_NEST ED_VAR(m_rareNonInheritedData, m_grid, m_gridTemplateColumns, lengths); } | |
| 1390 void setGridTemplateRows(const Vector<GridTrackSize>& lengths) { SET_NESTED_ VAR(m_rareNonInheritedData, m_grid, m_gridTemplateRows, lengths); } | |
| 1391 void setGridAutoRepeatColumns(const Vector<GridTrackSize>& trackSizes) { SET _NESTED_VAR(m_rareNonInheritedData, m_grid, m_gridAutoRepeatColumns, trackSizes) ; } | 1768 void setGridAutoRepeatColumns(const Vector<GridTrackSize>& trackSizes) { SET _NESTED_VAR(m_rareNonInheritedData, m_grid, m_gridAutoRepeatColumns, trackSizes) ; } |
| 1392 void setGridAutoRepeatRows(const Vector<GridTrackSize>& trackSizes) { SET_NE STED_VAR(m_rareNonInheritedData, m_grid, m_gridAutoRepeatRows, trackSizes); } | 1769 void setGridAutoRepeatRows(const Vector<GridTrackSize>& trackSizes) { SET_NE STED_VAR(m_rareNonInheritedData, m_grid, m_gridAutoRepeatRows, trackSizes); } |
| 1393 void setGridAutoRepeatColumnsInsertionPoint(const size_t insertionPoint) { S ET_NESTED_VAR(m_rareNonInheritedData, m_grid, m_autoRepeatColumnsInsertionPoint, insertionPoint); } | 1770 void setGridAutoRepeatColumnsInsertionPoint(const size_t insertionPoint) { S ET_NESTED_VAR(m_rareNonInheritedData, m_grid, m_autoRepeatColumnsInsertionPoint, insertionPoint); } |
| 1394 void setGridAutoRepeatRowsInsertionPoint(const size_t insertionPoint) { SET_ NESTED_VAR(m_rareNonInheritedData, m_grid, m_autoRepeatRowsInsertionPoint, inser tionPoint); } | 1771 void setGridAutoRepeatRowsInsertionPoint(const size_t insertionPoint) { SET_ NESTED_VAR(m_rareNonInheritedData, m_grid, m_autoRepeatRowsInsertionPoint, inser tionPoint); } |
| 1395 void setGridAutoRepeatColumnsType(const AutoRepeatType autoRepeatType) { SET _NESTED_VAR(m_rareNonInheritedData, m_grid, m_autoRepeatColumnsType, autoRepeatT ype); } | 1772 void setGridAutoRepeatColumnsType(const AutoRepeatType autoRepeatType) { SET _NESTED_VAR(m_rareNonInheritedData, m_grid, m_autoRepeatColumnsType, autoRepeatT ype); } |
| 1396 void setGridAutoRepeatRowsType(const AutoRepeatType autoRepeatType) { SET_NE STED_VAR(m_rareNonInheritedData, m_grid, m_autoRepeatRowsType, autoRepeatType); } | 1773 void setGridAutoRepeatRowsType(const AutoRepeatType autoRepeatType) { SET_NE STED_VAR(m_rareNonInheritedData, m_grid, m_autoRepeatRowsType, autoRepeatType); } |
| 1397 void setNamedGridColumnLines(const NamedGridLinesMap& namedGridColumnLines) { SET_NESTED_VAR(m_rareNonInheritedData, m_grid, m_namedGridColumnLines, namedGr idColumnLines); } | 1774 void setNamedGridColumnLines(const NamedGridLinesMap& namedGridColumnLines) { SET_NESTED_VAR(m_rareNonInheritedData, m_grid, m_namedGridColumnLines, namedGr idColumnLines); } |
| 1398 void setNamedGridRowLines(const NamedGridLinesMap& namedGridRowLines) { SET_ NESTED_VAR(m_rareNonInheritedData, m_grid, m_namedGridRowLines, namedGridRowLine s); } | 1775 void setNamedGridRowLines(const NamedGridLinesMap& namedGridRowLines) { SET_ NESTED_VAR(m_rareNonInheritedData, m_grid, m_namedGridRowLines, namedGridRowLine s); } |
| 1399 void setOrderedNamedGridColumnLines(const OrderedNamedGridLines& orderedName dGridColumnLines) { SET_NESTED_VAR(m_rareNonInheritedData, m_grid, m_orderedName dGridColumnLines, orderedNamedGridColumnLines); } | 1776 void setOrderedNamedGridColumnLines(const OrderedNamedGridLines& orderedName dGridColumnLines) { SET_NESTED_VAR(m_rareNonInheritedData, m_grid, m_orderedName dGridColumnLines, orderedNamedGridColumnLines); } |
| 1400 void setOrderedNamedGridRowLines(const OrderedNamedGridLines& orderedNamedGr idRowLines) { SET_NESTED_VAR(m_rareNonInheritedData, m_grid, m_orderedNamedGridR owLines, orderedNamedGridRowLines); } | 1777 void setOrderedNamedGridRowLines(const OrderedNamedGridLines& orderedNamedGr idRowLines) { SET_NESTED_VAR(m_rareNonInheritedData, m_grid, m_orderedNamedGridR owLines, orderedNamedGridRowLines); } |
| 1401 void setAutoRepeatNamedGridColumnLines(const NamedGridLinesMap& namedGridCol umnLines) { SET_NESTED_VAR(m_rareNonInheritedData, m_grid, m_autoRepeatNamedGrid ColumnLines, namedGridColumnLines); } | 1778 void setAutoRepeatNamedGridColumnLines(const NamedGridLinesMap& namedGridCol umnLines) { SET_NESTED_VAR(m_rareNonInheritedData, m_grid, m_autoRepeatNamedGrid ColumnLines, namedGridColumnLines); } |
| 1402 void setAutoRepeatNamedGridRowLines(const NamedGridLinesMap& namedGridRowLin es) { SET_NESTED_VAR(m_rareNonInheritedData, m_grid, m_autoRepeatNamedGridRowLin es, namedGridRowLines); } | 1779 void setAutoRepeatNamedGridRowLines(const NamedGridLinesMap& namedGridRowLin es) { SET_NESTED_VAR(m_rareNonInheritedData, m_grid, m_autoRepeatNamedGridRowLin es, namedGridRowLines); } |
| 1403 void setAutoRepeatOrderedNamedGridColumnLines(const OrderedNamedGridLines& o rderedNamedGridColumnLines) { SET_NESTED_VAR(m_rareNonInheritedData, m_grid, m_a utoRepeatOrderedNamedGridColumnLines, orderedNamedGridColumnLines); } | 1780 void setAutoRepeatOrderedNamedGridColumnLines(const OrderedNamedGridLines& o rderedNamedGridColumnLines) { SET_NESTED_VAR(m_rareNonInheritedData, m_grid, m_a utoRepeatOrderedNamedGridColumnLines, orderedNamedGridColumnLines); } |
| 1404 void setAutoRepeatOrderedNamedGridRowLines(const OrderedNamedGridLines& orde redNamedGridRowLines) { SET_NESTED_VAR(m_rareNonInheritedData, m_grid, m_autoRep eatOrderedNamedGridRowLines, orderedNamedGridRowLines); } | 1781 void setAutoRepeatOrderedNamedGridRowLines(const OrderedNamedGridLines& orde redNamedGridRowLines) { SET_NESTED_VAR(m_rareNonInheritedData, m_grid, m_autoRep eatOrderedNamedGridRowLines, orderedNamedGridRowLines); } |
| 1405 void setNamedGridArea(const NamedGridAreaMap& namedGridArea) { SET_NESTED_VA R(m_rareNonInheritedData, m_grid, m_namedGridArea, namedGridArea); } | 1782 void setNamedGridArea(const NamedGridAreaMap& namedGridArea) { SET_NESTED_VA R(m_rareNonInheritedData, m_grid, m_namedGridArea, namedGridArea); } |
| 1406 void setNamedGridAreaRowCount(size_t rowCount) { SET_NESTED_VAR(m_rareNonInh eritedData, m_grid, m_namedGridAreaRowCount, rowCount); } | 1783 void setNamedGridAreaRowCount(size_t rowCount) { SET_NESTED_VAR(m_rareNonInh eritedData, m_grid, m_namedGridAreaRowCount, rowCount); } |
| 1407 void setNamedGridAreaColumnCount(size_t columnCount) { SET_NESTED_VAR(m_rare NonInheritedData, m_grid, m_namedGridAreaColumnCount, columnCount); } | 1784 void setNamedGridAreaColumnCount(size_t columnCount) { SET_NESTED_VAR(m_rare NonInheritedData, m_grid, m_namedGridAreaColumnCount, columnCount); } |
| 1408 void setGridAutoFlow(GridAutoFlow flow) { SET_NESTED_VAR(m_rareNonInheritedD ata, m_grid, m_gridAutoFlow, flow); } | 1785 |
| 1409 | 1786 // Justify-self utility functions. |
| 1410 void setGridColumnStart(const GridPosition& columnStartPosition) { SET_NESTE D_VAR(m_rareNonInheritedData, m_gridItem, m_gridColumnStart, columnStartPosition ); } | 1787 ItemPosition justifySelfPosition() const { return m_rareNonInheritedData->m_ justifySelf.position(); } |
| 1411 void setGridColumnEnd(const GridPosition& columnEndPosition) { SET_NESTED_VA R(m_rareNonInheritedData, m_gridItem, m_gridColumnEnd, columnEndPosition); } | 1788 OverflowAlignment justifySelfOverflowAlignment() const { return m_rareNonInh eritedData->m_justifySelf.overflow(); } |
| 1412 void setGridRowStart(const GridPosition& rowStartPosition) { SET_NESTED_VAR( m_rareNonInheritedData, m_gridItem, m_gridRowStart, rowStartPosition); } | 1789 void setJustifySelfPosition(ItemPosition position) { m_rareNonInheritedData. access()->m_justifySelf.setPosition(position); } |
| 1413 void setGridRowEnd(const GridPosition& rowEndPosition) { SET_NESTED_VAR(m_ra reNonInheritedData, m_gridItem, m_gridRowEnd, rowEndPosition); } | 1790 void setJustifySelfOverflow(OverflowAlignment overflow) { m_rareNonInherited Data.access()->m_justifySelf.setOverflow(overflow); } |
| 1414 void setGridColumnGap(const Length& v) { SET_NESTED_VAR(m_rareNonInheritedDa ta, m_grid, m_gridColumnGap, v); } | 1791 |
| 1415 void setGridRowGap(const Length& v) { SET_NESTED_VAR(m_rareNonInheritedData, m_grid, m_gridRowGap, v); } | 1792 // Justify-items utility functions. |
| 1416 | 1793 ItemPosition justifyItemsPosition() const { return m_rareNonInheritedData->m _justifyItems.position(); } |
| 1417 void setUserModify(EUserModify u) { SET_VAR(m_rareInheritedData, userModify, u); } | 1794 OverflowAlignment justifyItemsOverflowAlignment() const { return m_rareNonIn heritedData->m_justifyItems.overflow(); } |
| 1418 void setUserDrag(EUserDrag d) { SET_VAR(m_rareNonInheritedData, userDrag, d) ; } | 1795 ItemPositionType justifyItemsPositionType() const { return m_rareNonInherite dData->m_justifyItems.positionType(); } |
| 1419 void setUserSelect(EUserSelect s) { SET_VAR(m_rareInheritedData, userSelect, s); } | 1796 void setJustifyItemsPosition(ItemPosition position) { m_rareNonInheritedData .access()->m_justifyItems.setPosition(position); } |
| 1420 void setTextOverflow(TextOverflow overflow) { SET_VAR(m_rareNonInheritedData , textOverflow, overflow); } | 1797 void setJustifyItemsOverflow(OverflowAlignment overflow) { m_rareNonInherite dData.access()->m_justifyItems.setOverflow(overflow); } |
| 1421 void setMarginBeforeCollapse(EMarginCollapse c) { SET_VAR(m_rareNonInherited Data, marginBeforeCollapse, c); } | 1798 void setJustifyItemsPositionType(ItemPositionType positionType) { m_rareNonI nheritedData.access()->m_justifyItems.setPositionType(positionType); } |
| 1422 void setMarginAfterCollapse(EMarginCollapse c) { SET_VAR(m_rareNonInheritedD ata, marginAfterCollapse, c); } | 1799 |
| 1423 void setWordBreak(EWordBreak b) { SET_VAR(m_rareInheritedData, wordBreak, b) ; } | 1800 // Writing mode utility functions. |
| 1424 void setOverflowWrap(EOverflowWrap b) { SET_VAR(m_rareInheritedData, overflo wWrap, b); } | 1801 bool isHorizontalWritingMode() const { return blink::isHorizontalWritingMode (getWritingMode()); } |
| 1425 void setLineBreak(LineBreak b) { SET_VAR(m_rareInheritedData, lineBreak, b); } | 1802 bool isFlippedLinesWritingMode() const { return blink::isFlippedLinesWriting Mode(getWritingMode()); } |
| 1426 void setHighlight(const AtomicString& h) { SET_VAR(m_rareInheritedData, high light, h); } | 1803 bool isFlippedBlocksWritingMode() const { return blink::isFlippedBlocksWriti ngMode(getWritingMode()); } |
| 1427 void setHyphens(Hyphens h) { SET_VAR(m_rareInheritedData, hyphens, h); } | 1804 |
| 1428 void setHyphenationString(const AtomicString& h) { SET_VAR(m_rareInheritedDa ta, hyphenationString, h); } | 1805 // Will-change utility functions. |
| 1429 void setResize(EResize r) { SET_VAR(m_rareNonInheritedData, m_resize, r); } | 1806 bool hasWillChangeCompositingHint() const; |
| 1430 void setColumnWidth(float f) { SET_NESTED_VAR(m_rareNonInheritedData, m_mult iCol, m_autoWidth, false); SET_NESTED_VAR(m_rareNonInheritedData, m_multiCol, m_ width, f); } | 1807 bool hasWillChangeOpacityHint() const { return willChangeProperties().contai ns(CSSPropertyOpacity); } |
| 1431 void setHasAutoColumnWidth() { SET_NESTED_VAR(m_rareNonInheritedData, m_mult iCol, m_autoWidth, true); SET_NESTED_VAR(m_rareNonInheritedData, m_multiCol, m_w idth, 0); } | 1808 bool hasWillChangeTransformHint() const; |
| 1432 void setColumnCount(unsigned short c) { SET_NESTED_VAR(m_rareNonInheritedDat a, m_multiCol, m_autoCount, false); SET_NESTED_VAR(m_rareNonInheritedData, m_mul tiCol, m_count, c); } | 1809 |
| 1433 void setHasAutoColumnCount() { SET_NESTED_VAR(m_rareNonInheritedData, m_mult iCol, m_autoCount, true); SET_NESTED_VAR(m_rareNonInheritedData, m_multiCol, m_c ount, initialColumnCount()); } | 1810 // Hyphen utility functions. |
| 1434 void setColumnFill(ColumnFill columnFill) { SET_NESTED_VAR(m_rareNonInherite dData, m_multiCol, m_fill, columnFill); } | 1811 const AtomicString& hyphenString() const; |
| 1435 void setColumnGap(float f) { SET_NESTED_VAR(m_rareNonInheritedData, m_multiC ol, m_normalGap, false); SET_NESTED_VAR(m_rareNonInheritedData, m_multiCol, m_ga p, f); } | 1812 |
| 1436 void setHasNormalColumnGap() { SET_NESTED_VAR(m_rareNonInheritedData, m_mult iCol, m_normalGap, true); SET_NESTED_VAR(m_rareNonInheritedData, m_multiCol, m_g ap, 0); } | 1813 // Line-height utility functions. |
| 1437 void setColumnRuleColor(const StyleColor& c) { SET_BORDERVALUE_COLOR(m_rareN onInheritedData.access()->m_multiCol, m_rule, c); } | 1814 const Length& specifiedLineHeight() const; |
| 1438 void setColumnRuleStyle(EBorderStyle b) { SET_NESTED_VAR(m_rareNonInheritedD ata, m_multiCol, m_rule.m_style, b); } | 1815 int computedLineHeight() const; |
| 1439 void setColumnRuleWidth(unsigned short w) { SET_NESTED_VAR(m_rareNonInherite dData, m_multiCol, m_rule.m_width, w); } | 1816 |
| 1440 void setColumnSpan(ColumnSpan columnSpan) { SET_NESTED_VAR(m_rareNonInherite dData, m_multiCol, m_columnSpan, columnSpan); } | 1817 // Width/height utility functions. |
| 1441 void inheritColumnPropertiesFrom(const ComputedStyle& parent) { m_rareNonInh eritedData.access()->m_multiCol = parent.m_rareNonInheritedData->m_multiCol; } | 1818 const Length& logicalWidth() const { return isHorizontalWritingMode() ? widt h() : height(); } |
| 1442 void setHasInlineTransform(bool b) { SET_VAR(m_rareNonInheritedData, m_hasIn lineTransform, b); } | 1819 const Length& logicalHeight() const { return isHorizontalWritingMode() ? hei ght() : width(); } |
| 1443 void setHasCompositorProxy(bool b) { SET_VAR(m_rareNonInheritedData, m_hasCo mpositorProxy, b); } | 1820 void setLogicalWidth(const Length& v) |
| 1444 void setTransform(const TransformOperations& ops) { SET_NESTED_VAR(m_rareNon InheritedData, m_transform, m_operations, ops); } | 1821 { |
| 1445 void setTransformOriginX(const Length& v) { setTransformOrigin(TransformOrig in(v, transformOriginY(), transformOriginZ())); } | 1822 if (isHorizontalWritingMode()) { |
| 1446 void setTransformOriginY(const Length& v) { setTransformOrigin(TransformOrig in(transformOriginX(), v, transformOriginZ())); } | 1823 SET_VAR(m_box, m_width, v); |
| 1447 void setTransformOriginZ(float f) { setTransformOrigin(TransformOrigin(trans formOriginX(), transformOriginY(), f)); } | 1824 } else { |
| 1448 void setTransformOrigin(const TransformOrigin& o) { SET_NESTED_VAR(m_rareNon InheritedData, m_transform, m_origin, o); } | 1825 SET_VAR(m_box, m_height, v); |
| 1449 void setTranslate(PassRefPtr<TranslateTransformOperation> v) { m_rareNonInhe ritedData.access()->m_transform.access()->m_translate = v; } | 1826 } |
| 1450 void setRotate(PassRefPtr<RotateTransformOperation> v) { m_rareNonInheritedD ata.access()->m_transform.access()->m_rotate = v; } | 1827 } |
| 1451 void setScale(PassRefPtr<ScaleTransformOperation> v) { m_rareNonInheritedDat a.access()->m_transform.access()->m_scale = v; } | 1828 |
| 1452 | 1829 void setLogicalHeight(const Length& v) |
| 1453 void setSpeak(ESpeak s) { SET_VAR(m_rareInheritedData, speak, s); } | 1830 { |
| 1454 void setTextCombine(TextCombine v) { SET_VAR(m_rareInheritedData, m_textComb ine, v); } | 1831 if (isHorizontalWritingMode()) { |
| 1455 void setTextDecorationColor(const StyleColor& c) { SET_VAR(m_rareNonInherite dData, m_textDecorationColor, c); } | 1832 SET_VAR(m_box, m_height, v); |
| 1456 void setTextEmphasisColor(const StyleColor& c) { SET_VAR_WITH_SETTER(m_rareI nheritedData, textEmphasisColor, setTextEmphasisColor, c); } | 1833 } else { |
| 1457 void setTextEmphasisFill(TextEmphasisFill fill) { SET_VAR(m_rareInheritedDat a, textEmphasisFill, fill); } | 1834 SET_VAR(m_box, m_width, v); |
| 1458 void setTextEmphasisMark(TextEmphasisMark mark) { SET_VAR(m_rareInheritedDat a, textEmphasisMark, mark); } | 1835 } |
| 1459 void setTextEmphasisCustomMark(const AtomicString& mark) { SET_VAR(m_rareInh eritedData, textEmphasisCustomMark, mark); } | 1836 } |
| 1460 void setTextEmphasisPosition(TextEmphasisPosition position) { SET_VAR(m_rare InheritedData, textEmphasisPosition, position); } | 1837 const Length& logicalMaxWidth() const { return isHorizontalWritingMode() ? m axWidth() : maxHeight(); } |
| 1461 bool setTextOrientation(TextOrientation); | 1838 const Length& logicalMaxHeight() const { return isHorizontalWritingMode() ? maxHeight() : maxWidth(); } |
| 1462 | 1839 const Length& logicalMinWidth() const { return isHorizontalWritingMode() ? m inWidth() : minHeight(); } |
| 1463 void setMotionPath(PassRefPtr<StylePath>); | 1840 const Length& logicalMinHeight() const { return isHorizontalWritingMode() ? minHeight() : minWidth(); } |
| 1464 void setMotionOffset(const Length& motionOffset) { SET_NESTED_VAR(m_rareNonI nheritedData, m_transform, m_motion.m_offset, motionOffset); } | 1841 |
| 1465 void setMotionRotation(const StyleMotionRotation& motionRotation) { SET_NEST ED_VAR(m_rareNonInheritedData, m_transform, m_motion.m_rotation, motionRotation) ; } | 1842 // Margin utility functions. |
| 1466 | 1843 bool hasMargin() const { return m_surround->margin.nonZero(); } |
| 1467 void setObjectFit(ObjectFit f) { SET_VAR(m_rareNonInheritedData, m_objectFit , f); } | 1844 bool hasMarginBeforeQuirk() const { return marginBefore().quirk(); } |
| 1468 void setObjectPosition(LengthPoint position) { SET_VAR(m_rareNonInheritedDat a, m_objectPosition, position); } | 1845 bool hasMarginAfterQuirk() const { return marginAfter().quirk(); } |
| 1469 | 1846 const Length& marginBefore() const { return m_surround->margin.before(getWri tingMode()); } |
| 1470 void setRubyPosition(RubyPosition position) { SET_VAR(m_rareInheritedData, m _rubyPosition, position); } | 1847 const Length& marginAfter() const { return m_surround->margin.after(getWriti ngMode()); } |
| 1471 | 1848 const Length& marginStart() const { return m_surround->margin.start(getWriti ngMode(), direction()); } |
| 1472 void setFilter(const FilterOperations& ops) { SET_NESTED_VAR(m_rareNonInheri tedData, m_filter, m_operations, ops); } | 1849 const Length& marginEnd() const { return m_surround->margin.end(getWritingMo de(), direction()); } |
| 1473 void setBackdropFilter(const FilterOperations& ops) { SET_NESTED_VAR(m_rareN onInheritedData, m_backdropFilter, m_operations, ops); } | 1850 const Length& marginOver() const { return m_surround->margin.over(getWriting Mode()); } |
| 1474 | 1851 const Length& marginUnder() const { return m_surround->margin.under(getWriti ngMode()); } |
| 1475 void setSnapHeightPosition(uint8_t position) { SET_VAR(m_rareInheritedData, m_snapHeightPosition, position); } | 1852 const Length& marginStartUsing(const ComputedStyle* otherStyle) const { retu rn m_surround->margin.start(otherStyle->getWritingMode(), otherStyle->direction( )); } |
| 1476 void setSnapHeightUnit(uint8_t unit) { SET_VAR(m_rareInheritedData, m_snapHe ightUnit, unit); } | 1853 const Length& marginEndUsing(const ComputedStyle* otherStyle) const { return m_surround->margin.end(otherStyle->getWritingMode(), otherStyle->direction()); } |
| 1477 | 1854 const Length& marginBeforeUsing(const ComputedStyle* otherStyle) const { ret urn m_surround->margin.before(otherStyle->getWritingMode()); } |
| 1478 void setTabSize(TabSize size) { SET_VAR(m_rareInheritedData, m_tabSize, size ); } | 1855 const Length& marginAfterUsing(const ComputedStyle* otherStyle) const { retu rn m_surround->margin.after(otherStyle->getWritingMode()); } |
| 1479 | 1856 void setMarginStart(const Length&); |
| 1480 void setRespectImageOrientation(RespectImageOrientationEnum v) { SET_VAR(m_r areInheritedData, m_respectImageOrientation, v); } | 1857 void setMarginEnd(const Length&); |
| 1481 | 1858 |
| 1482 // End CSS3 Setters | 1859 // Padding utility functions. |
| 1483 | 1860 const LengthBox& paddingBox() const { return m_surround->padding; } |
| 1484 void setWrapFlow(WrapFlow wrapFlow) { SET_VAR(m_rareNonInheritedData, m_wrap Flow, wrapFlow); } | 1861 const Length& paddingBefore() const { return m_surround->padding.before(getW ritingMode()); } |
| 1485 void setWrapThrough(WrapThrough wrapThrough) { SET_VAR(m_rareNonInheritedDat a, m_wrapThrough, wrapThrough); } | 1862 const Length& paddingAfter() const { return m_surround->padding.after(getWri tingMode()); } |
| 1486 | 1863 const Length& paddingStart() const { return m_surround->padding.start(getWri tingMode(), direction()); } |
| 1487 // Apple-specific property setters | 1864 const Length& paddingEnd() const { return m_surround->padding.end(getWriting Mode(), direction()); } |
| 1488 void setPointerEvents(EPointerEvents p) { m_inheritedData.m_pointerEvents = p; } | 1865 const Length& paddingOver() const { return m_surround->padding.over(getWriti ngMode()); } |
| 1489 | 1866 const Length& paddingUnder() const { return m_surround->padding.under(getWri tingMode()); } |
| 1490 void setTransformStyle3D(ETransformStyle3D b) { SET_VAR(m_rareNonInheritedDa ta, m_transformStyle3D, b); } | 1867 bool hasPadding() const { return m_surround->padding.nonZero(); } |
| 1491 void setBackfaceVisibility(EBackfaceVisibility b) { SET_VAR(m_rareNonInherit edData, m_backfaceVisibility, b); } | 1868 void resetPadding() { SET_VAR(m_surround, padding, LengthBox(Fixed)); } |
| 1492 void setPerspective(float p) { SET_VAR(m_rareNonInheritedData, m_perspective , p); } | 1869 void setPaddingBox(const LengthBox& b) { SET_VAR(m_surround, padding, b); } |
| 1493 void setPerspectiveOriginX(const Length& v) { setPerspectiveOrigin(LengthPoi nt(v, perspectiveOriginY())); } | 1870 |
| 1494 void setPerspectiveOriginY(const Length& v) { setPerspectiveOrigin(LengthPoi nt(perspectiveOriginX(), v)); } | 1871 // Border utility functions |
| 1495 void setPerspectiveOrigin(const LengthPoint& p) { SET_VAR(m_rareNonInherited Data, m_perspectiveOrigin, p); } | 1872 LayoutRectOutsets imageOutsets(const NinePieceImage&) const; |
| 1496 void setPageSize(const FloatSize& s) { SET_VAR(m_rareNonInheritedData, m_pag eSize, s); } | 1873 bool hasBorderImageOutsets() const |
| 1497 void setPageSizeType(PageSizeType t) { SET_VAR(m_rareNonInheritedData, m_pag eSizeType, t); } | 1874 { |
| 1875 return borderImage().hasImage() && borderImage().outset().nonZero(); | |
| 1876 } | |
| 1877 LayoutRectOutsets borderImageOutsets() const | |
| 1878 { | |
| 1879 return imageOutsets(borderImage()); | |
| 1880 } | |
| 1881 bool borderImageSlicesFill() const { return m_surround->border.image().fill( ); } | |
| 1882 | |
| 1883 void setBorderImageSlicesFill(bool); | |
| 1884 const BorderData& border() const { return m_surround->border; } | |
| 1885 const BorderValue& borderLeft() const { return m_surround->border.left(); } | |
| 1886 const BorderValue& borderRight() const { return m_surround->border.right(); } | |
| 1887 const BorderValue& borderTop() const { return m_surround->border.top(); } | |
| 1888 const BorderValue& borderBottom() const { return m_surround->border.bottom() ; } | |
| 1889 const BorderValue& borderBefore() const; | |
| 1890 const BorderValue& borderAfter() const; | |
| 1891 const BorderValue& borderStart() const; | |
| 1892 const BorderValue& borderEnd() const; | |
| 1893 int borderAfterWidth() const; | |
| 1894 int borderBeforeWidth() const; | |
| 1895 int borderEndWidth() const; | |
| 1896 int borderStartWidth() const; | |
| 1897 int borderOverWidth() const; | |
| 1898 int borderUnderWidth() const; | |
| 1899 | |
| 1900 bool hasBorderFill() const { return m_surround->border.hasBorderFill(); } | |
| 1901 bool hasBorder() const { return m_surround->border.hasBorder(); } | |
| 1902 bool hasBorderDecoration() const { return hasBorder() || hasBorderFill(); } | |
| 1903 bool hasBorderRadius() const { return m_surround->border.hasBorderRadius(); } | |
| 1904 | |
| 1905 void resetBorder() | |
| 1906 { | |
| 1907 resetBorderImage(); | |
| 1908 resetBorderTop(); | |
| 1909 resetBorderRight(); | |
| 1910 resetBorderBottom(); | |
| 1911 resetBorderLeft(); | |
| 1912 resetBorderTopLeftRadius(); | |
| 1913 resetBorderTopRightRadius(); | |
| 1914 resetBorderBottomLeftRadius(); | |
| 1915 resetBorderBottomRightRadius(); | |
| 1916 } | |
| 1917 void resetBorderTop() { SET_VAR(m_surround, border.m_top, BorderValue()); } | |
| 1918 void resetBorderRight() { SET_VAR(m_surround, border.m_right, BorderValue()) ; } | |
| 1919 void resetBorderBottom() { SET_VAR(m_surround, border.m_bottom, BorderValue( )); } | |
| 1920 void resetBorderLeft() { SET_VAR(m_surround, border.m_left, BorderValue()); } | |
| 1921 void resetBorderImage() { SET_VAR(m_surround, border.m_image, NinePieceImage ()); } | |
| 1922 void resetBorderTopLeftRadius() { SET_VAR(m_surround, border.m_topLeft, init ialBorderRadius()); } | |
| 1923 void resetBorderTopRightRadius() { SET_VAR(m_surround, border.m_topRight, in itialBorderRadius()); } | |
| 1924 void resetBorderBottomLeftRadius() { SET_VAR(m_surround, border.m_bottomLeft , initialBorderRadius()); } | |
| 1925 void resetBorderBottomRightRadius() { SET_VAR(m_surround, border.m_bottomRig ht, initialBorderRadius()); } | |
| 1926 | |
| 1927 void setBorderRadius(const LengthSize& s) | |
| 1928 { | |
| 1929 setBorderTopLeftRadius(s); | |
| 1930 setBorderTopRightRadius(s); | |
| 1931 setBorderBottomLeftRadius(s); | |
| 1932 setBorderBottomRightRadius(s); | |
| 1933 } | |
| 1934 void setBorderRadius(const IntSize& s) | |
| 1935 { | |
| 1936 setBorderRadius(LengthSize(Length(s.width(), Fixed), Length(s.height(), Fixed))); | |
| 1937 } | |
| 1938 | |
| 1939 FloatRoundedRect getRoundedBorderFor(const LayoutRect& borderRect, bool incl udeLogicalLeftEdge = true, | |
| 1940 bool includeLogicalRightEdge = true) const; | |
| 1941 FloatRoundedRect getRoundedInnerBorderFor(const LayoutRect& borderRect, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const; | |
| 1942 FloatRoundedRect getRoundedInnerBorderFor(const LayoutRect& borderRect, | |
| 1943 const LayoutRectOutsets insets, bool includeLogicalLeftEdge, bool includ eLogicalRightEdge) const; | |
| 1944 | |
| 1945 // Float utility functions. | |
| 1946 bool isFloating() const { return m_nonInheritedData.m_floating != NoFloat; } | |
| 1947 | |
| 1948 // Mix-blend-mode utility functions. | |
| 1949 bool hasBlendMode() const { return blendMode() != WebBlendModeNormal; } | |
| 1950 | |
| 1951 // Motion utility functions. | |
| 1952 bool hasMotionPath() const { return motionPath(); } | |
| 1953 | |
| 1954 // Direction utility functions. | |
| 1955 bool isLeftToRightDirection() const { return direction() == LTR; } | |
| 1956 | |
| 1957 // Perspective utility functions. | |
| 1958 bool hasPerspective() const { return m_rareNonInheritedData->m_perspective > 0; } | |
| 1959 | |
| 1960 // Page size utility functions. | |
| 1498 void resetPageSizeType() { SET_VAR(m_rareNonInheritedData, m_pageSizeType, P AGE_SIZE_AUTO); } | 1961 void resetPageSizeType() { SET_VAR(m_rareNonInheritedData, m_pageSizeType, P AGE_SIZE_AUTO); } |
| 1499 | 1962 |
| 1500 void setHasCurrentOpacityAnimation(bool b = true) { SET_VAR(m_rareNonInherit edData, m_hasCurrentOpacityAnimation, b); } | 1963 // Outline utility functions. |
| 1501 void setHasCurrentTransformAnimation(bool b = true) { SET_VAR(m_rareNonInher itedData, m_hasCurrentTransformAnimation, b); } | 1964 bool hasOutline() const { return outlineWidth() > 0 && outlineStyle() > Bord erStyleHidden; } |
| 1502 void setHasCurrentFilterAnimation(bool b = true) { SET_VAR(m_rareNonInherite dData, m_hasCurrentFilterAnimation, b); } | 1965 int outlineOutsetExtent() const; |
| 1503 void setHasCurrentBackdropFilterAnimation(bool b = true) { SET_VAR(m_rareNon InheritedData, m_hasCurrentBackdropFilterAnimation, b); } | 1966 bool isOutlineEquivalent(const ComputedStyle* otherStyle) const |
| 1504 | 1967 { |
| 1505 void setIsRunningOpacityAnimationOnCompositor(bool b = true) { SET_VAR(m_rar eNonInheritedData, m_runningOpacityAnimationOnCompositor, b); } | 1968 // No other style, so we don't have an outline then we consider them to be the same. |
| 1506 void setIsRunningTransformAnimationOnCompositor(bool b = true) { SET_VAR(m_r areNonInheritedData, m_runningTransformAnimationOnCompositor, b); } | 1969 if (!otherStyle) |
| 1507 void setIsRunningFilterAnimationOnCompositor(bool b = true) { SET_VAR(m_rare NonInheritedData, m_runningFilterAnimationOnCompositor, b); } | 1970 return !hasOutline(); |
| 1508 void setIsRunningBackdropFilterAnimationOnCompositor(bool b = true) { SET_VA R(m_rareNonInheritedData, m_runningBackdropFilterAnimationOnCompositor, b); } | 1971 return m_background->outline().visuallyEqual(otherStyle->m_background->o utline()); |
| 1509 | 1972 } |
| 1510 void setLineClamp(LineClampValue c) { SET_VAR(m_rareNonInheritedData, lineCl amp, c); } | 1973 void setOutlineFromStyle(const ComputedStyle& o) |
| 1511 void setTapHighlightColor(const Color& c) { SET_VAR(m_rareInheritedData, tap HighlightColor, c); } | 1974 { |
| 1512 void setTextSecurity(ETextSecurity aTextSecurity) { SET_VAR(m_rareInheritedD ata, textSecurity, aTextSecurity); } | 1975 DCHECK(!isOutlineEquivalent(&o)); |
| 1513 void setTouchAction(TouchAction t) { SET_VAR(m_rareNonInheritedData, m_touch Action, t); } | 1976 m_background.access()->m_outline = o.m_background->m_outline; |
| 1514 | 1977 } |
| 1515 void setScrollBehavior(ScrollBehavior b) { SET_VAR(m_rareNonInheritedData, m _scrollBehavior, b); } | 1978 |
| 1516 | 1979 // Position utility functions. |
| 1517 void setScrollSnapType(ScrollSnapType b) { SET_VAR(m_rareNonInheritedData, m _scrollSnapType, b); } | 1980 bool hasOutOfFlowPosition() const { return position() == AbsolutePosition || position() == FixedPosition; } |
| 1518 void setScrollSnapPointsX(const ScrollSnapPoints& b) { SET_NESTED_VAR(m_rare NonInheritedData, m_scrollSnap, m_xPoints, b); } | 1981 bool hasInFlowPosition() const { return position() == RelativePosition || po sition() == StickyPosition; } |
| 1519 void setScrollSnapPointsY(const ScrollSnapPoints& b) { SET_NESTED_VAR(m_rare NonInheritedData, m_scrollSnap, m_yPoints, b); } | 1982 bool hasViewportConstrainedPosition() const { return position() == FixedPosi tion || position() == StickyPosition; } |
| 1520 void setScrollSnapDestination(const LengthPoint& b) { SET_NESTED_VAR(m_rareN onInheritedData, m_scrollSnap, m_destination, b); } | 1983 |
| 1521 void setScrollSnapCoordinate(const Vector<LengthPoint>& b) { SET_NESTED_VAR( m_rareNonInheritedData, m_scrollSnap, m_coordinates, b); } | 1984 // Clip utility functions. |
| 1522 | 1985 const Length& clipLeft() const { return m_visual->clip.left(); } |
| 1523 void setWillChangeProperties(const Vector<CSSPropertyID>& properties) { SET_ NESTED_VAR(m_rareNonInheritedData, m_willChange, m_properties, properties); } | 1986 const Length& clipRight() const { return m_visual->clip.right(); } |
| 1524 void setWillChangeContents(bool b) { SET_NESTED_VAR(m_rareNonInheritedData, m_willChange, m_contents, b); } | 1987 const Length& clipTop() const { return m_visual->clip.top(); } |
| 1525 void setWillChangeScrollPosition(bool b) { SET_NESTED_VAR(m_rareNonInherited Data, m_willChange, m_scrollPosition, b); } | 1988 const Length& clipBottom() const { return m_visual->clip.bottom(); } |
| 1526 void setSubtreeWillChangeContents(bool b) { SET_VAR(m_rareInheritedData, m_s ubtreeWillChangeContents, b); } | 1989 |
| 1527 | 1990 // Offset utility functions. |
| 1528 bool requiresAcceleratedCompositingForExternalReasons(bool b) { return m_rar eNonInheritedData->m_requiresAcceleratedCompositingForExternalReasons; } | 1991 // Accessors for positioned object edges that take into account writing mode . |
| 1529 void setRequiresAcceleratedCompositingForExternalReasons(bool b) { SET_VAR(m _rareNonInheritedData, m_requiresAcceleratedCompositingForExternalReasons, b); } | 1992 const Length& logicalLeft() const { return m_surround->offset.logicalLeft(ge tWritingMode()); } |
| 1530 | 1993 const Length& logicalRight() const { return m_surround->offset.logicalRight( getWritingMode()); } |
| 1531 const SVGComputedStyle& svgStyle() const { return *m_svgStyle.get(); } | 1994 const Length& logicalTop() const { return m_surround->offset.before(getWriti ngMode()); } |
| 1532 SVGComputedStyle& accessSVGStyle() { return *m_svgStyle.access(); } | 1995 const Length& logicalBottom() const { return m_surround->offset.after(getWri tingMode()); } |
| 1533 | 1996 |
| 1534 const SVGPaintType& fillPaintType() const { return svgStyle().fillPaintType( ); } | 1997 // Whether or not a positioned element requires normal flow x/y to be comput ed |
| 1535 Color fillPaintColor() const { return svgStyle().fillPaintColor(); } | 1998 // to determine its position. |
| 1536 float fillOpacity() const { return svgStyle().fillOpacity(); } | 1999 bool hasAutoLeftAndRight() const { return left().isAuto() && right().isAuto( ); } |
| 1537 void setFillOpacity(float f) { accessSVGStyle().setFillOpacity(f); } | 2000 bool hasAutoTopAndBottom() const { return top().isAuto() && bottom().isAuto( ); } |
| 1538 | 2001 bool hasStaticInlinePosition(bool horizontal) const { return horizontal ? ha sAutoLeftAndRight() : hasAutoTopAndBottom(); } |
| 1539 const SVGPaintType& strokePaintType() const { return svgStyle().strokePaintT ype(); } | 2002 bool hasStaticBlockPosition(bool horizontal) const { return horizontal ? has AutoTopAndBottom() : hasAutoLeftAndRight(); } |
| 1540 Color strokePaintColor() const { return svgStyle().strokePaintColor(); } | 2003 |
| 1541 float strokeOpacity() const { return svgStyle().strokeOpacity(); } | 2004 // Content utility functions. |
| 1542 void setStrokeOpacity(float f) { accessSVGStyle().setStrokeOpacity(f); } | |
| 1543 const UnzoomedLength& strokeWidth() const { return svgStyle().strokeWidth(); } | |
| 1544 void setStrokeWidth(const UnzoomedLength& w) { accessSVGStyle().setStrokeWid th(w); } | |
| 1545 SVGDashArray* strokeDashArray() const { return svgStyle().strokeDashArray(); } | |
| 1546 void setStrokeDashArray(PassRefPtr<SVGDashArray> array) { accessSVGStyle().s etStrokeDashArray(array); } | |
| 1547 const Length& strokeDashOffset() const { return svgStyle().strokeDashOffset( ); } | |
| 1548 void setStrokeDashOffset(const Length& d) { accessSVGStyle().setStrokeDashOf fset(d); } | |
| 1549 float strokeMiterLimit() const { return svgStyle().strokeMiterLimit(); } | |
| 1550 void setStrokeMiterLimit(float f) { accessSVGStyle().setStrokeMiterLimit(f); } | |
| 1551 | |
| 1552 void setD(PassRefPtr<StylePath> d) { accessSVGStyle().setD(d); } | |
| 1553 void setCx(const Length& cx) { accessSVGStyle().setCx(cx); } | |
| 1554 void setCy(const Length& cy) { accessSVGStyle().setCy(cy); } | |
| 1555 void setX(const Length& x) { accessSVGStyle().setX(x); } | |
| 1556 void setY(const Length& y) { accessSVGStyle().setY(y); } | |
| 1557 void setR(const Length& r) { accessSVGStyle().setR(r); } | |
| 1558 void setRx(const Length& rx) { accessSVGStyle().setRx(rx); } | |
| 1559 void setRy(const Length& ry) { accessSVGStyle().setRy(ry); } | |
| 1560 | |
| 1561 float floodOpacity() const { return svgStyle().floodOpacity(); } | |
| 1562 void setFloodOpacity(float f) { accessSVGStyle().setFloodOpacity(f); } | |
| 1563 | |
| 1564 float stopOpacity() const { return svgStyle().stopOpacity(); } | |
| 1565 void setStopOpacity(float f) { accessSVGStyle().setStopOpacity(f); } | |
| 1566 | |
| 1567 void setStopColor(const Color& c) { accessSVGStyle().setStopColor(c); } | |
| 1568 void setFloodColor(const Color& c) { accessSVGStyle().setFloodColor(c); } | |
| 1569 void setLightingColor(const Color& c) { accessSVGStyle().setLightingColor(c) ; } | |
| 1570 | |
| 1571 EBaselineShift baselineShift() const { return svgStyle().baselineShift(); } | |
| 1572 const Length& baselineShiftValue() const { return svgStyle().baselineShiftVa lue(); } | |
| 1573 void setBaselineShiftValue(const Length& value) | |
| 1574 { | |
| 1575 SVGComputedStyle& svgStyle = accessSVGStyle(); | |
| 1576 svgStyle.setBaselineShift(BS_LENGTH); | |
| 1577 svgStyle.setBaselineShiftValue(value); | |
| 1578 } | |
| 1579 | |
| 1580 void setShapeOutside(ShapeValue* value) | |
| 1581 { | |
| 1582 if (m_rareNonInheritedData->m_shapeOutside == value) | |
| 1583 return; | |
| 1584 m_rareNonInheritedData.access()->m_shapeOutside = value; | |
| 1585 } | |
| 1586 ShapeValue* shapeOutside() const { return m_rareNonInheritedData->m_shapeOut side.get(); } | |
| 1587 | |
| 1588 static ShapeValue* initialShapeOutside() { return 0; } | |
| 1589 | |
| 1590 void setClipPath(PassRefPtr<ClipPathOperation> operation) | |
| 1591 { | |
| 1592 if (m_rareNonInheritedData->m_clipPath != operation) | |
| 1593 m_rareNonInheritedData.access()->m_clipPath = operation; | |
| 1594 } | |
| 1595 ClipPathOperation* clipPath() const { return m_rareNonInheritedData->m_clipP ath.get(); } | |
| 1596 | |
| 1597 static ClipPathOperation* initialClipPath() { return 0; } | |
| 1598 | |
| 1599 const Length& shapeMargin() const { return m_rareNonInheritedData->m_shapeMa rgin; } | |
| 1600 void setShapeMargin(const Length& shapeMargin) { SET_VAR(m_rareNonInheritedD ata, m_shapeMargin, shapeMargin); } | |
| 1601 static Length initialShapeMargin() { return Length(0, Fixed); } | |
| 1602 | |
| 1603 float shapeImageThreshold() const { return m_rareNonInheritedData->m_shapeIm ageThreshold; } | |
| 1604 void setShapeImageThreshold(float shapeImageThreshold) | |
| 1605 { | |
| 1606 float clampedShapeImageThreshold = clampTo<float>(shapeImageThreshold, 0 , 1); | |
| 1607 SET_VAR(m_rareNonInheritedData, m_shapeImageThreshold, clampedShapeImage Threshold); | |
| 1608 } | |
| 1609 static float initialShapeImageThreshold() { return 0; } | |
| 1610 | |
| 1611 bool hasContent() const { return contentData(); } | |
| 1612 ContentData* contentData() const { return m_rareNonInheritedData->m_content. get(); } | |
| 1613 bool contentDataEquivalent(const ComputedStyle* otherStyle) const { return c onst_cast<ComputedStyle*>(this)->m_rareNonInheritedData->contentDataEquivalent(* const_cast<ComputedStyle*>(otherStyle)->m_rareNonInheritedData); } | 2005 bool contentDataEquivalent(const ComputedStyle* otherStyle) const { return c onst_cast<ComputedStyle*>(this)->m_rareNonInheritedData->contentDataEquivalent(* const_cast<ComputedStyle*>(otherStyle)->m_rareNonInheritedData); } |
| 1614 void setContent(ContentData*); | 2006 |
| 1615 | 2007 // Contain utility functions. |
| 1616 const CounterDirectiveMap* counterDirectives() const; | 2008 bool containsPaint() const { return m_rareNonInheritedData->m_contain & Cont ainsPaint; } |
| 1617 CounterDirectiveMap& accessCounterDirectives(); | 2009 bool containsStyle() const { return m_rareNonInheritedData->m_contain & Cont ainsStyle; } |
| 1618 const CounterDirectives getCounterDirectives(const AtomicString& identifier) const; | 2010 bool containsLayout() const { return m_rareNonInheritedData->m_contain & Con tainsLayout; } |
| 1619 void clearIncrementDirectives(); | 2011 bool containsSize() const { return m_rareNonInheritedData->m_contain & Conta insSize; } |
| 1620 void clearResetDirectives(); | 2012 |
| 1621 | 2013 // Display utility functions. |
| 1622 QuotesData* quotes() const { return m_rareInheritedData->quotes.get(); } | |
| 1623 void setQuotes(PassRefPtr<QuotesData>); | |
| 1624 | |
| 1625 const AtomicString& hyphenString() const; | |
| 1626 | |
| 1627 bool inheritedEqual(const ComputedStyle&) const; | |
| 1628 bool nonInheritedEqual(const ComputedStyle&) const; | |
| 1629 bool loadingCustomFontsEqual(const ComputedStyle&) const; | |
| 1630 bool inheritedDataShared(const ComputedStyle&) const; | |
| 1631 | |
| 1632 bool isDisplayReplacedType() const { return isDisplayReplacedType(display()) ; } | 2014 bool isDisplayReplacedType() const { return isDisplayReplacedType(display()) ; } |
| 1633 bool isDisplayInlineType() const { return isDisplayInlineType(display()); } | 2015 bool isDisplayInlineType() const { return isDisplayInlineType(display()); } |
| 1634 bool isOriginalDisplayInlineType() const { return isDisplayInlineType(origin alDisplay()); } | 2016 bool isOriginalDisplayInlineType() const { return isDisplayInlineType(origin alDisplay()); } |
| 1635 bool isDisplayFlexibleOrGridBox() const { return isDisplayFlexibleBox(displa y()) || isDisplayGridBox(display()); } | 2017 bool isDisplayFlexibleOrGridBox() const { return isDisplayFlexibleBox(displa y()) || isDisplayGridBox(display()); } |
| 1636 bool isDisplayFlexibleBox() const { return isDisplayFlexibleBox(display()); } | 2018 bool isDisplayFlexibleBox() const { return isDisplayFlexibleBox(display()); } |
| 1637 | 2019 |
| 1638 | 2020 // Isolation utility functions. |
| 1639 bool setWritingMode(WritingMode v) | 2021 bool hasIsolation() const { return isolation() != IsolationAuto; } |
| 1640 { | 2022 |
| 1641 if (v == getWritingMode()) | 2023 // Cursor utility functions. |
| 1642 return false; | 2024 CursorList* cursors() const { return m_rareInheritedData->cursorData.get(); } |
| 1643 | 2025 void addCursor(StyleImage*, bool hotSpotSpecified, const IntPoint& hotSpot = IntPoint()); |
| 1644 m_inheritedData.m_writingMode = v; | 2026 void setCursorList(CursorList*); |
| 1645 return true; | 2027 void clearCursorList(); |
| 1646 } | 2028 |
| 1647 | 2029 // Text decoration utility functions. |
| 1648 // A unique style is one that has matches something that makes it impossible to share. | 2030 void applyTextDecorations(); |
| 1649 bool unique() const { return m_nonInheritedData.m_unique; } | 2031 void clearAppliedTextDecorations(); |
| 1650 void setUnique() { m_nonInheritedData.m_unique = true; } | 2032 const Vector<AppliedTextDecoration>& appliedTextDecorations() const; |
| 1651 | 2033 TextDecoration textDecorationsInEffect() const; |
| 1652 bool isSharable() const; | 2034 |
| 1653 | 2035 // Overflow utility functions. |
| 1654 bool emptyState() const { return m_nonInheritedData.m_emptyState; } | 2036 |
| 1655 void setEmptyState(bool b) { setUnique(); m_nonInheritedData.m_emptyState = b; } | 2037 // It's sufficient to just check one direction, since it's illegal to have v isible on only one overflow value. |
| 1656 | 2038 bool isOverflowVisible() const { DCHECK(overflowX() != OverflowVisible || ov erflowX() == overflowY()); return overflowX() == OverflowVisible; } |
| 1657 Color visitedDependentColor(int colorProperty) const; | 2039 bool isOverflowPaged() const { return overflowY() == OverflowPagedX || overf lowY() == OverflowPagedY; } |
| 1658 | 2040 |
| 1659 void setHasExplicitlyInheritedProperties() { m_nonInheritedData.m_explicitIn heritance = true; } | 2041 // Animation utility functions. |
| 1660 bool hasExplicitlyInheritedProperties() const { return m_nonInheritedData.m_ explicitInheritance; } | 2042 bool shouldCompositeForCurrentAnimations() const { return hasCurrentOpacityA nimation() || hasCurrentTransformAnimation() || hasCurrentFilterAnimation() || h asCurrentBackdropFilterAnimation(); } |
| 1661 | 2043 bool isRunningAnimationOnCompositor() const { return isRunningOpacityAnimati onOnCompositor() || isRunningTransformAnimationOnCompositor() || isRunningFilter AnimationOnCompositor() || isRunningBackdropFilterAnimationOnCompositor(); } |
| 1662 void setHasVariableReferenceFromNonInheritedProperty() { m_nonInheritedData. m_variableReference = true; } | 2044 |
| 1663 bool hasVariableReferenceFromNonInheritedProperty() const { return m_nonInhe ritedData.m_variableReference; } | 2045 // Opacity utility functions. |
| 1664 | 2046 bool hasOpacity() const { return opacity() < 1.0f; } |
| 1665 bool hasChildDependentFlags() const { return emptyState() || hasExplicitlyIn heritedProperties(); } | 2047 |
| 1666 void copyChildDependentFlagsFrom(const ComputedStyle&); | 2048 // Table layout utility functions. |
| 1667 | 2049 bool isFixedTableLayout() const { return tableLayout() == TableLayoutFixed & & !logicalWidth().isAuto(); } |
| 2050 | |
| 2051 // Filter/transform utility functions. | |
| 2052 bool has3DTransform() const { return m_rareNonInheritedData->m_transform->ha s3DTransform(); } | |
| 2053 bool hasTransform() const { return hasTransformOperations() || hasMotionPath () || hasCurrentTransformAnimation() || translate() || rotate() || scale(); } | |
| 2054 bool hasTransformOperations() const { return !m_rareNonInheritedData->m_tran sform->m_operations.operations().isEmpty(); } | |
| 2055 ETransformStyle3D usedTransformStyle3D() const { return hasGroupingProperty( ) ? TransformStyle3DFlat : transformStyle3D(); } | |
| 2056 bool transformDataEquivalent(const ComputedStyle& otherStyle) const { return m_rareNonInheritedData->m_transform == otherStyle.m_rareNonInheritedData->m_tra nsform; } | |
| 2057 bool preserves3D() const { return usedTransformStyle3D() != TransformStyle3D Flat; } | |
| 2058 enum ApplyTransformOrigin { IncludeTransformOrigin, ExcludeTransformOrigin } ; | |
| 2059 enum ApplyMotionPath { IncludeMotionPath, ExcludeMotionPath }; | |
| 2060 enum ApplyIndependentTransformProperties { IncludeIndependentTransformProper ties , ExcludeIndependentTransformProperties }; | |
| 2061 void applyTransform(TransformationMatrix&, const LayoutSize& borderBoxSize, ApplyTransformOrigin, ApplyMotionPath, ApplyIndependentTransformProperties) cons t; | |
| 2062 void applyTransform(TransformationMatrix&, const FloatRect& boundingBox, App lyTransformOrigin, ApplyMotionPath, ApplyIndependentTransformProperties) const; | |
| 2063 | |
| 2064 // Returns |true| if any property that renders using filter operations is | |
| 2065 // used (including, but not limited to, 'filter'). | |
| 2066 bool hasFilterInducingProperty() const { return hasFilter() || (RuntimeEnabl edFeatures::cssBoxReflectFilterEnabled() && hasBoxReflect()); } | |
| 2067 | |
| 2068 // Returns |true| if opacity should be considered to have non-initial value for the purpose | |
| 2069 // of creating stacking contexts. | |
| 2070 bool hasNonInitialOpacity() const { return hasOpacity() || hasWillChangeOpac ityHint() || hasCurrentOpacityAnimation(); } | |
| 2071 | |
| 2072 // Returns whether this style contains any grouping property as defined by [ css-transforms]. | |
| 2073 // The main purpose of this is to adjust the used value of transform-style p roperty. | |
| 2074 // Note: We currently don't include every grouping property on the spec to m aintain | |
| 2075 // backward compatibility. | |
| 2076 // [css-transforms] https://drafts.csswg.org/css-transforms/#grouping-proper ty-values | |
| 2077 bool hasGroupingProperty() const { return !isOverflowVisible() || hasFilterI nducingProperty() || hasNonInitialOpacity(); } | |
| 2078 | |
| 2079 // Return true if any transform related property (currently transform/motion Path, transformStyle3D, perspective, | |
| 2080 // or will-change:transform) indicates that we are transforming. will-change :transform should result in | |
| 2081 // the same rendering behavior as having a transform, including the creation of a containing block | |
| 2082 // for fixed position descendants. | |
| 2083 bool hasTransformRelatedProperty() const { return hasTransform() || preserve s3D() || hasPerspective() || hasWillChangeTransformHint(); } | |
| 2084 | |
| 2085 // Paint utility functions. | |
| 2086 void addPaintImage(StyleImage*); | |
| 2087 | |
| 2088 // FIXME: reflections should belong to this helper function but they are cur rently handled | |
| 2089 // through their self-painting layers. So the layout code doesn't account fo r them. | |
| 2090 bool hasVisualOverflowingEffect() const { return boxShadow() || hasBorderIma geOutsets() || hasOutline(); } | |
| 2091 | |
| 2092 // Stacking contexts and positioned elements[1] are stacked (sorted in negZO rderList | |
| 2093 // and posZOrderList) in their enclosing stacking contexts. | |
| 2094 // | |
| 2095 // [1] According to CSS2.1, Appendix E.2.8 (https://www.w3.org/TR/CSS21/zind ex.html), | |
| 2096 // positioned elements with 'z-index: auto' are "treated as if it created a new | |
| 2097 // stacking context" and z-ordered together with other elements with 'z-inde x: 0'. | |
| 2098 // The difference of them from normal stacking contexts is that they don't d etermine | |
| 2099 // the stacking of the elements underneath them. | |
| 2100 // (Note: There are also other elements treated as stacking context during p ainting, | |
| 2101 // but not managed in stacks. See ObjectPainter::paintAllPhasesAtomically(). ) | |
| 2102 void updateIsStackingContext(bool isDocumentElement, bool isInTopLayer); | |
| 2103 bool isStacked() const { return isStackingContext() || position() != StaticP osition; } | |
| 2104 | |
| 2105 // Pseudo-styles | |
| 2106 bool hasAnyPublicPseudoStyles() const; | |
| 2107 bool hasPseudoStyle(PseudoId) const; | |
| 2108 void setHasPseudoStyle(PseudoId); | |
| 2109 bool hasUniquePseudoStyle() const; | |
| 2110 bool hasPseudoElementStyle() const; | |
| 2111 | |
| 2112 bool canContainAbsolutePositionObjects() const { return position() != Static Position; } | |
| 2113 bool canContainFixedPositionObjects() const { return hasTransformRelatedProp erty() || containsPaint();} | |
| 2114 | |
| 2115 // Whitespace utility functions. | |
| 2116 static bool autoWrap(EWhiteSpace ws) | |
| 2117 { | |
| 2118 // Nowrap and pre don't automatically wrap. | |
| 2119 return ws != NOWRAP && ws != PRE; | |
| 2120 } | |
| 2121 | |
| 2122 bool autoWrap() const | |
| 2123 { | |
| 2124 return autoWrap(whiteSpace()); | |
| 2125 } | |
| 2126 | |
| 2127 static bool preserveNewline(EWhiteSpace ws) | |
| 2128 { | |
| 2129 // Normal and nowrap do not preserve newlines. | |
| 2130 return ws != NORMAL && ws != NOWRAP; | |
| 2131 } | |
| 2132 | |
| 2133 bool preserveNewline() const | |
| 2134 { | |
| 2135 return preserveNewline(whiteSpace()); | |
| 2136 } | |
| 2137 | |
| 2138 static bool collapseWhiteSpace(EWhiteSpace ws) | |
| 2139 { | |
| 2140 // Pre and prewrap do not collapse whitespace. | |
| 2141 return ws != PRE && ws != PRE_WRAP; | |
| 2142 } | |
| 2143 | |
| 2144 bool collapseWhiteSpace() const | |
| 2145 { | |
| 2146 return collapseWhiteSpace(whiteSpace()); | |
| 2147 } | |
| 2148 | |
| 2149 bool isCollapsibleWhiteSpace(UChar c) const | |
| 2150 { | |
| 2151 switch (c) { | |
| 2152 case ' ': | |
| 2153 case '\t': | |
| 2154 return collapseWhiteSpace(); | |
| 2155 case '\n': | |
| 2156 return !preserveNewline(); | |
| 2157 } | |
| 2158 return false; | |
| 2159 } | |
| 2160 bool breakOnlyAfterWhiteSpace() const | |
| 2161 { | |
| 2162 return whiteSpace() == PRE_WRAP || getLineBreak() == LineBreakAfterWhite Space; | |
| 2163 } | |
| 2164 | |
| 2165 bool breakWords() const | |
| 2166 { | |
| 2167 return (wordBreak() == BreakWordBreak || overflowWrap() == BreakOverflow Wrap) | |
| 2168 && whiteSpace() != PRE && whiteSpace() != NOWRAP; | |
| 2169 } | |
| 2170 | |
| 2171 // Text direction utility functions. | |
| 2172 bool shouldPlaceBlockDirectionScrollbarOnLogicalLeft() const { return !isLef tToRightDirection() && isHorizontalWritingMode(); } | |
| 2173 bool hasInlinePaginationAxis() const | |
| 2174 { | |
| 2175 // If the pagination axis is parallel with the writing mode inline axis, columns may be laid | |
| 2176 // out along the inline axis, just like for regular multicol. Otherwise, we need to lay out | |
| 2177 // along the block axis. | |
| 2178 if (isOverflowPaged()) | |
| 2179 return (overflowY() == OverflowPagedX) == isHorizontalWritingMode(); | |
| 2180 return false; | |
| 2181 } | |
| 2182 | |
| 2183 // Border utility functions. | |
| 2184 bool borderObscuresBackground() const; | |
| 2185 void getBorderEdgeInfo(BorderEdge edges[], bool includeLogicalLeftEdge = tru e, bool includeLogicalRightEdge = true) const; | |
| 1668 bool hasBoxDecorations() const | 2186 bool hasBoxDecorations() const |
| 1669 { | 2187 { |
| 1670 return hasBorderDecoration() | 2188 return hasBorderDecoration() |
| 1671 || hasBorderRadius() | 2189 || hasBorderRadius() |
| 1672 || hasOutline() | 2190 || hasOutline() |
| 1673 || hasAppearance() | 2191 || hasAppearance() |
| 1674 || boxShadow() | 2192 || boxShadow() |
| 1675 || hasFilterInducingProperty() | 2193 || hasFilterInducingProperty() |
| 1676 || hasBackdropFilter() | 2194 || hasBackdropFilter() |
| 1677 || resize() != RESIZE_NONE; | 2195 || resize() != RESIZE_NONE; |
| 1678 } | 2196 } |
| 1679 | 2197 |
| 1680 bool borderObscuresBackground() const; | 2198 // Background utility functions. |
| 1681 void getBorderEdgeInfo(BorderEdge edges[], bool includeLogicalLeftEdge = tru e, bool includeLogicalRightEdge = true) const; | 2199 FillLayer& accessBackgroundLayers() { return m_background.access()->m_backgr ound; } |
| 2200 const FillLayer& backgroundLayers() const { return m_background->background( ); } | |
| 2201 void adjustBackgroundLayers() | |
| 2202 { | |
| 2203 if (backgroundLayers().next()) { | |
| 2204 accessBackgroundLayers().cullEmptyLayers(); | |
| 2205 accessBackgroundLayers().fillUnsetProperties(); | |
| 2206 } | |
| 2207 } | |
| 2208 bool hasBackgroundRelatedColorReferencingCurrentColor() const | |
| 2209 { | |
| 2210 if (backgroundColor().isCurrentColor() || visitedLinkBackgroundColor().i sCurrentColor()) | |
| 2211 return true; | |
| 2212 if (!boxShadow()) | |
| 2213 return false; | |
| 2214 return shadowListHasCurrentColor(boxShadow()); | |
| 2215 } | |
| 2216 bool hasBackground() const | |
| 2217 { | |
| 2218 Color color = visitedDependentColor(CSSPropertyBackgroundColor); | |
| 2219 if (color.alpha()) | |
| 2220 return true; | |
| 2221 return hasBackgroundImage(); | |
| 2222 } | |
| 1682 | 2223 |
| 1683 void setHasAuthorBackground(bool authorBackground) { SET_VAR(m_rareNonInheri tedData, m_hasAuthorBackground, authorBackground); } | |
| 1684 void setHasAuthorBorder(bool authorBorder) { SET_VAR(m_rareNonInheritedData, m_hasAuthorBorder, authorBorder); } | |
| 1685 bool hasAuthorBackground() const { return m_rareNonInheritedData->m_hasAutho rBackground; }; | |
| 1686 bool hasAuthorBorder() const { return m_rareNonInheritedData->m_hasAuthorBor der; }; | |
| 1687 | 2224 |
| 1688 void addPaintImage(StyleImage*); | 2225 // Color utility functions. |
| 2226 // TODO(sashab): Rename this to just color(), and add a comment explaining h ow it works. | |
| 2227 Color visitedDependentColor(int colorProperty) const; | |
| 1689 | 2228 |
| 1690 // Initial values for all the properties | 2229 // -webkit-appearance utility functions. |
| 1691 static EBorderCollapse initialBorderCollapse() { return BorderCollapseSepara te; } | 2230 bool hasAppearance() const { return appearance() != NoControlPart; } |
| 1692 static EBorderStyle initialBorderStyle() { return BorderStyleNone; } | 2231 |
| 1693 static OutlineIsAuto initialOutlineStyleIsAuto() { return OutlineIsAutoOff; } | 2232 // Other utility functions. |
| 1694 static NinePieceImage initialNinePieceImage() { return NinePieceImage(); } | 2233 bool isStyleAvailable() const; |
| 1695 static LengthSize initialBorderRadius() { return LengthSize(Length(0, Fixed) , Length(0, Fixed)); } | 2234 bool isSharable() const; |
| 1696 static ECaptionSide initialCaptionSide() { return CaptionSideTop; } | 2235 |
| 1697 static EClear initialClear() { return ClearNone; } | 2236 // TODO(sashab) Remove these. |
| 1698 static LengthBox initialClip() { return LengthBox(); } | |
| 1699 static Containment initialContain() { return ContainsNone; } | |
| 1700 static TextDirection initialDirection() { return LTR; } | |
| 1701 static WritingMode initialWritingMode() { return TopToBottomWritingMode; } | |
| 1702 static TextCombine initialTextCombine() { return TextCombineNone; } | |
| 1703 static TextOrientation initialTextOrientation() { return TextOrientationMixe d; } | |
| 1704 static ObjectFit initialObjectFit() { return ObjectFitFill; } | |
| 1705 static LengthPoint initialObjectPosition() { return LengthPoint(Length(50.0, Percent), Length(50.0, Percent)); } | |
| 1706 static EDisplay initialDisplay() { return INLINE; } | |
| 1707 static EEmptyCells initialEmptyCells() { return EmptyCellsShow; } | |
| 1708 static EFloat initialFloating() { return NoFloat; } | |
| 1709 static EListStylePosition initialListStylePosition() { return ListStylePosit ionOutside; } | |
| 1710 static EListStyleType initialListStyleType() { return Disc; } | |
| 1711 static EOverflowAnchor initialOverflowAnchor() { return AnchorAuto; } | |
| 1712 static EOverflow initialOverflowX() { return OverflowVisible; } | |
| 1713 static EOverflow initialOverflowY() { return OverflowVisible; } | |
| 1714 static EBreak initialBreakAfter() { return BreakAuto; } | |
| 1715 static EBreak initialBreakBefore() { return BreakAuto; } | |
| 1716 static EBreak initialBreakInside() { return BreakAuto; } | |
| 1717 static EPosition initialPosition() { return StaticPosition; } | |
| 1718 static ETableLayout initialTableLayout() { return TableLayoutAuto; } | |
| 1719 static EUnicodeBidi initialUnicodeBidi() { return UBNormal; } | |
| 1720 static ETextTransform initialTextTransform() { return TTNONE; } | |
| 1721 static EVisibility initialVisibility() { return VISIBLE; } | |
| 1722 static EWhiteSpace initialWhiteSpace() { return NORMAL; } | |
| 1723 static short initialHorizontalBorderSpacing() { return 0; } | |
| 1724 static short initialVerticalBorderSpacing() { return 0; } | |
| 1725 static ECursor initialCursor() { return CURSOR_AUTO; } | |
| 1726 static Color initialColor() { return Color::black; } | |
| 1727 static StyleImage* initialListStyleImage() { return 0; } | |
| 1728 static unsigned initialBorderWidth() { return 3; } | |
| 1729 static unsigned short initialColumnRuleWidth() { return 3; } | |
| 1730 static unsigned short initialOutlineWidth() { return 3; } | |
| 1731 static float initialLetterWordSpacing() { return 0.0f; } | |
| 1732 static Length initialSize() { return Length(); } | |
| 1733 static Length initialMinSize() { return Length(); } | |
| 1734 static Length initialMaxSize() { return Length(MaxSizeNone); } | |
| 1735 static Length initialOffset() { return Length(); } | |
| 1736 static Length initialMargin() { return Length(Fixed); } | |
| 1737 static Length initialPadding() { return Length(Fixed); } | |
| 1738 static Length initialTextIndent() { return Length(Fixed); } | |
| 1739 static TextIndentLine initialTextIndentLine() { return TextIndentFirstLine; } | |
| 1740 static TextIndentType initialTextIndentType() { return TextIndentNormal; } | |
| 1741 static EVerticalAlign initialVerticalAlign() { return VerticalAlignBaseline; } | |
| 1742 static short initialWidows() { return 2; } | |
| 1743 static short initialOrphans() { return 2; } | |
| 1744 static Length initialLineHeight() { return Length(-100.0, Percent); } | |
| 1745 static ETextAlign initialTextAlign() { return TASTART; } | |
| 1746 static TextAlignLast initialTextAlignLast() { return TextAlignLastAuto; } | |
| 1747 static TextJustify initialTextJustify() { return TextJustifyAuto; } | |
| 1748 static TextDecoration initialTextDecoration() { return TextDecorationNone; } | |
| 1749 static TextUnderlinePosition initialTextUnderlinePosition() { return TextUnd erlinePositionAuto; } | |
| 1750 static TextDecorationStyle initialTextDecorationStyle() { return TextDecorat ionStyleSolid; } | |
| 1751 static float initialZoom() { return 1.0f; } | |
| 1752 static int initialOutlineOffset() { return 0; } | |
| 1753 static float initialOpacity() { return 1.0f; } | |
| 1754 static EBoxAlignment initialBoxAlign() { return BSTRETCH; } | |
| 1755 static EBoxDecorationBreak initialBoxDecorationBreak() { return BoxDecoratio nBreakSlice; } | |
| 1756 static EBoxDirection initialBoxDirection() { return BNORMAL; } | |
| 1757 static EBoxLines initialBoxLines() { return SINGLE; } | |
| 1758 static EBoxOrient initialBoxOrient() { return HORIZONTAL; } | |
| 1759 static EBoxPack initialBoxPack() { return BoxPackStart; } | |
| 1760 static float initialBoxFlex() { return 0.0f; } | |
| 1761 static unsigned initialBoxFlexGroup() { return 1; } | |
| 1762 static unsigned initialBoxOrdinalGroup() { return 1; } | |
| 1763 static EBoxSizing initialBoxSizing() { return BoxSizingContentBox; } | |
| 1764 static StyleReflection* initialBoxReflect() { return 0; } | |
| 1765 static float initialFlexGrow() { return 0; } | |
| 1766 static float initialFlexShrink() { return 1; } | |
| 1767 static Length initialFlexBasis() { return Length(Auto); } | |
| 1768 static int initialOrder() { return 0; } | |
| 1769 static StyleContentAlignmentData initialContentAlignment() { return StyleCon tentAlignmentData(ContentPositionNormal, ContentDistributionDefault, OverflowAli gnmentDefault); } | |
| 1770 static StyleSelfAlignmentData initialSelfAlignment() { return StyleSelfAlign mentData(ItemPositionAuto, OverflowAlignmentDefault); } | |
| 1771 static EFlexDirection initialFlexDirection() { return FlowRow; } | |
| 1772 static EFlexWrap initialFlexWrap() { return FlexNoWrap; } | |
| 1773 static EUserModify initialUserModify() { return READ_ONLY; } | |
| 1774 static EUserDrag initialUserDrag() { return DRAG_AUTO; } | |
| 1775 static EUserSelect initialUserSelect() { return SELECT_TEXT; } | |
| 1776 static TextOverflow initialTextOverflow() { return TextOverflowClip; } | |
| 1777 static EMarginCollapse initialMarginBeforeCollapse() { return MarginCollapse Collapse; } | |
| 1778 static EMarginCollapse initialMarginAfterCollapse() { return MarginCollapseC ollapse; } | |
| 1779 static EWordBreak initialWordBreak() { return NormalWordBreak; } | |
| 1780 static EOverflowWrap initialOverflowWrap() { return NormalOverflowWrap; } | |
| 1781 static LineBreak initialLineBreak() { return LineBreakAuto; } | |
| 1782 static const AtomicString& initialHighlight() { return nullAtom; } | |
| 1783 static ESpeak initialSpeak() { return SpeakNormal; } | |
| 1784 static Hyphens initialHyphens() { return HyphensManual; } | |
| 1785 static const AtomicString& initialHyphenationString() { return nullAtom; } | |
| 1786 static EResize initialResize() { return RESIZE_NONE; } | |
| 1787 static ControlPart initialAppearance() { return NoControlPart; } | |
| 1788 static Order initialRTLOrdering() { return LogicalOrder; } | |
| 1789 static float initialTextStrokeWidth() { return 0; } | |
| 1790 static unsigned short initialColumnCount() { return 1; } | |
| 1791 static ColumnFill initialColumnFill() { return ColumnFillBalance; } | |
| 1792 static ColumnSpan initialColumnSpan() { return ColumnSpanNone; } | |
| 1793 static EmptyTransformOperations initialTransform() { return EmptyTransformOp erations(); } | |
| 1794 static PassRefPtr<TranslateTransformOperation> initialTranslate() { return T ranslateTransformOperation::create(Length(0, Fixed), Length(0, Fixed), 0, Transf ormOperation::Translate3D); } | |
| 1795 static PassRefPtr<RotateTransformOperation> initialRotate() { return RotateT ransformOperation::create(0, 0, 1, 0, TransformOperation::Rotate3D); } | |
| 1796 static PassRefPtr<ScaleTransformOperation> initialScale() { return ScaleTran sformOperation::create(1, 1, 1, TransformOperation::Scale3D); } | |
| 1797 static Length initialTransformOriginX() { return Length(50.0, Percent); } | |
| 1798 static Length initialTransformOriginY() { return Length(50.0, Percent); } | |
| 1799 static float initialTransformOriginZ() { return 0; } | |
| 1800 static TransformOrigin initialTransformOrigin() { return TransformOrigin(Len gth(50.0, Percent), Length(50.0, Percent), 0); } | |
| 1801 static EPointerEvents initialPointerEvents() { return PE_AUTO; } | |
| 1802 static ETransformStyle3D initialTransformStyle3D() { return TransformStyle3D Flat; } | |
| 1803 static StylePath* initialMotionPath() { return nullptr; } | |
| 1804 static Length initialMotionOffset() { return Length(0, Fixed); } | |
| 1805 static StyleMotionRotation initialMotionRotation() { return StyleMotionRotat ion(0, MotionRotationAuto); } | |
| 1806 static EBackfaceVisibility initialBackfaceVisibility() { return BackfaceVisi bilityVisible; } | |
| 1807 static float initialPerspective() { return 0; } | |
| 1808 static Length initialPerspectiveOriginX() { return Length(50.0, Percent); } | |
| 1809 static Length initialPerspectiveOriginY() { return Length(50.0, Percent); } | |
| 1810 static LengthPoint initialPerspectiveOrigin() { return LengthPoint(Length(50 .0, Percent), Length(50.0, Percent)); } | |
| 1811 static Color initialBackgroundColor() { return Color::transparent; } | |
| 1812 static TextEmphasisFill initialTextEmphasisFill() { return TextEmphasisFillF illed; } | |
| 1813 static TextEmphasisMark initialTextEmphasisMark() { return TextEmphasisMarkN one; } | |
| 1814 static const AtomicString& initialTextEmphasisCustomMark() { return nullAtom ; } | |
| 1815 static TextEmphasisPosition initialTextEmphasisPosition() { return TextEmpha sisPositionOver; } | |
| 1816 static RubyPosition initialRubyPosition() { return RubyPositionBefore; } | |
| 1817 static ImageOrientationEnum initialImageOrientation() { return OriginTopLeft ; } | 2237 static ImageOrientationEnum initialImageOrientation() { return OriginTopLeft ; } |
| 1818 static RespectImageOrientationEnum initialRespectImageOrientation() { return DoNotRespectImageOrientation; } | |
| 1819 static EImageRendering initialImageRendering() { return ImageRenderingAuto; } | |
| 1820 static ImageResolutionSource initialImageResolutionSource() { return ImageRe solutionSpecified; } | 2238 static ImageResolutionSource initialImageResolutionSource() { return ImageRe solutionSpecified; } |
| 1821 static ImageResolutionSnap initialImageResolutionSnap() { return ImageResolu tionNoSnap; } | 2239 static ImageResolutionSnap initialImageResolutionSnap() { return ImageResolu tionNoSnap; } |
| 1822 static float initialImageResolution() { return 1; } | 2240 static float initialImageResolution() { return 1; } |
| 1823 static StyleImage* initialBorderImageSource() { return 0; } | 2241 void setWrapFlow(WrapFlow wrapFlow) { SET_VAR(m_rareNonInheritedData, m_wrap Flow, wrapFlow); } |
| 1824 static StyleImage* initialMaskBoxImageSource() { return 0; } | 2242 void setWrapThrough(WrapThrough wrapThrough) { SET_VAR(m_rareNonInheritedDat a, m_wrapThrough, wrapThrough); } |
| 1825 static PrintColorAdjust initialPrintColorAdjust() { return PrintColorAdjustE conomy; } | |
| 1826 static TouchAction initialTouchAction() { return TouchActionAuto; } | |
| 1827 static ShadowList* initialBoxShadow() { return 0; } | |
| 1828 static ShadowList* initialTextShadow() { return 0; } | |
| 1829 static StyleVariableData* initialVariables() { return nullptr; } | |
| 1830 static ScrollBehavior initialScrollBehavior() { return ScrollBehaviorAuto; } | |
| 1831 static ScrollSnapType initialScrollSnapType() { return ScrollSnapTypeNone; } | |
| 1832 static ScrollSnapPoints initialScrollSnapPointsX() { return ScrollSnapPoints (); } | |
| 1833 static ScrollSnapPoints initialScrollSnapPointsY() { return ScrollSnapPoints (); } | |
| 1834 static LengthPoint initialScrollSnapDestination() { return LengthPoint(Lengt h(0, Fixed), Length(0, Fixed)); } | |
| 1835 static Vector<LengthPoint> initialScrollSnapCoordinate() { return Vector<Len gthPoint>(); } | |
| 1836 | 2243 |
| 1837 // The initial value is 'none' for grid tracks. | |
| 1838 static Vector<GridTrackSize> initialGridTemplateColumns() { return Vector<Gr idTrackSize>(); } | |
| 1839 static Vector<GridTrackSize> initialGridTemplateRows() { return Vector<GridT rackSize>(); } | |
| 1840 static Vector<GridTrackSize> initialGridAutoRepeatTracks() { return Vector<G ridTrackSize>(); } | |
| 1841 static size_t initialGridAutoRepeatInsertionPoint() { return 0; } | |
| 1842 static AutoRepeatType initialGridAutoRepeatType() { return NoAutoRepeat; } | |
| 1843 | |
| 1844 static GridAutoFlow initialGridAutoFlow() { return AutoFlowRow; } | |
| 1845 | |
| 1846 static Vector<GridTrackSize> initialGridAutoColumns(); | |
| 1847 static Vector<GridTrackSize> initialGridAutoRows(); | |
| 1848 | |
| 1849 static NamedGridLinesMap initialNamedGridColumnLines() { return NamedGridLin esMap(); } | |
| 1850 static NamedGridLinesMap initialNamedGridRowLines() { return NamedGridLinesM ap(); } | |
| 1851 | |
| 1852 static OrderedNamedGridLines initialOrderedNamedGridColumnLines() { return O rderedNamedGridLines(); } | |
| 1853 static OrderedNamedGridLines initialOrderedNamedGridRowLines() { return Orde redNamedGridLines(); } | |
| 1854 | |
| 1855 static NamedGridAreaMap initialNamedGridArea() { return NamedGridAreaMap(); } | |
| 1856 static size_t initialNamedGridAreaCount() { return 0; } | |
| 1857 | |
| 1858 static Length initialGridColumnGap() { return Length(Fixed); } | |
| 1859 static Length initialGridRowGap() { return Length(Fixed); } | |
| 1860 | |
| 1861 // 'auto' is the default. | |
| 1862 static GridPosition initialGridColumnStart() { return GridPosition(); } | |
| 1863 static GridPosition initialGridColumnEnd() { return GridPosition(); } | |
| 1864 static GridPosition initialGridRowStart() { return GridPosition(); } | |
| 1865 static GridPosition initialGridRowEnd() { return GridPosition(); } | |
| 1866 | |
| 1867 static TabSize initialTabSize() { return TabSize(8); } | |
| 1868 | |
| 1869 static TextSizeAdjust initialTextSizeAdjust() { return TextSizeAdjust::adjus tAuto(); } | |
| 1870 | |
| 1871 static WrapFlow initialWrapFlow() { return WrapFlowAuto; } | |
| 1872 static WrapThrough initialWrapThrough() { return WrapThroughWrap; } | |
| 1873 | |
| 1874 static QuotesData* initialQuotes() { return 0; } | |
| 1875 | |
| 1876 // Keep these at the end. | |
| 1877 // FIXME: Why? Seems these should all be one big sorted list. | |
| 1878 static LineClampValue initialLineClamp() { return LineClampValue(); } | |
| 1879 static ETextSecurity initialTextSecurity() { return TSNONE; } | |
| 1880 static Color initialTapHighlightColor(); | |
| 1881 static const FilterOperations& initialFilter(); | |
| 1882 static const FilterOperations& initialBackdropFilter(); | |
| 1883 static WebBlendMode initialBlendMode() { return WebBlendModeNormal; } | |
| 1884 static EIsolation initialIsolation() { return IsolationAuto; } | |
| 1885 private: | 2244 private: |
| 1886 void setVisitedLinkColor(const Color&); | 2245 void setVisitedLinkColor(const Color&); |
| 1887 void setVisitedLinkBackgroundColor(const StyleColor& v) { SET_VAR(m_rareNonI nheritedData, m_visitedLinkBackgroundColor, v); } | 2246 void setVisitedLinkBackgroundColor(const StyleColor& v) { SET_VAR(m_rareNonI nheritedData, m_visitedLinkBackgroundColor, v); } |
| 1888 void setVisitedLinkBorderLeftColor(const StyleColor& v) { SET_VAR(m_rareNonI nheritedData, m_visitedLinkBorderLeftColor, v); } | 2247 void setVisitedLinkBorderLeftColor(const StyleColor& v) { SET_VAR(m_rareNonI nheritedData, m_visitedLinkBorderLeftColor, v); } |
| 1889 void setVisitedLinkBorderRightColor(const StyleColor& v) { SET_VAR(m_rareNon InheritedData, m_visitedLinkBorderRightColor, v); } | 2248 void setVisitedLinkBorderRightColor(const StyleColor& v) { SET_VAR(m_rareNon InheritedData, m_visitedLinkBorderRightColor, v); } |
| 1890 void setVisitedLinkBorderBottomColor(const StyleColor& v) { SET_VAR(m_rareNo nInheritedData, m_visitedLinkBorderBottomColor, v); } | 2249 void setVisitedLinkBorderBottomColor(const StyleColor& v) { SET_VAR(m_rareNo nInheritedData, m_visitedLinkBorderBottomColor, v); } |
| 1891 void setVisitedLinkBorderTopColor(const StyleColor& v) { SET_VAR(m_rareNonIn heritedData, m_visitedLinkBorderTopColor, v); } | 2250 void setVisitedLinkBorderTopColor(const StyleColor& v) { SET_VAR(m_rareNonIn heritedData, m_visitedLinkBorderTopColor, v); } |
| 1892 void setVisitedLinkOutlineColor(const StyleColor& v) { SET_VAR(m_rareNonInhe ritedData, m_visitedLinkOutlineColor, v); } | 2251 void setVisitedLinkOutlineColor(const StyleColor& v) { SET_VAR(m_rareNonInhe ritedData, m_visitedLinkOutlineColor, v); } |
| 1893 void setVisitedLinkColumnRuleColor(const StyleColor& v) { SET_NESTED_VAR(m_r areNonInheritedData, m_multiCol, m_visitedLinkColumnRuleColor, v); } | 2252 void setVisitedLinkColumnRuleColor(const StyleColor& v) { SET_NESTED_VAR(m_r areNonInheritedData, m_multiCol, m_visitedLinkColumnRuleColor, v); } |
| 1894 void setVisitedLinkTextDecorationColor(const StyleColor& v) { SET_VAR(m_rare NonInheritedData, m_visitedLinkTextDecorationColor, v); } | 2253 void setVisitedLinkTextDecorationColor(const StyleColor& v) { SET_VAR(m_rare NonInheritedData, m_visitedLinkTextDecorationColor, v); } |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2061 } | 2420 } |
| 2062 | 2421 |
| 2063 inline bool ComputedStyle::hasPseudoElementStyle() const | 2422 inline bool ComputedStyle::hasPseudoElementStyle() const |
| 2064 { | 2423 { |
| 2065 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; | 2424 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; |
| 2066 } | 2425 } |
| 2067 | 2426 |
| 2068 } // namespace blink | 2427 } // namespace blink |
| 2069 | 2428 |
| 2070 #endif // ComputedStyle_h | 2429 #endif // ComputedStyle_h |
| OLD | NEW |