| 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 |     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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   553   // border-top-color |   553   // border-top-color | 
|   554   void SetBorderTopColor(const StyleColor& v) { |   554   void SetBorderTopColor(const StyleColor& v) { | 
|   555     SET_BORDERVALUE_COLOR(surround_data_, border_.top_, v); |   555     SET_BORDERVALUE_COLOR(surround_data_, border_.top_, v); | 
|   556   } |   556   } | 
|   557  |   557  | 
|   558   // border-bottom-color |   558   // border-bottom-color | 
|   559   void SetBorderBottomColor(const StyleColor& v) { |   559   void SetBorderBottomColor(const StyleColor& v) { | 
|   560     SET_BORDERVALUE_COLOR(surround_data_, border_.bottom_, v); |   560     SET_BORDERVALUE_COLOR(surround_data_, border_.bottom_, v); | 
|   561   } |   561   } | 
|   562  |   562  | 
|   563   // Border radius properties. |  | 
|   564   static LengthSize InitialBorderRadius() { |  | 
|   565     return LengthSize(Length(0, kFixed), Length(0, kFixed)); |  | 
|   566   } |  | 
|   567  |  | 
|   568   // border-top-left-radius (aka -webkit-border-top-left-radius) |  | 
|   569   const LengthSize& BorderTopLeftRadius() const { |  | 
|   570     return surround_data_->border_.TopLeft(); |  | 
|   571   } |  | 
|   572   void SetBorderTopLeftRadius(const LengthSize& s) { |  | 
|   573     SET_VAR(surround_data_, border_.top_left_, s); |  | 
|   574   } |  | 
|   575  |  | 
|   576   // border-top-right-radius (aka -webkit-border-top-right-radius) |  | 
|   577   const LengthSize& BorderTopRightRadius() const { |  | 
|   578     return surround_data_->border_.TopRight(); |  | 
|   579   } |  | 
|   580   void SetBorderTopRightRadius(const LengthSize& s) { |  | 
|   581     SET_VAR(surround_data_, border_.top_right_, s); |  | 
|   582   } |  | 
|   583  |  | 
|   584   // border-bottom-left-radius (aka -webkit-border-bottom-left-radius) |  | 
|   585   const LengthSize& BorderBottomLeftRadius() const { |  | 
|   586     return surround_data_->border_.BottomLeft(); |  | 
|   587   } |  | 
|   588   void SetBorderBottomLeftRadius(const LengthSize& s) { |  | 
|   589     SET_VAR(surround_data_, border_.bottom_left_, s); |  | 
|   590   } |  | 
|   591  |  | 
|   592   // border-bottom-right-radius (aka -webkit-border-bottom-right-radius) |  | 
|   593   const LengthSize& BorderBottomRightRadius() const { |  | 
|   594     return surround_data_->border_.BottomRight(); |  | 
|   595   } |  | 
|   596   void SetBorderBottomRightRadius(const LengthSize& s) { |  | 
|   597     SET_VAR(surround_data_, border_.bottom_right_, s); |  | 
|   598   } |  | 
|   599  |  | 
|   600   // box-shadow (aka -webkit-box-shadow) |   563   // box-shadow (aka -webkit-box-shadow) | 
|   601   static ShadowList* InitialBoxShadow() { return 0; } |   564   static ShadowList* InitialBoxShadow() { return 0; } | 
|   602   ShadowList* BoxShadow() const { |   565   ShadowList* BoxShadow() const { | 
|   603     return rare_non_inherited_data_->box_shadow_.Get(); |   566     return rare_non_inherited_data_->box_shadow_.Get(); | 
|   604   } |   567   } | 
|   605   void SetBoxShadow(PassRefPtr<ShadowList>); |   568   void SetBoxShadow(PassRefPtr<ShadowList>); | 
|   606  |   569  | 
|   607   // box-sizing (aka -webkit-box-sizing) |   570   // box-sizing (aka -webkit-box-sizing) | 
|   608   static EBoxSizing InitialBoxSizing() { return EBoxSizing::kContentBox; } |   571   static EBoxSizing InitialBoxSizing() { return EBoxSizing::kContentBox; } | 
|   609   EBoxSizing BoxSizing() const { |   572   EBoxSizing BoxSizing() const { | 
| (...skipping 2268 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2878   float BorderAfterWidth() const; |  2841   float BorderAfterWidth() const; | 
|  2879   float BorderBeforeWidth() const; |  2842   float BorderBeforeWidth() const; | 
|  2880   float BorderEndWidth() const; |  2843   float BorderEndWidth() const; | 
|  2881   float BorderStartWidth() const; |  2844   float BorderStartWidth() const; | 
|  2882   float BorderOverWidth() const; |  2845   float BorderOverWidth() const; | 
|  2883   float BorderUnderWidth() const; |  2846   float BorderUnderWidth() const; | 
|  2884  |  2847  | 
|  2885   bool HasBorderFill() const { return Border().HasBorderFill(); } |  2848   bool HasBorderFill() const { return Border().HasBorderFill(); } | 
|  2886   bool HasBorder() const { return Border().HasBorder(); } |  2849   bool HasBorder() const { return Border().HasBorder(); } | 
|  2887   bool HasBorderDecoration() const { return HasBorder() || HasBorderFill(); } |  2850   bool HasBorderDecoration() const { return HasBorder() || HasBorderFill(); } | 
|  2888   bool HasBorderRadius() const { return Border().HasBorderRadius(); } |  2851   bool HasBorderRadius() const { | 
 |  2852     if (!BorderTopLeftRadius().Width().IsZero()) | 
 |  2853       return true; | 
 |  2854     if (!BorderTopRightRadius().Width().IsZero()) | 
 |  2855       return true; | 
 |  2856     if (!BorderBottomLeftRadius().Width().IsZero()) | 
 |  2857       return true; | 
 |  2858     if (!BorderBottomRightRadius().Width().IsZero()) | 
 |  2859       return true; | 
 |  2860     return false; | 
 |  2861   } | 
|  2889   bool HasBorderColorReferencingCurrentColor() const { |  2862   bool HasBorderColorReferencingCurrentColor() const { | 
|  2890     return Border().HasBorderColorReferencingCurrentColor(); |  2863     return Border().HasBorderColorReferencingCurrentColor(); | 
|  2891   } |  2864   } | 
|  2892  |  2865  | 
 |  2866   bool RadiiEqual(const ComputedStyle& o) const { | 
 |  2867     return BorderTopLeftRadius() == o.BorderTopLeftRadius() && | 
 |  2868            BorderTopRightRadius() == o.BorderTopRightRadius() && | 
 |  2869            BorderBottomLeftRadius() == o.BorderBottomLeftRadius() && | 
 |  2870            BorderBottomRightRadius() == o.BorderBottomRightRadius(); | 
 |  2871   } | 
 |  2872  | 
|  2893   void ResetBorder() { |  2873   void ResetBorder() { | 
|  2894     ResetBorderImage(); |  2874     ResetBorderImage(); | 
|  2895     ResetBorderTop(); |  2875     ResetBorderTop(); | 
|  2896     ResetBorderRight(); |  2876     ResetBorderRight(); | 
|  2897     ResetBorderBottom(); |  2877     ResetBorderBottom(); | 
|  2898     ResetBorderLeft(); |  2878     ResetBorderLeft(); | 
|  2899     ResetBorderTopLeftRadius(); |  2879     ResetBorderTopLeftRadius(); | 
|  2900     ResetBorderTopRightRadius(); |  2880     ResetBorderTopRightRadius(); | 
|  2901     ResetBorderBottomLeftRadius(); |  2881     ResetBorderBottomLeftRadius(); | 
|  2902     ResetBorderBottomRightRadius(); |  2882     ResetBorderBottomRightRadius(); | 
|  2903   } |  2883   } | 
|  2904   void ResetBorderTop() { |  2884   void ResetBorderTop() { | 
|  2905     SET_VAR(surround_data_, border_.top_, BorderValue()); |  2885     SET_VAR(surround_data_, border_.top_, BorderValue()); | 
|  2906   } |  2886   } | 
|  2907   void ResetBorderRight() { |  2887   void ResetBorderRight() { | 
|  2908     SET_VAR(surround_data_, border_.right_, BorderValue()); |  2888     SET_VAR(surround_data_, border_.right_, BorderValue()); | 
|  2909   } |  2889   } | 
|  2910   void ResetBorderBottom() { |  2890   void ResetBorderBottom() { | 
|  2911     SET_VAR(surround_data_, border_.bottom_, BorderValue()); |  2891     SET_VAR(surround_data_, border_.bottom_, BorderValue()); | 
|  2912   } |  2892   } | 
|  2913   void ResetBorderLeft() { |  2893   void ResetBorderLeft() { | 
|  2914     SET_VAR(surround_data_, border_.left_, BorderValue()); |  2894     SET_VAR(surround_data_, border_.left_, BorderValue()); | 
|  2915   } |  2895   } | 
|  2916   void ResetBorderImage() { |  2896   void ResetBorderImage() { | 
|  2917     SET_VAR(surround_data_, border_.image_, NinePieceImage()); |  2897     SET_VAR(surround_data_, border_.image_, NinePieceImage()); | 
|  2918   } |  2898   } | 
|  2919   void ResetBorderTopLeftRadius() { |  | 
|  2920     SET_VAR(surround_data_, border_.top_left_, InitialBorderRadius()); |  | 
|  2921   } |  | 
|  2922   void ResetBorderTopRightRadius() { |  | 
|  2923     SET_VAR(surround_data_, border_.top_right_, InitialBorderRadius()); |  | 
|  2924   } |  | 
|  2925   void ResetBorderBottomLeftRadius() { |  | 
|  2926     SET_VAR(surround_data_, border_.bottom_left_, InitialBorderRadius()); |  | 
|  2927   } |  | 
|  2928   void ResetBorderBottomRightRadius() { |  | 
|  2929     SET_VAR(surround_data_, border_.bottom_right_, InitialBorderRadius()); |  | 
|  2930   } |  | 
|  2931  |  2899  | 
|  2932   void SetBorderRadius(const LengthSize& s) { |  2900   void SetBorderRadius(const LengthSize& s) { | 
|  2933     SetBorderTopLeftRadius(s); |  2901     SetBorderTopLeftRadius(s); | 
|  2934     SetBorderTopRightRadius(s); |  2902     SetBorderTopRightRadius(s); | 
|  2935     SetBorderBottomLeftRadius(s); |  2903     SetBorderBottomLeftRadius(s); | 
|  2936     SetBorderBottomRightRadius(s); |  2904     SetBorderBottomRightRadius(s); | 
|  2937   } |  2905   } | 
|  2938   void SetBorderRadius(const IntSize& s) { |  2906   void SetBorderRadius(const IntSize& s) { | 
|  2939     SetBorderRadius( |  2907     SetBorderRadius( | 
|  2940         LengthSize(Length(s.Width(), kFixed), Length(s.Height(), kFixed))); |  2908         LengthSize(Length(s.Width(), kFixed), Length(s.Height(), kFixed))); | 
| (...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  3686       PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); |  3654       PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); | 
|  3687 } |  3655 } | 
|  3688  |  3656  | 
|  3689 inline bool ComputedStyle::HasPseudoElementStyle() const { |  3657 inline bool ComputedStyle::HasPseudoElementStyle() const { | 
|  3690   return PseudoBitsInternal() & kElementPseudoIdMask; |  3658   return PseudoBitsInternal() & kElementPseudoIdMask; | 
|  3691 } |  3659 } | 
|  3692  |  3660  | 
|  3693 }  // namespace blink |  3661 }  // namespace blink | 
|  3694  |  3662  | 
|  3695 #endif  // ComputedStyle_h |  3663 #endif  // ComputedStyle_h | 
| OLD | NEW |