Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 10 matching lines...) Expand all Loading... | |
| 21 * Boston, MA 02110-1301, USA. | 21 * Boston, MA 02110-1301, USA. |
| 22 * | 22 * |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 #ifndef StyleRareInheritedData_h | 25 #ifndef StyleRareInheritedData_h |
| 26 #define StyleRareInheritedData_h | 26 #define StyleRareInheritedData_h |
| 27 | 27 |
| 28 #include "core/CoreExport.h" | 28 #include "core/CoreExport.h" |
| 29 #include "core/css/StyleAutoColor.h" | 29 #include "core/css/StyleAutoColor.h" |
| 30 #include "core/css/StyleColor.h" | 30 #include "core/css/StyleColor.h" |
| 31 #include "core/style/AppliedTextDecoration.h" | |
| 31 #include "core/style/AppliedTextDecorationList.h" | 32 #include "core/style/AppliedTextDecorationList.h" |
| 33 #include "core/style/CursorData.h" | |
| 32 #include "core/style/CursorList.h" | 34 #include "core/style/CursorList.h" |
| 35 #include "core/style/QuotesData.h" | |
| 36 #include "core/style/ShadowData.h" | |
| 37 #include "core/style/ShadowList.h" | |
| 38 #include "core/style/StyleImage.h" | |
| 39 #include "core/style/StyleInheritedVariables.h" | |
| 33 #include "core/style/TextSizeAdjust.h" | 40 #include "core/style/TextSizeAdjust.h" |
| 34 #include "platform/Length.h" | 41 #include "platform/Length.h" |
| 35 #include "platform/graphics/Color.h" | 42 #include "platform/graphics/Color.h" |
| 36 #include "platform/heap/Handle.h" | 43 #include "platform/heap/Handle.h" |
| 37 #include "platform/text/TabSize.h" | 44 #include "platform/text/TabSize.h" |
| 38 #include "platform/wtf/PassRefPtr.h" | 45 #include "platform/wtf/PassRefPtr.h" |
| 39 #include "platform/wtf/RefCounted.h" | 46 #include "platform/wtf/RefCounted.h" |
| 40 #include "platform/wtf/RefVector.h" | 47 #include "platform/wtf/RefVector.h" |
| 41 #include "platform/wtf/text/AtomicString.h" | 48 #include "platform/wtf/text/AtomicString.h" |
| 42 | 49 |
| 43 namespace blink { | 50 namespace blink { |
| 44 | 51 |
| 45 class QuotesData; | 52 class QuotesData; |
| 46 class ShadowList; | 53 class ShadowList; |
| 47 class StyleImage; | 54 class StyleImage; |
| 48 class StyleInheritedVariables; | 55 class StyleInheritedVariables; |
|
alancutter (OOO until 2018)
2017/05/16 06:23:37
These need removing.
| |
| 49 | 56 |
| 50 // This struct is for rarely used inherited CSS3, CSS2, and WebKit-specific | 57 // This struct is for rarely used inherited CSS3, CSS2, and WebKit-specific |
| 51 // properties. By grouping them together, we save space, and only allocate this | 58 // properties. By grouping them together, we save space, and only allocate this |
| 52 // object when someone actually uses one of these properties. | 59 // object when someone actually uses one of these properties. |
| 53 // TODO(sashab): Move this into a private class on ComputedStyle, and remove | 60 // TODO(sashab): Move this into a private class on ComputedStyle, and remove |
| 54 // all methods on it, merging them into copy/creation methods on ComputedStyle | 61 // all methods on it, merging them into copy/creation methods on ComputedStyle |
| 55 // instead. Keep the allocation logic, only allocating a new object if needed. | 62 // instead. Keep the allocation logic, only allocating a new object if needed. |
| 56 class CORE_EXPORT StyleRareInheritedData | 63 class CORE_EXPORT StyleRareInheritedData |
| 57 : public RefCounted<StyleRareInheritedData> { | 64 : public RefCountedCopyable<StyleRareInheritedData> { |
| 58 public: | 65 public: |
| 59 static PassRefPtr<StyleRareInheritedData> Create() { | 66 static PassRefPtr<StyleRareInheritedData> Create() { |
| 60 return AdoptRef(new StyleRareInheritedData); | 67 return AdoptRef(new StyleRareInheritedData); |
| 61 } | 68 } |
| 62 PassRefPtr<StyleRareInheritedData> Copy() const { | 69 PassRefPtr<StyleRareInheritedData> Copy() const { |
| 63 return AdoptRef(new StyleRareInheritedData(*this)); | 70 return AdoptRef(new StyleRareInheritedData(*this)); |
| 64 } | 71 } |
| 65 ~StyleRareInheritedData(); | |
| 66 | 72 |
| 67 bool operator==(const StyleRareInheritedData&) const; | 73 bool operator==(const StyleRareInheritedData&) const; |
| 68 bool operator!=(const StyleRareInheritedData& o) const { | 74 bool operator!=(const StyleRareInheritedData& o) const { |
| 69 return !(*this == o); | 75 return !(*this == o); |
| 70 } | 76 } |
| 71 bool ShadowDataEquivalent(const StyleRareInheritedData&) const; | 77 bool ShadowDataEquivalent(const StyleRareInheritedData&) const; |
| 72 bool QuotesDataEquivalent(const StyleRareInheritedData&) const; | 78 bool QuotesDataEquivalent(const StyleRareInheritedData&) const; |
| 73 | 79 |
| 74 Persistent<StyleImage> list_style_image_; | 80 Persistent<StyleImage> list_style_image_; |
| 75 | 81 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 157 Color tap_highlight_color_; | 163 Color tap_highlight_color_; |
| 158 | 164 |
| 159 RefPtr<AppliedTextDecorationList> applied_text_decorations_; | 165 RefPtr<AppliedTextDecorationList> applied_text_decorations_; |
| 160 TabSize tab_size_; | 166 TabSize tab_size_; |
| 161 | 167 |
| 162 RefPtr<StyleInheritedVariables> variables_; | 168 RefPtr<StyleInheritedVariables> variables_; |
| 163 TextSizeAdjust text_size_adjust_; | 169 TextSizeAdjust text_size_adjust_; |
| 164 | 170 |
| 165 private: | 171 private: |
| 166 StyleRareInheritedData(); | 172 StyleRareInheritedData(); |
| 167 StyleRareInheritedData(const StyleRareInheritedData&); | 173 StyleRareInheritedData(const StyleRareInheritedData&) = default; |
|
alancutter (OOO until 2018)
2017/05/16 06:24:35
Can = default be used in CPP files? Perhaps it's b
| |
| 168 }; | 174 }; |
| 169 | 175 |
| 170 } // namespace blink | 176 } // namespace blink |
| 171 | 177 |
| 172 #endif // StyleRareInheritedData_h | 178 #endif // StyleRareInheritedData_h |
| OLD | NEW |