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

Side by Side Diff: sky/engine/core/frame/FrameView.cpp

Issue 682363002: Remove more scrolling methods from FrameView. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/frame/FrameView.h ('k') | sky/engine/core/frame/Settings.in » ('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) 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 void FrameView::recalcOverflowAfterStyleChange() 224 void FrameView::recalcOverflowAfterStyleChange()
225 { 225 {
226 RenderView* renderView = this->renderView(); 226 RenderView* renderView = this->renderView();
227 RELEASE_ASSERT(renderView); 227 RELEASE_ASSERT(renderView);
228 if (!renderView->needsOverflowRecalcAfterStyleChange()) 228 if (!renderView->needsOverflowRecalcAfterStyleChange())
229 return; 229 return;
230 230
231 renderView->recalcOverflowAfterStyleChange(); 231 renderView->recalcOverflowAfterStyleChange();
232 } 232 }
233 233
234 bool FrameView::usesCompositedScrolling() const
235 {
236 RenderView* renderView = this->renderView();
237 if (!renderView)
238 return false;
239 if (m_frame->settings() && m_frame->settings()->preferCompositingToLCDTextEn abled())
240 return renderView->compositor()->inCompositingMode();
241 return false;
242 }
243
244 GraphicsLayer* FrameView::layerForScrolling() const
245 {
246 RenderView* renderView = this->renderView();
247 if (!renderView)
248 return 0;
249 return renderView->compositor()->scrollLayer();
250 }
251
252 GraphicsLayer* FrameView::layerForHorizontalScrollbar() const
253 {
254 RenderView* renderView = this->renderView();
255 if (!renderView)
256 return 0;
257 return renderView->compositor()->layerForHorizontalScrollbar();
258 }
259
260 GraphicsLayer* FrameView::layerForVerticalScrollbar() const
261 {
262 RenderView* renderView = this->renderView();
263 if (!renderView)
264 return 0;
265 return renderView->compositor()->layerForVerticalScrollbar();
266 }
267
268 GraphicsLayer* FrameView::layerForScrollCorner() const
269 {
270 RenderView* renderView = this->renderView();
271 if (!renderView)
272 return 0;
273 return renderView->compositor()->layerForScrollCorner();
274 }
275
276 IntRect FrameView::contentsToScreen(const IntRect& rect) const 234 IntRect FrameView::contentsToScreen(const IntRect& rect) const
277 { 235 {
278 HostWindow* window = hostWindow(); 236 HostWindow* window = hostWindow();
279 if (!window) 237 if (!window)
280 return IntRect(); 238 return IntRect();
281 return window->rootViewToScreen(contentsToRootView(rect)); 239 return window->rootViewToScreen(contentsToRootView(rect));
282 } 240 }
283 241
284 bool FrameView::scheduleAnimation() 242 bool FrameView::scheduleAnimation()
285 { 243 {
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 IntRect clipRect = contentsToWindow(visibleContentRect(scrollbarInclusion)); 877 IntRect clipRect = contentsToWindow(visibleContentRect(scrollbarInclusion));
920 return clipRect; 878 return clipRect;
921 } 879 }
922 880
923 bool FrameView::isActive() const 881 bool FrameView::isActive() const
924 { 882 {
925 Page* page = frame().page(); 883 Page* page = frame().page();
926 return page && page->focusController().isActive(); 884 return page && page->focusController().isActive();
927 } 885 }
928 886
929 void FrameView::getTickmarks(Vector<IntRect>& tickmarks) const
930 {
931 if (!m_tickmarks.isEmpty())
932 tickmarks = m_tickmarks;
933 else
934 tickmarks = frame().document()->markers().renderedRectsForMarkers(Docume ntMarker::TextMatch);
935 }
936
937 void FrameView::setVisibleContentScaleFactor(float visibleContentScaleFactor) 887 void FrameView::setVisibleContentScaleFactor(float visibleContentScaleFactor)
938 { 888 {
939 if (m_visibleContentScaleFactor == visibleContentScaleFactor) 889 if (m_visibleContentScaleFactor == visibleContentScaleFactor)
940 return; 890 return;
941 m_visibleContentScaleFactor = visibleContentScaleFactor; 891 m_visibleContentScaleFactor = visibleContentScaleFactor;
942 } 892 }
943 893
944 void FrameView::setInputEventsTransformForEmulation(const IntSize& offset, float contentScaleFactor) 894 void FrameView::setInputEventsTransformForEmulation(const IntSize& offset, float contentScaleFactor)
945 { 895 {
946 m_inputEventsOffsetForEmulation = offset; 896 m_inputEventsOffsetForEmulation = offset;
947 m_inputEventsScaleFactorForEmulation = contentScaleFactor; 897 m_inputEventsScaleFactorForEmulation = contentScaleFactor;
948 } 898 }
949 899
950 IntSize FrameView::inputEventsOffsetForEmulation() const 900 IntSize FrameView::inputEventsOffsetForEmulation() const
951 { 901 {
952 return m_inputEventsOffsetForEmulation; 902 return m_inputEventsOffsetForEmulation;
953 } 903 }
954 904
955 float FrameView::inputEventsScaleFactor() const 905 float FrameView::inputEventsScaleFactor() const
956 { 906 {
957 float pageScale = visibleContentScaleFactor(); 907 float pageScale = visibleContentScaleFactor();
958 return pageScale * m_inputEventsScaleFactorForEmulation; 908 return pageScale * m_inputEventsScaleFactorForEmulation;
959 } 909 }
960 910
961 IntRect FrameView::scrollableAreaBoundingBox() const
962 {
963 return frameRect();
964 }
965
966 bool FrameView::scrollAnimatorEnabled() const
967 {
968 return m_frame->settings() && m_frame->settings()->scrollAnimatorEnabled();
969 }
970
971 Color FrameView::documentBackgroundColor() const 911 Color FrameView::documentBackgroundColor() const
972 { 912 {
973 // <https://bugs.webkit.org/show_bug.cgi?id=59540> We blend the background c olor of 913 // <https://bugs.webkit.org/show_bug.cgi?id=59540> We blend the background c olor of
974 // the document and the body against the base background color of the frame view. 914 // the document and the body against the base background color of the frame view.
975 // Background images are unfortunately impractical to include. 915 // Background images are unfortunately impractical to include.
976 916
977 Color result = baseBackgroundColor(); 917 Color result = baseBackgroundColor();
978 if (!frame().document()) 918 if (!frame().document())
979 return result; 919 return result;
980 920
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 void FrameView::setLayoutSizeInternal(const IntSize& size) 1255 void FrameView::setLayoutSizeInternal(const IntSize& size)
1316 { 1256 {
1317 if (m_layoutSize == size) 1257 if (m_layoutSize == size)
1318 return; 1258 return;
1319 1259
1320 m_layoutSize = size; 1260 m_layoutSize = size;
1321 contentsResized(); 1261 contentsResized();
1322 } 1262 }
1323 1263
1324 } // namespace blink 1264 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/frame/FrameView.h ('k') | sky/engine/core/frame/Settings.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698