| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 #include "platform/Cursor.h" | 115 #include "platform/Cursor.h" |
| 116 #include "platform/Language.h" | 116 #include "platform/Language.h" |
| 117 #include "platform/TraceEvent.h" | 117 #include "platform/TraceEvent.h" |
| 118 #include "platform/geometry/IntRect.h" | 118 #include "platform/geometry/IntRect.h" |
| 119 #include "platform/geometry/LayoutRect.h" | 119 #include "platform/geometry/LayoutRect.h" |
| 120 #include "platform/graphics/GraphicsLayer.h" | 120 #include "platform/graphics/GraphicsLayer.h" |
| 121 #include "platform/graphics/filters/FilterOperation.h" | 121 #include "platform/graphics/filters/FilterOperation.h" |
| 122 #include "platform/graphics/filters/FilterOperations.h" | 122 #include "platform/graphics/filters/FilterOperations.h" |
| 123 #include "platform/graphics/gpu/SharedGraphicsContext3D.h" | 123 #include "platform/graphics/gpu/SharedGraphicsContext3D.h" |
| 124 #include "platform/weborigin/SchemeRegistry.h" | 124 #include "platform/weborigin/SchemeRegistry.h" |
| 125 #include "public/platform/WebGraphicsContext3D.h" |
| 125 #include "public/platform/WebLayer.h" | 126 #include "public/platform/WebLayer.h" |
| 126 #include "wtf/InstanceCounter.h" | 127 #include "wtf/InstanceCounter.h" |
| 127 #include "wtf/dtoa.h" | 128 #include "wtf/dtoa.h" |
| 128 #include "wtf/text/StringBuffer.h" | 129 #include "wtf/text/StringBuffer.h" |
| 129 | 130 |
| 130 namespace WebCore { | 131 namespace WebCore { |
| 131 | 132 |
| 132 static MockPagePopupDriver* s_pagePopupDriver = 0; | 133 static MockPagePopupDriver* s_pagePopupDriver = 0; |
| 133 | 134 |
| 134 using namespace HTMLNames; | 135 using namespace HTMLNames; |
| (...skipping 2190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2325 | 2326 |
| 2326 RenderMenuList* menuList = toRenderMenuList(renderer); | 2327 RenderMenuList* menuList = toRenderMenuList(renderer); |
| 2327 return menuList->popupIsVisible(); | 2328 return menuList->popupIsVisible(); |
| 2328 } | 2329 } |
| 2329 | 2330 |
| 2330 bool Internals::loseSharedGraphicsContext3D() | 2331 bool Internals::loseSharedGraphicsContext3D() |
| 2331 { | 2332 { |
| 2332 RefPtr<GraphicsContext3D> sharedContext = SharedGraphicsContext3D::get(); | 2333 RefPtr<GraphicsContext3D> sharedContext = SharedGraphicsContext3D::get(); |
| 2333 if (!sharedContext) | 2334 if (!sharedContext) |
| 2334 return false; | 2335 return false; |
| 2335 sharedContext->extensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CONTEX
T_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB); | 2336 sharedContext->webContext()->loseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_EXT
, GL_INNOCENT_CONTEXT_RESET_EXT); |
| 2336 // To prevent tests that call loseSharedGraphicsContext3D from being | 2337 // To prevent tests that call loseSharedGraphicsContext3D from being |
| 2337 // flaky, we call finish so that the context is guaranteed to be lost | 2338 // flaky, we call finish so that the context is guaranteed to be lost |
| 2338 // synchronously (i.e. before returning). | 2339 // synchronously (i.e. before returning). |
| 2339 sharedContext->finish(); | 2340 sharedContext->finish(); |
| 2340 return true; | 2341 return true; |
| 2341 } | 2342 } |
| 2342 | 2343 |
| 2343 void Internals::forceCompositingUpdate(Document* document, ExceptionState& excep
tionState) | 2344 void Internals::forceCompositingUpdate(Document* document, ExceptionState& excep
tionState) |
| 2344 { | 2345 { |
| 2345 if (!document || !document->renderView()) { | 2346 if (!document || !document->renderView()) { |
| 2346 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr
or); | 2347 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr
or); |
| 2347 return; | 2348 return; |
| 2348 } | 2349 } |
| 2349 | 2350 |
| 2350 document->updateLayout(); | 2351 document->updateLayout(); |
| 2351 | 2352 |
| 2352 RenderView* view = document->renderView(); | 2353 RenderView* view = document->renderView(); |
| 2353 if (view->compositor()) | 2354 if (view->compositor()) |
| 2354 view->compositor()->updateCompositingLayers(CompositingUpdateFinishAllDe
ferredWork); | 2355 view->compositor()->updateCompositingLayers(CompositingUpdateFinishAllDe
ferredWork); |
| 2355 } | 2356 } |
| 2356 | 2357 |
| 2357 void Internals::setZoomFactor(float factor) | 2358 void Internals::setZoomFactor(float factor) |
| 2358 { | 2359 { |
| 2359 frame()->setPageZoomFactor(factor); | 2360 frame()->setPageZoomFactor(factor); |
| 2360 } | 2361 } |
| 2361 | 2362 |
| 2362 } | 2363 } |
| OLD | NEW |