| 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 return this; | 220 return this; |
| 221 } | 221 } |
| 222 | 222 |
| 223 void WebLocalFrameImpl::close() | 223 void WebLocalFrameImpl::close() |
| 224 { | 224 { |
| 225 m_client = 0; | 225 m_client = 0; |
| 226 | 226 |
| 227 deref(); // Balances ref() acquired in WebFrame::create | 227 deref(); // Balances ref() acquired in WebFrame::create |
| 228 } | 228 } |
| 229 | 229 |
| 230 WebSize WebLocalFrameImpl::scrollOffset() const | |
| 231 { | |
| 232 FrameView* view = frameView(); | |
| 233 if (!view) | |
| 234 return WebSize(); | |
| 235 return view->scrollOffset(); | |
| 236 } | |
| 237 | |
| 238 WebSize WebLocalFrameImpl::minimumScrollOffset() const | |
| 239 { | |
| 240 FrameView* view = frameView(); | |
| 241 if (!view) | |
| 242 return WebSize(); | |
| 243 return toIntSize(view->minimumScrollPosition()); | |
| 244 } | |
| 245 | |
| 246 WebSize WebLocalFrameImpl::maximumScrollOffset() const | |
| 247 { | |
| 248 FrameView* view = frameView(); | |
| 249 if (!view) | |
| 250 return WebSize(); | |
| 251 return toIntSize(view->maximumScrollPosition()); | |
| 252 } | |
| 253 | |
| 254 WebSize WebLocalFrameImpl::contentsSize() const | 230 WebSize WebLocalFrameImpl::contentsSize() const |
| 255 { | 231 { |
| 256 return frame()->view()->size(); | 232 return frame()->view()->size(); |
| 257 } | 233 } |
| 258 | 234 |
| 259 bool WebLocalFrameImpl::hasVisibleContent() const | 235 bool WebLocalFrameImpl::hasVisibleContent() const |
| 260 { | 236 { |
| 261 return frame()->view()->width() > 0 && frame()->view()->height() > 0; | 237 return frame()->view()->width() > 0 && frame()->view()->height() > 0; |
| 262 } | 238 } |
| 263 | 239 |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 } | 794 } |
| 819 | 795 |
| 820 void WebLocalFrameImpl::invalidateAll() const | 796 void WebLocalFrameImpl::invalidateAll() const |
| 821 { | 797 { |
| 822 ASSERT(frame() && frame()->view()); | 798 ASSERT(frame() && frame()->view()); |
| 823 FrameView* view = frame()->view(); | 799 FrameView* view = frame()->view(); |
| 824 view->invalidateRect(view->frameRect()); | 800 view->invalidateRect(view->frameRect()); |
| 825 } | 801 } |
| 826 | 802 |
| 827 } // namespace blink | 803 } // namespace blink |
| OLD | NEW |