| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 #include "core/page/PrintContext.h" | 99 #include "core/page/PrintContext.h" |
| 100 #include "core/page/Settings.h" | 100 #include "core/page/Settings.h" |
| 101 #include "core/frame/animation/AnimationController.h" | 101 #include "core/frame/animation/AnimationController.h" |
| 102 #include "core/page/scrolling/ScrollingCoordinator.h" | 102 #include "core/page/scrolling/ScrollingCoordinator.h" |
| 103 #include "core/platform/ColorChooser.h" | 103 #include "core/platform/ColorChooser.h" |
| 104 #include "core/platform/Cursor.h" | 104 #include "core/platform/Cursor.h" |
| 105 #include "core/platform/graphics/GraphicsLayer.h" | 105 #include "core/platform/graphics/GraphicsLayer.h" |
| 106 #include "core/platform/graphics/filters/FilterOperation.h" | 106 #include "core/platform/graphics/filters/FilterOperation.h" |
| 107 #include "core/platform/graphics/filters/FilterOperations.h" | 107 #include "core/platform/graphics/filters/FilterOperations.h" |
| 108 #include "core/platform/graphics/gpu/SharedGraphicsContext3D.h" | 108 #include "core/platform/graphics/gpu/SharedGraphicsContext3D.h" |
| 109 #include "core/platform/mock/PlatformSpeechSynthesizerMock.h" | |
| 110 #include "core/rendering/CompositedLayerMapping.h" | 109 #include "core/rendering/CompositedLayerMapping.h" |
| 111 #include "core/rendering/RenderLayer.h" | 110 #include "core/rendering/RenderLayer.h" |
| 112 #include "core/rendering/RenderLayerCompositor.h" | 111 #include "core/rendering/RenderLayerCompositor.h" |
| 113 #include "core/rendering/RenderMenuList.h" | 112 #include "core/rendering/RenderMenuList.h" |
| 114 #include "core/rendering/RenderObject.h" | 113 #include "core/rendering/RenderObject.h" |
| 115 #include "core/rendering/RenderTreeAsText.h" | 114 #include "core/rendering/RenderTreeAsText.h" |
| 116 #include "core/rendering/RenderView.h" | 115 #include "core/rendering/RenderView.h" |
| 117 #include "core/testing/GCObservation.h" | 116 #include "core/testing/GCObservation.h" |
| 118 #include "core/workers/WorkerThread.h" | 117 #include "core/workers/WorkerThread.h" |
| 119 #include "modules/speech/DOMWindowSpeechSynthesis.h" | |
| 120 #include "modules/speech/SpeechSynthesis.h" | |
| 121 #include "platform/Language.h" | 118 #include "platform/Language.h" |
| 122 #include "platform/TraceEvent.h" | 119 #include "platform/TraceEvent.h" |
| 123 #include "platform/geometry/IntRect.h" | 120 #include "platform/geometry/IntRect.h" |
| 124 #include "public/platform/WebLayer.h" | 121 #include "public/platform/WebLayer.h" |
| 125 #include "weborigin/SchemeRegistry.h" | 122 #include "weborigin/SchemeRegistry.h" |
| 126 #include "wtf/dtoa.h" | 123 #include "wtf/dtoa.h" |
| 127 #include "wtf/text/StringBuffer.h" | 124 #include "wtf/text/StringBuffer.h" |
| 128 | 125 |
| 129 namespace WebCore { | 126 namespace WebCore { |
| 130 | 127 |
| (...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 } | 710 } |
| 714 String uniqueName = frame()->tree().uniqueName(); | 711 String uniqueName = frame()->tree().uniqueName(); |
| 715 if (mainItem->target() == uniqueName) | 712 if (mainItem->target() == uniqueName) |
| 716 mainItem->setDocumentState(state); | 713 mainItem->setDocumentState(state); |
| 717 else if (HistoryItem* subItem = mainItem->childItemWithTarget(uniqueName)) | 714 else if (HistoryItem* subItem = mainItem->childItemWithTarget(uniqueName)) |
| 718 subItem->setDocumentState(state); | 715 subItem->setDocumentState(state); |
| 719 else | 716 else |
| 720 es.throwUninformativeAndGenericDOMException(InvalidAccessError); | 717 es.throwUninformativeAndGenericDOMException(InvalidAccessError); |
| 721 } | 718 } |
| 722 | 719 |
| 723 void Internals::enableMockSpeechSynthesizer() | |
| 724 { | |
| 725 Document* document = contextDocument(); | |
| 726 if (!document || !document->domWindow()) | |
| 727 return; | |
| 728 SpeechSynthesis* synthesis = DOMWindowSpeechSynthesis::speechSynthesis(docum
ent->domWindow()); | |
| 729 if (!synthesis) | |
| 730 return; | |
| 731 | |
| 732 synthesis->setPlatformSynthesizer(PlatformSpeechSynthesizerMock::create(synt
hesis)); | |
| 733 } | |
| 734 | |
| 735 void Internals::setEnableMockPagePopup(bool enabled, ExceptionState& es) | 720 void Internals::setEnableMockPagePopup(bool enabled, ExceptionState& es) |
| 736 { | 721 { |
| 737 Document* document = contextDocument(); | 722 Document* document = contextDocument(); |
| 738 if (!document || !document->page()) | 723 if (!document || !document->page()) |
| 739 return; | 724 return; |
| 740 Page* page = document->page(); | 725 Page* page = document->page(); |
| 741 if (!enabled) { | 726 if (!enabled) { |
| 742 page->chrome().client().resetPagePopupDriver(); | 727 page->chrome().client().resetPagePopupDriver(); |
| 743 return; | 728 return; |
| 744 } | 729 } |
| (...skipping 1533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2278 return false; | 2263 return false; |
| 2279 sharedContext->extensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CONTEX
T_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB); | 2264 sharedContext->extensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CONTEX
T_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB); |
| 2280 // To prevent tests that call loseSharedGraphicsContext3D from being | 2265 // To prevent tests that call loseSharedGraphicsContext3D from being |
| 2281 // flaky, we call finish so that the context is guaranteed to be lost | 2266 // flaky, we call finish so that the context is guaranteed to be lost |
| 2282 // synchronously (i.e. before returning). | 2267 // synchronously (i.e. before returning). |
| 2283 sharedContext->finish(); | 2268 sharedContext->finish(); |
| 2284 return true; | 2269 return true; |
| 2285 } | 2270 } |
| 2286 | 2271 |
| 2287 } | 2272 } |
| OLD | NEW |