Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: Source/core/dom/Document.cpp

Issue 369423002: Have srcset respond to viewport changes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Self review nits Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 3381 matching lines...) Expand 10 before | Expand all | Expand 10 after
3392 } 3392 }
3393 3393
3394 void Document::evaluateMediaQueryList() 3394 void Document::evaluateMediaQueryList()
3395 { 3395 {
3396 if (m_mediaQueryMatcher) 3396 if (m_mediaQueryMatcher)
3397 m_mediaQueryMatcher->mediaFeaturesChanged(); 3397 m_mediaQueryMatcher->mediaFeaturesChanged();
3398 } 3398 }
3399 3399
3400 void Document::notifyResizeForViewportUnits() 3400 void Document::notifyResizeForViewportUnits()
3401 { 3401 {
3402 if (m_mediaQueryMatcher)
3403 m_mediaQueryMatcher->viewportChanged();
3402 if (!hasViewportUnits()) 3404 if (!hasViewportUnits())
3403 return; 3405 return;
3404 ensureStyleResolver().notifyResizeForViewportUnits(); 3406 ensureStyleResolver().notifyResizeForViewportUnits();
3405 setNeedsStyleRecalcForViewportUnits(); 3407 setNeedsStyleRecalcForViewportUnits();
3406 } 3408 }
3407 3409
3408 void Document::styleResolverChanged(StyleResolverUpdateMode updateMode) 3410 void Document::styleResolverChanged(StyleResolverUpdateMode updateMode)
3409 { 3411 {
3410 // styleResolverChanged() can be invoked during Document destruction. 3412 // styleResolverChanged() can be invoked during Document destruction.
3411 // We just skip that case. 3413 // We just skip that case.
(...skipping 2475 matching lines...) Expand 10 before | Expand all | Expand 10 after
5887 using namespace blink; 5889 using namespace blink;
5888 void showLiveDocumentInstances() 5890 void showLiveDocumentInstances()
5889 { 5891 {
5890 WeakDocumentSet& set = liveDocumentSet(); 5892 WeakDocumentSet& set = liveDocumentSet();
5891 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 5893 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
5892 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) { 5894 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) {
5893 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data()); 5895 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data());
5894 } 5896 }
5895 } 5897 }
5896 #endif 5898 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698