Chromium Code Reviews| Index: Source/core/css/resolver/ViewportStyleResolver.cpp |
| diff --git a/Source/core/css/resolver/ViewportStyleResolver.cpp b/Source/core/css/resolver/ViewportStyleResolver.cpp |
| index 4480d7f47ed72473c1df70a02e517c538613d8a5..34239374452d71ee590cdda4ac0ae685e9848c03 100644 |
| --- a/Source/core/css/resolver/ViewportStyleResolver.cpp |
| +++ b/Source/core/css/resolver/ViewportStyleResolver.cpp |
| @@ -75,9 +75,21 @@ void ViewportStyleResolver::clearDocument() |
| void ViewportStyleResolver::resolve() |
| { |
| - if (!m_document || !m_propertySet) |
| + if (!m_document) |
| return; |
| + if (!m_propertySet) { |
| + // FIXME: This is not entirely correct. If the doctype is XHTML MP, or there is a Meta |
| + // element for setting the viewport, the viewport arguments should fall back to those |
| + // settings when the @viewport rules are all removed. For now, reset to implicit when |
| + // there was an @viewport rule which has now been removed. |
| + if (m_document->viewportArguments().type == ViewportArguments::CSSDeviceAdaptation) { |
|
kenneth.r.christiansen
2013/08/21 08:28:35
Did you test if this is also an issue after my ->@
|
| + m_document->setViewportArguments(ViewportArguments()); |
| + m_document->updateViewportArguments(); |
| + } |
| + return; |
| + } |
| + |
| ViewportArguments arguments(ViewportArguments::CSSDeviceAdaptation); |
| arguments.userZoom = getViewportArgumentValue(CSSPropertyUserZoom); |