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

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

Issue 2900633003: Make TextEmphasisMark 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 1732 matching lines...) Expand 10 before | Expand all | Expand 10 after
1743 } 1743 }
1744 void SetLineBreak(LineBreak b) { 1744 void SetLineBreak(LineBreak b) {
1745 SET_VAR(rare_inherited_data_, line_break_, static_cast<unsigned>(b)); 1745 SET_VAR(rare_inherited_data_, line_break_, static_cast<unsigned>(b));
1746 } 1746 }
1747 1747
1748 // Text emphasis properties. 1748 // Text emphasis properties.
1749 static TextEmphasisFill InitialTextEmphasisFill() { 1749 static TextEmphasisFill InitialTextEmphasisFill() {
1750 return TextEmphasisFill::kFilled; 1750 return TextEmphasisFill::kFilled;
1751 } 1751 }
1752 static TextEmphasisMark InitialTextEmphasisMark() { 1752 static TextEmphasisMark InitialTextEmphasisMark() {
1753 return kTextEmphasisMarkNone; 1753 return TextEmphasisMark::kNone;
1754 } 1754 }
1755 static const AtomicString& InitialTextEmphasisCustomMark() { 1755 static const AtomicString& InitialTextEmphasisCustomMark() {
1756 return g_null_atom; 1756 return g_null_atom;
1757 } 1757 }
1758 TextEmphasisFill GetTextEmphasisFill() const { 1758 TextEmphasisFill GetTextEmphasisFill() const {
1759 return static_cast<TextEmphasisFill>( 1759 return static_cast<TextEmphasisFill>(
1760 rare_inherited_data_->text_emphasis_fill_); 1760 rare_inherited_data_->text_emphasis_fill_);
1761 } 1761 }
1762 TextEmphasisMark GetTextEmphasisMark() const; 1762 TextEmphasisMark GetTextEmphasisMark() const;
1763 const AtomicString& TextEmphasisCustomMark() const { 1763 const AtomicString& TextEmphasisCustomMark() const {
1764 return rare_inherited_data_->text_emphasis_custom_mark_; 1764 return rare_inherited_data_->text_emphasis_custom_mark_;
1765 } 1765 }
1766 const AtomicString& TextEmphasisMarkString() const; 1766 const AtomicString& TextEmphasisMarkString() const;
1767 void SetTextEmphasisFill(TextEmphasisFill fill) { 1767 void SetTextEmphasisFill(TextEmphasisFill fill) {
1768 SET_VAR(rare_inherited_data_, text_emphasis_fill_, 1768 SET_VAR(rare_inherited_data_, text_emphasis_fill_,
1769 static_cast<unsigned>(fill)); 1769 static_cast<unsigned>(fill));
1770 } 1770 }
1771 void SetTextEmphasisMark(TextEmphasisMark mark) { 1771 void SetTextEmphasisMark(TextEmphasisMark mark) {
1772 SET_VAR(rare_inherited_data_, text_emphasis_mark_, mark); 1772 SET_VAR(rare_inherited_data_, text_emphasis_mark_,
1773 static_cast<unsigned>(mark));
1773 } 1774 }
1774 void SetTextEmphasisCustomMark(const AtomicString& mark) { 1775 void SetTextEmphasisCustomMark(const AtomicString& mark) {
1775 SET_VAR(rare_inherited_data_, text_emphasis_custom_mark_, mark); 1776 SET_VAR(rare_inherited_data_, text_emphasis_custom_mark_, mark);
1776 } 1777 }
1777 1778
1778 // -webkit-text-emphasis-color (aka -epub-text-emphasis-color) 1779 // -webkit-text-emphasis-color (aka -epub-text-emphasis-color)
1779 void SetTextEmphasisColor(const StyleColor& color) { 1780 void SetTextEmphasisColor(const StyleColor& color) {
1780 SET_VAR(rare_inherited_data_, text_emphasis_color_, color.Resolve(Color())); 1781 SET_VAR(rare_inherited_data_, text_emphasis_color_, color.Resolve(Color()));
1781 SET_VAR(rare_inherited_data_, text_emphasis_color_is_current_color_, 1782 SET_VAR(rare_inherited_data_, text_emphasis_color_is_current_color_,
1782 color.IsCurrentColor()); 1783 color.IsCurrentColor());
(...skipping 1966 matching lines...) Expand 10 before | Expand all | Expand 10 after
3749 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); 3750 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId)));
3750 } 3751 }
3751 3752
3752 inline bool ComputedStyle::HasPseudoElementStyle() const { 3753 inline bool ComputedStyle::HasPseudoElementStyle() const {
3753 return PseudoBitsInternal() & kElementPseudoIdMask; 3754 return PseudoBitsInternal() & kElementPseudoIdMask;
3754 } 3755 }
3755 3756
3756 } // namespace blink 3757 } // namespace blink
3757 3758
3758 #endif // ComputedStyle_h 3759 #endif // ComputedStyle_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp ('k') | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698