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

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

Issue 677223002: Remove some more frame-level scrolling machinery. (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/web/WebLocalFrameImpl.h ('k') | sky/engine/web/WebViewImpl.cpp » ('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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 } 245 }
246 246
247 WebSize WebLocalFrameImpl::maximumScrollOffset() const 247 WebSize WebLocalFrameImpl::maximumScrollOffset() const
248 { 248 {
249 FrameView* view = frameView(); 249 FrameView* view = frameView();
250 if (!view) 250 if (!view)
251 return WebSize(); 251 return WebSize();
252 return toIntSize(view->maximumScrollPosition()); 252 return toIntSize(view->maximumScrollPosition());
253 } 253 }
254 254
255 void WebLocalFrameImpl::setScrollOffset(const WebSize& offset)
256 {
257 if (FrameView* view = frameView())
258 view->setScrollOffset(IntPoint(offset.width, offset.height));
259 }
260
261 WebSize WebLocalFrameImpl::contentsSize() const 255 WebSize WebLocalFrameImpl::contentsSize() const
262 { 256 {
263 return frame()->view()->size(); 257 return frame()->view()->size();
264 } 258 }
265 259
266 bool WebLocalFrameImpl::hasVisibleContent() const 260 bool WebLocalFrameImpl::hasVisibleContent() const
267 { 261 {
268 return frame()->view()->width() > 0 && frame()->view()->height() > 0; 262 return frame()->view()->width() > 0 && frame()->view()->height() > 0;
269 } 263 }
270 264
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 } 830 }
837 831
838 void WebLocalFrameImpl::invalidateAll() const 832 void WebLocalFrameImpl::invalidateAll() const
839 { 833 {
840 ASSERT(frame() && frame()->view()); 834 ASSERT(frame() && frame()->view());
841 FrameView* view = frame()->view(); 835 FrameView* view = frame()->view();
842 view->invalidateRect(view->frameRect()); 836 view->invalidateRect(view->frameRect());
843 } 837 }
844 838
845 } // namespace blink 839 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/web/WebLocalFrameImpl.h ('k') | sky/engine/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698