| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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) |
| OLD | NEW |