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 26 matching lines...) Expand all Loading... |
37 | 37 |
38 namespace blink { | 38 namespace blink { |
39 | 39 |
40 class Document; | 40 class Document; |
41 class MutableStylePropertySet; | 41 class MutableStylePropertySet; |
42 class StyleRuleViewport; | 42 class StyleRuleViewport; |
43 | 43 |
44 class CORE_EXPORT ViewportStyleResolver | 44 class CORE_EXPORT ViewportStyleResolver |
45 : public GarbageCollected<ViewportStyleResolver> { | 45 : public GarbageCollected<ViewportStyleResolver> { |
46 public: | 46 public: |
47 static ViewportStyleResolver* create(Document* document) { | 47 static ViewportStyleResolver* create(Document& document) { |
48 return new ViewportStyleResolver(document); | 48 return new ViewportStyleResolver(document); |
49 } | 49 } |
50 | 50 |
51 enum Origin { UserAgentOrigin, AuthorOrigin }; | 51 enum Origin { UserAgentOrigin, AuthorOrigin }; |
52 | 52 |
53 void collectViewportRules(); | 53 void collectViewportRules(); |
54 void collectViewportRules(RuleSet*, Origin); | 54 void collectViewportRules(RuleSet*, Origin); |
55 void resolve(); | 55 void resolve(); |
56 | 56 |
57 DECLARE_TRACE(); | 57 DECLARE_TRACE(); |
58 | 58 |
59 private: | 59 private: |
60 explicit ViewportStyleResolver(Document*); | 60 explicit ViewportStyleResolver(Document&); |
61 | 61 |
62 void addViewportRule(StyleRuleViewport*, Origin); | 62 void collectViewportRulesFromUASheets(); |
| 63 void collectViewportChildRules(const HeapVector<Member<StyleRuleBase>>&, |
| 64 Origin); |
| 65 void addViewportRule(StyleRuleViewport&, Origin); |
63 | 66 |
64 float viewportArgumentValue(CSSPropertyID) const; | 67 float viewportArgumentValue(CSSPropertyID) const; |
65 Length viewportLengthValue(CSSPropertyID) const; | 68 Length viewportLengthValue(CSSPropertyID) const; |
66 | 69 |
67 Member<Document> m_document; | 70 Member<Document> m_document; |
68 Member<MutableStylePropertySet> m_propertySet; | 71 Member<MutableStylePropertySet> m_propertySet; |
| 72 Member<MediaQueryEvaluator> m_initialViewportMedium; |
69 bool m_hasAuthorStyle; | 73 bool m_hasAuthorStyle; |
70 }; | 74 }; |
71 | 75 |
72 } // namespace blink | 76 } // namespace blink |
73 | 77 |
74 #endif // ViewportStyleResolver_h | 78 #endif // ViewportStyleResolver_h |
OLD | NEW |