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

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

Issue 2904403002: Generate methods for TextEmphasis properties in ComputedStyleBase. (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 1786 matching lines...) Expand 10 before | Expand all | Expand 10 after
1797 // -webkit-line-break 1797 // -webkit-line-break
1798 static LineBreak InitialLineBreak() { return LineBreak::kAuto; } 1798 static LineBreak InitialLineBreak() { return LineBreak::kAuto; }
1799 LineBreak GetLineBreak() const { 1799 LineBreak GetLineBreak() const {
1800 return static_cast<LineBreak>(rare_inherited_data_->line_break_); 1800 return static_cast<LineBreak>(rare_inherited_data_->line_break_);
1801 } 1801 }
1802 void SetLineBreak(LineBreak b) { 1802 void SetLineBreak(LineBreak b) {
1803 SET_VAR(rare_inherited_data_, line_break_, static_cast<unsigned>(b)); 1803 SET_VAR(rare_inherited_data_, line_break_, static_cast<unsigned>(b));
1804 } 1804 }
1805 1805
1806 // Text emphasis properties. 1806 // Text emphasis properties.
1807 static TextEmphasisFill InitialTextEmphasisFill() {
1808 return TextEmphasisFill::kFilled;
1809 }
1810 static TextEmphasisMark InitialTextEmphasisMark() { 1807 static TextEmphasisMark InitialTextEmphasisMark() {
1811 return TextEmphasisMark::kNone; 1808 return TextEmphasisMark::kNone;
1812 } 1809 }
1813 static const AtomicString& InitialTextEmphasisCustomMark() {
1814 return g_null_atom;
1815 }
1816 TextEmphasisFill GetTextEmphasisFill() const {
1817 return static_cast<TextEmphasisFill>(
1818 rare_inherited_data_->text_emphasis_fill_);
1819 }
1820 TextEmphasisMark GetTextEmphasisMark() const; 1810 TextEmphasisMark GetTextEmphasisMark() const;
1821 const AtomicString& TextEmphasisCustomMark() const {
1822 return rare_inherited_data_->text_emphasis_custom_mark_;
1823 }
1824 const AtomicString& TextEmphasisMarkString() const;
1825 void SetTextEmphasisFill(TextEmphasisFill fill) {
1826 SET_VAR(rare_inherited_data_, text_emphasis_fill_,
1827 static_cast<unsigned>(fill));
1828 }
1829 void SetTextEmphasisMark(TextEmphasisMark mark) { 1811 void SetTextEmphasisMark(TextEmphasisMark mark) {
1830 SET_VAR(rare_inherited_data_, text_emphasis_mark_, 1812 SET_VAR(rare_inherited_data_, text_emphasis_mark_,
1831 static_cast<unsigned>(mark)); 1813 static_cast<unsigned>(mark));
1832 } 1814 }
1833 void SetTextEmphasisCustomMark(const AtomicString& mark) { 1815 const AtomicString& TextEmphasisMarkString() const;
1834 SET_VAR(rare_inherited_data_, text_emphasis_custom_mark_, mark);
1835 }
1836 1816
1837 // -webkit-text-emphasis-color (aka -epub-text-emphasis-color) 1817 // -webkit-text-emphasis-color (aka -epub-text-emphasis-color)
1838 void SetTextEmphasisColor(const StyleColor& color) { 1818 void SetTextEmphasisColor(const StyleColor& color) {
1839 SET_VAR(rare_inherited_data_, text_emphasis_color_, color.Resolve(Color())); 1819 SET_VAR(rare_inherited_data_, text_emphasis_color_, color.Resolve(Color()));
1840 SET_VAR(rare_inherited_data_, text_emphasis_color_is_current_color_, 1820 SET_VAR(rare_inherited_data_, text_emphasis_color_is_current_color_,
1841 color.IsCurrentColor()); 1821 color.IsCurrentColor());
1842 } 1822 }
1843 1823
1844 // -webkit-text-emphasis-position
1845 static TextEmphasisPosition InitialTextEmphasisPosition() {
1846 return TextEmphasisPosition::kOver;
1847 }
1848 TextEmphasisPosition GetTextEmphasisPosition() const {
1849 return static_cast<TextEmphasisPosition>(
1850 rare_inherited_data_->text_emphasis_position_);
1851 }
1852 void SetTextEmphasisPosition(TextEmphasisPosition position) {
1853 SET_VAR(rare_inherited_data_, text_emphasis_position_,
1854 static_cast<unsigned>(position));
1855 }
1856
1857 // -webkit-line-clamp 1824 // -webkit-line-clamp
1858 static LineClampValue InitialLineClamp() { return LineClampValue(); } 1825 static LineClampValue InitialLineClamp() { return LineClampValue(); }
1859 const LineClampValue& LineClamp() const { 1826 const LineClampValue& LineClamp() const {
1860 return rare_non_inherited_data_->line_clamp; 1827 return rare_non_inherited_data_->line_clamp;
1861 } 1828 }
1862 void SetLineClamp(LineClampValue c) { 1829 void SetLineClamp(LineClampValue c) {
1863 SET_VAR(rare_non_inherited_data_, line_clamp, c); 1830 SET_VAR(rare_non_inherited_data_, line_clamp, c);
1864 } 1831 }
1865 1832
1866 // -webkit-ruby-position 1833 // -webkit-ruby-position
(...skipping 1930 matching lines...) Expand 10 before | Expand all | Expand 10 after
3797 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); 3764 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId)));
3798 } 3765 }
3799 3766
3800 inline bool ComputedStyle::HasPseudoElementStyle() const { 3767 inline bool ComputedStyle::HasPseudoElementStyle() const {
3801 return PseudoBitsInternal() & kElementPseudoIdMask; 3768 return PseudoBitsInternal() & kElementPseudoIdMask;
3802 } 3769 }
3803 3770
3804 } // namespace blink 3771 } // namespace blink
3805 3772
3806 #endif // ComputedStyle_h 3773 #endif // ComputedStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698