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

Side by Side Diff: sky/engine/web/WebViewImpl.cpp

Issue 878303002: Remove more scrolling code from Sky (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/web/WebViewImpl.h ('k') | sky/examples/flights-app/app-scrollable.sky » ('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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "sky/engine/core/editing/TextIterator.h" 45 #include "sky/engine/core/editing/TextIterator.h"
46 #include "sky/engine/core/events/KeyboardEvent.h" 46 #include "sky/engine/core/events/KeyboardEvent.h"
47 #include "sky/engine/core/frame/FrameHost.h" 47 #include "sky/engine/core/frame/FrameHost.h"
48 #include "sky/engine/core/frame/FrameView.h" 48 #include "sky/engine/core/frame/FrameView.h"
49 #include "sky/engine/core/frame/LocalFrame.h" 49 #include "sky/engine/core/frame/LocalFrame.h"
50 #include "sky/engine/core/frame/NewEventHandler.h" 50 #include "sky/engine/core/frame/NewEventHandler.h"
51 #include "sky/engine/core/frame/Settings.h" 51 #include "sky/engine/core/frame/Settings.h"
52 #include "sky/engine/core/html/HTMLImportElement.h" 52 #include "sky/engine/core/html/HTMLImportElement.h"
53 #include "sky/engine/core/loader/FrameLoader.h" 53 #include "sky/engine/core/loader/FrameLoader.h"
54 #include "sky/engine/core/loader/UniqueIdentifier.h" 54 #include "sky/engine/core/loader/UniqueIdentifier.h"
55 #include "sky/engine/core/page/AutoscrollController.h"
56 #include "sky/engine/core/page/EventHandler.h" 55 #include "sky/engine/core/page/EventHandler.h"
57 #include "sky/engine/core/page/FocusController.h" 56 #include "sky/engine/core/page/FocusController.h"
58 #include "sky/engine/core/page/Page.h" 57 #include "sky/engine/core/page/Page.h"
59 #include "sky/engine/core/rendering/RenderView.h" 58 #include "sky/engine/core/rendering/RenderView.h"
60 #include "sky/engine/platform/Cursor.h" 59 #include "sky/engine/platform/Cursor.h"
61 #include "sky/engine/platform/KeyboardCodes.h" 60 #include "sky/engine/platform/KeyboardCodes.h"
62 #include "sky/engine/platform/Logging.h" 61 #include "sky/engine/platform/Logging.h"
63 #include "sky/engine/platform/NotImplemented.h" 62 #include "sky/engine/platform/NotImplemented.h"
64 #include "sky/engine/platform/TraceEvent.h" 63 #include "sky/engine/platform/TraceEvent.h"
65 #include "sky/engine/platform/fonts/FontCache.h" 64 #include "sky/engine/platform/fonts/FontCache.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 , m_suppressNextKeypressEvent(false) 127 , m_suppressNextKeypressEvent(false)
129 , m_imeAcceptEvents(true) 128 , m_imeAcceptEvents(true)
130 , m_isTransparent(false) 129 , m_isTransparent(false)
131 , m_rootLayer(0) 130 , m_rootLayer(0)
132 , m_matchesHeuristicsForGpuRasterization(false) 131 , m_matchesHeuristicsForGpuRasterization(false)
133 , m_recreatingGraphicsContext(false) 132 , m_recreatingGraphicsContext(false)
134 , m_flingModifier(0) 133 , m_flingModifier(0)
135 , m_flingSourceDevice(false) 134 , m_flingSourceDevice(false)
136 , m_showPaintRects(false) 135 , m_showPaintRects(false)
137 , m_showDebugBorders(false) 136 , m_showDebugBorders(false)
138 , m_showScrollBottleneckRects(false)
139 , m_baseBackgroundColor(Color::white) 137 , m_baseBackgroundColor(Color::white)
140 , m_backgroundColorOverride(Color::transparent) 138 , m_backgroundColorOverride(Color::transparent)
141 { 139 {
142 Page::PageClients pageClients; 140 Page::PageClients pageClients;
143 pageClients.chromeClient = &m_chromeClientImpl; 141 pageClients.chromeClient = &m_chromeClientImpl;
144 pageClients.editorClient = &m_editorClientImpl; 142 pageClients.editorClient = &m_editorClientImpl;
145 pageClients.spellCheckerClient = &m_spellCheckerClientImpl; 143 pageClients.spellCheckerClient = &m_spellCheckerClientImpl;
146 144
147 m_page = adoptPtr(new Page(pageClients, m_client->services())); 145 m_page = adoptPtr(new Page(pageClients, m_client->services()));
148 146
(...skipping 16 matching lines...) Expand all
165 void WebViewImpl::setShowPaintRects(bool show) 163 void WebViewImpl::setShowPaintRects(bool show)
166 { 164 {
167 m_showPaintRects = show; 165 m_showPaintRects = show;
168 } 166 }
169 167
170 void WebViewImpl::setShowDebugBorders(bool show) 168 void WebViewImpl::setShowDebugBorders(bool show)
171 { 169 {
172 m_showDebugBorders = show; 170 m_showDebugBorders = show;
173 } 171 }
174 172
175 void WebViewImpl::setShowScrollBottleneckRects(bool show)
176 {
177 m_showScrollBottleneckRects = show;
178 }
179
180 void WebViewImpl::acceptLanguagesChanged() 173 void WebViewImpl::acceptLanguagesChanged()
181 { 174 {
182 if (!page()) 175 if (!page())
183 return; 176 return;
184 177
185 page()->acceptLanguagesChanged(); 178 page()->acceptLanguagesChanged();
186 } 179 }
187 180
188 LocalFrame* WebViewImpl::focusedCoreFrame() const 181 LocalFrame* WebViewImpl::focusedCoreFrame() const
189 { 182 {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 if (!validFrameTime.lastFrameTimeMonotonic) 245 if (!validFrameTime.lastFrameTimeMonotonic)
253 validFrameTime.lastFrameTimeMonotonic = monotonicallyIncreasingTime(); 246 validFrameTime.lastFrameTimeMonotonic = monotonicallyIncreasingTime();
254 247
255 WTF_LOG(ScriptedAnimationController, "WebViewImpl::beginFrame: page = %d", ! m_page ? 0 : 1); 248 WTF_LOG(ScriptedAnimationController, "WebViewImpl::beginFrame: page = %d", ! m_page ? 0 : 1);
256 if (!m_page) 249 if (!m_page)
257 return; 250 return;
258 251
259 RefPtr<FrameView> view = m_page->mainFrame()->view(); 252 RefPtr<FrameView> view = m_page->mainFrame()->view();
260 if (!view) 253 if (!view)
261 return; 254 return;
262 m_page->autoscrollController().animate(validFrameTime.lastFrameTimeMonotonic );
263 m_page->animator().serviceScriptedAnimations(validFrameTime.lastFrameTimeMon otonic); 255 m_page->animator().serviceScriptedAnimations(validFrameTime.lastFrameTimeMon otonic);
264 } 256 }
265 257
266 void WebViewImpl::layout() 258 void WebViewImpl::layout()
267 { 259 {
268 TRACE_EVENT0("blink", "WebViewImpl::layout"); 260 TRACE_EVENT0("blink", "WebViewImpl::layout");
269 if (!m_page) 261 if (!m_page)
270 return; 262 return;
271 m_page->animator().updateLayoutAndStyleForPainting(m_page->mainFrame()); 263 m_page->animator().updateLayoutAndStyleForPainting(m_page->mainFrame());
272 } 264 }
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState, 851 void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState,
860 bool isInitialState) { 852 bool isInitialState) {
861 if (!page()) 853 if (!page())
862 return; 854 return;
863 855
864 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState = = WebPageVisibilityStateHidden); 856 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState = = WebPageVisibilityStateHidden);
865 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int> (visibilityState)), isInitialState); 857 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int> (visibilityState)), isInitialState);
866 } 858 }
867 859
868 } // namespace blink 860 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/web/WebViewImpl.h ('k') | sky/examples/flights-app/app-scrollable.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698