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

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

Issue 2885363005: Make Hyphens an enum class. (Closed)
Patch Set: 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 1591 matching lines...) Expand 10 before | Expand all | Expand 10 after
1602 rare_non_inherited_data_.Access()->mask_box_image_.SetBorderSlices(slices); 1602 rare_non_inherited_data_.Access()->mask_box_image_.SetBorderSlices(slices);
1603 } 1603 }
1604 1604
1605 // Inherited properties. 1605 // Inherited properties.
1606 1606
1607 // color 1607 // color
1608 static Color InitialColor() { return Color::kBlack; } 1608 static Color InitialColor() { return Color::kBlack; }
1609 void SetColor(const Color&); 1609 void SetColor(const Color&);
1610 1610
1611 // hyphens 1611 // hyphens
1612 static Hyphens InitialHyphens() { return kHyphensManual; } 1612 static Hyphens InitialHyphens() { return Hyphens::kManual; }
1613 Hyphens GetHyphens() const { 1613 Hyphens GetHyphens() const {
1614 return static_cast<Hyphens>(rare_inherited_data_->hyphens_); 1614 return static_cast<Hyphens>(rare_inherited_data_->hyphens_);
1615 } 1615 }
1616 void SetHyphens(Hyphens h) { SET_VAR(rare_inherited_data_, hyphens_, h); } 1616 void SetHyphens(Hyphens h) {
1617 SET_VAR(rare_inherited_data_, hyphens_, static_cast<unsigned>(h));
1618 }
1617 1619
1618 // -webkit-hyphenate-character 1620 // -webkit-hyphenate-character
1619 static const AtomicString& InitialHyphenationString() { return g_null_atom; } 1621 static const AtomicString& InitialHyphenationString() { return g_null_atom; }
1620 const AtomicString& HyphenationString() const { 1622 const AtomicString& HyphenationString() const {
1621 return rare_inherited_data_->hyphenation_string_; 1623 return rare_inherited_data_->hyphenation_string_;
1622 } 1624 }
1623 void SetHyphenationString(const AtomicString& h) { 1625 void SetHyphenationString(const AtomicString& h) {
1624 SET_VAR(rare_inherited_data_, hyphenation_string_, h); 1626 SET_VAR(rare_inherited_data_, hyphenation_string_, h);
1625 } 1627 }
1626 1628
(...skipping 2151 matching lines...) Expand 10 before | Expand all | Expand 10 after
3778 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); 3780 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId)));
3779 } 3781 }
3780 3782
3781 inline bool ComputedStyle::HasPseudoElementStyle() const { 3783 inline bool ComputedStyle::HasPseudoElementStyle() const {
3782 return PseudoBitsInternal() & kElementPseudoIdMask; 3784 return PseudoBitsInternal() & kElementPseudoIdMask;
3783 } 3785 }
3784 3786
3785 } // namespace blink 3787 } // namespace blink
3786 3788
3787 #endif // ComputedStyle_h 3789 #endif // ComputedStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698