OLD | NEW |
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 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
809 // Don't schedule more layouts, we're in one. | 809 // Don't schedule more layouts, we're in one. |
810 TemporaryChange<bool> changeSchedulingEnabled(m_layoutSchedulingEnabled, fal
se); | 810 TemporaryChange<bool> changeSchedulingEnabled(m_layoutSchedulingEnabled, fal
se); |
811 | 811 |
812 if (!m_nestedLayoutCount && !m_inSynchronousPostLayout && m_postLayoutTasksT
imer.isActive()) { | 812 if (!m_nestedLayoutCount && !m_inSynchronousPostLayout && m_postLayoutTasksT
imer.isActive()) { |
813 // This is a new top-level layout. If there are any remaining tasks from
the previous layout, finish them now. | 813 // This is a new top-level layout. If there are any remaining tasks from
the previous layout, finish them now. |
814 m_inSynchronousPostLayout = true; | 814 m_inSynchronousPostLayout = true; |
815 performPostLayoutTasks(); | 815 performPostLayoutTasks(); |
816 m_inSynchronousPostLayout = false; | 816 m_inSynchronousPostLayout = false; |
817 } | 817 } |
818 | 818 |
| 819 bool wasResized = wasViewportResized(); |
819 Document* document = m_frame->document(); | 820 Document* document = m_frame->document(); |
820 if (wasViewportResized()) | 821 if (wasResized) |
821 document->notifyResizeForViewportUnits(); | 822 document->notifyResizeForViewportUnits(); |
822 | 823 |
823 // Viewport-dependent media queries may cause us to need completely differen
t style information. | 824 // Viewport-dependent media queries may cause us to need completely differen
t style information. |
824 if (!document->styleResolver() || document->styleResolver()->mediaQueryAffec
tedByViewportChange()) { | 825 if (!document->styleResolver() || (wasResized && document->styleResolver()->
mediaQueryAffectedByViewportChange())) { |
825 document->styleResolverChanged(); | 826 document->styleResolverChanged(); |
826 document->mediaQueryAffectingValueChanged(); | 827 document->mediaQueryAffectingValueChanged(); |
827 } else { | 828 } else if (wasResized) { |
828 document->evaluateMediaQueryList(); | 829 document->evaluateMediaQueryList(); |
829 } | 830 } |
830 | 831 |
831 document->updateRenderTreeIfNeeded(); | 832 document->updateRenderTreeIfNeeded(); |
832 lifecycle().advanceTo(DocumentLifecycle::StyleClean); | 833 lifecycle().advanceTo(DocumentLifecycle::StyleClean); |
833 } | 834 } |
834 | 835 |
835 void FrameView::performLayout(RenderObject* rootForThisLayout, bool inSubtreeLay
out) | 836 void FrameView::performLayout(RenderObject* rootForThisLayout, bool inSubtreeLay
out) |
836 { | 837 { |
837 TRACE_EVENT0("blink,benchmark", "FrameView::performLayout"); | 838 TRACE_EVENT0("blink,benchmark", "FrameView::performLayout"); |
(...skipping 3200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4038 { | 4039 { |
4039 Settings* settings = frame().settings(); | 4040 Settings* settings = frame().settings(); |
4040 if (!settings || !settings->rootLayerScrolls()) | 4041 if (!settings || !settings->rootLayerScrolls()) |
4041 return this; | 4042 return this; |
4042 | 4043 |
4043 RenderView* renderView = this->renderView(); | 4044 RenderView* renderView = this->renderView(); |
4044 return renderView ? renderView->scrollableArea() : nullptr; | 4045 return renderView ? renderView->scrollableArea() : nullptr; |
4045 } | 4046 } |
4046 | 4047 |
4047 } // namespace blink | 4048 } // namespace blink |
OLD | NEW |