| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple 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 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 1797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1808 { | 1808 { |
| 1809 Document* document = contextDocument(); | 1809 Document* document = contextDocument(); |
| 1810 if (!document || !document->page()) { | 1810 if (!document || !document->page()) { |
| 1811 es.throwDOMException(InvalidAccessError); | 1811 es.throwDOMException(InvalidAccessError); |
| 1812 return; | 1812 return; |
| 1813 } | 1813 } |
| 1814 Page* page = document->page(); | 1814 Page* page = document->page(); |
| 1815 page->setDeviceScaleFactor(scaleFactor); | 1815 page->setDeviceScaleFactor(scaleFactor); |
| 1816 } | 1816 } |
| 1817 | 1817 |
| 1818 void Internals::setPageScaleFactor(float scaleFactor, int x, int y, ExceptionSta
te& es) | |
| 1819 { | |
| 1820 Document* document = contextDocument(); | |
| 1821 if (!document || !document->page()) { | |
| 1822 es.throwDOMException(InvalidAccessError); | |
| 1823 return; | |
| 1824 } | |
| 1825 Page* page = document->page(); | |
| 1826 page->setPageScaleFactor(scaleFactor, IntPoint(x, y)); | |
| 1827 } | |
| 1828 | |
| 1829 void Internals::setIsCursorVisible(Document* document, bool isVisible, Exception
State& es) | 1818 void Internals::setIsCursorVisible(Document* document, bool isVisible, Exception
State& es) |
| 1830 { | 1819 { |
| 1831 if (!document || !document->page()) { | 1820 if (!document || !document->page()) { |
| 1832 es.throwDOMException(InvalidAccessError); | 1821 es.throwDOMException(InvalidAccessError); |
| 1833 return; | 1822 return; |
| 1834 } | 1823 } |
| 1835 document->page()->setIsCursorVisible(isVisible); | 1824 document->page()->setIsCursorVisible(isVisible); |
| 1836 } | 1825 } |
| 1837 | 1826 |
| 1838 void Internals::webkitWillEnterFullScreenForElement(Document* document, Element*
element) | 1827 void Internals::webkitWillEnterFullScreenForElement(Document* document, Element*
element) |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2081 return false; | 2070 return false; |
| 2082 sharedContext->getExtensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CON
TEXT_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB); | 2071 sharedContext->getExtensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CON
TEXT_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB); |
| 2083 // To prevent tests that call loseSharedGraphicsContext3D from being | 2072 // To prevent tests that call loseSharedGraphicsContext3D from being |
| 2084 // flaky, we call finish so that the context is guaranteed to be lost | 2073 // flaky, we call finish so that the context is guaranteed to be lost |
| 2085 // synchronously (i.e. before returning). | 2074 // synchronously (i.e. before returning). |
| 2086 sharedContext->finish(); | 2075 sharedContext->finish(); |
| 2087 return true; | 2076 return true; |
| 2088 } | 2077 } |
| 2089 | 2078 |
| 2090 } | 2079 } |
| OLD | NEW |