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

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

Issue 2880573002: Store border-*-style on SurroundData in ComputedStyle (Closed)
Patch Set: Merge branch 'enumClass' into borderStyle Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
6 * rights reserved. 6 * rights reserved.
7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 return surround_data_->border_.GetImage().Outset(); 509 return surround_data_->border_.GetImage().Outset();
510 } 510 }
511 void SetBorderImageOutset(const BorderImageLengthBox&); 511 void SetBorderImageOutset(const BorderImageLengthBox&);
512 512
513 // Border width properties. 513 // Border width properties.
514 static float InitialBorderWidth() { return 3; } 514 static float InitialBorderWidth() { return 3; }
515 515
516 // TODO(nainar): Move all fixed point logic to a separate class. 516 // TODO(nainar): Move all fixed point logic to a separate class.
517 // border-top-width 517 // border-top-width
518 float BorderTopWidth() const { 518 float BorderTopWidth() const {
519 if (surround_data_->border_.top_.Style() == EBorderStyle::kNone || 519 if (BorderTopStyle() == EBorderStyle::kNone ||
520 surround_data_->border_.top_.Style() == EBorderStyle::kHidden) 520 BorderTopStyle() == EBorderStyle::kHidden)
521 return 0; 521 return 0;
522 return static_cast<float>(BorderTopWidthInternal()) / 522 return static_cast<float>(BorderTopWidthInternal()) /
523 kBorderWidthDenominator; 523 kBorderWidthDenominator;
524 } 524 }
525 void SetBorderTopWidth(float v) { 525 void SetBorderTopWidth(float v) {
526 SetBorderTopWidthInternal(WidthToFixedPoint(v)); 526 SetBorderTopWidthInternal(WidthToFixedPoint(v));
527 } 527 }
528 bool BorderTopNonZero() const {
529 return BorderTopWidth() && (BorderTopStyle() != EBorderStyle::kNone);
530 }
528 531
529 // border-bottom-width 532 // border-bottom-width
530 float BorderBottomWidth() const { 533 float BorderBottomWidth() const {
531 if (surround_data_->border_.bottom_.Style() == EBorderStyle::kNone || 534 if (BorderBottomStyle() == EBorderStyle::kNone ||
532 surround_data_->border_.bottom_.Style() == EBorderStyle::kHidden) 535 BorderBottomStyle() == EBorderStyle::kHidden)
533 return 0; 536 return 0;
534 return static_cast<float>(BorderBottomWidthInternal()) / 537 return static_cast<float>(BorderBottomWidthInternal()) /
535 kBorderWidthDenominator; 538 kBorderWidthDenominator;
536 } 539 }
537 void SetBorderBottomWidth(float v) { 540 void SetBorderBottomWidth(float v) {
538 SetBorderBottomWidthInternal(WidthToFixedPoint(v)); 541 SetBorderBottomWidthInternal(WidthToFixedPoint(v));
539 } 542 }
543 bool BorderBottomNonZero() const {
544 return BorderBottomWidth() && (BorderBottomStyle() != EBorderStyle::kNone);
545 }
540 546
541 // border-left-width 547 // border-left-width
542 float BorderLeftWidth() const { 548 float BorderLeftWidth() const {
543 if (surround_data_->border_.left_.Style() == EBorderStyle::kNone || 549 if (BorderLeftStyle() == EBorderStyle::kNone ||
544 surround_data_->border_.left_.Style() == EBorderStyle::kHidden) 550 BorderLeftStyle() == EBorderStyle::kHidden)
545 return 0; 551 return 0;
546 return static_cast<float>(BorderLeftWidthInternal()) / 552 return static_cast<float>(BorderLeftWidthInternal()) /
547 kBorderWidthDenominator; 553 kBorderWidthDenominator;
548 } 554 }
549 void SetBorderLeftWidth(float v) { 555 void SetBorderLeftWidth(float v) {
550 SetBorderLeftWidthInternal(WidthToFixedPoint(v)); 556 SetBorderLeftWidthInternal(WidthToFixedPoint(v));
551 } 557 }
558 bool BorderLeftNonZero() const {
559 return BorderLeftWidth() && (BorderLeftStyle() != EBorderStyle::kNone);
560 }
552 561
553 // border-right-width 562 // border-right-width
554 float BorderRightWidth() const { 563 float BorderRightWidth() const {
555 if (surround_data_->border_.right_.Style() == EBorderStyle::kNone || 564 if (BorderRightStyle() == EBorderStyle::kNone ||
556 surround_data_->border_.right_.Style() == EBorderStyle::kHidden) 565 BorderRightStyle() == EBorderStyle::kHidden)
557 return 0; 566 return 0;
558 return static_cast<float>(BorderRightWidthInternal()) / 567 return static_cast<float>(BorderRightWidthInternal()) /
559 kBorderWidthDenominator; 568 kBorderWidthDenominator;
560 } 569 }
561 void SetBorderRightWidth(float v) { 570 void SetBorderRightWidth(float v) {
562 SetBorderRightWidthInternal(WidthToFixedPoint(v)); 571 SetBorderRightWidthInternal(WidthToFixedPoint(v));
563 } 572 }
564 573 bool BorderRightNonZero() const {
565 // Border style properties. 574 return BorderRightWidth() && (BorderRightStyle() != EBorderStyle::kNone);
566 static EBorderStyle InitialBorderStyle() { return EBorderStyle::kNone; }
567
568 // border-top-style
569 EBorderStyle BorderTopStyle() const {
570 return surround_data_->border_.Top().Style();
571 }
572 void SetBorderTopStyle(EBorderStyle v) {
573 SET_VAR(surround_data_, border_.top_.style_, static_cast<unsigned>(v));
574 } 575 }
575 576
576 // border-right-style 577 static EBorderStyle InitialColumnRuleStyle() { return EBorderStyle::kNone; }
577 EBorderStyle BorderRightStyle() const {
578 return surround_data_->border_.Right().Style();
579 }
580 void SetBorderRightStyle(EBorderStyle v) {
581 SET_VAR(surround_data_, border_.right_.style_, static_cast<unsigned>(v));
582 }
583
584 // border-left-style
585 EBorderStyle BorderLeftStyle() const {
586 return surround_data_->border_.Left().Style();
587 }
588 void SetBorderLeftStyle(EBorderStyle v) {
589 SET_VAR(surround_data_, border_.left_.style_, static_cast<unsigned>(v));
590 }
591
592 // border-bottom-style
593 EBorderStyle BorderBottomStyle() const {
594 return surround_data_->border_.Bottom().Style();
595 }
596 void SetBorderBottomStyle(EBorderStyle v) {
597 SET_VAR(surround_data_, border_.bottom_.style_, static_cast<unsigned>(v));
598 }
599 578
600 // Border color properties. 579 // Border color properties.
601 // border-left-color 580 // border-left-color
602 void SetBorderLeftColor(const StyleColor& color) { 581 void SetBorderLeftColor(const StyleColor& color) {
603 if (!compareEqual(BorderLeftColor(), color)) { 582 if (!compareEqual(BorderLeftColor(), color)) {
604 SetBorderLeftColorInternal(color.Resolve(Color())); 583 SetBorderLeftColorInternal(color.Resolve(Color()));
605 SetBorderLeftColorIsCurrentColor(color.IsCurrentColor()); 584 SetBorderLeftColorIsCurrentColor(color.IsCurrentColor());
606 } 585 }
607 } 586 }
608 587
(...skipping 2243 matching lines...) Expand 10 before | Expand all | Expand 10 after
2852 bool HasBorderImageOutsets() const { 2831 bool HasBorderImageOutsets() const {
2853 return BorderImage().HasImage() && BorderImage().Outset().NonZero(); 2832 return BorderImage().HasImage() && BorderImage().Outset().NonZero();
2854 } 2833 }
2855 LayoutRectOutsets BorderImageOutsets() const { 2834 LayoutRectOutsets BorderImageOutsets() const {
2856 return ImageOutsets(BorderImage()); 2835 return ImageOutsets(BorderImage());
2857 } 2836 }
2858 bool BorderImageSlicesFill() const { return Border().GetImage().Fill(); } 2837 bool BorderImageSlicesFill() const { return Border().GetImage().Fill(); }
2859 2838
2860 void SetBorderImageSlicesFill(bool); 2839 void SetBorderImageSlicesFill(bool);
2861 const BorderData& Border() const { return surround_data_->border_; } 2840 const BorderData& Border() const { return surround_data_->border_; }
2862 BorderValue BorderLeft() const { 2841 const BorderValue BorderLeft() const {
2863 return BorderValue(surround_data_->border_.Left(), BorderLeftColor(), 2842 return BorderValue(BorderLeftStyle(), BorderLeftColor(), BorderLeftWidth(),
2864 BorderLeftWidth()); 2843 OutlineStyleIsAuto());
2865 } 2844 }
2866 BorderValue BorderRight() const { 2845 const BorderValue BorderRight() const {
2867 return BorderValue(surround_data_->border_.Right(), BorderRightColor(), 2846 return BorderValue(BorderRightStyle(), BorderRightColor(),
2868 BorderRightWidth()); 2847 BorderRightWidth(), OutlineStyleIsAuto());
2869 } 2848 }
2870 BorderValue BorderTop() const { 2849 const BorderValue BorderTop() const {
2871 return BorderValue(surround_data_->border_.Top(), BorderTopColor(), 2850 return BorderValue(BorderTopStyle(), BorderTopColor(), BorderTopWidth(),
2872 BorderTopWidth()); 2851 OutlineStyleIsAuto());
2873 } 2852 }
2874 BorderValue BorderBottom() const { 2853 const BorderValue BorderBottom() const {
2875 return BorderValue(surround_data_->border_.Bottom(), BorderBottomColor(), 2854 return BorderValue(BorderBottomStyle(), BorderBottomColor(),
2876 BorderBottomWidth()); 2855 BorderBottomWidth(), OutlineStyleIsAuto());
2877 } 2856 }
2857
2878 bool BorderSizeEquals(const ComputedStyle& o) const { 2858 bool BorderSizeEquals(const ComputedStyle& o) const {
2879 return BorderWidthEquals(BorderLeftWidth(), o.BorderLeftWidth()) && 2859 return BorderWidthEquals(BorderLeftWidth(), o.BorderLeftWidth()) &&
2880 BorderWidthEquals(BorderTopWidth(), o.BorderTopWidth()) && 2860 BorderWidthEquals(BorderTopWidth(), o.BorderTopWidth()) &&
2881 BorderWidthEquals(BorderRightWidth(), o.BorderRightWidth()) && 2861 BorderWidthEquals(BorderRightWidth(), o.BorderRightWidth()) &&
2882 BorderWidthEquals(BorderBottomWidth(), o.BorderBottomWidth()); 2862 BorderWidthEquals(BorderBottomWidth(), o.BorderBottomWidth());
2883 } 2863 }
2864
2884 BorderValue BorderBefore() const; 2865 BorderValue BorderBefore() const;
2885 BorderValue BorderAfter() const; 2866 BorderValue BorderAfter() const;
2886 BorderValue BorderStart() const; 2867 BorderValue BorderStart() const;
2887 BorderValue BorderEnd() const; 2868 BorderValue BorderEnd() const;
2888 float BorderAfterWidth() const; 2869 float BorderAfterWidth() const;
2889 float BorderBeforeWidth() const; 2870 float BorderBeforeWidth() const;
2890 float BorderEndWidth() const; 2871 float BorderEndWidth() const;
2891 float BorderStartWidth() const; 2872 float BorderStartWidth() const;
2892 float BorderOverWidth() const; 2873 float BorderOverWidth() const;
2893 float BorderUnderWidth() const; 2874 float BorderUnderWidth() const;
2894 2875
2895 bool HasBorderFill() const { return Border().HasBorderFill(); } 2876 bool HasBorderFill() const { return Border().HasBorderFill(); }
2896 bool HasBorder() const { 2877 bool HasBorder() const {
2897 return Border().HasBorder() || BorderLeftWidth() || BorderRightWidth() || 2878 return BorderLeftNonZero() || BorderRightNonZero() || BorderTopNonZero() ||
2898 BorderTopWidth() || BorderBottomWidth(); 2879 BorderBottomNonZero();
2899 } 2880 }
2900 bool HasBorderDecoration() const { return HasBorder() || HasBorderFill(); } 2881 bool HasBorderDecoration() const { return HasBorder() || HasBorderFill(); }
2901 bool HasBorderRadius() const { 2882 bool HasBorderRadius() const {
2902 if (!BorderTopLeftRadius().Width().IsZero()) 2883 if (!BorderTopLeftRadius().Width().IsZero())
2903 return true; 2884 return true;
2904 if (!BorderTopRightRadius().Width().IsZero()) 2885 if (!BorderTopRightRadius().Width().IsZero())
2905 return true; 2886 return true;
2906 if (!BorderBottomLeftRadius().Width().IsZero()) 2887 if (!BorderBottomLeftRadius().Width().IsZero())
2907 return true; 2888 return true;
2908 if (!BorderBottomRightRadius().Width().IsZero()) 2889 if (!BorderBottomRightRadius().Width().IsZero())
2909 return true; 2890 return true;
2910 return false; 2891 return false;
2911 } 2892 }
2912 bool HasBorderColorReferencingCurrentColor() const { 2893 bool HasBorderColorReferencingCurrentColor() const {
2913 return (BorderLeft().NonZero() && BorderLeftColor().IsCurrentColor()) || 2894 return (BorderLeft().NonZero() && BorderLeftColor().IsCurrentColor()) ||
2914 (BorderRight().NonZero() && BorderRightColor().IsCurrentColor()) || 2895 (BorderRight().NonZero() && BorderRightColor().IsCurrentColor()) ||
2915 (BorderTop().NonZero() && BorderTopColor().IsCurrentColor()) || 2896 (BorderTop().NonZero() && BorderTopColor().IsCurrentColor()) ||
2916 (BorderBottom().NonZero() && BorderBottomColor().IsCurrentColor()); 2897 (BorderBottom().NonZero() && BorderBottomColor().IsCurrentColor());
2917 } 2898 }
2918 2899
2919 bool RadiiEqual(const ComputedStyle& o) const { 2900 bool RadiiEqual(const ComputedStyle& o) const {
2920 return BorderTopLeftRadius() == o.BorderTopLeftRadius() && 2901 return BorderTopLeftRadius() == o.BorderTopLeftRadius() &&
2921 BorderTopRightRadius() == o.BorderTopRightRadius() && 2902 BorderTopRightRadius() == o.BorderTopRightRadius() &&
2922 BorderBottomLeftRadius() == o.BorderBottomLeftRadius() && 2903 BorderBottomLeftRadius() == o.BorderBottomLeftRadius() &&
2923 BorderBottomRightRadius() == o.BorderBottomRightRadius(); 2904 BorderBottomRightRadius() == o.BorderBottomRightRadius();
2924 } 2905 }
2925 2906
2926 bool BorderColorEquals(const ComputedStyle& o) const { 2907 bool BorderLeftEquals(const ComputedStyle& o) const {
2927 return (BorderLeftColorInternal() == o.BorderLeftColorInternal() && 2908 return BorderLeftWidthInternal() == o.BorderLeftWidthInternal() &&
2928 BorderRightColorInternal() == o.BorderRightColorInternal() && 2909 BorderLeftStyle() == o.BorderLeftStyle() &&
2929 BorderTopColorInternal() == o.BorderTopColorInternal() && 2910 BorderLeftColor() == o.BorderLeftColor() &&
2930 BorderBottomColorInternal() == o.BorderBottomColorInternal()) && 2911 BorderLeftColorIsCurrentColor() == o.BorderLeftColorIsCurrentColor();
2931 (BorderLeftColorIsCurrentColor() ==
2932 o.BorderLeftColorIsCurrentColor() &&
2933 BorderRightColorIsCurrentColor() ==
2934 o.BorderRightColorIsCurrentColor() &&
2935 BorderTopColorIsCurrentColor() ==
2936 o.BorderTopColorIsCurrentColor() &&
2937 BorderBottomColorIsCurrentColor() ==
2938 o.BorderBottomColorIsCurrentColor());
2939 } 2912 }
2940 2913
2941 bool BorderColorVisuallyEquals(const ComputedStyle& o) const { 2914 bool BorderLeftVisuallyEqual(const ComputedStyle& o) const {
2942 if ((BorderLeftStyle() == EBorderStyle::kNone && 2915 if (BorderLeftStyle() == EBorderStyle::kNone &&
2943 o.BorderLeftStyle() == EBorderStyle::kNone) && 2916 o.BorderLeftStyle() == EBorderStyle::kNone)
2944 (BorderRightStyle() == EBorderStyle::kNone &&
2945 o.BorderRightStyle() == EBorderStyle::kNone) &&
2946 (BorderTopStyle() == EBorderStyle::kNone &&
2947 o.BorderTopStyle() == EBorderStyle::kNone) &&
2948 (BorderBottomStyle() == EBorderStyle::kNone &&
2949 o.BorderBottomStyle() == EBorderStyle::kNone))
2950 return true; 2917 return true;
2951 if ((BorderLeftStyle() == EBorderStyle::kHidden && 2918 if (BorderLeftStyle() == EBorderStyle::kHidden &&
2952 o.BorderLeftStyle() == EBorderStyle::kHidden) && 2919 o.BorderLeftStyle() == EBorderStyle::kHidden)
2953 (BorderRightStyle() == EBorderStyle::kHidden &&
2954 o.BorderRightStyle() == EBorderStyle::kHidden) &&
2955 (BorderTopStyle() == EBorderStyle::kHidden &&
2956 o.BorderTopStyle() == EBorderStyle::kHidden) &&
2957 (BorderBottomStyle() == EBorderStyle::kHidden &&
2958 o.BorderBottomStyle() == EBorderStyle::kHidden))
2959 return true; 2920 return true;
2960 return BorderColorEquals(o); 2921 return BorderLeftEquals(o);
2922 }
2923
2924 bool BorderRightEquals(const ComputedStyle& o) const {
2925 return BorderRightWidthInternal() == o.BorderRightWidthInternal() &&
2926 BorderRightStyle() == o.BorderRightStyle() &&
2927 BorderRightColor() == o.BorderRightColor() &&
2928 BorderRightColorIsCurrentColor() ==
2929 o.BorderRightColorIsCurrentColor();
2930 }
2931
2932 bool BorderRightVisuallyEqual(const ComputedStyle& o) const {
2933 if (BorderRightStyle() == EBorderStyle::kNone &&
2934 o.BorderRightStyle() == EBorderStyle::kNone)
2935 return true;
2936 if (BorderRightStyle() == EBorderStyle::kHidden &&
2937 o.BorderRightStyle() == EBorderStyle::kHidden)
2938 return true;
2939 return BorderRightEquals(o);
2940 }
2941
2942 bool BorderTopVisuallyEqual(const ComputedStyle& o) const {
2943 if (BorderTopStyle() == EBorderStyle::kNone &&
2944 o.BorderTopStyle() == EBorderStyle::kNone)
2945 return true;
2946 if (BorderTopStyle() == EBorderStyle::kHidden &&
2947 o.BorderTopStyle() == EBorderStyle::kHidden)
2948 return true;
2949 return BorderTopEquals(o);
2950 }
2951
2952 bool BorderTopEquals(const ComputedStyle& o) const {
2953 return BorderTopWidthInternal() == o.BorderTopWidthInternal() &&
2954 BorderTopStyle() == o.BorderTopStyle() &&
2955 BorderTopColor() == o.BorderTopColor() &&
2956 BorderTopColorIsCurrentColor() == o.BorderTopColorIsCurrentColor();
2957 }
2958
2959 bool BorderBottomVisuallyEqual(const ComputedStyle& o) const {
2960 if (BorderBottomStyle() == EBorderStyle::kNone &&
2961 o.BorderBottomStyle() == EBorderStyle::kNone)
2962 return true;
2963 if (BorderBottomStyle() == EBorderStyle::kHidden &&
2964 o.BorderBottomStyle() == EBorderStyle::kHidden)
2965 return true;
2966 return BorderBottomEquals(o);
2967 }
2968
2969 bool BorderBottomEquals(const ComputedStyle& o) const {
2970 return BorderBottomWidthInternal() == o.BorderBottomWidthInternal() &&
2971 BorderBottomStyle() == o.BorderBottomStyle() &&
2972 BorderBottomColor() == o.BorderBottomColor() &&
2973 BorderBottomColorIsCurrentColor() ==
2974 o.BorderBottomColorIsCurrentColor();
2975 }
2976
2977 bool BorderEquals(const ComputedStyle& o) const {
2978 return BorderLeftEquals(o) && BorderRightEquals(o) && BorderTopEquals(o) &&
2979 BorderBottomEquals(o) && BorderImage() == o.BorderImage();
2980 }
2981
2982 bool BorderVisuallyEqual(const ComputedStyle& o) const {
2983 return BorderLeftVisuallyEqual(o) && BorderRightVisuallyEqual(o) &&
2984 BorderTopVisuallyEqual(o) && BorderBottomVisuallyEqual(o) &&
2985 BorderImage() == o.BorderImage();
2961 } 2986 }
2962 2987
2963 void ResetBorder() { 2988 void ResetBorder() {
2964 ResetBorderImage(); 2989 ResetBorderImage();
2965 ResetBorderTop(); 2990 ResetBorderTop();
2966 ResetBorderRight(); 2991 ResetBorderRight();
2967 ResetBorderBottom(); 2992 ResetBorderBottom();
2968 ResetBorderLeft(); 2993 ResetBorderLeft();
2969 ResetBorderTopLeftRadius(); 2994 ResetBorderTopLeftRadius();
2970 ResetBorderTopRightRadius(); 2995 ResetBorderTopRightRadius();
2971 ResetBorderBottomLeftRadius(); 2996 ResetBorderBottomLeftRadius();
2972 ResetBorderBottomRightRadius(); 2997 ResetBorderBottomRightRadius();
2973 } 2998 }
2974 2999
2975 void ResetBorderTop() { 3000 void ResetBorderTop() {
2976 SET_VAR(surround_data_, border_.top_, BorderStyle()); 3001 SetBorderTopStyle(EBorderStyle::kNone);
2977 SetBorderTopWidth(3); 3002 SetBorderTopWidth(3);
2978 SetBorderTopColorInternal(0); 3003 SetBorderTopColorInternal(0);
2979 SetBorderTopColorInternal(true); 3004 SetBorderTopColorInternal(true);
3005 SetBorderTopStyle(EBorderStyle::kNone);
2980 } 3006 }
2981 void ResetBorderRight() { 3007 void ResetBorderRight() {
2982 SET_VAR(surround_data_, border_.right_, BorderStyle()); 3008 SetBorderRightStyle(EBorderStyle::kNone);
2983 SetBorderRightWidth(3); 3009 SetBorderRightWidth(3);
2984 SetBorderRightColorInternal(0); 3010 SetBorderRightColorInternal(0);
2985 SetBorderRightColorInternal(true); 3011 SetBorderRightColorInternal(true);
3012 SetBorderRightStyle(EBorderStyle::kNone);
2986 } 3013 }
2987 void ResetBorderBottom() { 3014 void ResetBorderBottom() {
2988 SET_VAR(surround_data_, border_.bottom_, BorderStyle()); 3015 SetBorderBottomStyle(EBorderStyle::kNone);
2989 SetBorderBottomWidth(3); 3016 SetBorderBottomWidth(3);
2990 SetBorderBottomColorInternal(0); 3017 SetBorderBottomColorInternal(0);
2991 SetBorderBottomColorInternal(true); 3018 SetBorderBottomColorInternal(true);
3019 SetBorderBottomStyle(EBorderStyle::kNone);
2992 } 3020 }
2993 void ResetBorderLeft() { 3021 void ResetBorderLeft() {
2994 SET_VAR(surround_data_, border_.left_, BorderStyle()); 3022 SetBorderLeftStyle(EBorderStyle::kNone);
2995 SetBorderLeftWidth(3); 3023 SetBorderLeftWidth(3);
2996 SetBorderLeftColorInternal(0); 3024 SetBorderLeftColorInternal(0);
2997 SetBorderLeftColorInternal(true); 3025 SetBorderLeftColorInternal(true);
3026 SetBorderLeftStyle(EBorderStyle::kNone);
2998 } 3027 }
2999 void ResetBorderImage() { 3028 void ResetBorderImage() {
3000 SET_VAR(surround_data_, border_.image_, NinePieceImage()); 3029 SET_VAR(surround_data_, border_.image_, NinePieceImage());
3001 } 3030 }
3002 3031
3003 void SetBorderRadius(const LengthSize& s) { 3032 void SetBorderRadius(const LengthSize& s) {
3004 SetBorderTopLeftRadius(s); 3033 SetBorderTopLeftRadius(s);
3005 SetBorderTopRightRadius(s); 3034 SetBorderTopRightRadius(s);
3006 SetBorderBottomLeftRadius(s); 3035 SetBorderBottomLeftRadius(s);
3007 SetBorderBottomRightRadius(s); 3036 SetBorderBottomRightRadius(s);
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
3800 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); 3829 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId)));
3801 } 3830 }
3802 3831
3803 inline bool ComputedStyle::HasPseudoElementStyle() const { 3832 inline bool ComputedStyle::HasPseudoElementStyle() const {
3804 return PseudoBitsInternal() & kElementPseudoIdMask; 3833 return PseudoBitsInternal() & kElementPseudoIdMask;
3805 } 3834 }
3806 3835
3807 } // namespace blink 3836 } // namespace blink
3808 3837
3809 #endif // ComputedStyle_h 3838 #endif // ComputedStyle_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/CachedUAStyle.h ('k') | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698