| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |