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

Side by Side Diff: Source/core/frame/FrameView.cpp

Issue 82083002: Move viewport unit resolution to style recalc time (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: rebased.. Created 7 years 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) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 // Don't schedule more layouts, we're in one. 836 // Don't schedule more layouts, we're in one.
837 TemporaryChange<bool> changeSchedulingEnabled(m_layoutSchedulingEnabled, fal se); 837 TemporaryChange<bool> changeSchedulingEnabled(m_layoutSchedulingEnabled, fal se);
838 838
839 if (!m_nestedLayoutCount && !m_inSynchronousPostLayout && m_postLayoutTasksT imer.isActive() && !frame().document()->shouldDisplaySeamlesslyWithParent()) { 839 if (!m_nestedLayoutCount && !m_inSynchronousPostLayout && m_postLayoutTasksT imer.isActive() && !frame().document()->shouldDisplaySeamlesslyWithParent()) {
840 // This is a new top-level layout. If there are any remaining tasks from the previous layout, finish them now. 840 // This is a new top-level layout. If there are any remaining tasks from the previous layout, finish them now.
841 m_inSynchronousPostLayout = true; 841 m_inSynchronousPostLayout = true;
842 performPostLayoutTasks(); 842 performPostLayoutTasks();
843 m_inSynchronousPostLayout = false; 843 m_inSynchronousPostLayout = false;
844 } 844 }
845 845
846 Document* document = m_frame->document();
847 document->notifyResizeForViewportUnits();
848
846 // Viewport-dependent media queries may cause us to need completely differen t style information. 849 // Viewport-dependent media queries may cause us to need completely differen t style information.
847 Document* document = m_frame->document(); 850 if (!document->styleResolver() || document->styleResolver()->mediaQueryAffec tedByViewportChange()) {
848 if (!document->styleResolver() || document->styleResolver()->affectedByViewp ortChange()) {
849 document->styleResolverChanged(RecalcStyleDeferred); 851 document->styleResolverChanged(RecalcStyleDeferred);
850 document->mediaQueryAffectingValueChanged(); 852 document->mediaQueryAffectingValueChanged();
851 853
852 // FIXME: This instrumentation event is not strictly accurate since cach ed media query results 854 // FIXME: This instrumentation event is not strictly accurate since cach ed media query results
853 // do not persist across StyleResolver rebuilds. 855 // do not persist across StyleResolver rebuilds.
854 InspectorInstrumentation::mediaQueryResultChanged(document); 856 InspectorInstrumentation::mediaQueryResultChanged(document);
855 } else { 857 } else {
856 document->evaluateMediaQueryList(); 858 document->evaluateMediaQueryList();
857 } 859 }
858 860
(...skipping 2630 matching lines...) Expand 10 before | Expand all | Expand 10 after
3489 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) 3491 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation)
3490 { 3492 {
3491 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); 3493 ScrollableArea::willRemoveScrollbar(scrollbar, orientation);
3492 if (AXObjectCache* cache = axObjectCache()) { 3494 if (AXObjectCache* cache = axObjectCache()) {
3493 cache->remove(scrollbar); 3495 cache->remove(scrollbar);
3494 cache->handleScrollbarUpdate(this); 3496 cache->handleScrollbarUpdate(this);
3495 } 3497 }
3496 } 3498 }
3497 3499
3498 } // namespace WebCore 3500 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698