@@ -2292,7 +2292,7 @@ namespace Sass {
22922292 { concrete_type (SELECTOR); }
22932293 virtual ~Selector () = 0 ;
22942294 virtual size_t hash () = 0;
2295- virtual unsigned long specificity () {
2295+ virtual unsigned long specificity () const {
22962296 return 0 ;
22972297 }
22982298 virtual void set_media_block (Media_Block_Ptr mb) {
@@ -2425,7 +2425,7 @@ namespace Sass {
24252425 virtual Compound_Selector_Ptr unify_with (Compound_Selector_Ptr, Context&);
24262426 virtual bool has_parent_ref () { return false ; };
24272427 virtual bool has_real_parent_ref () { return false ; };
2428- virtual bool is_pseudo_element () { return false ; }
2428+ virtual bool is_pseudo_element () const { return false ; }
24292429 virtual bool is_pseudo_class () { return false ; }
24302430
24312431 virtual bool is_superselector_of (Compound_Selector_Obj sub) { return false ; }
@@ -2461,7 +2461,7 @@ namespace Sass {
24612461 bool is_real_parent_ref () { return real (); };
24622462 virtual bool has_parent_ref () { return true ; };
24632463 virtual bool has_real_parent_ref () { return is_real_parent_ref (); };
2464- virtual unsigned long specificity ()
2464+ virtual unsigned long specificity () const
24652465 {
24662466 return 0 ;
24672467 }
@@ -2482,7 +2482,7 @@ namespace Sass {
24822482 Placeholder_Selector (const Placeholder_Selector* ptr)
24832483 : Simple_Selector(ptr)
24842484 { }
2485- virtual unsigned long specificity ()
2485+ virtual unsigned long specificity () const
24862486 {
24872487 return Constants::Specificity_Base;
24882488 }
@@ -2505,7 +2505,7 @@ namespace Sass {
25052505 Element_Selector (const Element_Selector* ptr)
25062506 : Simple_Selector(ptr)
25072507 { }
2508- virtual unsigned long specificity ()
2508+ virtual unsigned long specificity () const
25092509 {
25102510 if (name () == " *" ) return 0 ;
25112511 else return Constants::Specificity_Element;
@@ -2531,7 +2531,7 @@ namespace Sass {
25312531 {
25322532 return false ;
25332533 }
2534- virtual unsigned long specificity ()
2534+ virtual unsigned long specificity () const
25352535 {
25362536 return Constants::Specificity_Class;
25372537 }
@@ -2555,7 +2555,7 @@ namespace Sass {
25552555 {
25562556 return true ;
25572557 }
2558- virtual unsigned long specificity ()
2558+ virtual unsigned long specificity () const
25592559 {
25602560 return Constants::Specificity_ID;
25612561 }
@@ -2589,7 +2589,7 @@ namespace Sass {
25892589 }
25902590 return hash_;
25912591 }
2592- virtual unsigned long specificity ()
2592+ virtual unsigned long specificity () const
25932593 {
25942594 return Constants::Specificity_Attr;
25952595 }
@@ -2643,7 +2643,7 @@ namespace Sass {
26432643 // in CSS levels 1 and 2 (namely, :first-line, :first-letter, :before and
26442644 // :after). This compatibility is not allowed for the new pseudo-elements
26452645 // introduced in this specification.
2646- virtual bool is_pseudo_element ()
2646+ virtual bool is_pseudo_element () const
26472647 {
26482648 return (name_[0 ] == ' :' && name_[1 ] == ' :' )
26492649 || is_pseudo_class_element (name_);
@@ -2656,7 +2656,7 @@ namespace Sass {
26562656 }
26572657 return hash_;
26582658 }
2659- virtual unsigned long specificity ()
2659+ virtual unsigned long specificity () const
26602660 {
26612661 if (is_pseudo_element ())
26622662 return Constants::Specificity_Element;
@@ -2704,7 +2704,7 @@ namespace Sass {
27042704 if (!selector ()) return false ;
27052705 return selector ()->has_real_parent_ref ();
27062706 }
2707- virtual unsigned long specificity ()
2707+ virtual unsigned long specificity () const
27082708 {
27092709 return selector_ ? selector_->specificity () : 0 ;
27102710 }
@@ -2782,7 +2782,7 @@ namespace Sass {
27822782 }
27832783 return Selector::hash_;
27842784 }
2785- virtual unsigned long specificity ()
2785+ virtual unsigned long specificity () const
27862786 {
27872787 int sum = 0 ;
27882788 for (size_t i = 0 , L = length (); i < L; ++i)
@@ -3017,7 +3017,7 @@ namespace Sass {
30173017 }
30183018 return Selector::hash_;
30193019 }
3020- virtual unsigned long specificity ()
3020+ virtual unsigned long specificity () const
30213021 {
30223022 unsigned long sum = 0 ;
30233023 unsigned long specificity = 0 ;
0 commit comments