| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 1827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1838 GraphicsContext spool(context); | 1838 GraphicsContext spool(context); |
| 1839 #endif | 1839 #endif |
| 1840 | 1840 |
| 1841 DCHECK(pages_[page].x() == 0); | 1841 DCHECK(pages_[page].x() == 0); |
| 1842 // Offset to get the right square. | 1842 // Offset to get the right square. |
| 1843 spool.translate(0, -static_cast<float>(pages_[page].y())); | 1843 spool.translate(0, -static_cast<float>(pages_[page].y())); |
| 1844 frame()->view()->paint(&spool, pages_[page]); | 1844 frame()->view()->paint(&spool, pages_[page]); |
| 1845 return true; | 1845 return true; |
| 1846 } | 1846 } |
| 1847 | 1847 |
| 1848 bool WebFrameImpl::HasUnloadListener() { | |
| 1849 if (frame() && frame()->document()) { | |
| 1850 Document* doc = frame()->document(); | |
| 1851 return doc->hasUnloadEventListener(); | |
| 1852 } | |
| 1853 return false; | |
| 1854 } | |
| 1855 | |
| 1856 bool WebFrameImpl::IsReloadAllowingStaleData() const { | 1848 bool WebFrameImpl::IsReloadAllowingStaleData() const { |
| 1857 FrameLoader* loader = frame() ? frame()->loader() : NULL; | 1849 FrameLoader* loader = frame() ? frame()->loader() : NULL; |
| 1858 if (loader) { | 1850 if (loader) { |
| 1859 return WebCore::FrameLoadTypeReloadAllowingStaleData == | 1851 return WebCore::FrameLoadTypeReloadAllowingStaleData == |
| 1860 loader->policyLoadType(); | 1852 loader->policyLoadType(); |
| 1861 } | 1853 } |
| 1862 return false; | 1854 return false; |
| 1863 } | 1855 } |
| 1864 | 1856 |
| 1865 int WebFrameImpl::PendingFrameUnloadEventCount() const { | 1857 int WebFrameImpl::PendingFrameUnloadEventCount() const { |
| 1866 return frame()->eventHandler()->pendingFrameUnloadEventCount(); | 1858 return frame()->eventHandler()->pendingFrameUnloadEventCount(); |
| 1867 } | 1859 } |
| OLD | NEW |