OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Intel Corporation. All rights reserved. | 2 * Copyright (C) 2012 Intel Corporation. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
10 * disclaimer. | 10 * disclaimer. |
(...skipping 27 matching lines...) Expand all Loading... |
38 #include "wtf/RefPtr.h" | 38 #include "wtf/RefPtr.h" |
39 | 39 |
40 namespace blink { | 40 namespace blink { |
41 | 41 |
42 class Document; | 42 class Document; |
43 class MutableStylePropertySet; | 43 class MutableStylePropertySet; |
44 class StyleRuleViewport; | 44 class StyleRuleViewport; |
45 | 45 |
46 class CORE_EXPORT ViewportStyleResolver : public GarbageCollected<ViewportStyleR
esolver> { | 46 class CORE_EXPORT ViewportStyleResolver : public GarbageCollected<ViewportStyleR
esolver> { |
47 public: | 47 public: |
48 static RawPtr<ViewportStyleResolver> create(Document* document) | 48 static ViewportStyleResolver* create(Document* document) |
49 { | 49 { |
50 return new ViewportStyleResolver(document); | 50 return new ViewportStyleResolver(document); |
51 } | 51 } |
52 | 52 |
53 enum Origin { UserAgentOrigin, AuthorOrigin }; | 53 enum Origin { UserAgentOrigin, AuthorOrigin }; |
54 | 54 |
55 void collectViewportRules(); | 55 void collectViewportRules(); |
56 void collectViewportRules(RuleSet*, Origin); | 56 void collectViewportRules(RuleSet*, Origin); |
57 void resolve(); | 57 void resolve(); |
58 | 58 |
59 DECLARE_TRACE(); | 59 DECLARE_TRACE(); |
60 | 60 |
61 private: | 61 private: |
62 explicit ViewportStyleResolver(Document*); | 62 explicit ViewportStyleResolver(Document*); |
63 | 63 |
64 void addViewportRule(StyleRuleViewport*, Origin); | 64 void addViewportRule(StyleRuleViewport*, Origin); |
65 | 65 |
66 float viewportArgumentValue(CSSPropertyID) const; | 66 float viewportArgumentValue(CSSPropertyID) const; |
67 Length viewportLengthValue(CSSPropertyID) const; | 67 Length viewportLengthValue(CSSPropertyID) const; |
68 | 68 |
69 Member<Document> m_document; | 69 Member<Document> m_document; |
70 Member<MutableStylePropertySet> m_propertySet; | 70 Member<MutableStylePropertySet> m_propertySet; |
71 bool m_hasAuthorStyle; | 71 bool m_hasAuthorStyle; |
72 }; | 72 }; |
73 | 73 |
74 } // namespace blink | 74 } // namespace blink |
75 | 75 |
76 #endif // ViewportStyleResolver_h | 76 #endif // ViewportStyleResolver_h |
OLD | NEW |