Index: third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp |
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp |
index 24e802cedab22282b5d74a959857aa211d25e353..282ac47b0d4fd8f5adeb385cc0c90d5ad422c2ab 100644 |
--- a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp |
+++ b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp |
@@ -1917,8 +1917,11 @@ void StyleResolver::computeFont(ComputedStyle* style, |
void StyleResolver::updateMediaType() { |
if (FrameView* view = document().view()) { |
+ bool wasPrint = m_printMediaType; |
m_printMediaType = |
equalIgnoringCase(view->mediaType(), MediaTypeNames::print); |
+ if (wasPrint != m_printMediaType) |
+ m_matchedPropertiesCache.clearViewportDependent(); |
} |
} |