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

Side by Side Diff: sky/engine/core/css/resolver/StyleResolverState.h

Issue 1229273004: Remove Animations and Transitions. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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 18 matching lines...) Expand all
29 #include "sky/engine/core/css/resolver/ElementResolveContext.h" 29 #include "sky/engine/core/css/resolver/ElementResolveContext.h"
30 #include "sky/engine/core/css/resolver/ElementStyleResources.h" 30 #include "sky/engine/core/css/resolver/ElementStyleResources.h"
31 #include "sky/engine/core/css/resolver/FontBuilder.h" 31 #include "sky/engine/core/css/resolver/FontBuilder.h"
32 #include "sky/engine/core/dom/Document.h" 32 #include "sky/engine/core/dom/Document.h"
33 #include "sky/engine/core/dom/Element.h" 33 #include "sky/engine/core/dom/Element.h"
34 #include "sky/engine/core/rendering/style/RenderStyle.h" 34 #include "sky/engine/core/rendering/style/RenderStyle.h"
35 #include "sky/engine/core/rendering/style/StyleInheritedData.h" 35 #include "sky/engine/core/rendering/style/StyleInheritedData.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 class CSSAnimationUpdate;
40 class FontDescription; 39 class FontDescription;
41 class StyleRule; 40 class StyleRule;
42 41
43 class StyleResolverState { 42 class StyleResolverState {
44 STACK_ALLOCATED(); 43 STACK_ALLOCATED();
45 WTF_MAKE_NONCOPYABLE(StyleResolverState); 44 WTF_MAKE_NONCOPYABLE(StyleResolverState);
46 public: 45 public:
47 StyleResolverState(Document&, Element*, RenderStyle* parentStyle = 0); 46 StyleResolverState(Document&, Element*, RenderStyle* parentStyle = 0);
48 ~StyleResolverState(); 47 ~StyleResolverState();
49 48
50 // In FontFaceSet and CanvasRenderingContext2D, we don't have an element to grab the document from. 49 // In FontFaceSet and CanvasRenderingContext2D, we don't have an element to grab the document from.
51 // This is why we have to store the document separately. 50 // This is why we have to store the document separately.
52 Document& document() const { return *m_document; } 51 Document& document() const { return *m_document; }
53 // These are all just pass-through methods to ElementResolveContext. 52 // These are all just pass-through methods to ElementResolveContext.
54 Element* element() const { return m_elementContext.element(); } 53 Element* element() const { return m_elementContext.element(); }
55 const ContainerNode* parentNode() const { return m_elementContext.parentNode (); } 54 const ContainerNode* parentNode() const { return m_elementContext.parentNode (); }
56 55
57 bool distributedToInsertionPoint() const { return m_elementContext.distribut edToInsertionPoint(); } 56 bool distributedToInsertionPoint() const { return m_elementContext.distribut edToInsertionPoint(); }
58 57
59 const ElementResolveContext& elementContext() const { return m_elementContex t; } 58 const ElementResolveContext& elementContext() const { return m_elementContex t; }
60 59
61 void setStyle(PassRefPtr<RenderStyle> style) { m_style = style; m_cssToLengt hConversionData.setStyle(m_style.get()); } 60 void setStyle(PassRefPtr<RenderStyle> style) { m_style = style; m_cssToLengt hConversionData.setStyle(m_style.get()); }
62 const RenderStyle* style() const { return m_style.get(); } 61 const RenderStyle* style() const { return m_style.get(); }
63 RenderStyle* style() { return m_style.get(); } 62 RenderStyle* style() { return m_style.get(); }
64 PassRefPtr<RenderStyle> takeStyle() { return m_style.release(); } 63 PassRefPtr<RenderStyle> takeStyle() { return m_style.release(); }
65 64
66 const CSSToLengthConversionData& cssToLengthConversionData() const { return m_cssToLengthConversionData; } 65 const CSSToLengthConversionData& cssToLengthConversionData() const { return m_cssToLengthConversionData; }
67 66
68 void setAnimationUpdate(PassOwnPtr<CSSAnimationUpdate>);
69 const CSSAnimationUpdate* animationUpdate() { return m_animationUpdate.get() ; }
70 PassOwnPtr<CSSAnimationUpdate> takeAnimationUpdate();
71
72 void setParentStyle(PassRefPtr<RenderStyle> parentStyle) { m_parentStyle = p arentStyle; } 67 void setParentStyle(PassRefPtr<RenderStyle> parentStyle) { m_parentStyle = p arentStyle; }
73 const RenderStyle* parentStyle() const { return m_parentStyle.get(); } 68 const RenderStyle* parentStyle() const { return m_parentStyle.get(); }
74 RenderStyle* parentStyle() { return m_parentStyle.get(); } 69 RenderStyle* parentStyle() { return m_parentStyle.get(); }
75 70
76 // Holds all attribute names found while applying "content" properties that contain an "attr()" value. 71 // Holds all attribute names found while applying "content" properties that contain an "attr()" value.
77 Vector<AtomicString>& contentAttrValues() { return m_contentAttrValues; } 72 Vector<AtomicString>& contentAttrValues() { return m_contentAttrValues; }
78 73
79 void setLineHeightValue(CSSValue* value) { m_lineHeightValue = value; } 74 void setLineHeightValue(CSSValue* value) { m_lineHeightValue = value; }
80 CSSValue* lineHeightValue() { return m_lineHeightValue; } 75 CSSValue* lineHeightValue() { return m_lineHeightValue; }
81 76
(...skipping 24 matching lines...) Expand all
106 101
107 // m_style is the primary output for each element's style resolve. 102 // m_style is the primary output for each element's style resolve.
108 RefPtr<RenderStyle> m_style; 103 RefPtr<RenderStyle> m_style;
109 104
110 CSSToLengthConversionData m_cssToLengthConversionData; 105 CSSToLengthConversionData m_cssToLengthConversionData;
111 106
112 // m_parentStyle is not always just element->parentNode()->style() 107 // m_parentStyle is not always just element->parentNode()->style()
113 // so we keep it separate from m_elementContext. 108 // so we keep it separate from m_elementContext.
114 RefPtr<RenderStyle> m_parentStyle; 109 RefPtr<RenderStyle> m_parentStyle;
115 110
116 OwnPtr<CSSAnimationUpdate> m_animationUpdate;
117
118 RawPtr<CSSValue> m_lineHeightValue; 111 RawPtr<CSSValue> m_lineHeightValue;
119 112
120 FontBuilder m_fontBuilder; 113 FontBuilder m_fontBuilder;
121 114
122 ElementStyleResources m_elementStyleResources; 115 ElementStyleResources m_elementStyleResources;
123 // CSSToStyleMap is a pure-logic class and only contains 116 // CSSToStyleMap is a pure-logic class and only contains
124 // a back-pointer to this object. 117 // a back-pointer to this object.
125 CSSToStyleMap m_styleMap; 118 CSSToStyleMap m_styleMap;
126 Vector<AtomicString> m_contentAttrValues; 119 Vector<AtomicString> m_contentAttrValues;
127 }; 120 };
128 121
129 } // namespace blink 122 } // namespace blink
130 123
131 #endif // SKY_ENGINE_CORE_CSS_RESOLVER_STYLERESOLVERSTATE_H_ 124 #endif // SKY_ENGINE_CORE_CSS_RESOLVER_STYLERESOLVERSTATE_H_
OLDNEW
« no previous file with comments | « sky/engine/core/css/resolver/StyleResolver.cpp ('k') | sky/engine/core/css/resolver/StyleResolverState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698