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

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

Issue 2880573002: Store border-*-style on SurroundData in ComputedStyle (Closed)
Patch Set: Store border-*-style on SurroundData 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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 return surround_data_->border_.GetImage().Outset(); 467 return surround_data_->border_.GetImage().Outset();
468 } 468 }
469 void SetBorderImageOutset(const BorderImageLengthBox&); 469 void SetBorderImageOutset(const BorderImageLengthBox&);
470 470
471 // Border width properties. 471 // Border width properties.
472 static float InitialBorderWidth() { return 3; } 472 static float InitialBorderWidth() { return 3; }
473 473
474 // TODO(nainar): Move all fixed point logic to a separate class. 474 // TODO(nainar): Move all fixed point logic to a separate class.
475 // border-top-width 475 // border-top-width
476 float BorderTopWidth() const { 476 float BorderTopWidth() const {
477 if (surround_data_->border_.top_.Style() == EBorderStyle::kNone || 477 if (BorderTopStyle() == EBorderStyle::kNone ||
478 surround_data_->border_.top_.Style() == EBorderStyle::kHidden) 478 BorderTopStyle() == EBorderStyle::kHidden)
479 return 0; 479 return 0;
480 return static_cast<float>(BorderTopWidthInternal()) / 480 return static_cast<float>(BorderTopWidthInternal()) /
481 kBorderWidthDenominator; 481 kBorderWidthDenominator;
482 } 482 }
483 void SetBorderTopWidth(float v) { 483 void SetBorderTopWidth(float v) {
484 SetBorderTopWidthInternal(WidthToFixedPoint(v)); 484 SetBorderTopWidthInternal(WidthToFixedPoint(v));
485 } 485 }
486 bool BorderTopNonZero() const {
487 return BorderTopWidth() && (BorderTopStyle() != EBorderStyle::kNone);
488 }
486 489
487 // border-bottom-width 490 // border-bottom-width
488 float BorderBottomWidth() const { 491 float BorderBottomWidth() const {
489 if (surround_data_->border_.bottom_.Style() == EBorderStyle::kNone || 492 if (BorderBottomStyle() == EBorderStyle::kNone ||
490 surround_data_->border_.bottom_.Style() == EBorderStyle::kHidden) 493 BorderBottomStyle() == EBorderStyle::kHidden)
491 return 0; 494 return 0;
492 return static_cast<float>(BorderBottomWidthInternal()) / 495 return static_cast<float>(BorderBottomWidthInternal()) /
493 kBorderWidthDenominator; 496 kBorderWidthDenominator;
494 } 497 }
495 void SetBorderBottomWidth(float v) { 498 void SetBorderBottomWidth(float v) {
496 SetBorderBottomWidthInternal(WidthToFixedPoint(v)); 499 SetBorderBottomWidthInternal(WidthToFixedPoint(v));
497 } 500 }
501 bool BorderBottomNonZero() const {
502 return BorderBottomWidth() && (BorderBottomStyle() != EBorderStyle::kNone);
503 }
498 504
499 // border-left-width 505 // border-left-width
500 float BorderLeftWidth() const { 506 float BorderLeftWidth() const {
501 if (surround_data_->border_.left_.Style() == EBorderStyle::kNone || 507 if (BorderLeftStyle() == EBorderStyle::kNone ||
502 surround_data_->border_.left_.Style() == EBorderStyle::kHidden) 508 BorderLeftStyle() == EBorderStyle::kHidden)
503 return 0; 509 return 0;
504 return static_cast<float>(BorderLeftWidthInternal()) / 510 return static_cast<float>(BorderLeftWidthInternal()) /
505 kBorderWidthDenominator; 511 kBorderWidthDenominator;
506 } 512 }
507 void SetBorderLeftWidth(float v) { 513 void SetBorderLeftWidth(float v) {
508 SetBorderLeftWidthInternal(WidthToFixedPoint(v)); 514 SetBorderLeftWidthInternal(WidthToFixedPoint(v));
509 } 515 }
516 bool BorderLeftNonZero() const {
517 return BorderLeftWidth() && (BorderLeftStyle() != EBorderStyle::kNone);
518 }
510 519
511 // border-right-width 520 // border-right-width
512 float BorderRightWidth() const { 521 float BorderRightWidth() const {
513 if (surround_data_->border_.right_.Style() == EBorderStyle::kNone || 522 if (BorderRightStyle() == EBorderStyle::kNone ||
514 surround_data_->border_.right_.Style() == EBorderStyle::kHidden) 523 BorderRightStyle() == EBorderStyle::kHidden)
515 return 0; 524 return 0;
516 return static_cast<float>(BorderRightWidthInternal()) / 525 return static_cast<float>(BorderRightWidthInternal()) /
517 kBorderWidthDenominator; 526 kBorderWidthDenominator;
518 } 527 }
519 void SetBorderRightWidth(float v) { 528 void SetBorderRightWidth(float v) {
520 SetBorderRightWidthInternal(WidthToFixedPoint(v)); 529 SetBorderRightWidthInternal(WidthToFixedPoint(v));
521 } 530 }
522 531 bool BorderRightNonZero() const {
523 // Border style properties. 532 return BorderRightWidth() && (BorderRightStyle() != EBorderStyle::kNone);
524 static EBorderStyle InitialBorderStyle() { return EBorderStyle::kNone; }
525
526 // border-top-style
527 EBorderStyle BorderTopStyle() const {
528 return surround_data_->border_.Top().Style();
529 }
530 void SetBorderTopStyle(EBorderStyle v) {
531 SET_VAR(surround_data_, border_.top_.style_, static_cast<unsigned>(v));
532 } 533 }
533 534
534 // border-right-style 535 static EBorderStyle InitialColumnRuleStyle() { return EBorderStyle::kNone; }
535 EBorderStyle BorderRightStyle() const {
536 return surround_data_->border_.Right().Style();
537 }
538 void SetBorderRightStyle(EBorderStyle v) {
539 SET_VAR(surround_data_, border_.right_.style_, static_cast<unsigned>(v));
540 }
541
542 // border-left-style
543 EBorderStyle BorderLeftStyle() const {
544 return surround_data_->border_.Left().Style();
545 }
546 void SetBorderLeftStyle(EBorderStyle v) {
547 SET_VAR(surround_data_, border_.left_.style_, static_cast<unsigned>(v));
548 }
549
550 // border-bottom-style
551 EBorderStyle BorderBottomStyle() const {
552 return surround_data_->border_.Bottom().Style();
553 }
554 void SetBorderBottomStyle(EBorderStyle v) {
555 SET_VAR(surround_data_, border_.bottom_.style_, static_cast<unsigned>(v));
556 }
557 536
558 // Border color properties. 537 // Border color properties.
559 // border-left-color 538 // border-left-color
560 void SetBorderLeftColor(const StyleColor& color) { 539 void SetBorderLeftColor(const StyleColor& color) {
561 if (!compareEqual(BorderLeftColor(), color)) { 540 if (!compareEqual(BorderLeftColor(), color)) {
562 SetBorderLeftColorInternal(color.Resolve(Color())); 541 SetBorderLeftColorInternal(color.Resolve(Color()));
563 SetBorderLeftColorIsCurrentColor(color.IsCurrentColor()); 542 SetBorderLeftColorIsCurrentColor(color.IsCurrentColor());
564 } 543 }
565 } 544 }
566 545
(...skipping 2250 matching lines...) Expand 10 before | Expand all | Expand 10 after
2817 bool HasBorderImageOutsets() const { 2796 bool HasBorderImageOutsets() const {
2818 return BorderImage().HasImage() && BorderImage().Outset().NonZero(); 2797 return BorderImage().HasImage() && BorderImage().Outset().NonZero();
2819 } 2798 }
2820 LayoutRectOutsets BorderImageOutsets() const { 2799 LayoutRectOutsets BorderImageOutsets() const {
2821 return ImageOutsets(BorderImage()); 2800 return ImageOutsets(BorderImage());
2822 } 2801 }
2823 bool BorderImageSlicesFill() const { return Border().GetImage().Fill(); } 2802 bool BorderImageSlicesFill() const { return Border().GetImage().Fill(); }
2824 2803
2825 void SetBorderImageSlicesFill(bool); 2804 void SetBorderImageSlicesFill(bool);
2826 const BorderData& Border() const { return surround_data_->border_; } 2805 const BorderData& Border() const { return surround_data_->border_; }
2827 BorderValue BorderLeft() const { 2806 const BorderValue BorderLeft() const {
2828 return BorderValue(surround_data_->border_.Left(), BorderLeftColor(), 2807 return BorderValue(BorderLeftStyle(), BorderLeftColor(), BorderLeftWidth());
2829 BorderLeftWidth());
2830 } 2808 }
2831 BorderValue BorderRight() const { 2809 const BorderValue BorderRight() const {
2832 return BorderValue(surround_data_->border_.Right(), BorderRightColor(), 2810 return BorderValue(BorderRightStyle(), BorderRightColor(),
2833 BorderRightWidth()); 2811 BorderRightWidth());
2834 } 2812 }
2835 BorderValue BorderTop() const { 2813 const BorderValue BorderTop() const {
2836 return BorderValue(surround_data_->border_.Top(), BorderTopColor(), 2814 return BorderValue(BorderTopStyle(), BorderTopColor(), BorderTopWidth());
2837 BorderTopWidth());
2838 } 2815 }
2839 BorderValue BorderBottom() const { 2816 const BorderValue BorderBottom() const {
2840 return BorderValue(surround_data_->border_.Bottom(), BorderBottomColor(), 2817 return BorderValue(BorderBottomStyle(), BorderBottomColor(),
2841 BorderBottomWidth()); 2818 BorderBottomWidth());
2842 } 2819 }
2820
2843 bool BorderSizeEquals(const ComputedStyle& o) const { 2821 bool BorderSizeEquals(const ComputedStyle& o) const {
2844 return BorderWidthEquals(BorderLeftWidth(), o.BorderLeftWidth()) && 2822 return BorderWidthEquals(BorderLeftWidth(), o.BorderLeftWidth()) &&
2845 BorderWidthEquals(BorderTopWidth(), o.BorderTopWidth()) && 2823 BorderWidthEquals(BorderTopWidth(), o.BorderTopWidth()) &&
2846 BorderWidthEquals(BorderRightWidth(), o.BorderRightWidth()) && 2824 BorderWidthEquals(BorderRightWidth(), o.BorderRightWidth()) &&
2847 BorderWidthEquals(BorderBottomWidth(), o.BorderBottomWidth()); 2825 BorderWidthEquals(BorderBottomWidth(), o.BorderBottomWidth());
2848 } 2826 }
2827
2849 BorderValue BorderBefore() const; 2828 BorderValue BorderBefore() const;
2850 BorderValue BorderAfter() const; 2829 BorderValue BorderAfter() const;
2851 BorderValue BorderStart() const; 2830 BorderValue BorderStart() const;
2852 BorderValue BorderEnd() const; 2831 BorderValue BorderEnd() const;
2853 float BorderAfterWidth() const; 2832 float BorderAfterWidth() const;
2854 float BorderBeforeWidth() const; 2833 float BorderBeforeWidth() const;
2855 float BorderEndWidth() const; 2834 float BorderEndWidth() const;
2856 float BorderStartWidth() const; 2835 float BorderStartWidth() const;
2857 float BorderOverWidth() const; 2836 float BorderOverWidth() const;
2858 float BorderUnderWidth() const; 2837 float BorderUnderWidth() const;
2859 2838
2860 bool HasBorderFill() const { return Border().HasBorderFill(); } 2839 bool HasBorderFill() const { return Border().HasBorderFill(); }
2861 bool HasBorder() const { 2840 bool HasBorder() const {
2862 return Border().HasBorder() || BorderLeftWidth() || BorderRightWidth() || 2841 return BorderLeftNonZero() || BorderRightNonZero() || BorderTopNonZero() ||
2863 BorderTopWidth() || BorderBottomWidth(); 2842 BorderBottomNonZero();
2864 } 2843 }
2865 bool HasBorderDecoration() const { return HasBorder() || HasBorderFill(); } 2844 bool HasBorderDecoration() const { return HasBorder() || HasBorderFill(); }
2866 bool HasBorderRadius() const { 2845 bool HasBorderRadius() const {
2867 if (!BorderTopLeftRadius().Width().IsZero()) 2846 if (!BorderTopLeftRadius().Width().IsZero())
2868 return true; 2847 return true;
2869 if (!BorderTopRightRadius().Width().IsZero()) 2848 if (!BorderTopRightRadius().Width().IsZero())
2870 return true; 2849 return true;
2871 if (!BorderBottomLeftRadius().Width().IsZero()) 2850 if (!BorderBottomLeftRadius().Width().IsZero())
2872 return true; 2851 return true;
2873 if (!BorderBottomRightRadius().Width().IsZero()) 2852 if (!BorderBottomRightRadius().Width().IsZero())
2874 return true; 2853 return true;
2875 return false; 2854 return false;
2876 } 2855 }
2877 bool HasBorderColorReferencingCurrentColor() const { 2856 bool HasBorderColorReferencingCurrentColor() const {
2878 return (BorderLeft().NonZero() && BorderLeftColor().IsCurrentColor()) || 2857 return (BorderLeft().NonZero() && BorderLeftColor().IsCurrentColor()) ||
2879 (BorderRight().NonZero() && BorderRightColor().IsCurrentColor()) || 2858 (BorderRight().NonZero() && BorderRightColor().IsCurrentColor()) ||
2880 (BorderTop().NonZero() && BorderTopColor().IsCurrentColor()) || 2859 (BorderTop().NonZero() && BorderTopColor().IsCurrentColor()) ||
2881 (BorderBottom().NonZero() && BorderBottomColor().IsCurrentColor()); 2860 (BorderBottom().NonZero() && BorderBottomColor().IsCurrentColor());
2882 } 2861 }
2883 2862
2884 bool RadiiEqual(const ComputedStyle& o) const { 2863 bool RadiiEqual(const ComputedStyle& o) const {
2885 return BorderTopLeftRadius() == o.BorderTopLeftRadius() && 2864 return BorderTopLeftRadius() == o.BorderTopLeftRadius() &&
2886 BorderTopRightRadius() == o.BorderTopRightRadius() && 2865 BorderTopRightRadius() == o.BorderTopRightRadius() &&
2887 BorderBottomLeftRadius() == o.BorderBottomLeftRadius() && 2866 BorderBottomLeftRadius() == o.BorderBottomLeftRadius() &&
2888 BorderBottomRightRadius() == o.BorderBottomRightRadius(); 2867 BorderBottomRightRadius() == o.BorderBottomRightRadius();
2889 } 2868 }
2890 2869
2891 bool BorderColorEquals(const ComputedStyle& o) const { 2870 bool BorderLeftEquals(const ComputedStyle& o) const {
2892 return (BorderLeftColorInternal() == o.BorderLeftColorInternal() && 2871 return BorderLeftWidthInternal() == o.BorderLeftWidthInternal() &&
2893 BorderRightColorInternal() == o.BorderRightColorInternal() && 2872 BorderLeftStyle() == o.BorderLeftStyle() &&
2894 BorderTopColorInternal() == o.BorderTopColorInternal() && 2873 BorderLeftColor() == o.BorderLeftColor() &&
2895 BorderBottomColorInternal() == o.BorderBottomColorInternal()) && 2874 BorderLeftColorIsCurrentColor() == o.BorderLeftColorIsCurrentColor();
2896 (BorderLeftColorIsCurrentColor() ==
2897 o.BorderLeftColorIsCurrentColor() &&
2898 BorderRightColorIsCurrentColor() ==
2899 o.BorderRightColorIsCurrentColor() &&
2900 BorderTopColorIsCurrentColor() ==
2901 o.BorderTopColorIsCurrentColor() &&
2902 BorderBottomColorIsCurrentColor() ==
2903 o.BorderBottomColorIsCurrentColor());
2904 } 2875 }
2905 2876
2906 bool BorderColorVisuallyEquals(const ComputedStyle& o) const { 2877 bool BorderLeftVisuallyEqual(const ComputedStyle& o) const {
2907 if ((BorderLeftStyle() == EBorderStyle::kNone && 2878 if (BorderLeftStyle() == EBorderStyle::kNone &&
2908 o.BorderLeftStyle() == EBorderStyle::kNone) && 2879 o.BorderLeftStyle() == EBorderStyle::kNone)
2909 (BorderRightStyle() == EBorderStyle::kNone &&
2910 o.BorderRightStyle() == EBorderStyle::kNone) &&
2911 (BorderTopStyle() == EBorderStyle::kNone &&
2912 o.BorderTopStyle() == EBorderStyle::kNone) &&
2913 (BorderBottomStyle() == EBorderStyle::kNone &&
2914 o.BorderBottomStyle() == EBorderStyle::kNone))
2915 return true; 2880 return true;
2916 if ((BorderLeftStyle() == EBorderStyle::kHidden && 2881 if (BorderLeftStyle() == EBorderStyle::kHidden &&
2917 o.BorderLeftStyle() == EBorderStyle::kHidden) && 2882 o.BorderLeftStyle() == EBorderStyle::kHidden)
2918 (BorderRightStyle() == EBorderStyle::kHidden &&
2919 o.BorderRightStyle() == EBorderStyle::kHidden) &&
2920 (BorderTopStyle() == EBorderStyle::kHidden &&
2921 o.BorderTopStyle() == EBorderStyle::kHidden) &&
2922 (BorderBottomStyle() == EBorderStyle::kHidden &&
2923 o.BorderBottomStyle() == EBorderStyle::kHidden))
2924 return true; 2883 return true;
2925 return BorderColorEquals(o); 2884 return BorderLeftEquals(o);
2885 }
2886
2887 bool BorderRightEquals(const ComputedStyle& o) const {
2888 return BorderRightWidthInternal() == o.BorderRightWidthInternal() &&
2889 BorderRightStyle() == o.BorderRightStyle() &&
2890 BorderRightColor() == o.BorderRightColor() &&
2891 BorderRightColorIsCurrentColor() ==
2892 o.BorderRightColorIsCurrentColor();
2893 }
2894
2895 bool BorderRightVisuallyEqual(const ComputedStyle& o) const {
2896 if (BorderRightStyle() == EBorderStyle::kNone &&
shend 2017/05/17 22:18:34 For the future, I think it might be possible to co
nainar 2017/05/18 01:58:35 Made note of this for a future CL. Yeah can't dete
2897 o.BorderRightStyle() == EBorderStyle::kNone)
2898 return true;
2899 if (BorderRightStyle() == EBorderStyle::kHidden &&
2900 o.BorderRightStyle() == EBorderStyle::kHidden)
2901 return true;
2902 return BorderRightEquals(o);
2903 }
2904
2905 bool BorderTopVisuallyEqual(const ComputedStyle& o) const {
2906 if (BorderTopStyle() == EBorderStyle::kNone &&
2907 o.BorderTopStyle() == EBorderStyle::kNone)
2908 return true;
2909 if (BorderTopStyle() == EBorderStyle::kHidden &&
2910 o.BorderTopStyle() == EBorderStyle::kHidden)
2911 return true;
2912 return BorderTopEquals(o);
2913 }
2914
2915 bool BorderTopEquals(const ComputedStyle& o) const {
2916 return BorderTopWidthInternal() == o.BorderTopWidthInternal() &&
2917 BorderTopStyle() == o.BorderTopStyle() &&
2918 BorderTopColor() == o.BorderTopColor() &&
2919 BorderTopColorIsCurrentColor() == o.BorderTopColorIsCurrentColor();
2920 }
2921
2922 bool BorderBottomVisuallyEqual(const ComputedStyle& o) const {
2923 if (BorderBottomStyle() == EBorderStyle::kNone &&
2924 o.BorderBottomStyle() == EBorderStyle::kNone)
2925 return true;
2926 if (BorderBottomStyle() == EBorderStyle::kHidden &&
2927 o.BorderBottomStyle() == EBorderStyle::kHidden)
2928 return true;
2929 return BorderBottomEquals(o);
2930 }
2931
2932 bool BorderBottomEquals(const ComputedStyle& o) const {
2933 return BorderBottomWidthInternal() == o.BorderBottomWidthInternal() &&
2934 BorderBottomStyle() == o.BorderBottomStyle() &&
2935 BorderBottomColor() == o.BorderBottomColor() &&
2936 BorderBottomColorIsCurrentColor() ==
2937 o.BorderBottomColorIsCurrentColor();
2938 }
2939
2940 bool BorderEquals(const ComputedStyle& o) const {
2941 return BorderLeftEquals(o) && BorderRightEquals(o) && BorderTopEquals(o) &&
2942 BorderBottomEquals(o) && BorderImage() == o.BorderImage();
2943 }
2944
2945 bool BorderVisuallyEqual(const ComputedStyle& o) const {
2946 return BorderLeftVisuallyEqual(o) && BorderRightVisuallyEqual(o) &&
2947 BorderTopVisuallyEqual(o) && BorderBottomVisuallyEqual(o);
2926 } 2948 }
2927 2949
2928 void ResetBorder() { 2950 void ResetBorder() {
2929 ResetBorderImage(); 2951 ResetBorderImage();
2930 ResetBorderTop(); 2952 ResetBorderTop();
2931 ResetBorderRight(); 2953 ResetBorderRight();
2932 ResetBorderBottom(); 2954 ResetBorderBottom();
2933 ResetBorderLeft(); 2955 ResetBorderLeft();
2934 ResetBorderTopLeftRadius(); 2956 ResetBorderTopLeftRadius();
2935 ResetBorderTopRightRadius(); 2957 ResetBorderTopRightRadius();
2936 ResetBorderBottomLeftRadius(); 2958 ResetBorderBottomLeftRadius();
2937 ResetBorderBottomRightRadius(); 2959 ResetBorderBottomRightRadius();
2938 } 2960 }
2939 2961
2940 void ResetBorderTop() { 2962 void ResetBorderTop() {
2941 SET_VAR(surround_data_, border_.top_, BorderStyle()); 2963 SetBorderTopStyle(EBorderStyle::kNone);
2942 SetBorderTopWidth(3); 2964 SetBorderTopWidth(3);
2943 SetBorderTopColorInternal(0); 2965 SetBorderTopColorInternal(0);
2944 SetBorderTopColorInternal(true); 2966 SetBorderTopColorInternal(true);
2967 SetBorderTopStyle(EBorderStyle::kNone);
2945 } 2968 }
2946 void ResetBorderRight() { 2969 void ResetBorderRight() {
2947 SET_VAR(surround_data_, border_.right_, BorderStyle()); 2970 SetBorderRightStyle(EBorderStyle::kNone);
2948 SetBorderRightWidth(3); 2971 SetBorderRightWidth(3);
2949 SetBorderRightColorInternal(0); 2972 SetBorderRightColorInternal(0);
2950 SetBorderRightColorInternal(true); 2973 SetBorderRightColorInternal(true);
2974 SetBorderRightStyle(EBorderStyle::kNone);
2951 } 2975 }
2952 void ResetBorderBottom() { 2976 void ResetBorderBottom() {
2953 SET_VAR(surround_data_, border_.bottom_, BorderStyle()); 2977 SetBorderBottomStyle(EBorderStyle::kNone);
2954 SetBorderBottomWidth(3); 2978 SetBorderBottomWidth(3);
2955 SetBorderBottomColorInternal(0); 2979 SetBorderBottomColorInternal(0);
2956 SetBorderBottomColorInternal(true); 2980 SetBorderBottomColorInternal(true);
2981 SetBorderBottomStyle(EBorderStyle::kNone);
2957 } 2982 }
2958 void ResetBorderLeft() { 2983 void ResetBorderLeft() {
2959 SET_VAR(surround_data_, border_.left_, BorderStyle()); 2984 SetBorderLeftStyle(EBorderStyle::kNone);
2960 SetBorderLeftWidth(3); 2985 SetBorderLeftWidth(3);
2961 SetBorderLeftColorInternal(0); 2986 SetBorderLeftColorInternal(0);
2962 SetBorderLeftColorInternal(true); 2987 SetBorderLeftColorInternal(true);
2988 SetBorderLeftStyle(EBorderStyle::kNone);
2963 } 2989 }
2964 void ResetBorderImage() { 2990 void ResetBorderImage() {
2965 SET_VAR(surround_data_, border_.image_, NinePieceImage()); 2991 SET_VAR(surround_data_, border_.image_, NinePieceImage());
2966 } 2992 }
2967 2993
2968 void SetBorderRadius(const LengthSize& s) { 2994 void SetBorderRadius(const LengthSize& s) {
2969 SetBorderTopLeftRadius(s); 2995 SetBorderTopLeftRadius(s);
2970 SetBorderTopRightRadius(s); 2996 SetBorderTopRightRadius(s);
2971 SetBorderBottomLeftRadius(s); 2997 SetBorderBottomLeftRadius(s);
2972 SetBorderBottomRightRadius(s); 2998 SetBorderBottomRightRadius(s);
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
3765 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); 3791 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId)));
3766 } 3792 }
3767 3793
3768 inline bool ComputedStyle::HasPseudoElementStyle() const { 3794 inline bool ComputedStyle::HasPseudoElementStyle() const {
3769 return PseudoBitsInternal() & kElementPseudoIdMask; 3795 return PseudoBitsInternal() & kElementPseudoIdMask;
3770 } 3796 }
3771 3797
3772 } // namespace blink 3798 } // namespace blink
3773 3799
3774 #endif // ComputedStyle_h 3800 #endif // ComputedStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698