| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 if (origin == AuthorOrigin) | 91 if (origin == AuthorOrigin) |
| 92 m_hasAuthorStyle = true; | 92 m_hasAuthorStyle = true; |
| 93 | 93 |
| 94 if (!m_propertySet) { | 94 if (!m_propertySet) { |
| 95 m_propertySet = propertySet.mutableCopy(); | 95 m_propertySet = propertySet.mutableCopy(); |
| 96 return; | 96 return; |
| 97 } | 97 } |
| 98 | 98 |
| 99 // We cannot use mergeAndOverrideOnConflict() here because it doesn't | 99 // We cannot use mergeAndOverrideOnConflict() here because it doesn't |
| 100 // respect the !important declaration (but addParsedProperty() does). | 100 // respect the !important declaration (but addRespectingCascade() does). |
| 101 for (unsigned i = 0; i < propertyCount; ++i) | 101 for (unsigned i = 0; i < propertyCount; ++i) |
| 102 m_propertySet->addParsedProperty(propertySet.propertyAt(i).toCSSProperty
()); | 102 m_propertySet->addRespectingCascade(propertySet.propertyAt(i).toCSSPrope
rty()); |
| 103 } | 103 } |
| 104 | 104 |
| 105 void ViewportStyleResolver::resolve() | 105 void ViewportStyleResolver::resolve() |
| 106 { | 106 { |
| 107 if (!m_propertySet) { | 107 if (!m_propertySet) { |
| 108 m_document->setViewportDescription(ViewportDescription(ViewportDescripti
on::UserAgentStyleSheet)); | 108 m_document->setViewportDescription(ViewportDescription(ViewportDescripti
on::UserAgentStyleSheet)); |
| 109 return; | 109 return; |
| 110 } | 110 } |
| 111 | 111 |
| 112 ViewportDescription description(m_hasAuthorStyle ? ViewportDescription::Auth
orStyleSheet : ViewportDescription::UserAgentStyleSheet); | 112 ViewportDescription description(m_hasAuthorStyle ? ViewportDescription::Auth
orStyleSheet : ViewportDescription::UserAgentStyleSheet); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 return result; | 220 return result; |
| 221 } | 221 } |
| 222 | 222 |
| 223 DEFINE_TRACE(ViewportStyleResolver) | 223 DEFINE_TRACE(ViewportStyleResolver) |
| 224 { | 224 { |
| 225 visitor->trace(m_propertySet); | 225 visitor->trace(m_propertySet); |
| 226 visitor->trace(m_document); | 226 visitor->trace(m_document); |
| 227 } | 227 } |
| 228 | 228 |
| 229 } // namespace blink | 229 } // namespace blink |
| OLD | NEW |