Chromium Code Reviews| 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 24 matching lines...) Expand all Loading... | |
| 35 #include "platform/Length.h" | 35 #include "platform/Length.h" |
| 36 #include "wtf/RefCounted.h" | 36 #include "wtf/RefCounted.h" |
| 37 #include "wtf/RefPtr.h" | 37 #include "wtf/RefPtr.h" |
| 38 | 38 |
| 39 namespace WebCore { | 39 namespace WebCore { |
| 40 | 40 |
| 41 class Document; | 41 class Document; |
| 42 class MutableStylePropertySet; | 42 class MutableStylePropertySet; |
| 43 class StyleRuleViewport; | 43 class StyleRuleViewport; |
| 44 | 44 |
| 45 class ViewportStyleResolver : public RefCountedWillBeGarbageCollected<ViewportSt yleResolver> { | 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 PassRefPtrWillBeRawPtr<ViewportStyleResolver> create(Document* docume nt) | 48 static PassOwnPtrWillBeRawPtr<ViewportStyleResolver> create(Document* docume nt) |
| 49 { | 49 { |
| 50 return adoptRefWillBeNoop(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(RuleSet*, Origin); | 55 void collectViewportRules(RuleSet*, Origin); |
| 56 | 56 |
| 57 void clearDocument(); | |
|
haraken
2014/03/25 13:19:30
Removing clearDocument() looks wrong to me. When a
wibling-chromium
2014/03/25 13:27:17
It wasn't cleared previously. The only caller of c
haraken
2014/03/25 13:50:21
Correct me if I'm wrong:
StyleResolver and Viewpor
wibling-chromium
2014/03/25 13:59:25
My point is that before my change what you said wa
| |
| 58 void resolve(); | 57 void resolve(); |
| 59 | 58 |
| 60 void trace(Visitor*); | 59 void trace(Visitor*); |
| 61 | 60 |
| 62 private: | 61 private: |
| 63 explicit ViewportStyleResolver(Document*); | 62 explicit ViewportStyleResolver(Document*); |
| 64 | 63 |
| 65 void addViewportRule(StyleRuleViewport*, Origin); | 64 void addViewportRule(StyleRuleViewport*, Origin); |
| 66 | 65 |
| 67 float viewportArgumentValue(CSSPropertyID) const; | 66 float viewportArgumentValue(CSSPropertyID) const; |
| 68 Length viewportLengthValue(CSSPropertyID) const; | 67 Length viewportLengthValue(CSSPropertyID) const; |
| 69 | 68 |
| 70 Document* m_document; | 69 Document* m_document; |
| 71 RefPtrWillBeMember<MutableStylePropertySet> m_propertySet; | 70 RefPtrWillBeMember<MutableStylePropertySet> m_propertySet; |
| 72 bool m_hasAuthorStyle; | 71 bool m_hasAuthorStyle; |
| 73 }; | 72 }; |
| 74 | 73 |
| 75 } // namespace WebCore | 74 } // namespace WebCore |
| 76 | 75 |
| 77 #endif // ViewportStyleResolver_h | 76 #endif // ViewportStyleResolver_h |
| OLD | NEW |