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

Side by Side Diff: Source/core/css/resolver/ViewportStyleResolver.h

Issue 979033003: Move code from StyleResolver to ViewportStyleResolver. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 5 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) 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 class ViewportStyleResolver : public NoBaseWillBeGarbageCollected<ViewportStyleR esolver> { 45 class ViewportStyleResolver : public NoBaseWillBeGarbageCollected<ViewportStyleR esolver> {
46 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(ViewportStyleResolver); 46 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(ViewportStyleResolver);
47 public: 47 public:
48 static PassOwnPtrWillBeRawPtr<ViewportStyleResolver> create(Document* docume nt) 48 static PassOwnPtrWillBeRawPtr<ViewportStyleResolver> create(Document* docume nt)
49 { 49 {
50 return adoptPtrWillBeNoop(new ViewportStyleResolver(document)); 50 return adoptPtrWillBeNoop(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(RuleSet*, Origin); 56 void collectViewportRules(RuleSet*, Origin);
56
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 RawPtrWillBeMember<Document> m_document; 69 RawPtrWillBeMember<Document> m_document;
70 RefPtrWillBeMember<MutableStylePropertySet> m_propertySet; 70 RefPtrWillBeMember<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
OLDNEW
« no previous file with comments | « Source/core/css/resolver/StyleResolver.cpp ('k') | Source/core/css/resolver/ViewportStyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698