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

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

Issue 211073002: [Oilpan]: Move CSSFontSelectorClient to the oilpan heap using transition types. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Adding StyleEngine.cpp change (forgot to upload diff again with WTF change) Created 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012-2013 Intel Corporation. All rights reserved. 2 * Copyright (C) 2012-2013 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
35 #include "core/css/CSSToLengthConversionData.h" 35 #include "core/css/CSSToLengthConversionData.h"
36 #include "core/css/StylePropertySet.h" 36 #include "core/css/StylePropertySet.h"
37 #include "core/css/StyleRule.h" 37 #include "core/css/StyleRule.h"
38 #include "core/dom/Document.h" 38 #include "core/dom/Document.h"
39 #include "core/dom/NodeRenderStyle.h" 39 #include "core/dom/NodeRenderStyle.h"
40 #include "core/dom/ViewportDescription.h" 40 #include "core/dom/ViewportDescription.h"
41 #include "core/frame/FrameView.h" 41 #include "core/frame/FrameView.h"
42 42
43 namespace WebCore { 43 namespace WebCore {
44 44
45 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(ViewportStyleResolver); 45 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(ViewportStyleResolver);
zerny-chromium 2014/03/26 14:57:49 Ditto
wibling-chromium 2014/03/26 15:21:35 Done.
46 46
47 ViewportStyleResolver::ViewportStyleResolver(Document* document) 47 ViewportStyleResolver::ViewportStyleResolver(Document* document)
48 : m_document(document), 48 : m_document(document),
49 m_hasAuthorStyle(false) 49 m_hasAuthorStyle(false)
50 { 50 {
51 ASSERT(m_document); 51 ASSERT(m_document);
52 } 52 }
53 53
54 void ViewportStyleResolver::collectViewportRules(RuleSet* rules, Origin origin) 54 void ViewportStyleResolver::collectViewportRules(RuleSet* rules, Origin origin)
55 { 55 {
(...skipping 19 matching lines...) Expand all
75 m_propertySet = propertySet.mutableCopy(); 75 m_propertySet = propertySet.mutableCopy();
76 return; 76 return;
77 } 77 }
78 78
79 // We cannot use mergeAndOverrideOnConflict() here because it doesn't 79 // We cannot use mergeAndOverrideOnConflict() here because it doesn't
80 // respect the !important declaration (but addParsedProperty() does). 80 // respect the !important declaration (but addParsedProperty() does).
81 for (unsigned i = 0; i < propertyCount; ++i) 81 for (unsigned i = 0; i < propertyCount; ++i)
82 m_propertySet->addParsedProperty(propertySet.propertyAt(i).toCSSProperty ()); 82 m_propertySet->addParsedProperty(propertySet.propertyAt(i).toCSSProperty ());
83 } 83 }
84 84
85 void ViewportStyleResolver::clearDocument()
86 {
87 m_document = 0;
88 }
89
90 void ViewportStyleResolver::resolve() 85 void ViewportStyleResolver::resolve()
91 { 86 {
92 if (!m_document) 87 if (!m_document)
93 return; 88 return;
94 89
95 if (!m_propertySet || (!m_hasAuthorStyle && m_document->hasLegacyViewportTag ())) { 90 if (!m_propertySet || (!m_hasAuthorStyle && m_document->hasLegacyViewportTag ())) {
96 ASSERT(!m_hasAuthorStyle); 91 ASSERT(!m_hasAuthorStyle);
97 m_propertySet = nullptr; 92 m_propertySet = nullptr;
98 m_document->setViewportDescription(ViewportDescription()); 93 m_document->setViewportDescription(ViewportDescription());
99 return; 94 return;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 198
204 return result; 199 return result;
205 } 200 }
206 201
207 void ViewportStyleResolver::trace(Visitor* visitor) 202 void ViewportStyleResolver::trace(Visitor* visitor)
208 { 203 {
209 visitor->trace(m_propertySet); 204 visitor->trace(m_propertySet);
210 } 205 }
211 206
212 } // namespace WebCore 207 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698