@@ -2292,7 +2292,7 @@ namespace Sass {
2292
2292
{ concrete_type (SELECTOR); }
2293
2293
virtual ~Selector () = 0 ;
2294
2294
virtual size_t hash () = 0;
2295
- virtual unsigned long specificity () {
2295
+ virtual unsigned long specificity () const {
2296
2296
return 0 ;
2297
2297
}
2298
2298
virtual void set_media_block (Media_Block_Ptr mb) {
@@ -2425,7 +2425,7 @@ namespace Sass {
2425
2425
virtual Compound_Selector_Ptr unify_with (Compound_Selector_Ptr, Context&);
2426
2426
virtual bool has_parent_ref () { return false ; };
2427
2427
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 ; }
2429
2429
virtual bool is_pseudo_class () { return false ; }
2430
2430
2431
2431
virtual bool is_superselector_of (Compound_Selector_Obj sub) { return false ; }
@@ -2461,7 +2461,7 @@ namespace Sass {
2461
2461
bool is_real_parent_ref () { return real (); };
2462
2462
virtual bool has_parent_ref () { return true ; };
2463
2463
virtual bool has_real_parent_ref () { return is_real_parent_ref (); };
2464
- virtual unsigned long specificity ()
2464
+ virtual unsigned long specificity () const
2465
2465
{
2466
2466
return 0 ;
2467
2467
}
@@ -2482,7 +2482,7 @@ namespace Sass {
2482
2482
Placeholder_Selector (const Placeholder_Selector* ptr)
2483
2483
: Simple_Selector(ptr)
2484
2484
{ }
2485
- virtual unsigned long specificity ()
2485
+ virtual unsigned long specificity () const
2486
2486
{
2487
2487
return Constants::Specificity_Base;
2488
2488
}
@@ -2505,7 +2505,7 @@ namespace Sass {
2505
2505
Element_Selector (const Element_Selector* ptr)
2506
2506
: Simple_Selector(ptr)
2507
2507
{ }
2508
- virtual unsigned long specificity ()
2508
+ virtual unsigned long specificity () const
2509
2509
{
2510
2510
if (name () == " *" ) return 0 ;
2511
2511
else return Constants::Specificity_Element;
@@ -2531,7 +2531,7 @@ namespace Sass {
2531
2531
{
2532
2532
return false ;
2533
2533
}
2534
- virtual unsigned long specificity ()
2534
+ virtual unsigned long specificity () const
2535
2535
{
2536
2536
return Constants::Specificity_Class;
2537
2537
}
@@ -2555,7 +2555,7 @@ namespace Sass {
2555
2555
{
2556
2556
return true ;
2557
2557
}
2558
- virtual unsigned long specificity ()
2558
+ virtual unsigned long specificity () const
2559
2559
{
2560
2560
return Constants::Specificity_ID;
2561
2561
}
@@ -2589,7 +2589,7 @@ namespace Sass {
2589
2589
}
2590
2590
return hash_;
2591
2591
}
2592
- virtual unsigned long specificity ()
2592
+ virtual unsigned long specificity () const
2593
2593
{
2594
2594
return Constants::Specificity_Attr;
2595
2595
}
@@ -2643,7 +2643,7 @@ namespace Sass {
2643
2643
// in CSS levels 1 and 2 (namely, :first-line, :first-letter, :before and
2644
2644
// :after). This compatibility is not allowed for the new pseudo-elements
2645
2645
// introduced in this specification.
2646
- virtual bool is_pseudo_element ()
2646
+ virtual bool is_pseudo_element () const
2647
2647
{
2648
2648
return (name_[0 ] == ' :' && name_[1 ] == ' :' )
2649
2649
|| is_pseudo_class_element (name_);
@@ -2656,7 +2656,7 @@ namespace Sass {
2656
2656
}
2657
2657
return hash_;
2658
2658
}
2659
- virtual unsigned long specificity ()
2659
+ virtual unsigned long specificity () const
2660
2660
{
2661
2661
if (is_pseudo_element ())
2662
2662
return Constants::Specificity_Element;
@@ -2704,7 +2704,7 @@ namespace Sass {
2704
2704
if (!selector ()) return false ;
2705
2705
return selector ()->has_real_parent_ref ();
2706
2706
}
2707
- virtual unsigned long specificity ()
2707
+ virtual unsigned long specificity () const
2708
2708
{
2709
2709
return selector_ ? selector_->specificity () : 0 ;
2710
2710
}
@@ -2782,7 +2782,7 @@ namespace Sass {
2782
2782
}
2783
2783
return Selector::hash_;
2784
2784
}
2785
- virtual unsigned long specificity ()
2785
+ virtual unsigned long specificity () const
2786
2786
{
2787
2787
int sum = 0 ;
2788
2788
for (size_t i = 0 , L = length (); i < L; ++i)
@@ -3017,7 +3017,7 @@ namespace Sass {
3017
3017
}
3018
3018
return Selector::hash_;
3019
3019
}
3020
- virtual unsigned long specificity ()
3020
+ virtual unsigned long specificity () const
3021
3021
{
3022
3022
unsigned long sum = 0 ;
3023
3023
unsigned long specificity = 0 ;
0 commit comments