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

Side by Side Diff: third_party/WebKit/Source/core/style/StyleRareInheritedData.cpp

Issue 2100013002: Implement the new text-size-adjust CSS property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup convertTextSizeAdjust and add a test that better covers it Created 4 years, 5 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) 1999 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 Length lengths[1]; 45 Length lengths[1];
46 float secondFloat; 46 float secondFloat;
47 unsigned m_bitfields[2]; 47 unsigned m_bitfields[2];
48 short pagedMediaShorts[2]; 48 short pagedMediaShorts[2];
49 short hyphenationShorts[3]; 49 short hyphenationShorts[3];
50 uint8_t snapHeight; 50 uint8_t snapHeight;
51 51
52 Color touchColors; 52 Color touchColors;
53 TabSize tabSize; 53 TabSize tabSize;
54 void* variables[1]; 54 void* variables[1];
55 TextSizeAdjust textSizeAdjust;
55 }; 56 };
56 57
57 static_assert(sizeof(StyleRareInheritedData) <= sizeof(SameSizeAsStyleRareInheri tedData), "StyleRareInheritedData should stay small"); 58 static_assert(sizeof(StyleRareInheritedData) <= sizeof(SameSizeAsStyleRareInheri tedData), "StyleRareInheritedData should stay small");
58 59
59 StyleRareInheritedData::StyleRareInheritedData() 60 StyleRareInheritedData::StyleRareInheritedData()
60 : listStyleImage(ComputedStyle::initialListStyleImage()) 61 : listStyleImage(ComputedStyle::initialListStyleImage())
61 , textStrokeWidth(ComputedStyle::initialTextStrokeWidth()) 62 , textStrokeWidth(ComputedStyle::initialTextStrokeWidth())
62 , indent(ComputedStyle::initialTextIndent()) 63 , indent(ComputedStyle::initialTextIndent())
63 , m_effectiveZoom(ComputedStyle::initialZoom()) 64 , m_effectiveZoom(ComputedStyle::initialZoom())
64 , widows(ComputedStyle::initialWidows()) 65 , widows(ComputedStyle::initialWidows())
(...skipping 27 matching lines...) Expand all
92 , m_subtreeWillChangeContents(false) 93 , m_subtreeWillChangeContents(false)
93 , m_selfOrAncestorHasDirAutoAttribute(false) 94 , m_selfOrAncestorHasDirAutoAttribute(false)
94 , m_respectImageOrientation(false) 95 , m_respectImageOrientation(false)
95 , m_snapHeightPosition(0) 96 , m_snapHeightPosition(0)
96 , hyphenationLimitBefore(-1) 97 , hyphenationLimitBefore(-1)
97 , hyphenationLimitAfter(-1) 98 , hyphenationLimitAfter(-1)
98 , hyphenationLimitLines(-1) 99 , hyphenationLimitLines(-1)
99 , m_snapHeightUnit(0) 100 , m_snapHeightUnit(0)
100 , tapHighlightColor(ComputedStyle::initialTapHighlightColor()) 101 , tapHighlightColor(ComputedStyle::initialTapHighlightColor())
101 , m_tabSize(ComputedStyle::initialTabSize()) 102 , m_tabSize(ComputedStyle::initialTabSize())
103 , m_textSizeAdjust(ComputedStyle::initialTextSizeAdjust())
102 { 104 {
103 } 105 }
104 106
105 StyleRareInheritedData::StyleRareInheritedData(const StyleRareInheritedData& o) 107 StyleRareInheritedData::StyleRareInheritedData(const StyleRareInheritedData& o)
106 : RefCounted<StyleRareInheritedData>() 108 : RefCounted<StyleRareInheritedData>()
107 , listStyleImage(o.listStyleImage) 109 , listStyleImage(o.listStyleImage)
108 , m_textStrokeColor(o.m_textStrokeColor) 110 , m_textStrokeColor(o.m_textStrokeColor)
109 , textStrokeWidth(o.textStrokeWidth) 111 , textStrokeWidth(o.textStrokeWidth)
110 , m_textFillColor(o.m_textFillColor) 112 , m_textFillColor(o.m_textFillColor)
111 , m_textEmphasisColor(o.m_textEmphasisColor) 113 , m_textEmphasisColor(o.m_textEmphasisColor)
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 , hyphenationString(o.hyphenationString) 154 , hyphenationString(o.hyphenationString)
153 , hyphenationLimitBefore(o.hyphenationLimitBefore) 155 , hyphenationLimitBefore(o.hyphenationLimitBefore)
154 , hyphenationLimitAfter(o.hyphenationLimitAfter) 156 , hyphenationLimitAfter(o.hyphenationLimitAfter)
155 , hyphenationLimitLines(o.hyphenationLimitLines) 157 , hyphenationLimitLines(o.hyphenationLimitLines)
156 , m_snapHeightUnit(o.m_snapHeightUnit) 158 , m_snapHeightUnit(o.m_snapHeightUnit)
157 , textEmphasisCustomMark(o.textEmphasisCustomMark) 159 , textEmphasisCustomMark(o.textEmphasisCustomMark)
158 , tapHighlightColor(o.tapHighlightColor) 160 , tapHighlightColor(o.tapHighlightColor)
159 , appliedTextDecorations(o.appliedTextDecorations) 161 , appliedTextDecorations(o.appliedTextDecorations)
160 , m_tabSize(o.m_tabSize) 162 , m_tabSize(o.m_tabSize)
161 , variables(o.variables) 163 , variables(o.variables)
164 , m_textSizeAdjust(o.m_textSizeAdjust)
162 { 165 {
163 } 166 }
164 167
165 StyleRareInheritedData::~StyleRareInheritedData() 168 StyleRareInheritedData::~StyleRareInheritedData()
166 { 169 {
167 } 170 }
168 171
169 bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const 172 bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const
170 { 173 {
171 return m_textStrokeColor == o.m_textStrokeColor 174 return m_textStrokeColor == o.m_textStrokeColor
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 && hyphenationString == o.hyphenationString 219 && hyphenationString == o.hyphenationString
217 && m_snapHeightUnit == o.m_snapHeightUnit 220 && m_snapHeightUnit == o.m_snapHeightUnit
218 && textEmphasisCustomMark == o.textEmphasisCustomMark 221 && textEmphasisCustomMark == o.textEmphasisCustomMark
219 && quotesDataEquivalent(o) 222 && quotesDataEquivalent(o)
220 && m_tabSize == o.m_tabSize 223 && m_tabSize == o.m_tabSize
221 && m_imageRendering == o.m_imageRendering 224 && m_imageRendering == o.m_imageRendering
222 && m_textUnderlinePosition == o.m_textUnderlinePosition 225 && m_textUnderlinePosition == o.m_textUnderlinePosition
223 && m_rubyPosition == o.m_rubyPosition 226 && m_rubyPosition == o.m_rubyPosition
224 && dataEquivalent(listStyleImage.get(), o.listStyleImage.get()) 227 && dataEquivalent(listStyleImage.get(), o.listStyleImage.get())
225 && dataEquivalent(appliedTextDecorations, o.appliedTextDecorations) 228 && dataEquivalent(appliedTextDecorations, o.appliedTextDecorations)
226 && dataEquivalent(variables, o.variables); 229 && dataEquivalent(variables, o.variables)
230 && m_textSizeAdjust == o.m_textSizeAdjust;
227 } 231 }
228 232
229 bool StyleRareInheritedData::shadowDataEquivalent(const StyleRareInheritedData& o) const 233 bool StyleRareInheritedData::shadowDataEquivalent(const StyleRareInheritedData& o) const
230 { 234 {
231 return dataEquivalent(textShadow.get(), o.textShadow.get()); 235 return dataEquivalent(textShadow.get(), o.textShadow.get());
232 } 236 }
233 237
234 bool StyleRareInheritedData::quotesDataEquivalent(const StyleRareInheritedData& o) const 238 bool StyleRareInheritedData::quotesDataEquivalent(const StyleRareInheritedData& o) const
235 { 239 {
236 return dataEquivalent(quotes, o.quotes); 240 return dataEquivalent(quotes, o.quotes);
237 } 241 }
238 242
239 } // namespace blink 243 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698