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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
543 } | 543 } |
544 | 544 |
545 // border-bottom-color | 545 // border-bottom-color |
546 void SetBorderBottomColor(const StyleColor& color) { | 546 void SetBorderBottomColor(const StyleColor& color) { |
547 if (!compareEqual(BorderBottomColor(), color)) { | 547 if (!compareEqual(BorderBottomColor(), color)) { |
548 SetBorderBottomColorInternal(color.Resolve(Color())); | 548 SetBorderBottomColorInternal(color.Resolve(Color())); |
549 SetBorderBottomColorIsCurrentColor(color.IsCurrentColor()); | 549 SetBorderBottomColorIsCurrentColor(color.IsCurrentColor()); |
550 } | 550 } |
551 } | 551 } |
552 | 552 |
553 StyleColor TextEmphasisColor() const { | |
shend
2017/05/25 08:20:19
Why are these moved?
nainar
2017/05/25 08:38:50
They were private before and need to be public to
shend
2017/05/25 22:19:52
Hmm, these were private a for a reason (never acce
| |
554 return rare_inherited_data_->text_emphasis_color_is_current_color_ | |
555 ? StyleColor::CurrentColor() | |
556 : StyleColor(rare_inherited_data_->text_emphasis_color_); | |
557 } | |
558 StyleColor TextFillColor() const { | |
559 return rare_inherited_data_->text_fill_color_is_current_color_ | |
560 ? StyleColor::CurrentColor() | |
561 : StyleColor(rare_inherited_data_->text_fill_color_); | |
562 } | |
563 StyleColor TextStrokeColor() const { | |
564 return rare_inherited_data_->text_stroke_color_is_current_color_ | |
565 ? StyleColor::CurrentColor() | |
566 : StyleColor(rare_inherited_data_->text_stroke_color_); | |
567 } | |
568 StyleAutoColor CaretColor() const { | |
569 if (rare_inherited_data_->caret_color_is_current_color_) | |
570 return StyleAutoColor::CurrentColor(); | |
571 if (rare_inherited_data_->caret_color_is_auto_) | |
572 return StyleAutoColor::AutoColor(); | |
573 return StyleAutoColor(rare_inherited_data_->caret_color_); | |
574 } | |
575 StyleColor VisitedLinkTextEmphasisColor() const { | |
576 return rare_inherited_data_ | |
577 ->visited_link_text_emphasis_color_is_current_color_ | |
578 ? StyleColor::CurrentColor() | |
579 : StyleColor( | |
580 rare_inherited_data_->visited_link_text_emphasis_color_); | |
581 } | |
582 StyleColor VisitedLinkTextFillColor() const { | |
583 return rare_inherited_data_->visited_link_text_fill_color_is_current_color_ | |
584 ? StyleColor::CurrentColor() | |
585 : StyleColor( | |
586 rare_inherited_data_->visited_link_text_fill_color_); | |
587 } | |
588 StyleColor VisitedLinkTextStrokeColor() const { | |
589 return rare_inherited_data_ | |
590 ->visited_link_text_stroke_color_is_current_color_ | |
591 ? StyleColor::CurrentColor() | |
592 : StyleColor( | |
593 rare_inherited_data_->visited_link_text_stroke_color_); | |
594 } | |
595 StyleAutoColor VisitedLinkCaretColor() const { | |
596 if (rare_inherited_data_->visited_link_caret_color_is_current_color_) | |
597 return StyleAutoColor::CurrentColor(); | |
598 if (rare_inherited_data_->visited_link_caret_color_is_auto_) | |
599 return StyleAutoColor::AutoColor(); | |
600 return StyleAutoColor(rare_inherited_data_->visited_link_caret_color_); | |
601 } | |
602 | |
553 // box-shadow (aka -webkit-box-shadow) | 603 // box-shadow (aka -webkit-box-shadow) |
554 static ShadowList* InitialBoxShadow() { return 0; } | 604 static ShadowList* InitialBoxShadow() { return 0; } |
555 ShadowList* BoxShadow() const { | 605 ShadowList* BoxShadow() const { |
556 return rare_non_inherited_data_->box_shadow_.Get(); | 606 return rare_non_inherited_data_->box_shadow_.Get(); |
557 } | 607 } |
558 void SetBoxShadow(RefPtr<ShadowList>); | 608 void SetBoxShadow(RefPtr<ShadowList>); |
559 | 609 |
560 // clip | 610 // clip |
561 static LengthBox InitialClip() { return LengthBox(); } | 611 static LengthBox InitialClip() { return LengthBox(); } |
562 const LengthBox& Clip() const { return ClipInternal(); } | 612 const LengthBox& Clip() const { return ClipInternal(); } |
(...skipping 2987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3550 ? StyleColor::CurrentColor() | 3600 ? StyleColor::CurrentColor() |
3551 : StyleColor(BorderTopColorInternal()); | 3601 : StyleColor(BorderTopColorInternal()); |
3552 } | 3602 } |
3553 StyleColor BorderBottomColor() const { | 3603 StyleColor BorderBottomColor() const { |
3554 return BorderBottomColorIsCurrentColor() | 3604 return BorderBottomColorIsCurrentColor() |
3555 ? StyleColor::CurrentColor() | 3605 ? StyleColor::CurrentColor() |
3556 : StyleColor(BorderBottomColorInternal()); | 3606 : StyleColor(BorderBottomColorInternal()); |
3557 } | 3607 } |
3558 | 3608 |
3559 StyleColor BackgroundColor() const { return BackgroundColorInternal(); } | 3609 StyleColor BackgroundColor() const { return BackgroundColorInternal(); } |
3560 StyleAutoColor CaretColor() const { | |
3561 if (rare_inherited_data_->caret_color_is_current_color_) | |
3562 return StyleAutoColor::CurrentColor(); | |
3563 if (rare_inherited_data_->caret_color_is_auto_) | |
3564 return StyleAutoColor::AutoColor(); | |
3565 return StyleAutoColor(rare_inherited_data_->caret_color_); | |
3566 } | |
3567 Color GetColor() const; | 3610 Color GetColor() const; |
3568 StyleColor ColumnRuleColor() const { | 3611 StyleColor ColumnRuleColor() const { |
3569 return rare_non_inherited_data_->multi_col_->rule_.GetColor(); | 3612 return rare_non_inherited_data_->multi_col_->rule_.GetColor(); |
3570 } | 3613 } |
3571 StyleColor OutlineColor() const { | 3614 StyleColor OutlineColor() const { |
3572 return rare_non_inherited_data_->outline_.GetColor(); | 3615 return rare_non_inherited_data_->outline_.GetColor(); |
3573 } | 3616 } |
3574 StyleColor TextEmphasisColor() const { | |
3575 return rare_inherited_data_->text_emphasis_color_is_current_color_ | |
3576 ? StyleColor::CurrentColor() | |
3577 : StyleColor(rare_inherited_data_->text_emphasis_color_); | |
3578 } | |
3579 StyleColor TextFillColor() const { | |
3580 return rare_inherited_data_->text_fill_color_is_current_color_ | |
3581 ? StyleColor::CurrentColor() | |
3582 : StyleColor(rare_inherited_data_->text_fill_color_); | |
3583 } | |
3584 StyleColor TextStrokeColor() const { | |
3585 return rare_inherited_data_->text_stroke_color_is_current_color_ | |
3586 ? StyleColor::CurrentColor() | |
3587 : StyleColor(rare_inherited_data_->text_stroke_color_); | |
3588 } | |
3589 StyleAutoColor VisitedLinkCaretColor() const { | |
3590 if (rare_inherited_data_->visited_link_caret_color_is_current_color_) | |
3591 return StyleAutoColor::CurrentColor(); | |
3592 if (rare_inherited_data_->visited_link_caret_color_is_auto_) | |
3593 return StyleAutoColor::AutoColor(); | |
3594 return StyleAutoColor(rare_inherited_data_->visited_link_caret_color_); | |
3595 } | |
3596 StyleColor VisitedLinkBackgroundColor() const { | 3617 StyleColor VisitedLinkBackgroundColor() const { |
3597 return rare_non_inherited_data_->visited_link_background_color_; | 3618 return rare_non_inherited_data_->visited_link_background_color_; |
3598 } | 3619 } |
3599 StyleColor VisitedLinkBorderLeftColor() const { | 3620 StyleColor VisitedLinkBorderLeftColor() const { |
3600 return rare_non_inherited_data_->visited_link_border_left_color_; | 3621 return rare_non_inherited_data_->visited_link_border_left_color_; |
3601 } | 3622 } |
3602 StyleColor VisitedLinkBorderRightColor() const { | 3623 StyleColor VisitedLinkBorderRightColor() const { |
3603 return rare_non_inherited_data_->visited_link_border_right_color_; | 3624 return rare_non_inherited_data_->visited_link_border_right_color_; |
3604 } | 3625 } |
3605 StyleColor VisitedLinkBorderBottomColor() const { | 3626 StyleColor VisitedLinkBorderBottomColor() const { |
3606 return rare_non_inherited_data_->visited_link_border_bottom_color_; | 3627 return rare_non_inherited_data_->visited_link_border_bottom_color_; |
3607 } | 3628 } |
3608 StyleColor VisitedLinkBorderTopColor() const { | 3629 StyleColor VisitedLinkBorderTopColor() const { |
3609 return rare_non_inherited_data_->visited_link_border_top_color_; | 3630 return rare_non_inherited_data_->visited_link_border_top_color_; |
3610 } | 3631 } |
3611 StyleColor VisitedLinkOutlineColor() const { | 3632 StyleColor VisitedLinkOutlineColor() const { |
3612 return rare_non_inherited_data_->visited_link_outline_color_; | 3633 return rare_non_inherited_data_->visited_link_outline_color_; |
3613 } | 3634 } |
3614 StyleColor VisitedLinkColumnRuleColor() const { | 3635 StyleColor VisitedLinkColumnRuleColor() const { |
3615 return rare_non_inherited_data_->multi_col_ | 3636 return rare_non_inherited_data_->multi_col_ |
3616 ->visited_link_column_rule_color_; | 3637 ->visited_link_column_rule_color_; |
3617 } | 3638 } |
3618 StyleColor TextDecorationColor() const { | 3639 StyleColor TextDecorationColor() const { |
3619 return rare_non_inherited_data_->text_decoration_color_; | 3640 return rare_non_inherited_data_->text_decoration_color_; |
3620 } | 3641 } |
3621 StyleColor VisitedLinkTextDecorationColor() const { | 3642 StyleColor VisitedLinkTextDecorationColor() const { |
3622 return rare_non_inherited_data_->visited_link_text_decoration_color_; | 3643 return rare_non_inherited_data_->visited_link_text_decoration_color_; |
3623 } | 3644 } |
3624 StyleColor VisitedLinkTextEmphasisColor() const { | |
3625 return rare_inherited_data_ | |
3626 ->visited_link_text_emphasis_color_is_current_color_ | |
3627 ? StyleColor::CurrentColor() | |
3628 : StyleColor( | |
3629 rare_inherited_data_->visited_link_text_emphasis_color_); | |
3630 } | |
3631 StyleColor VisitedLinkTextFillColor() const { | |
3632 return rare_inherited_data_->visited_link_text_fill_color_is_current_color_ | |
3633 ? StyleColor::CurrentColor() | |
3634 : StyleColor( | |
3635 rare_inherited_data_->visited_link_text_fill_color_); | |
3636 } | |
3637 StyleColor VisitedLinkTextStrokeColor() const { | |
3638 return rare_inherited_data_ | |
3639 ->visited_link_text_stroke_color_is_current_color_ | |
3640 ? StyleColor::CurrentColor() | |
3641 : StyleColor( | |
3642 rare_inherited_data_->visited_link_text_stroke_color_); | |
3643 } | |
3644 | 3645 |
3645 StyleColor DecorationColorIncludingFallback(bool visited_link) const; | 3646 StyleColor DecorationColorIncludingFallback(bool visited_link) const; |
3646 Color ColorIncludingFallback(int color_property, bool visited_link) const; | 3647 Color ColorIncludingFallback(int color_property, bool visited_link) const; |
3647 | 3648 |
3648 Color StopColor() const { return SvgStyle().StopColor(); } | 3649 Color StopColor() const { return SvgStyle().StopColor(); } |
3649 Color FloodColor() const { return SvgStyle().FloodColor(); } | 3650 Color FloodColor() const { return SvgStyle().FloodColor(); } |
3650 Color LightingColor() const { return SvgStyle().LightingColor(); } | 3651 Color LightingColor() const { return SvgStyle().LightingColor(); } |
3651 | 3652 |
3652 void AddAppliedTextDecoration(const AppliedTextDecoration&); | 3653 void AddAppliedTextDecoration(const AppliedTextDecoration&); |
3653 void OverrideTextDecorationColors(Color propagated_color); | 3654 void OverrideTextDecorationColors(Color propagated_color); |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3770 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); | 3771 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); |
3771 } | 3772 } |
3772 | 3773 |
3773 inline bool ComputedStyle::HasPseudoElementStyle() const { | 3774 inline bool ComputedStyle::HasPseudoElementStyle() const { |
3774 return PseudoBitsInternal() & kElementPseudoIdMask; | 3775 return PseudoBitsInternal() & kElementPseudoIdMask; |
3775 } | 3776 } |
3776 | 3777 |
3777 } // namespace blink | 3778 } // namespace blink |
3778 | 3779 |
3779 #endif // ComputedStyle_h | 3780 #endif // ComputedStyle_h |
OLD | NEW |