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 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 m_inSynchronousPostLayout = true; | 773 m_inSynchronousPostLayout = true; |
774 performPostLayoutTasks(); | 774 performPostLayoutTasks(); |
775 m_inSynchronousPostLayout = false; | 775 m_inSynchronousPostLayout = false; |
776 } | 776 } |
777 | 777 |
778 bool wasResized = wasViewportResized(); | 778 bool wasResized = wasViewportResized(); |
779 Document* document = m_frame->document(); | 779 Document* document = m_frame->document(); |
780 | 780 |
781 // Viewport-dependent media queries may cause us to need completely differen
t style information. | 781 // Viewport-dependent media queries may cause us to need completely differen
t style information. |
782 if (!document->styleResolver() || (wasResized && document->styleResolver()->
mediaQueryAffectedByViewportChange())) { | 782 if (!document->styleResolver() || (wasResized && document->styleResolver()->
mediaQueryAffectedByViewportChange())) { |
783 document->styleResolverChanged(); | |
784 document->mediaQueryAffectingValueChanged(); | 783 document->mediaQueryAffectingValueChanged(); |
785 } else if (wasResized) { | 784 } else if (wasResized) { |
786 document->evaluateMediaQueryList(); | 785 document->evaluateMediaQueryList(); |
787 } | 786 } |
788 | 787 |
789 document->updateLayoutTreeIfNeeded(); | 788 document->updateLayoutTreeIfNeeded(); |
790 lifecycle().advanceTo(DocumentLifecycle::StyleClean); | 789 lifecycle().advanceTo(DocumentLifecycle::StyleClean); |
791 | 790 |
792 if (m_frame->isMainFrame() && !m_viewportScrollableArea) { | 791 if (m_frame->isMainFrame() && !m_viewportScrollableArea) { |
793 ScrollableArea& visualViewport = page()->frameHost().visualViewport(); | 792 ScrollableArea& visualViewport = page()->frameHost().visualViewport(); |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1171 Node* node = object.node(); | 1170 Node* node = object.node(); |
1172 ASSERT(node); | 1171 ASSERT(node); |
1173 if (isHTMLObjectElement(*node) || isHTMLEmbedElement(*node)) | 1172 if (isHTMLObjectElement(*node) || isHTMLEmbedElement(*node)) |
1174 toHTMLPlugInElement(node)->setNeedsWidgetUpdate(true); | 1173 toHTMLPlugInElement(node)->setNeedsWidgetUpdate(true); |
1175 | 1174 |
1176 m_partUpdateSet.add(&object); | 1175 m_partUpdateSet.add(&object); |
1177 } | 1176 } |
1178 | 1177 |
1179 void FrameView::setDisplayMode(WebDisplayMode mode) | 1178 void FrameView::setDisplayMode(WebDisplayMode mode) |
1180 { | 1179 { |
| 1180 if (mode == m_displayMode) |
| 1181 return; |
| 1182 |
1181 m_displayMode = mode; | 1183 m_displayMode = mode; |
| 1184 |
1182 if (m_frame->document()) | 1185 if (m_frame->document()) |
1183 m_frame->document()->mediaQueryAffectingValueChanged(); | 1186 m_frame->document()->mediaQueryAffectingValueChanged(); |
1184 } | 1187 } |
1185 | 1188 |
1186 void FrameView::setMediaType(const AtomicString& mediaType) | 1189 void FrameView::setMediaType(const AtomicString& mediaType) |
1187 { | 1190 { |
1188 ASSERT(m_frame->document()); | 1191 ASSERT(m_frame->document()); |
1189 m_frame->document()->mediaQueryAffectingValueChanged(); | 1192 m_frame->document()->mediaQueryAffectingValueChanged(); |
1190 m_mediaType = mediaType; | 1193 m_mediaType = mediaType; |
1191 } | 1194 } |
(...skipping 2786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3978 | 3981 |
3979 if (!graphicsLayer) | 3982 if (!graphicsLayer) |
3980 return; | 3983 return; |
3981 | 3984 |
3982 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL
ayoutObject(), paintInvalidationContainer, viewRect); | 3985 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL
ayoutObject(), paintInvalidationContainer, viewRect); |
3983 | 3986 |
3984 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); | 3987 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); |
3985 } | 3988 } |
3986 | 3989 |
3987 } // namespace blink | 3990 } // namespace blink |
OLD | NEW |