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

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 1697 matching lines...) Expand 10 before | Expand all | Expand 10 after
1708 // -webkit-line-break 1708 // -webkit-line-break
1709 static LineBreak InitialLineBreak() { return LineBreak::kAuto; } 1709 static LineBreak InitialLineBreak() { return LineBreak::kAuto; }
1710 LineBreak GetLineBreak() const { 1710 LineBreak GetLineBreak() const {
1711 return static_cast<LineBreak>(rare_inherited_data_->line_break_); 1711 return static_cast<LineBreak>(rare_inherited_data_->line_break_);
1712 } 1712 }
1713 void SetLineBreak(LineBreak b) { 1713 void SetLineBreak(LineBreak b) {
1714 SET_VAR(rare_inherited_data_, line_break_, static_cast<unsigned>(b)); 1714 SET_VAR(rare_inherited_data_, line_break_, static_cast<unsigned>(b));
1715 } 1715 }
1716 1716
1717 // Text emphasis properties. 1717 // Text emphasis properties.
1718 static TextEmphasisFill InitialTextEmphasisFill() {
1719 return TextEmphasisFill::kFilled;
1720 }
1721 static TextEmphasisMark InitialTextEmphasisMark() { 1718 static TextEmphasisMark InitialTextEmphasisMark() {
1722 return TextEmphasisMark::kNone; 1719 return TextEmphasisMark::kNone;
1723 } 1720 }
1724 static const AtomicString& InitialTextEmphasisCustomMark() {
1725 return g_null_atom;
1726 }
1727 TextEmphasisFill GetTextEmphasisFill() const {
1728 return static_cast<TextEmphasisFill>(
1729 rare_inherited_data_->text_emphasis_fill_);
1730 }
1731 TextEmphasisMark GetTextEmphasisMark() const; 1721 TextEmphasisMark GetTextEmphasisMark() const;
1732 const AtomicString& TextEmphasisCustomMark() const {
1733 return rare_inherited_data_->text_emphasis_custom_mark_;
1734 }
1735 const AtomicString& TextEmphasisMarkString() const;
1736 void SetTextEmphasisFill(TextEmphasisFill fill) {
1737 SET_VAR(rare_inherited_data_, text_emphasis_fill_,
1738 static_cast<unsigned>(fill));
1739 }
1740 void SetTextEmphasisMark(TextEmphasisMark mark) { 1722 void SetTextEmphasisMark(TextEmphasisMark mark) {
1741 SET_VAR(rare_inherited_data_, text_emphasis_mark_, 1723 SET_VAR(rare_inherited_data_, text_emphasis_mark_,
1742 static_cast<unsigned>(mark)); 1724 static_cast<unsigned>(mark));
1743 } 1725 }
1744 void SetTextEmphasisCustomMark(const AtomicString& mark) { 1726 const AtomicString& TextEmphasisMarkString() const;
1745 SET_VAR(rare_inherited_data_, text_emphasis_custom_mark_, mark);
1746 }
1747 1727
1748 // -webkit-text-emphasis-color (aka -epub-text-emphasis-color) 1728 // -webkit-text-emphasis-color (aka -epub-text-emphasis-color)
1749 void SetTextEmphasisColor(const StyleColor& color) { 1729 void SetTextEmphasisColor(const StyleColor& color) {
1750 SET_VAR(rare_inherited_data_, text_emphasis_color_, color.Resolve(Color())); 1730 SET_VAR(rare_inherited_data_, text_emphasis_color_, color.Resolve(Color()));
1751 SET_VAR(rare_inherited_data_, text_emphasis_color_is_current_color_, 1731 SET_VAR(rare_inherited_data_, text_emphasis_color_is_current_color_,
1752 color.IsCurrentColor()); 1732 color.IsCurrentColor());
1753 } 1733 }
1754 1734
1755 // -webkit-text-emphasis-position
1756 static TextEmphasisPosition InitialTextEmphasisPosition() {
1757 return TextEmphasisPosition::kOver;
1758 }
1759 TextEmphasisPosition GetTextEmphasisPosition() const {
1760 return static_cast<TextEmphasisPosition>(
1761 rare_inherited_data_->text_emphasis_position_);
1762 }
1763 void SetTextEmphasisPosition(TextEmphasisPosition position) {
1764 SET_VAR(rare_inherited_data_, text_emphasis_position_,
1765 static_cast<unsigned>(position));
1766 }
1767
1768 // -webkit-line-clamp 1735 // -webkit-line-clamp
1769 static LineClampValue InitialLineClamp() { return LineClampValue(); } 1736 static LineClampValue InitialLineClamp() { return LineClampValue(); }
1770 const LineClampValue& LineClamp() const { 1737 const LineClampValue& LineClamp() const {
1771 return rare_non_inherited_data_->line_clamp; 1738 return rare_non_inherited_data_->line_clamp;
1772 } 1739 }
1773 void SetLineClamp(LineClampValue c) { 1740 void SetLineClamp(LineClampValue c) {
1774 SET_VAR(rare_non_inherited_data_, line_clamp, c); 1741 SET_VAR(rare_non_inherited_data_, line_clamp, c);
1775 } 1742 }
1776 1743
1777 // -webkit-ruby-position 1744 // -webkit-ruby-position
(...skipping 1905 matching lines...) Expand 10 before | Expand all | Expand 10 after
3683 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); 3650 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId)));
3684 } 3651 }
3685 3652
3686 inline bool ComputedStyle::HasPseudoElementStyle() const { 3653 inline bool ComputedStyle::HasPseudoElementStyle() const {
3687 return PseudoBitsInternal() & kElementPseudoIdMask; 3654 return PseudoBitsInternal() & kElementPseudoIdMask;
3688 } 3655 }
3689 3656
3690 } // namespace blink 3657 } // namespace blink
3691 3658
3692 #endif // ComputedStyle_h 3659 #endif // ComputedStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698