| 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 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 || (wasResized && document->styleResolver()->mediaQueryAffectedByViewpor
tChange()) | 807 || (wasResized && document->styleResolver()->mediaQueryAffectedByViewpor
tChange()) |
| 808 || (wasResized && m_frame->settings() && m_frame->settings()->resizeIsDe
viceSizeChange() && document->styleResolver()->mediaQueryAffectedByDeviceChange(
))) { | 808 || (wasResized && m_frame->settings() && m_frame->settings()->resizeIsDe
viceSizeChange() && document->styleResolver()->mediaQueryAffectedByDeviceChange(
))) { |
| 809 document->mediaQueryAffectingValueChanged(); | 809 document->mediaQueryAffectingValueChanged(); |
| 810 } else if (wasResized) { | 810 } else if (wasResized) { |
| 811 document->evaluateMediaQueryList(); | 811 document->evaluateMediaQueryList(); |
| 812 } | 812 } |
| 813 | 813 |
| 814 document->updateStyleAndLayoutTree(); | 814 document->updateStyleAndLayoutTree(); |
| 815 lifecycle().advanceTo(DocumentLifecycle::StyleClean); | 815 lifecycle().advanceTo(DocumentLifecycle::StyleClean); |
| 816 | 816 |
| 817 if (m_frame->isMainFrame() && !m_viewportScrollableArea) { | |
| 818 ScrollableArea& visualViewport = m_frame->host()->visualViewport(); | |
| 819 ScrollableArea* layoutViewport = layoutViewportScrollableArea(); | |
| 820 ASSERT(layoutViewport); | |
| 821 m_viewportScrollableArea = RootFrameViewport::create(visualViewport, *la
youtViewport); | |
| 822 } | |
| 823 | |
| 824 if (RuntimeEnabledFeatures::scrollAnchoringEnabled()) | 817 if (RuntimeEnabledFeatures::scrollAnchoringEnabled()) |
| 825 m_scrollAnchor.save(); | 818 m_scrollAnchor.save(); |
| 826 } | 819 } |
| 827 | 820 |
| 828 static inline void layoutFromRootObject(LayoutObject& root) | 821 static inline void layoutFromRootObject(LayoutObject& root) |
| 829 { | 822 { |
| 830 LayoutState layoutState(root); | 823 LayoutState layoutState(root); |
| 831 root.layout(); | 824 root.layout(); |
| 832 } | 825 } |
| 833 | 826 |
| (...skipping 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2386 return; | 2379 return; |
| 2387 Vector<AnnotatedRegionValue> newRegions; | 2380 Vector<AnnotatedRegionValue> newRegions; |
| 2388 collectAnnotatedRegions(*(document->layoutBox()), newRegions); | 2381 collectAnnotatedRegions(*(document->layoutBox()), newRegions); |
| 2389 if (newRegions == document->annotatedRegions()) | 2382 if (newRegions == document->annotatedRegions()) |
| 2390 return; | 2383 return; |
| 2391 document->setAnnotatedRegions(newRegions); | 2384 document->setAnnotatedRegions(newRegions); |
| 2392 if (Page* page = m_frame->page()) | 2385 if (Page* page = m_frame->page()) |
| 2393 page->chromeClient().annotatedRegionsChanged(); | 2386 page->chromeClient().annotatedRegionsChanged(); |
| 2394 } | 2387 } |
| 2395 | 2388 |
| 2389 void FrameView::didAttachDocument() |
| 2390 { |
| 2391 if (m_frame->isMainFrame()) { |
| 2392 DCHECK(m_frame->host()); |
| 2393 ScrollableArea& visualViewport = m_frame->host()->visualViewport(); |
| 2394 ScrollableArea* layoutViewport = layoutViewportScrollableArea(); |
| 2395 DCHECK(layoutViewport); |
| 2396 m_viewportScrollableArea = RootFrameViewport::create(visualViewport, *la
youtViewport); |
| 2397 } |
| 2398 } |
| 2399 |
| 2396 void FrameView::updateScrollCorner() | 2400 void FrameView::updateScrollCorner() |
| 2397 { | 2401 { |
| 2398 RefPtr<ComputedStyle> cornerStyle; | 2402 RefPtr<ComputedStyle> cornerStyle; |
| 2399 IntRect cornerRect = scrollCornerRect(); | 2403 IntRect cornerRect = scrollCornerRect(); |
| 2400 Document* doc = m_frame->document(); | 2404 Document* doc = m_frame->document(); |
| 2401 | 2405 |
| 2402 if (doc && !cornerRect.isEmpty()) { | 2406 if (doc && !cornerRect.isEmpty()) { |
| 2403 // Try the <body> element first as a scroll corner source. | 2407 // Try the <body> element first as a scroll corner source. |
| 2404 if (Element* body = doc->body()) { | 2408 if (Element* body = doc->body()) { |
| 2405 if (LayoutObject* layoutObject = body->layoutObject()) | 2409 if (LayoutObject* layoutObject = body->layoutObject()) |
| (...skipping 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4239 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); | 4243 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); |
| 4240 } | 4244 } |
| 4241 | 4245 |
| 4242 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const | 4246 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const |
| 4243 { | 4247 { |
| 4244 ASSERT(!layoutViewItem().isNull()); | 4248 ASSERT(!layoutViewItem().isNull()); |
| 4245 return *layoutView(); | 4249 return *layoutView(); |
| 4246 } | 4250 } |
| 4247 | 4251 |
| 4248 } // namespace blink | 4252 } // namespace blink |
| OLD | NEW |