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

Side by Side Diff: sky/engine/core/rendering/RenderLayerScrollableArea.cpp

Issue 878673005: Get rid of Chrome, use Page. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « sky/engine/core/rendering/RenderInline.cpp ('k') | sky/engine/public/web/WebViewClient.h » ('j') | 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) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 #include "sky/engine/config.h" 44 #include "sky/engine/config.h"
45 #include "sky/engine/core/rendering/RenderLayer.h" 45 #include "sky/engine/core/rendering/RenderLayer.h"
46 46
47 #include "sky/engine/core/dom/Node.h" 47 #include "sky/engine/core/dom/Node.h"
48 #include "sky/engine/core/dom/shadow/ShadowRoot.h" 48 #include "sky/engine/core/dom/shadow/ShadowRoot.h"
49 #include "sky/engine/core/editing/FrameSelection.h" 49 #include "sky/engine/core/editing/FrameSelection.h"
50 #include "sky/engine/core/frame/FrameView.h" 50 #include "sky/engine/core/frame/FrameView.h"
51 #include "sky/engine/core/frame/LocalFrame.h" 51 #include "sky/engine/core/frame/LocalFrame.h"
52 #include "sky/engine/core/inspector/InspectorTraceEvents.h" 52 #include "sky/engine/core/inspector/InspectorTraceEvents.h"
53 #include "sky/engine/core/page/Chrome.h"
54 #include "sky/engine/core/page/EventHandler.h" 53 #include "sky/engine/core/page/EventHandler.h"
55 #include "sky/engine/core/page/FocusController.h" 54 #include "sky/engine/core/page/FocusController.h"
56 #include "sky/engine/core/page/Page.h" 55 #include "sky/engine/core/page/Page.h"
57 #include "sky/engine/core/rendering/HitTestResult.h" 56 #include "sky/engine/core/rendering/HitTestResult.h"
58 #include "sky/engine/core/rendering/RenderGeometryMap.h" 57 #include "sky/engine/core/rendering/RenderGeometryMap.h"
59 #include "sky/engine/core/rendering/RenderView.h" 58 #include "sky/engine/core/rendering/RenderView.h"
60 #include "sky/engine/platform/graphics/GraphicsContextStateSaver.h" 59 #include "sky/engine/platform/graphics/GraphicsContextStateSaver.h"
61 #include "sky/engine/platform/scroll/ScrollAnimator.h" 60 #include "sky/engine/platform/scroll/ScrollAnimator.h"
62 #include "sky/engine/platform/scroll/Scrollbar.h" 61 #include "sky/engine/platform/scroll/Scrollbar.h"
63 #include "sky/engine/public/platform/Platform.h" 62 #include "sky/engine/public/platform/Platform.h"
(...skipping 28 matching lines...) Expand all
92 if (node && node->isElementNode()) 91 if (node && node->isElementNode())
93 toElement(node)->setSavedLayerScrollOffset(m_scrollOffset); 92 toElement(node)->setSavedLayerScrollOffset(m_scrollOffset);
94 } 93 }
95 94
96 destroyScrollbar(HorizontalScrollbar); 95 destroyScrollbar(HorizontalScrollbar);
97 destroyScrollbar(VerticalScrollbar); 96 destroyScrollbar(VerticalScrollbar);
98 } 97 }
99 98
100 HostWindow* RenderLayerScrollableArea::hostWindow() const 99 HostWindow* RenderLayerScrollableArea::hostWindow() const
101 { 100 {
102 if (Page* page = box().frame()->page()) 101 return box().frame()->page();
103 return &page->chrome();
104 return nullptr;
105 } 102 }
106 103
107 bool RenderLayerScrollableArea::isActive() const 104 bool RenderLayerScrollableArea::isActive() const
108 { 105 {
109 Page* page = box().frame()->page(); 106 Page* page = box().frame()->page();
110 return page && page->focusController().isActive(); 107 return page && page->focusController().isActive();
111 } 108 }
112 109
113 static int cornerStart(const RenderStyle* style, int minX, int maxX, int thickne ss) 110 static int cornerStart(const RenderStyle* style, int minX, int maxX, int thickne ss)
114 { 111 {
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) 688 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild)
692 { 689 {
693 // We only want to track the topmost scroll child for scrollable areas with 690 // We only want to track the topmost scroll child for scrollable areas with
694 // overlay scrollbars. 691 // overlay scrollbars.
695 if (!hasOverlayScrollbars()) 692 if (!hasOverlayScrollbars())
696 return; 693 return;
697 m_nextTopmostScrollChild = scrollChild; 694 m_nextTopmostScrollChild = scrollChild;
698 } 695 }
699 696
700 } // namespace blink 697 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderInline.cpp ('k') | sky/engine/public/web/WebViewClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698