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

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

Issue 2895883002: Make TextEmphasisPosition an enum class. (Closed)
Patch Set: Rebase Created 3 years, 6 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 1763 matching lines...) Expand 10 before | Expand all | Expand 10 after
1774 1774
1775 // -webkit-text-emphasis-color (aka -epub-text-emphasis-color) 1775 // -webkit-text-emphasis-color (aka -epub-text-emphasis-color)
1776 void SetTextEmphasisColor(const StyleColor& color) { 1776 void SetTextEmphasisColor(const StyleColor& color) {
1777 SET_VAR(rare_inherited_data_, text_emphasis_color_, color.Resolve(Color())); 1777 SET_VAR(rare_inherited_data_, text_emphasis_color_, color.Resolve(Color()));
1778 SET_VAR(rare_inherited_data_, text_emphasis_color_is_current_color_, 1778 SET_VAR(rare_inherited_data_, text_emphasis_color_is_current_color_,
1779 color.IsCurrentColor()); 1779 color.IsCurrentColor());
1780 } 1780 }
1781 1781
1782 // -webkit-text-emphasis-position 1782 // -webkit-text-emphasis-position
1783 static TextEmphasisPosition InitialTextEmphasisPosition() { 1783 static TextEmphasisPosition InitialTextEmphasisPosition() {
1784 return kTextEmphasisPositionOver; 1784 return TextEmphasisPosition::kOver;
1785 } 1785 }
1786 TextEmphasisPosition GetTextEmphasisPosition() const { 1786 TextEmphasisPosition GetTextEmphasisPosition() const {
1787 return static_cast<TextEmphasisPosition>( 1787 return static_cast<TextEmphasisPosition>(
1788 rare_inherited_data_->text_emphasis_position_); 1788 rare_inherited_data_->text_emphasis_position_);
1789 } 1789 }
1790 void SetTextEmphasisPosition(TextEmphasisPosition position) { 1790 void SetTextEmphasisPosition(TextEmphasisPosition position) {
1791 SET_VAR(rare_inherited_data_, text_emphasis_position_, position); 1791 SET_VAR(rare_inherited_data_, text_emphasis_position_,
1792 static_cast<unsigned>(position));
1792 } 1793 }
1793 1794
1794 // -webkit-highlight 1795 // -webkit-highlight
1795 static const AtomicString& InitialHighlight() { return g_null_atom; } 1796 static const AtomicString& InitialHighlight() { return g_null_atom; }
1796 const AtomicString& Highlight() const { 1797 const AtomicString& Highlight() const {
1797 return rare_inherited_data_->highlight_; 1798 return rare_inherited_data_->highlight_;
1798 } 1799 }
1799 void SetHighlight(const AtomicString& h) { 1800 void SetHighlight(const AtomicString& h) {
1800 SET_VAR(rare_inherited_data_, highlight_, h); 1801 SET_VAR(rare_inherited_data_, highlight_, h);
1801 } 1802 }
(...skipping 1943 matching lines...) Expand 10 before | Expand all | Expand 10 after
3745 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); 3746 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId)));
3746 } 3747 }
3747 3748
3748 inline bool ComputedStyle::HasPseudoElementStyle() const { 3749 inline bool ComputedStyle::HasPseudoElementStyle() const {
3749 return PseudoBitsInternal() & kElementPseudoIdMask; 3750 return PseudoBitsInternal() & kElementPseudoIdMask;
3750 } 3751 }
3751 3752
3752 } // namespace blink 3753 } // namespace blink
3753 3754
3754 #endif // ComputedStyle_h 3755 #endif // ComputedStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698