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