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

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

Issue 2765123002: Removed use of FrameHost in FrameView.cpp (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "core/dom/StyleChangeReason.h" 43 #include "core/dom/StyleChangeReason.h"
44 #include "core/dom/TaskRunnerHelper.h" 44 #include "core/dom/TaskRunnerHelper.h"
45 #include "core/editing/DragCaret.h" 45 #include "core/editing/DragCaret.h"
46 #include "core/editing/EditingUtilities.h" 46 #include "core/editing/EditingUtilities.h"
47 #include "core/editing/FrameSelection.h" 47 #include "core/editing/FrameSelection.h"
48 #include "core/editing/RenderedPosition.h" 48 #include "core/editing/RenderedPosition.h"
49 #include "core/editing/markers/DocumentMarkerController.h" 49 #include "core/editing/markers/DocumentMarkerController.h"
50 #include "core/events/ErrorEvent.h" 50 #include "core/events/ErrorEvent.h"
51 #include "core/frame/BrowserControls.h" 51 #include "core/frame/BrowserControls.h"
52 #include "core/frame/EventHandlerRegistry.h" 52 #include "core/frame/EventHandlerRegistry.h"
53 #include "core/frame/FrameHost.h"
54 #include "core/frame/LocalFrame.h" 53 #include "core/frame/LocalFrame.h"
55 #include "core/frame/LocalFrameClient.h" 54 #include "core/frame/LocalFrameClient.h"
56 #include "core/frame/Location.h" 55 #include "core/frame/Location.h"
57 #include "core/frame/PageScaleConstraintsSet.h" 56 #include "core/frame/PageScaleConstraintsSet.h"
58 #include "core/frame/RemoteFrame.h" 57 #include "core/frame/RemoteFrame.h"
59 #include "core/frame/RemoteFrameView.h" 58 #include "core/frame/RemoteFrameView.h"
60 #include "core/frame/Settings.h" 59 #include "core/frame/Settings.h"
61 #include "core/frame/VisualViewport.h" 60 #include "core/frame/VisualViewport.h"
62 #include "core/html/HTMLFrameElement.h" 61 #include "core/html/HTMLFrameElement.h"
63 #include "core/html/HTMLPlugInElement.h" 62 #include "core/html/HTMLPlugInElement.h"
(...skipping 2682 matching lines...) Expand 10 before | Expand all | Expand 10 after
2746 Vector<AnnotatedRegionValue> newRegions; 2745 Vector<AnnotatedRegionValue> newRegions;
2747 collectAnnotatedRegions(*(document->layoutBox()), newRegions); 2746 collectAnnotatedRegions(*(document->layoutBox()), newRegions);
2748 if (newRegions == document->annotatedRegions()) 2747 if (newRegions == document->annotatedRegions())
2749 return; 2748 return;
2750 document->setAnnotatedRegions(newRegions); 2749 document->setAnnotatedRegions(newRegions);
2751 if (Page* page = m_frame->page()) 2750 if (Page* page = m_frame->page())
2752 page->chromeClient().annotatedRegionsChanged(); 2751 page->chromeClient().annotatedRegionsChanged();
2753 } 2752 }
2754 2753
2755 void FrameView::didAttachDocument() { 2754 void FrameView::didAttachDocument() {
2756 FrameHost* frameHost = m_frame->host(); 2755 Page* page = m_frame->page();
2757 DCHECK(frameHost); 2756 DCHECK(page);
2758 2757
2759 DCHECK(m_frame->document()); 2758 DCHECK(m_frame->document());
2760 2759
2761 if (m_frame->isMainFrame()) { 2760 if (m_frame->isMainFrame()) {
2762 ScrollableArea& visualViewport = m_frame->page()->visualViewport(); 2761 ScrollableArea& visualViewport = m_frame->page()->visualViewport();
2763 ScrollableArea* layoutViewport = layoutViewportScrollableArea(); 2762 ScrollableArea* layoutViewport = layoutViewportScrollableArea();
2764 DCHECK(layoutViewport); 2763 DCHECK(layoutViewport);
2765 2764
2766 RootFrameViewport* rootFrameViewport = 2765 RootFrameViewport* rootFrameViewport =
2767 RootFrameViewport::create(visualViewport, *layoutViewport); 2766 RootFrameViewport::create(visualViewport, *layoutViewport);
2768 m_viewportScrollableArea = rootFrameViewport; 2767 m_viewportScrollableArea = rootFrameViewport;
2769 2768
2770 frameHost->page() 2769 page->globalRootScrollerController().initializeViewportScrollCallback(
2771 .globalRootScrollerController() 2770 *rootFrameViewport);
2772 .initializeViewportScrollCallback(*rootFrameViewport);
2773 } 2771 }
2774 } 2772 }
2775 2773
2776 void FrameView::updateScrollCorner() { 2774 void FrameView::updateScrollCorner() {
2777 RefPtr<ComputedStyle> cornerStyle; 2775 RefPtr<ComputedStyle> cornerStyle;
2778 IntRect cornerRect = scrollCornerRect(); 2776 IntRect cornerRect = scrollCornerRect();
2779 Document* doc = m_frame->document(); 2777 Document* doc = m_frame->document();
2780 2778
2781 if (doc && !cornerRect.isEmpty()) { 2779 if (doc && !cornerRect.isEmpty()) {
2782 // Try the <body> element first as a scroll corner source. 2780 // Try the <body> element first as a scroll corner source.
(...skipping 2476 matching lines...) Expand 10 before | Expand all | Expand 10 after
5259 void FrameView::setAnimationHost( 5257 void FrameView::setAnimationHost(
5260 std::unique_ptr<CompositorAnimationHost> host) { 5258 std::unique_ptr<CompositorAnimationHost> host) {
5261 m_animationHost = std::move(host); 5259 m_animationHost = std::move(host);
5262 } 5260 }
5263 5261
5264 LayoutUnit FrameView::caretWidth() const { 5262 LayoutUnit FrameView::caretWidth() const {
5265 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); 5263 return LayoutUnit(getHostWindow()->windowToViewportScalar(1));
5266 } 5264 }
5267 5265
5268 } // namespace blink 5266 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698