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

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

Issue 2899663003: Make TextEmphasisFill an enum class. (Closed)
Patch Set: Rebase Created 3 years, 7 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 1772 matching lines...) Expand 10 before | Expand all | Expand 10 after
1783 static LineBreak InitialLineBreak() { return LineBreak::kAuto; } 1783 static LineBreak InitialLineBreak() { return LineBreak::kAuto; }
1784 LineBreak GetLineBreak() const { 1784 LineBreak GetLineBreak() const {
1785 return static_cast<LineBreak>(rare_inherited_data_->line_break_); 1785 return static_cast<LineBreak>(rare_inherited_data_->line_break_);
1786 } 1786 }
1787 void SetLineBreak(LineBreak b) { 1787 void SetLineBreak(LineBreak b) {
1788 SET_VAR(rare_inherited_data_, line_break_, static_cast<unsigned>(b)); 1788 SET_VAR(rare_inherited_data_, line_break_, static_cast<unsigned>(b));
1789 } 1789 }
1790 1790
1791 // Text emphasis properties. 1791 // Text emphasis properties.
1792 static TextEmphasisFill InitialTextEmphasisFill() { 1792 static TextEmphasisFill InitialTextEmphasisFill() {
1793 return kTextEmphasisFillFilled; 1793 return TextEmphasisFill::kFilled;
1794 } 1794 }
1795 static TextEmphasisMark InitialTextEmphasisMark() { 1795 static TextEmphasisMark InitialTextEmphasisMark() {
1796 return kTextEmphasisMarkNone; 1796 return kTextEmphasisMarkNone;
1797 } 1797 }
1798 static const AtomicString& InitialTextEmphasisCustomMark() { 1798 static const AtomicString& InitialTextEmphasisCustomMark() {
1799 return g_null_atom; 1799 return g_null_atom;
1800 } 1800 }
1801 TextEmphasisFill GetTextEmphasisFill() const { 1801 TextEmphasisFill GetTextEmphasisFill() const {
1802 return static_cast<TextEmphasisFill>( 1802 return static_cast<TextEmphasisFill>(
1803 rare_inherited_data_->text_emphasis_fill_); 1803 rare_inherited_data_->text_emphasis_fill_);
1804 } 1804 }
1805 TextEmphasisMark GetTextEmphasisMark() const; 1805 TextEmphasisMark GetTextEmphasisMark() const;
1806 const AtomicString& TextEmphasisCustomMark() const { 1806 const AtomicString& TextEmphasisCustomMark() const {
1807 return rare_inherited_data_->text_emphasis_custom_mark_; 1807 return rare_inherited_data_->text_emphasis_custom_mark_;
1808 } 1808 }
1809 const AtomicString& TextEmphasisMarkString() const; 1809 const AtomicString& TextEmphasisMarkString() const;
1810 void SetTextEmphasisFill(TextEmphasisFill fill) { 1810 void SetTextEmphasisFill(TextEmphasisFill fill) {
1811 SET_VAR(rare_inherited_data_, text_emphasis_fill_, fill); 1811 SET_VAR(rare_inherited_data_, text_emphasis_fill_,
1812 static_cast<unsigned>(fill));
1812 } 1813 }
1813 void SetTextEmphasisMark(TextEmphasisMark mark) { 1814 void SetTextEmphasisMark(TextEmphasisMark mark) {
1814 SET_VAR(rare_inherited_data_, text_emphasis_mark_, mark); 1815 SET_VAR(rare_inherited_data_, text_emphasis_mark_, mark);
1815 } 1816 }
1816 void SetTextEmphasisCustomMark(const AtomicString& mark) { 1817 void SetTextEmphasisCustomMark(const AtomicString& mark) {
1817 SET_VAR(rare_inherited_data_, text_emphasis_custom_mark_, mark); 1818 SET_VAR(rare_inherited_data_, text_emphasis_custom_mark_, mark);
1818 } 1819 }
1819 1820
1820 // -webkit-text-emphasis-color (aka -epub-text-emphasis-color) 1821 // -webkit-text-emphasis-color (aka -epub-text-emphasis-color)
1821 void SetTextEmphasisColor(const StyleColor& color) { 1822 void SetTextEmphasisColor(const StyleColor& color) {
(...skipping 1970 matching lines...) Expand 10 before | Expand all | Expand 10 after
3792 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); 3793 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId)));
3793 } 3794 }
3794 3795
3795 inline bool ComputedStyle::HasPseudoElementStyle() const { 3796 inline bool ComputedStyle::HasPseudoElementStyle() const {
3796 return PseudoBitsInternal() & kElementPseudoIdMask; 3797 return PseudoBitsInternal() & kElementPseudoIdMask;
3797 } 3798 }
3798 3799
3799 } // namespace blink 3800 } // namespace blink
3800 3801
3801 #endif // ComputedStyle_h 3802 #endif // ComputedStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698