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

Side by Side Diff: Source/core/rendering/style/RenderStyle.h

Issue 767543003: Remove unused functions from RenderStyle. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/rendering/style/RenderStyle.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 void setAffectedByHover() { noninherited_flags.affectedByHover = true; } 373 void setAffectedByHover() { noninherited_flags.affectedByHover = true; }
374 void setAffectedByActive() { noninherited_flags.affectedByActive = true; } 374 void setAffectedByActive() { noninherited_flags.affectedByActive = true; }
375 void setAffectedByDrag() { noninherited_flags.affectedByDrag = true; } 375 void setAffectedByDrag() { noninherited_flags.affectedByDrag = true; }
376 376
377 bool operator==(const RenderStyle& other) const; 377 bool operator==(const RenderStyle& other) const;
378 bool operator!=(const RenderStyle& other) const { return !(*this == other); } 378 bool operator!=(const RenderStyle& other) const { return !(*this == other); }
379 bool isFloating() const { return noninherited_flags.floating != NoFloat; } 379 bool isFloating() const { return noninherited_flags.floating != NoFloat; }
380 bool hasMargin() const { return surround->margin.nonZero(); } 380 bool hasMargin() const { return surround->margin.nonZero(); }
381 bool hasBorder() const { return surround->border.hasBorder(); } 381 bool hasBorder() const { return surround->border.hasBorder(); }
382 bool hasPadding() const { return surround->padding.nonZero(); } 382 bool hasPadding() const { return surround->padding.nonZero(); }
383 bool hasOffset() const { return surround->offset.nonZero(); }
384 bool hasMarginBeforeQuirk() const { return marginBefore().quirk(); } 383 bool hasMarginBeforeQuirk() const { return marginBefore().quirk(); }
385 bool hasMarginAfterQuirk() const { return marginAfter().quirk(); } 384 bool hasMarginAfterQuirk() const { return marginAfter().quirk(); }
386 385
387 bool hasBackgroundImage() const { return m_background->background().hasImage (); } 386 bool hasBackgroundImage() const { return m_background->background().hasImage (); }
388 bool hasFixedBackgroundImage() const { return m_background->background().has FixedImage(); } 387 bool hasFixedBackgroundImage() const { return m_background->background().has FixedImage(); }
389 388
390 bool hasEntirelyFixedBackground() const; 389 bool hasEntirelyFixedBackground() const;
391 390
392 bool hasAppearance() const { return appearance() != NoControlPart; } 391 bool hasAppearance() const { return appearance() != NoControlPart; }
393 392
394 bool hasBackground() const 393 bool hasBackground() const
395 { 394 {
396 Color color = visitedDependentColor(CSSPropertyBackgroundColor); 395 Color color = visitedDependentColor(CSSPropertyBackgroundColor);
397 if (color.alpha()) 396 if (color.alpha())
398 return true; 397 return true;
399 return hasBackgroundImage(); 398 return hasBackgroundImage();
400 } 399 }
401 400
402 LayoutBoxExtent imageOutsets(const NinePieceImage&) const; 401 LayoutBoxExtent imageOutsets(const NinePieceImage&) const;
403 bool hasBorderImageOutsets() const 402 bool hasBorderImageOutsets() const
404 { 403 {
405 return borderImage().hasImage() && borderImage().outset().nonZero(); 404 return borderImage().hasImage() && borderImage().outset().nonZero();
406 } 405 }
407 LayoutBoxExtent borderImageOutsets() const 406 LayoutBoxExtent borderImageOutsets() const
408 { 407 {
409 return imageOutsets(borderImage()); 408 return imageOutsets(borderImage());
410 } 409 }
411 410
412 LayoutBoxExtent maskBoxImageOutsets() const
413 {
414 return imageOutsets(maskBoxImage());
415 }
416
417 bool hasFilterOutsets() const { return hasFilter() && filter().hasOutsets(); } 411 bool hasFilterOutsets() const { return hasFilter() && filter().hasOutsets(); }
418 FilterOutsets filterOutsets() const { return hasFilter() ? filter().outsets( ) : FilterOutsets(); } 412 FilterOutsets filterOutsets() const { return hasFilter() ? filter().outsets( ) : FilterOutsets(); }
419 413
420 Order rtlOrdering() const { return static_cast<Order>(inherited_flags.m_rtlO rdering); } 414 Order rtlOrdering() const { return static_cast<Order>(inherited_flags.m_rtlO rdering); }
421 void setRTLOrdering(Order o) { inherited_flags.m_rtlOrdering = o; } 415 void setRTLOrdering(Order o) { inherited_flags.m_rtlOrdering = o; }
422 416
423 bool isStyleAvailable() const; 417 bool isStyleAvailable() const;
424 418
425 bool hasAnyPublicPseudoStyles() const; 419 bool hasAnyPublicPseudoStyles() const;
426 bool hasPseudoStyle(PseudoId pseudo) const; 420 bool hasPseudoStyle(PseudoId pseudo) const;
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 bool breakOnlyAfterWhiteSpace() const 625 bool breakOnlyAfterWhiteSpace() const
632 { 626 {
633 return whiteSpace() == PRE_WRAP || lineBreak() == LineBreakAfterWhiteSpa ce; 627 return whiteSpace() == PRE_WRAP || lineBreak() == LineBreakAfterWhiteSpa ce;
634 } 628 }
635 629
636 bool breakWords() const 630 bool breakWords() const
637 { 631 {
638 return wordBreak() == BreakWordBreak || overflowWrap() == BreakOverflowW rap; 632 return wordBreak() == BreakWordBreak || overflowWrap() == BreakOverflowW rap;
639 } 633 }
640 634
641 EFillRepeat backgroundRepeatX() const { return static_cast<EFillRepeat>(m_ba ckground->background().repeatX()); }
642 EFillRepeat backgroundRepeatY() const { return static_cast<EFillRepeat>(m_ba ckground->background().repeatY()); }
643 CompositeOperator backgroundComposite() const { return static_cast<Composite Operator>(m_background->background().composite()); }
644 EFillAttachment backgroundAttachment() const { return static_cast<EFillAttac hment>(m_background->background().attachment()); }
645 EFillBox backgroundClip() const { return static_cast<EFillBox>(m_background- >background().clip()); } 635 EFillBox backgroundClip() const { return static_cast<EFillBox>(m_background- >background().clip()); }
646 EFillBox backgroundOrigin() const { return static_cast<EFillBox>(m_backgroun d->background().origin()); }
647 const Length& backgroundXPosition() const { return m_background->background( ).xPosition(); }
648 const Length& backgroundYPosition() const { return m_background->background( ).yPosition(); }
649 EFillSizeType backgroundSizeType() const { return m_background->background() .sizeType(); }
650 const LengthSize& backgroundSizeLength() const { return m_background->backgr ound().sizeLength(); }
651 FillLayer& accessBackgroundLayers() { return m_background.access()->m_backgr ound; } 636 FillLayer& accessBackgroundLayers() { return m_background.access()->m_backgr ound; }
652 const FillLayer& backgroundLayers() const { return m_background->background( ); } 637 const FillLayer& backgroundLayers() const { return m_background->background( ); }
653 638
654 StyleImage* maskImage() const { return rareNonInheritedData->m_mask.image(); } 639 StyleImage* maskImage() const { return rareNonInheritedData->m_mask.image(); }
655 EFillRepeat maskRepeatX() const { return static_cast<EFillRepeat>(rareNonInh eritedData->m_mask.repeatX()); }
656 EFillRepeat maskRepeatY() const { return static_cast<EFillRepeat>(rareNonInh eritedData->m_mask.repeatY()); }
657 CompositeOperator maskComposite() const { return static_cast<CompositeOperat or>(rareNonInheritedData->m_mask.composite()); }
658 EFillBox maskClip() const { return static_cast<EFillBox>(rareNonInheritedDat a->m_mask.clip()); }
659 EFillBox maskOrigin() const { return static_cast<EFillBox>(rareNonInheritedD ata->m_mask.origin()); }
660 const Length& maskXPosition() const { return rareNonInheritedData->m_mask.xP osition(); }
661 const Length& maskYPosition() const { return rareNonInheritedData->m_mask.yP osition(); }
662 EFillSizeType maskSizeType() const { return rareNonInheritedData->m_mask.siz eType(); }
663 const LengthSize& maskSizeLength() const { return rareNonInheritedData->m_ma sk.sizeLength(); }
664 FillLayer& accessMaskLayers() { return rareNonInheritedData.access()->m_mask ; } 640 FillLayer& accessMaskLayers() { return rareNonInheritedData.access()->m_mask ; }
665 const FillLayer& maskLayers() const { return rareNonInheritedData->m_mask; } 641 const FillLayer& maskLayers() const { return rareNonInheritedData->m_mask; }
666 642
667 const NinePieceImage& maskBoxImage() const { return rareNonInheritedData->m_ maskBoxImage; } 643 const NinePieceImage& maskBoxImage() const { return rareNonInheritedData->m_ maskBoxImage; }
668 StyleImage* maskBoxImageSource() const { return rareNonInheritedData->m_mask BoxImage.image(); } 644 StyleImage* maskBoxImageSource() const { return rareNonInheritedData->m_mask BoxImage.image(); }
669 const LengthBox& maskBoxImageSlices() const { return rareNonInheritedData->m _maskBoxImage.imageSlices(); } 645 const LengthBox& maskBoxImageSlices() const { return rareNonInheritedData->m _maskBoxImage.imageSlices(); }
670 bool maskBoxImageSlicesFill() const { return rareNonInheritedData->m_maskBox Image.fill(); } 646 bool maskBoxImageSlicesFill() const { return rareNonInheritedData->m_maskBox Image.fill(); }
671 const BorderImageLengthBox& maskBoxImageWidth() const { return rareNonInheri tedData->m_maskBoxImage.borderSlices(); } 647 const BorderImageLengthBox& maskBoxImageWidth() const { return rareNonInheri tedData->m_maskBoxImage.borderSlices(); }
672 const BorderImageLengthBox& maskBoxImageOutset() const { return rareNonInher itedData->m_maskBoxImage.outset(); } 648 const BorderImageLengthBox& maskBoxImageOutset() const { return rareNonInher itedData->m_maskBoxImage.outset(); }
673 649
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 // CSS3 Getter Methods 697 // CSS3 Getter Methods
722 698
723 int outlineOffset() const 699 int outlineOffset() const
724 { 700 {
725 if (m_background->outline().style() == BNONE) 701 if (m_background->outline().style() == BNONE)
726 return 0; 702 return 0;
727 return m_background->outline().offset(); 703 return m_background->outline().offset();
728 } 704 }
729 705
730 ShadowList* textShadow() const { return rareInheritedData->textShadow.get(); } 706 ShadowList* textShadow() const { return rareInheritedData->textShadow.get(); }
731 void getTextShadowExtent(LayoutUnit& top, LayoutUnit& right, LayoutUnit& bot tom, LayoutUnit& left) const { getShadowExtent(textShadow(), top, right, bottom, left); }
732 void getTextShadowHorizontalExtent(LayoutUnit& left, LayoutUnit& right) cons t { getShadowHorizontalExtent(textShadow(), left, right); }
733 void getTextShadowVerticalExtent(LayoutUnit& top, LayoutUnit& bottom) const { getShadowVerticalExtent(textShadow(), top, bottom); }
734 void getTextShadowInlineDirectionExtent(LayoutUnit& logicalLeft, LayoutUnit& logicalRight) { getShadowInlineDirectionExtent(textShadow(), logicalLeft, logic alRight); } 707 void getTextShadowInlineDirectionExtent(LayoutUnit& logicalLeft, LayoutUnit& logicalRight) { getShadowInlineDirectionExtent(textShadow(), logicalLeft, logic alRight); }
735 void getTextShadowBlockDirectionExtent(LayoutUnit& logicalTop, LayoutUnit& l ogicalBottom) { getShadowBlockDirectionExtent(textShadow(), logicalTop, logicalB ottom); } 708 void getTextShadowBlockDirectionExtent(LayoutUnit& logicalTop, LayoutUnit& l ogicalBottom) { getShadowBlockDirectionExtent(textShadow(), logicalTop, logicalB ottom); }
736 709
737 float textStrokeWidth() const { return rareInheritedData->textStrokeWidth; } 710 float textStrokeWidth() const { return rareInheritedData->textStrokeWidth; }
738 float opacity() const { return rareNonInheritedData->opacity; } 711 float opacity() const { return rareNonInheritedData->opacity; }
739 bool hasOpacity() const { return opacity() < 1.0f; } 712 bool hasOpacity() const { return opacity() < 1.0f; }
740 ControlPart appearance() const { return static_cast<ControlPart>(rareNonInhe ritedData->m_appearance); } 713 ControlPart appearance() const { return static_cast<ControlPart>(rareNonInhe ritedData->m_appearance); }
741 EBoxAlignment boxAlign() const { return static_cast<EBoxAlignment>(rareNonIn heritedData->m_deprecatedFlexibleBox->align); } 714 EBoxAlignment boxAlign() const { return static_cast<EBoxAlignment>(rareNonIn heritedData->m_deprecatedFlexibleBox->align); }
742 EBoxDirection boxDirection() const { return static_cast<EBoxDirection>(inher ited_flags._box_direction); } 715 EBoxDirection boxDirection() const { return static_cast<EBoxDirection>(inher ited_flags._box_direction); }
743 float boxFlex() const { return rareNonInheritedData->m_deprecatedFlexibleBox ->flex; } 716 float boxFlex() const { return rareNonInheritedData->m_deprecatedFlexibleBox ->flex; }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 const GridTrackSize& gridAutoColumns() const { return rareNonInheritedData-> m_grid->m_gridAutoColumns; } 761 const GridTrackSize& gridAutoColumns() const { return rareNonInheritedData-> m_grid->m_gridAutoColumns; }
789 const GridTrackSize& gridAutoRows() const { return rareNonInheritedData->m_g rid->m_gridAutoRows; } 762 const GridTrackSize& gridAutoRows() const { return rareNonInheritedData->m_g rid->m_gridAutoRows; }
790 763
791 const GridPosition& gridColumnStart() const { return rareNonInheritedData->m _gridItem->m_gridColumnStart; } 764 const GridPosition& gridColumnStart() const { return rareNonInheritedData->m _gridItem->m_gridColumnStart; }
792 const GridPosition& gridColumnEnd() const { return rareNonInheritedData->m_g ridItem->m_gridColumnEnd; } 765 const GridPosition& gridColumnEnd() const { return rareNonInheritedData->m_g ridItem->m_gridColumnEnd; }
793 const GridPosition& gridRowStart() const { return rareNonInheritedData->m_gr idItem->m_gridRowStart; } 766 const GridPosition& gridRowStart() const { return rareNonInheritedData->m_gr idItem->m_gridRowStart; }
794 const GridPosition& gridRowEnd() const { return rareNonInheritedData->m_grid Item->m_gridRowEnd; } 767 const GridPosition& gridRowEnd() const { return rareNonInheritedData->m_grid Item->m_gridRowEnd; }
795 768
796 ShadowList* boxShadow() const { return rareNonInheritedData->m_boxShadow.get (); } 769 ShadowList* boxShadow() const { return rareNonInheritedData->m_boxShadow.get (); }
797 void getBoxShadowExtent(LayoutUnit& top, LayoutUnit& right, LayoutUnit& bott om, LayoutUnit& left) const { getShadowExtent(boxShadow(), top, right, bottom, l eft); } 770 void getBoxShadowExtent(LayoutUnit& top, LayoutUnit& right, LayoutUnit& bott om, LayoutUnit& left) const { getShadowExtent(boxShadow(), top, right, bottom, l eft); }
798 LayoutBoxExtent getBoxShadowInsetExtent() const { return getShadowInsetExten t(boxShadow()); }
799 void getBoxShadowHorizontalExtent(LayoutUnit& left, LayoutUnit& right) const { getShadowHorizontalExtent(boxShadow(), left, right); }
800 void getBoxShadowVerticalExtent(LayoutUnit& top, LayoutUnit& bottom) const { getShadowVerticalExtent(boxShadow(), top, bottom); }
801 void getBoxShadowInlineDirectionExtent(LayoutUnit& logicalLeft, LayoutUnit& logicalRight) { getShadowInlineDirectionExtent(boxShadow(), logicalLeft, logical Right); } 771 void getBoxShadowInlineDirectionExtent(LayoutUnit& logicalLeft, LayoutUnit& logicalRight) { getShadowInlineDirectionExtent(boxShadow(), logicalLeft, logical Right); }
802 void getBoxShadowBlockDirectionExtent(LayoutUnit& logicalTop, LayoutUnit& lo gicalBottom) { getShadowBlockDirectionExtent(boxShadow(), logicalTop, logicalBot tom); } 772 void getBoxShadowBlockDirectionExtent(LayoutUnit& logicalTop, LayoutUnit& lo gicalBottom) { getShadowBlockDirectionExtent(boxShadow(), logicalTop, logicalBot tom); }
803 773
804 EBoxDecorationBreak boxDecorationBreak() const { return m_box->boxDecoration Break(); } 774 EBoxDecorationBreak boxDecorationBreak() const { return m_box->boxDecoration Break(); }
805 StyleReflection* boxReflect() const { return rareNonInheritedData->m_boxRefl ect.get(); } 775 StyleReflection* boxReflect() const { return rareNonInheritedData->m_boxRefl ect.get(); }
806 bool reflectionDataEquivalent(const RenderStyle* otherStyle) const { return rareNonInheritedData->reflectionDataEquivalent(*otherStyle->rareNonInheritedData ); } 776 bool reflectionDataEquivalent(const RenderStyle* otherStyle) const { return rareNonInheritedData->reflectionDataEquivalent(*otherStyle->rareNonInheritedData ); }
807 777
808 // FIXME: reflections should belong to this helper function but they are cur rently handled 778 // FIXME: reflections should belong to this helper function but they are cur rently handled
809 // through their self-painting layers. So the rendering code doesn't account for them. 779 // through their self-painting layers. So the rendering code doesn't account for them.
810 bool hasVisualOverflowingEffect() const { return boxShadow() || hasBorderIma geOutsets() || hasOutline(); } 780 bool hasVisualOverflowingEffect() const { return boxShadow() || hasBorderIma geOutsets() || hasOutline(); }
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 849
880 bool hasMask() const { return rareNonInheritedData->m_mask.hasImage() || rar eNonInheritedData->m_maskBoxImage.hasImage(); } 850 bool hasMask() const { return rareNonInheritedData->m_mask.hasImage() || rar eNonInheritedData->m_maskBoxImage.hasImage(); }
881 851
882 TextCombine textCombine() const { return static_cast<TextCombine>(rareNonInh eritedData->m_textCombine); } 852 TextCombine textCombine() const { return static_cast<TextCombine>(rareNonInh eritedData->m_textCombine); }
883 bool hasTextCombine() const { return textCombine() != TextCombineNone; } 853 bool hasTextCombine() const { return textCombine() != TextCombineNone; }
884 854
885 unsigned tabSize() const { return rareInheritedData->m_tabSize; } 855 unsigned tabSize() const { return rareInheritedData->m_tabSize; }
886 856
887 // End CSS3 Getters 857 // End CSS3 Getters
888 858
889 WrapFlow wrapFlow() const { return static_cast<WrapFlow>(rareNonInheritedDat a->m_wrapFlow); }
890 WrapThrough wrapThrough() const { return static_cast<WrapThrough>(rareNonInh eritedData->m_wrapThrough); }
891
892 // Apple-specific property getter methods 859 // Apple-specific property getter methods
893 EPointerEvents pointerEvents() const { return static_cast<EPointerEvents>(in herited_flags._pointerEvents); } 860 EPointerEvents pointerEvents() const { return static_cast<EPointerEvents>(in herited_flags._pointerEvents); }
894 const CSSAnimationData* animations() const { return rareNonInheritedData->m_ animations.get(); } 861 const CSSAnimationData* animations() const { return rareNonInheritedData->m_ animations.get(); }
895 const CSSTransitionData* transitions() const { return rareNonInheritedData-> m_transitions.get(); } 862 const CSSTransitionData* transitions() const { return rareNonInheritedData-> m_transitions.get(); }
896 863
897 CSSAnimationData& accessAnimations(); 864 CSSAnimationData& accessAnimations();
898 CSSTransitionData& accessTransitions(); 865 CSSTransitionData& accessTransitions();
899 866
900 ETransformStyle3D transformStyle3D() const { return static_cast<ETransformSt yle3D>(rareNonInheritedData->m_transformStyle3D); } 867 ETransformStyle3D transformStyle3D() const { return static_cast<ETransformSt yle3D>(rareNonInheritedData->m_transformStyle3D); }
901 bool preserves3D() const { return rareNonInheritedData->m_transformStyle3D = = TransformStyle3DPreserve3D; } 868 bool preserves3D() const { return rareNonInheritedData->m_transformStyle3D = = TransformStyle3DPreserve3D; }
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 void resetBorderBottom() { SET_VAR(surround, border.m_bottom, BorderValue()) ; } 983 void resetBorderBottom() { SET_VAR(surround, border.m_bottom, BorderValue()) ; }
1017 void resetBorderLeft() { SET_VAR(surround, border.m_left, BorderValue()); } 984 void resetBorderLeft() { SET_VAR(surround, border.m_left, BorderValue()); }
1018 void resetBorderImage() { SET_VAR(surround, border.m_image, NinePieceImage() ); } 985 void resetBorderImage() { SET_VAR(surround, border.m_image, NinePieceImage() ); }
1019 void resetBorderTopLeftRadius() { SET_VAR(surround, border.m_topLeft, initia lBorderRadius()); } 986 void resetBorderTopLeftRadius() { SET_VAR(surround, border.m_topLeft, initia lBorderRadius()); }
1020 void resetBorderTopRightRadius() { SET_VAR(surround, border.m_topRight, init ialBorderRadius()); } 987 void resetBorderTopRightRadius() { SET_VAR(surround, border.m_topRight, init ialBorderRadius()); }
1021 void resetBorderBottomLeftRadius() { SET_VAR(surround, border.m_bottomLeft, initialBorderRadius()); } 988 void resetBorderBottomLeftRadius() { SET_VAR(surround, border.m_bottomLeft, initialBorderRadius()); }
1022 void resetBorderBottomRightRadius() { SET_VAR(surround, border.m_bottomRight , initialBorderRadius()); } 989 void resetBorderBottomRightRadius() { SET_VAR(surround, border.m_bottomRight , initialBorderRadius()); }
1023 990
1024 void setBackgroundColor(const StyleColor& v) { SET_VAR(m_background, m_color , v); } 991 void setBackgroundColor(const StyleColor& v) { SET_VAR(m_background, m_color , v); }
1025 992
1026 void setBackgroundXPosition(const Length& length) { SET_VAR(m_background, m_ background.m_xPosition, length); }
1027 void setBackgroundYPosition(const Length& length) { SET_VAR(m_background, m_ background.m_yPosition, length); }
1028 void setBackgroundSize(EFillSizeType b) { SET_VAR(m_background, m_background .m_sizeType, b); }
1029 void setBackgroundSizeLength(const LengthSize& s) { SET_VAR(m_background, m_ background.m_sizeLength, s); }
1030
1031 void setBorderImage(const NinePieceImage& b) { SET_VAR(surround, border.m_im age, b); } 993 void setBorderImage(const NinePieceImage& b) { SET_VAR(surround, border.m_im age, b); }
1032 void setBorderImageSource(PassRefPtr<StyleImage>); 994 void setBorderImageSource(PassRefPtr<StyleImage>);
1033 void setBorderImageSlices(const LengthBox&); 995 void setBorderImageSlices(const LengthBox&);
1034 void setBorderImageWidth(const BorderImageLengthBox&); 996 void setBorderImageWidth(const BorderImageLengthBox&);
1035 void setBorderImageOutset(const BorderImageLengthBox&); 997 void setBorderImageOutset(const BorderImageLengthBox&);
1036 998
1037 void setBorderTopLeftRadius(const LengthSize& s) { SET_VAR(surround, border. m_topLeft, s); } 999 void setBorderTopLeftRadius(const LengthSize& s) { SET_VAR(surround, border. m_topLeft, s); }
1038 void setBorderTopRightRadius(const LengthSize& s) { SET_VAR(surround, border .m_topRight, s); } 1000 void setBorderTopRightRadius(const LengthSize& s) { SET_VAR(surround, border .m_topRight, s); }
1039 void setBorderBottomLeftRadius(const LengthSize& s) { SET_VAR(surround, bord er.m_bottomLeft, s); } 1001 void setBorderBottomLeftRadius(const LengthSize& s) { SET_VAR(surround, bord er.m_bottomLeft, s); }
1040 void setBorderBottomRightRadius(const LengthSize& s) { SET_VAR(surround, bor der.m_bottomRight, s); } 1002 void setBorderBottomRightRadius(const LengthSize& s) { SET_VAR(surround, bor der.m_bottomRight, s); }
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 } 1103 }
1142 1104
1143 void adjustMaskLayers() 1105 void adjustMaskLayers()
1144 { 1106 {
1145 if (maskLayers().next()) { 1107 if (maskLayers().next()) {
1146 accessMaskLayers().cullEmptyLayers(); 1108 accessMaskLayers().cullEmptyLayers();
1147 accessMaskLayers().fillUnsetProperties(); 1109 accessMaskLayers().fillUnsetProperties();
1148 } 1110 }
1149 } 1111 }
1150 1112
1151 void setMaskImage(PassRefPtr<StyleImage> v) { rareNonInheritedData.access()- >m_mask.setImage(v); }
1152
1153 void setMaskBoxImage(const NinePieceImage& b) { SET_VAR(rareNonInheritedData , m_maskBoxImage, b); } 1113 void setMaskBoxImage(const NinePieceImage& b) { SET_VAR(rareNonInheritedData , m_maskBoxImage, b); }
1154 void setMaskBoxImageSource(PassRefPtr<StyleImage> v) { rareNonInheritedData. access()->m_maskBoxImage.setImage(v); } 1114 void setMaskBoxImageSource(PassRefPtr<StyleImage> v) { rareNonInheritedData. access()->m_maskBoxImage.setImage(v); }
1155 void setMaskBoxImageSlices(const LengthBox& slices) 1115 void setMaskBoxImageSlices(const LengthBox& slices)
1156 { 1116 {
1157 rareNonInheritedData.access()->m_maskBoxImage.setImageSlices(slices); 1117 rareNonInheritedData.access()->m_maskBoxImage.setImageSlices(slices);
1158 } 1118 }
1159 void setMaskBoxImageSlicesFill(bool fill) 1119 void setMaskBoxImageSlicesFill(bool fill)
1160 { 1120 {
1161 rareNonInheritedData.access()->m_maskBoxImage.setFill(fill); 1121 rareNonInheritedData.access()->m_maskBoxImage.setFill(fill);
1162 } 1122 }
1163 void setMaskBoxImageWidth(const BorderImageLengthBox& slices) 1123 void setMaskBoxImageWidth(const BorderImageLengthBox& slices)
1164 { 1124 {
1165 rareNonInheritedData.access()->m_maskBoxImage.setBorderSlices(slices); 1125 rareNonInheritedData.access()->m_maskBoxImage.setBorderSlices(slices);
1166 } 1126 }
1167 void setMaskBoxImageOutset(const BorderImageLengthBox& outset) 1127 void setMaskBoxImageOutset(const BorderImageLengthBox& outset)
1168 { 1128 {
1169 rareNonInheritedData.access()->m_maskBoxImage.setOutset(outset); 1129 rareNonInheritedData.access()->m_maskBoxImage.setOutset(outset);
1170 } 1130 }
1171 void setMaskXPosition(const Length& length) { SET_VAR(rareNonInheritedData, m_mask.m_xPosition, length); }
1172 void setMaskYPosition(const Length& length) { SET_VAR(rareNonInheritedData, m_mask.m_yPosition, length); }
1173 void setMaskSize(const LengthSize& s) { SET_VAR(rareNonInheritedData, m_mask .m_sizeLength, s); }
1174 1131
1175 void setBorderCollapse(EBorderCollapse collapse) { inherited_flags._border_c ollapse = collapse; } 1132 void setBorderCollapse(EBorderCollapse collapse) { inherited_flags._border_c ollapse = collapse; }
1176 void setHorizontalBorderSpacing(short); 1133 void setHorizontalBorderSpacing(short);
1177 void setVerticalBorderSpacing(short); 1134 void setVerticalBorderSpacing(short);
1178 void setEmptyCells(EEmptyCell v) { inherited_flags._empty_cells = v; } 1135 void setEmptyCells(EEmptyCell v) { inherited_flags._empty_cells = v; }
1179 void setCaptionSide(ECaptionSide v) { inherited_flags._caption_side = v; } 1136 void setCaptionSide(ECaptionSide v) { inherited_flags._caption_side = v; }
1180 1137
1181 void setListStyleType(EListStyleType v) { inherited_flags._list_style_type = v; } 1138 void setListStyleType(EListStyleType v) { inherited_flags._list_style_type = v; }
1182 void setListStyleImage(PassRefPtr<StyleImage>); 1139 void setListStyleImage(PassRefPtr<StyleImage>);
1183 void setListStylePosition(EListStylePosition v) { inherited_flags._list_styl e_position = v; } 1140 void setListStylePosition(EListStylePosition v) { inherited_flags._list_styl e_position = v; }
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
1286 void setUserModify(EUserModify u) { SET_VAR(rareInheritedData, userModify, u ); } 1243 void setUserModify(EUserModify u) { SET_VAR(rareInheritedData, userModify, u ); }
1287 void setUserDrag(EUserDrag d) { SET_VAR(rareNonInheritedData, userDrag, d); } 1244 void setUserDrag(EUserDrag d) { SET_VAR(rareNonInheritedData, userDrag, d); }
1288 void setUserSelect(EUserSelect s) { SET_VAR(rareInheritedData, userSelect, s ); } 1245 void setUserSelect(EUserSelect s) { SET_VAR(rareInheritedData, userSelect, s ); }
1289 void setTextOverflow(TextOverflow overflow) { SET_VAR(rareNonInheritedData, textOverflow, overflow); } 1246 void setTextOverflow(TextOverflow overflow) { SET_VAR(rareNonInheritedData, textOverflow, overflow); }
1290 void setMarginBeforeCollapse(EMarginCollapse c) { SET_VAR(rareNonInheritedDa ta, marginBeforeCollapse, c); } 1247 void setMarginBeforeCollapse(EMarginCollapse c) { SET_VAR(rareNonInheritedDa ta, marginBeforeCollapse, c); }
1291 void setMarginAfterCollapse(EMarginCollapse c) { SET_VAR(rareNonInheritedDat a, marginAfterCollapse, c); } 1248 void setMarginAfterCollapse(EMarginCollapse c) { SET_VAR(rareNonInheritedDat a, marginAfterCollapse, c); }
1292 void setWordBreak(EWordBreak b) { SET_VAR(rareInheritedData, wordBreak, b); } 1249 void setWordBreak(EWordBreak b) { SET_VAR(rareInheritedData, wordBreak, b); }
1293 void setOverflowWrap(EOverflowWrap b) { SET_VAR(rareInheritedData, overflowW rap, b); } 1250 void setOverflowWrap(EOverflowWrap b) { SET_VAR(rareInheritedData, overflowW rap, b); }
1294 void setLineBreak(LineBreak b) { SET_VAR(rareInheritedData, lineBreak, b); } 1251 void setLineBreak(LineBreak b) { SET_VAR(rareInheritedData, lineBreak, b); }
1295 void setHighlight(const AtomicString& h) { SET_VAR(rareInheritedData, highli ght, h); } 1252 void setHighlight(const AtomicString& h) { SET_VAR(rareInheritedData, highli ght, h); }
1296 void setHyphens(Hyphens h) { SET_VAR(rareInheritedData, hyphens, h); }
1297 void setHyphenationString(const AtomicString& h) { SET_VAR(rareInheritedData , hyphenationString, h); } 1253 void setHyphenationString(const AtomicString& h) { SET_VAR(rareInheritedData , hyphenationString, h); }
1298 void setLocale(const AtomicString& locale) { SET_VAR(rareInheritedData, loca le, locale); } 1254 void setLocale(const AtomicString& locale) { SET_VAR(rareInheritedData, loca le, locale); }
1299 void setResize(EResize r) { SET_VAR(rareNonInheritedData, m_resize, r); } 1255 void setResize(EResize r) { SET_VAR(rareNonInheritedData, m_resize, r); }
1300 void setColumnWidth(float f) { SET_VAR(rareNonInheritedData.access()->m_mult iCol, m_autoWidth, false); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_ width, f); } 1256 void setColumnWidth(float f) { SET_VAR(rareNonInheritedData.access()->m_mult iCol, m_autoWidth, false); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_ width, f); }
1301 void setHasAutoColumnWidth() { SET_VAR(rareNonInheritedData.access()->m_mult iCol, m_autoWidth, true); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_w idth, 0); } 1257 void setHasAutoColumnWidth() { SET_VAR(rareNonInheritedData.access()->m_mult iCol, m_autoWidth, true); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_w idth, 0); }
1302 void setColumnCount(unsigned short c) { SET_VAR(rareNonInheritedData.access( )->m_multiCol, m_autoCount, false); SET_VAR(rareNonInheritedData.access()->m_mul tiCol, m_count, c); } 1258 void setColumnCount(unsigned short c) { SET_VAR(rareNonInheritedData.access( )->m_multiCol, m_autoCount, false); SET_VAR(rareNonInheritedData.access()->m_mul tiCol, m_count, c); }
1303 void setHasAutoColumnCount() { SET_VAR(rareNonInheritedData.access()->m_mult iCol, m_autoCount, true); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_c ount, 0); } 1259 void setHasAutoColumnCount() { SET_VAR(rareNonInheritedData.access()->m_mult iCol, m_autoCount, true); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_c ount, 0); }
1304 void setColumnFill(ColumnFill columnFill) { SET_VAR(rareNonInheritedData.acc ess()->m_multiCol, m_fill, columnFill); } 1260 void setColumnFill(ColumnFill columnFill) { SET_VAR(rareNonInheritedData.acc ess()->m_multiCol, m_fill, columnFill); }
1305 void setColumnGap(float f) { SET_VAR(rareNonInheritedData.access()->m_multiC ol, m_normalGap, false); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_ga p, f); } 1261 void setColumnGap(float f) { SET_VAR(rareNonInheritedData.access()->m_multiC ol, m_normalGap, false); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_ga p, f); }
1306 void setHasNormalColumnGap() { SET_VAR(rareNonInheritedData.access()->m_mult iCol, m_normalGap, true); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_g ap, 0); } 1262 void setHasNormalColumnGap() { SET_VAR(rareNonInheritedData.access()->m_mult iCol, m_normalGap, true); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_g ap, 0); }
1307 void setColumnRuleColor(const StyleColor& c) { SET_BORDERVALUE_COLOR(rareNon InheritedData.access()->m_multiCol, m_rule, c); } 1263 void setColumnRuleColor(const StyleColor& c) { SET_BORDERVALUE_COLOR(rareNon InheritedData.access()->m_multiCol, m_rule, c); }
1308 void setColumnRuleStyle(EBorderStyle b) { SET_VAR(rareNonInheritedData.acces s()->m_multiCol, m_rule.m_style, b); } 1264 void setColumnRuleStyle(EBorderStyle b) { SET_VAR(rareNonInheritedData.acces s()->m_multiCol, m_rule.m_style, b); }
1309 void setColumnRuleWidth(unsigned short w) { SET_VAR(rareNonInheritedData.acc ess()->m_multiCol, m_rule.m_width, w); } 1265 void setColumnRuleWidth(unsigned short w) { SET_VAR(rareNonInheritedData.acc ess()->m_multiCol, m_rule.m_width, w); }
1310 void resetColumnRule() { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_rule, BorderValue()); }
1311 void setColumnSpan(ColumnSpan columnSpan) { SET_VAR(rareNonInheritedData.acc ess()->m_multiCol, m_columnSpan, columnSpan); } 1266 void setColumnSpan(ColumnSpan columnSpan) { SET_VAR(rareNonInheritedData.acc ess()->m_multiCol, m_columnSpan, columnSpan); }
1312 void setColumnBreakBefore(EPageBreak p) { SET_VAR(rareNonInheritedData.acces s()->m_multiCol, m_breakBefore, p); } 1267 void setColumnBreakBefore(EPageBreak p) { SET_VAR(rareNonInheritedData.acces s()->m_multiCol, m_breakBefore, p); }
1313 // For valid values of column-break-inside see http://www.w3.org/TR/css3-mul ticol/#break-before-break-after-break-inside 1268 // For valid values of column-break-inside see http://www.w3.org/TR/css3-mul ticol/#break-before-break-after-break-inside
1314 void setColumnBreakInside(EPageBreak p) { ASSERT(p == PBAUTO || p == PBAVOID ); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_breakInside, p); } 1269 void setColumnBreakInside(EPageBreak p) { ASSERT(p == PBAUTO || p == PBAVOID ); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_breakInside, p); }
1315 void setColumnBreakAfter(EPageBreak p) { SET_VAR(rareNonInheritedData.access ()->m_multiCol, m_breakAfter, p); } 1270 void setColumnBreakAfter(EPageBreak p) { SET_VAR(rareNonInheritedData.access ()->m_multiCol, m_breakAfter, p); }
1316 void inheritColumnPropertiesFrom(RenderStyle* parent) { rareNonInheritedData .access()->m_multiCol = parent->rareNonInheritedData->m_multiCol; } 1271 void inheritColumnPropertiesFrom(RenderStyle* parent) { rareNonInheritedData .access()->m_multiCol = parent->rareNonInheritedData->m_multiCol; }
1317 void setHasInlineTransform(bool b) { SET_VAR(rareNonInheritedData, m_hasInli neTransform, b); } 1272 void setHasInlineTransform(bool b) { SET_VAR(rareNonInheritedData, m_hasInli neTransform, b); }
1318 void setTransform(const TransformOperations& ops) { SET_VAR(rareNonInherited Data.access()->m_transform, m_operations, ops); } 1273 void setTransform(const TransformOperations& ops) { SET_VAR(rareNonInherited Data.access()->m_transform, m_operations, ops); }
1319 void setTransformOriginX(const Length& v) { setTransformOrigin(TransformOrig in(v, transformOriginY(), transformOriginZ())); } 1274 void setTransformOriginX(const Length& v) { setTransformOrigin(TransformOrig in(v, transformOriginY(), transformOriginZ())); }
1320 void setTransformOriginY(const Length& v) { setTransformOrigin(TransformOrig in(transformOriginX(), v, transformOriginZ())); } 1275 void setTransformOriginY(const Length& v) { setTransformOrigin(TransformOrig in(transformOriginX(), v, transformOriginZ())); }
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
1698 void setVisitedLinkBorderTopColor(const StyleColor& v) { SET_VAR(rareNonInhe ritedData, m_visitedLinkBorderTopColor, v); } 1653 void setVisitedLinkBorderTopColor(const StyleColor& v) { SET_VAR(rareNonInhe ritedData, m_visitedLinkBorderTopColor, v); }
1699 void setVisitedLinkOutlineColor(const StyleColor& v) { SET_VAR(rareNonInheri tedData, m_visitedLinkOutlineColor, v); } 1654 void setVisitedLinkOutlineColor(const StyleColor& v) { SET_VAR(rareNonInheri tedData, m_visitedLinkOutlineColor, v); }
1700 void setVisitedLinkColumnRuleColor(const StyleColor& v) { SET_VAR(rareNonInh eritedData.access()->m_multiCol, m_visitedLinkColumnRuleColor, v); } 1655 void setVisitedLinkColumnRuleColor(const StyleColor& v) { SET_VAR(rareNonInh eritedData.access()->m_multiCol, m_visitedLinkColumnRuleColor, v); }
1701 void setVisitedLinkTextDecorationColor(const StyleColor& v) { SET_VAR(rareNo nInheritedData, m_visitedLinkTextDecorationColor, v); } 1656 void setVisitedLinkTextDecorationColor(const StyleColor& v) { SET_VAR(rareNo nInheritedData, m_visitedLinkTextDecorationColor, v); }
1702 void setVisitedLinkTextEmphasisColor(const StyleColor& v) { SET_VAR_WITH_SET TER(rareInheritedData, visitedLinkTextEmphasisColor, setVisitedLinkTextEmphasisC olor, v); } 1657 void setVisitedLinkTextEmphasisColor(const StyleColor& v) { SET_VAR_WITH_SET TER(rareInheritedData, visitedLinkTextEmphasisColor, setVisitedLinkTextEmphasisC olor, v); }
1703 void setVisitedLinkTextFillColor(const StyleColor& v) { SET_VAR_WITH_SETTER( rareInheritedData, visitedLinkTextFillColor, setVisitedLinkTextFillColor, v); } 1658 void setVisitedLinkTextFillColor(const StyleColor& v) { SET_VAR_WITH_SETTER( rareInheritedData, visitedLinkTextFillColor, setVisitedLinkTextFillColor, v); }
1704 void setVisitedLinkTextStrokeColor(const StyleColor& v) { SET_VAR_WITH_SETTE R(rareInheritedData, visitedLinkTextStrokeColor, setVisitedLinkTextStrokeColor, v); } 1659 void setVisitedLinkTextStrokeColor(const StyleColor& v) { SET_VAR_WITH_SETTE R(rareInheritedData, visitedLinkTextStrokeColor, setVisitedLinkTextStrokeColor, v); }
1705 1660
1706 void inheritUnicodeBidiFrom(const RenderStyle* parent) { noninherited_flags. unicodeBidi = parent->noninherited_flags.unicodeBidi; } 1661 void inheritUnicodeBidiFrom(const RenderStyle* parent) { noninherited_flags. unicodeBidi = parent->noninherited_flags.unicodeBidi; }
1707 void getShadowExtent(const ShadowList*, LayoutUnit& top, LayoutUnit& right, LayoutUnit& bottom, LayoutUnit& left) const; 1662 void getShadowExtent(const ShadowList*, LayoutUnit& top, LayoutUnit& right, LayoutUnit& bottom, LayoutUnit& left) const;
1708 LayoutBoxExtent getShadowInsetExtent(const ShadowList*) const;
1709 void getShadowHorizontalExtent(const ShadowList*, LayoutUnit& left, LayoutUn it& right) const; 1663 void getShadowHorizontalExtent(const ShadowList*, LayoutUnit& left, LayoutUn it& right) const;
1710 void getShadowVerticalExtent(const ShadowList*, LayoutUnit& top, LayoutUnit& bottom) const; 1664 void getShadowVerticalExtent(const ShadowList*, LayoutUnit& top, LayoutUnit& bottom) const;
1711 void getShadowInlineDirectionExtent(const ShadowList* shadow, LayoutUnit& lo gicalLeft, LayoutUnit& logicalRight) const 1665 void getShadowInlineDirectionExtent(const ShadowList* shadow, LayoutUnit& lo gicalLeft, LayoutUnit& logicalRight) const
1712 { 1666 {
1713 return isHorizontalWritingMode() ? getShadowHorizontalExtent(shadow, log icalLeft, logicalRight) : getShadowVerticalExtent(shadow, logicalLeft, logicalRi ght); 1667 return isHorizontalWritingMode() ? getShadowHorizontalExtent(shadow, log icalLeft, logicalRight) : getShadowVerticalExtent(shadow, logicalLeft, logicalRi ght);
1714 } 1668 }
1715 void getShadowBlockDirectionExtent(const ShadowList* shadow, LayoutUnit& log icalTop, LayoutUnit& logicalBottom) const 1669 void getShadowBlockDirectionExtent(const ShadowList* shadow, LayoutUnit& log icalTop, LayoutUnit& logicalBottom) const
1716 { 1670 {
1717 return isHorizontalWritingMode() ? getShadowVerticalExtent(shadow, logic alTop, logicalBottom) : getShadowHorizontalExtent(shadow, logicalTop, logicalBot tom); 1671 return isHorizontalWritingMode() ? getShadowVerticalExtent(shadow, logic alTop, logicalBottom) : getShadowHorizontalExtent(shadow, logicalTop, logicalBot tom);
1718 } 1672 }
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1886 inline bool RenderStyle::hasPseudoElementStyle() const 1840 inline bool RenderStyle::hasPseudoElementStyle() const
1887 { 1841 {
1888 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; 1842 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK;
1889 } 1843 }
1890 1844
1891 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect ::Radii&); 1845 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect ::Radii&);
1892 1846
1893 } // namespace blink 1847 } // namespace blink
1894 1848
1895 #endif // RenderStyle_h 1849 #endif // RenderStyle_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/style/RenderStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698