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

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

Issue 15746004: Rename/tweak some StylePropertySet/CSSStyleDeclaration copying functions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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
« no previous file with comments | « Source/core/css/WebKitCSSKeyframeRule.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 void ViewportStyleResolver::addViewportRule(StyleRuleViewport* viewportRule) 55 void ViewportStyleResolver::addViewportRule(StyleRuleViewport* viewportRule)
56 { 56 {
57 StylePropertySet* propertySet = viewportRule->mutableProperties(); 57 StylePropertySet* propertySet = viewportRule->mutableProperties();
58 58
59 unsigned propertyCount = propertySet->propertyCount(); 59 unsigned propertyCount = propertySet->propertyCount();
60 if (!propertyCount) 60 if (!propertyCount)
61 return; 61 return;
62 62
63 if (!m_propertySet) { 63 if (!m_propertySet) {
64 m_propertySet = propertySet->copy(); 64 m_propertySet = propertySet->mutableCopy();
65 return; 65 return;
66 } 66 }
67 67
68 // We cannot use mergeAndOverrideOnConflict() here because it doesn't 68 // We cannot use mergeAndOverrideOnConflict() here because it doesn't
69 // respect the !important declaration (but addParsedProperty() does). 69 // respect the !important declaration (but addParsedProperty() does).
70 for (unsigned i = 0; i < propertyCount; ++i) 70 for (unsigned i = 0; i < propertyCount; ++i)
71 m_propertySet->addParsedProperty(propertySet->propertyAt(i).toCSSPropert y()); 71 m_propertySet->addParsedProperty(propertySet->propertyAt(i).toCSSPropert y());
72 } 72 }
73 73
74 void ViewportStyleResolver::clearDocument() 74 void ViewportStyleResolver::clearDocument()
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 case CSSValueFixed: 158 case CSSValueFixed:
159 return 0; 159 return 0;
160 default: 160 default:
161 return defaultValue; 161 return defaultValue;
162 } 162 }
163 } 163 }
164 164
165 } // namespace WebCore 165 } // namespace WebCore
166 166
167 #endif // ENABLE(CSS_DEVICE_ADAPTATION) 167 #endif // ENABLE(CSS_DEVICE_ADAPTATION)
OLDNEW
« no previous file with comments | « Source/core/css/WebKitCSSKeyframeRule.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698