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

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

Issue 2753013004: Apply SVG styles paint-order, stroke-linejoin, and stroke-linecap on DOM text
Patch Set: Apply SVG styles paint-order, stroke-linejoin, and stroke-linecap on DOM text Created 3 years, 9 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 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 class AppliedTextDecoration; 43 class AppliedTextDecoration;
44 class CursorData; 44 class CursorData;
45 class QuotesData; 45 class QuotesData;
46 class ShadowList; 46 class ShadowList;
47 class StyleImage; 47 class StyleImage;
48 class StyleInheritedVariables; 48 class StyleInheritedVariables;
49 49
50 typedef RefVector<AppliedTextDecoration> AppliedTextDecorationList; 50 typedef RefVector<AppliedTextDecoration> AppliedTextDecorationList;
51 typedef HeapVector<CursorData> CursorList; 51 typedef HeapVector<CursorData> CursorList;
52 52
53 class UnzoomedLength {
54 DISALLOW_NEW();
55
56 public:
57 explicit UnzoomedLength(const Length& length) : m_length(length) {}
58
59 bool isZero() const { return m_length.isZero(); }
60
61 bool operator==(const UnzoomedLength& other) const {
62 return m_length == other.m_length;
63 }
64 bool operator!=(const UnzoomedLength& other) const {
65 return !operator==(other);
66 }
67
68 const Length& length() const { return m_length; }
69
70 private:
71 Length m_length;
72 };
73
53 // This struct is for rarely used inherited CSS3, CSS2, and WebKit-specific 74 // This struct is for rarely used inherited CSS3, CSS2, and WebKit-specific
54 // properties. By grouping them together, we save space, and only allocate this 75 // properties. By grouping them together, we save space, and only allocate this
55 // object when someone actually uses one of these properties. 76 // object when someone actually uses one of these properties.
56 // TODO(sashab): Move this into a private class on ComputedStyle, and remove 77 // TODO(sashab): Move this into a private class on ComputedStyle, and remove
57 // all methods on it, merging them into copy/creation methods on ComputedStyle 78 // all methods on it, merging them into copy/creation methods on ComputedStyle
58 // instead. Keep the allocation logic, only allocating a new object if needed. 79 // instead. Keep the allocation logic, only allocating a new object if needed.
59 class CORE_EXPORT StyleRareInheritedData 80 class CORE_EXPORT StyleRareInheritedData
60 : public RefCounted<StyleRareInheritedData> { 81 : public RefCounted<StyleRareInheritedData> {
61 public: 82 public:
62 static PassRefPtr<StyleRareInheritedData> create() { 83 static PassRefPtr<StyleRareInheritedData> create() {
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 unsigned m_rubyPosition : 1; // RubyPosition 234 unsigned m_rubyPosition : 1; // RubyPosition
214 235
215 // Though will-change is not itself an inherited property, the intent 236 // Though will-change is not itself an inherited property, the intent
216 // expressed by 'will-change: contents' includes descendants. 237 // expressed by 'will-change: contents' includes descendants.
217 unsigned m_subtreeWillChangeContents : 1; 238 unsigned m_subtreeWillChangeContents : 1;
218 239
219 unsigned m_selfOrAncestorHasDirAutoAttribute : 1; 240 unsigned m_selfOrAncestorHasDirAutoAttribute : 1;
220 241
221 unsigned m_respectImageOrientation : 1; 242 unsigned m_respectImageOrientation : 1;
222 243
244 unsigned paintOrder : 3; // EPaintOrder
245 unsigned capStyle : 2; // LineCap
246 unsigned joinStyle : 2; // LineJoin
247 UnzoomedLength strokeWidth;
248
223 AtomicString hyphenationString; 249 AtomicString hyphenationString;
224 short hyphenationLimitBefore; 250 short hyphenationLimitBefore;
225 short hyphenationLimitAfter; 251 short hyphenationLimitAfter;
226 short hyphenationLimitLines; 252 short hyphenationLimitLines;
227 253
228 uint8_t m_lineHeightStep; 254 uint8_t m_lineHeightStep;
229 255
230 AtomicString textEmphasisCustomMark; 256 AtomicString textEmphasisCustomMark;
231 RefPtr<QuotesData> quotes; 257 RefPtr<QuotesData> quotes;
232 258
233 Color tapHighlightColor; 259 Color tapHighlightColor;
234 260
235 RefPtr<AppliedTextDecorationList> appliedTextDecorations; 261 RefPtr<AppliedTextDecorationList> appliedTextDecorations;
236 TabSize m_tabSize; 262 TabSize m_tabSize;
237 263
238 RefPtr<StyleInheritedVariables> variables; 264 RefPtr<StyleInheritedVariables> variables;
239 TextSizeAdjust m_textSizeAdjust; 265 TextSizeAdjust m_textSizeAdjust;
240 266
241 private: 267 private:
242 StyleRareInheritedData(); 268 StyleRareInheritedData();
243 StyleRareInheritedData(const StyleRareInheritedData&); 269 StyleRareInheritedData(const StyleRareInheritedData&);
244 }; 270 };
245 271
246 } // namespace blink 272 } // namespace blink
247 273
248 #endif // StyleRareInheritedData_h 274 #endif // StyleRareInheritedData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698