| 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 1840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1851 return String(); | 1851 return String(); |
| 1852 } | 1852 } |
| 1853 | 1853 |
| 1854 String Internals::mainThreadScrollingReasons(Document* document, ExceptionState&
es) const | 1854 String Internals::mainThreadScrollingReasons(Document* document, ExceptionState&
es) const |
| 1855 { | 1855 { |
| 1856 if (!document || !document->frame()) { | 1856 if (!document || !document->frame()) { |
| 1857 es.throwUninformativeAndGenericDOMException(InvalidAccessError); | 1857 es.throwUninformativeAndGenericDOMException(InvalidAccessError); |
| 1858 return String(); | 1858 return String(); |
| 1859 } | 1859 } |
| 1860 | 1860 |
| 1861 // Force a re-layout and a compositing update. |
| 1862 document->updateLayout(); |
| 1863 RenderView* view = document->renderView(); |
| 1864 if (view->compositor()) |
| 1865 view->compositor()->updateCompositingLayers(CompositingUpdateFinishAllDe
ferredWork); |
| 1866 |
| 1861 Page* page = document->page(); | 1867 Page* page = document->page(); |
| 1862 if (!page) | 1868 if (!page) |
| 1863 return String(); | 1869 return String(); |
| 1864 | 1870 |
| 1865 return page->mainThreadScrollingReasonsAsText(); | 1871 return page->mainThreadScrollingReasonsAsText(); |
| 1866 } | 1872 } |
| 1867 | 1873 |
| 1868 PassRefPtr<ClientRectList> Internals::nonFastScrollableRects(Document* document,
ExceptionState& es) const | 1874 PassRefPtr<ClientRectList> Internals::nonFastScrollableRects(Document* document,
ExceptionState& es) const |
| 1869 { | 1875 { |
| 1870 if (!document || !document->frame()) { | 1876 if (!document || !document->frame()) { |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2284 if (!sharedContext) | 2290 if (!sharedContext) |
| 2285 return false; | 2291 return false; |
| 2286 sharedContext->extensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CONTEX
T_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB); | 2292 sharedContext->extensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CONTEX
T_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB); |
| 2287 // To prevent tests that call loseSharedGraphicsContext3D from being | 2293 // To prevent tests that call loseSharedGraphicsContext3D from being |
| 2288 // flaky, we call finish so that the context is guaranteed to be lost | 2294 // flaky, we call finish so that the context is guaranteed to be lost |
| 2289 // synchronously (i.e. before returning). | 2295 // synchronously (i.e. before returning). |
| 2290 sharedContext->finish(); | 2296 sharedContext->finish(); |
| 2291 return true; | 2297 return true; |
| 2292 } | 2298 } |
| 2293 | 2299 |
| 2300 void Internals::forceCompositingUpdate(Document* document, ExceptionState& es) |
| 2301 { |
| 2302 if (!document || !document->renderView()) { |
| 2303 es.throwUninformativeAndGenericDOMException(InvalidAccessError); |
| 2304 return; |
| 2305 } |
| 2306 |
| 2307 document->updateLayout(); |
| 2308 |
| 2309 RenderView* view = document->renderView(); |
| 2310 if (view->compositor()) |
| 2311 view->compositor()->updateCompositingLayers(CompositingUpdateFinishAllDe
ferredWork); |
| 2294 } | 2312 } |
| 2313 |
| 2314 } |
| OLD | NEW |