| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 #include "core/testing/DictionaryTest.h" | 119 #include "core/testing/DictionaryTest.h" |
| 120 #include "core/testing/GCObservation.h" | 120 #include "core/testing/GCObservation.h" |
| 121 #include "core/testing/InternalRuntimeFlags.h" | 121 #include "core/testing/InternalRuntimeFlags.h" |
| 122 #include "core/testing/InternalSettings.h" | 122 #include "core/testing/InternalSettings.h" |
| 123 #include "core/testing/LayerRect.h" | 123 #include "core/testing/LayerRect.h" |
| 124 #include "core/testing/LayerRectList.h" | 124 #include "core/testing/LayerRectList.h" |
| 125 #include "core/testing/PrivateScriptTest.h" | 125 #include "core/testing/PrivateScriptTest.h" |
| 126 #include "core/testing/TypeConversions.h" | 126 #include "core/testing/TypeConversions.h" |
| 127 #include "core/testing/UnionTypesTest.h" | 127 #include "core/testing/UnionTypesTest.h" |
| 128 #include "core/workers/WorkerThread.h" | 128 #include "core/workers/WorkerThread.h" |
| 129 #include "gpu/command_buffer/client/gles2_interface.h" |
| 129 #include "platform/Cursor.h" | 130 #include "platform/Cursor.h" |
| 130 #include "platform/Language.h" | 131 #include "platform/Language.h" |
| 131 #include "platform/PlatformKeyboardEvent.h" | 132 #include "platform/PlatformKeyboardEvent.h" |
| 132 #include "platform/RuntimeEnabledFeatures.h" | 133 #include "platform/RuntimeEnabledFeatures.h" |
| 133 #include "platform/TraceEvent.h" | 134 #include "platform/TraceEvent.h" |
| 134 #include "platform/geometry/IntRect.h" | 135 #include "platform/geometry/IntRect.h" |
| 135 #include "platform/geometry/LayoutRect.h" | 136 #include "platform/geometry/LayoutRect.h" |
| 136 #include "platform/graphics/GraphicsLayer.h" | 137 #include "platform/graphics/GraphicsLayer.h" |
| 137 #include "platform/heap/Handle.h" | 138 #include "platform/heap/Handle.h" |
| 138 #include "platform/inspector_protocol/FrontendChannel.h" | 139 #include "platform/inspector_protocol/FrontendChannel.h" |
| (...skipping 2087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2226 { | 2227 { |
| 2227 ASSERT(select); | 2228 ASSERT(select); |
| 2228 select->resetTypeAheadSessionForTesting(); | 2229 select->resetTypeAheadSessionForTesting(); |
| 2229 } | 2230 } |
| 2230 | 2231 |
| 2231 bool Internals::loseSharedGraphicsContext3D() | 2232 bool Internals::loseSharedGraphicsContext3D() |
| 2232 { | 2233 { |
| 2233 OwnPtr<WebGraphicsContext3DProvider> sharedProvider = adoptPtr(Platform::cur
rent()->createSharedOffscreenGraphicsContext3DProvider()); | 2234 OwnPtr<WebGraphicsContext3DProvider> sharedProvider = adoptPtr(Platform::cur
rent()->createSharedOffscreenGraphicsContext3DProvider()); |
| 2234 if (!sharedProvider) | 2235 if (!sharedProvider) |
| 2235 return false; | 2236 return false; |
| 2236 WebGraphicsContext3D* sharedContext = sharedProvider->context3d(); | 2237 gpu::gles2::GLES2Interface* sharedGL = sharedProvider->contextGL(); |
| 2237 sharedContext->loseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_EXT, GL_INNOCENT_
CONTEXT_RESET_EXT); | 2238 sharedGL->LoseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_EXT, GL_INNOCENT_CONTE
XT_RESET_EXT); |
| 2238 // To prevent tests that call loseSharedGraphicsContext3D from being | 2239 // To prevent tests that call loseSharedGraphicsContext3D from being |
| 2239 // flaky, we call finish so that the context is guaranteed to be lost | 2240 // flaky, we call finish so that the context is guaranteed to be lost |
| 2240 // synchronously (i.e. before returning). | 2241 // synchronously (i.e. before returning). |
| 2241 sharedContext->finish(); | 2242 sharedGL->Finish(); |
| 2242 return true; | 2243 return true; |
| 2243 } | 2244 } |
| 2244 | 2245 |
| 2245 void Internals::forceCompositingUpdate(Document* document, ExceptionState& excep
tionState) | 2246 void Internals::forceCompositingUpdate(Document* document, ExceptionState& excep
tionState) |
| 2246 { | 2247 { |
| 2247 ASSERT(document); | 2248 ASSERT(document); |
| 2248 if (!document->layoutView()) { | 2249 if (!document->layoutView()) { |
| 2249 exceptionState.throwDOMException(InvalidAccessError, "The document provi
ded is invalid."); | 2250 exceptionState.throwDOMException(InvalidAccessError, "The document provi
ded is invalid."); |
| 2250 return; | 2251 return; |
| 2251 } | 2252 } |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2581 } | 2582 } |
| 2582 | 2583 |
| 2583 String Internals::getProgrammaticScrollAnimationState(Node* node) const | 2584 String Internals::getProgrammaticScrollAnimationState(Node* node) const |
| 2584 { | 2585 { |
| 2585 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) | 2586 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) |
| 2586 return scrollableArea->programmaticScrollAnimator().runStateAsText(); | 2587 return scrollableArea->programmaticScrollAnimator().runStateAsText(); |
| 2587 return String(); | 2588 return String(); |
| 2588 } | 2589 } |
| 2589 | 2590 |
| 2590 } // namespace blink | 2591 } // namespace blink |
| OLD | NEW |