| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 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 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 #include "core/page/EventHandler.h" | 90 #include "core/page/EventHandler.h" |
| 91 #include "core/page/FrameTree.h" | 91 #include "core/page/FrameTree.h" |
| 92 #include "core/page/Page.h" | 92 #include "core/page/Page.h" |
| 93 #include "core/page/WindowFeatures.h" | 93 #include "core/page/WindowFeatures.h" |
| 94 #include "core/page/WindowFocusAllowedIndicator.h" | 94 #include "core/page/WindowFocusAllowedIndicator.h" |
| 95 #include "core/page/scrolling/ScrollingCoordinator.h" | 95 #include "core/page/scrolling/ScrollingCoordinator.h" |
| 96 #include "core/storage/Storage.h" | 96 #include "core/storage/Storage.h" |
| 97 #include "core/storage/StorageArea.h" | 97 #include "core/storage/StorageArea.h" |
| 98 #include "core/storage/StorageNamespace.h" | 98 #include "core/storage/StorageNamespace.h" |
| 99 #include "core/timing/Performance.h" | 99 #include "core/timing/Performance.h" |
| 100 #include "core/workers/WorkerThread.h" |
| 100 #include "platform/EventDispatchForbiddenScope.h" | 101 #include "platform/EventDispatchForbiddenScope.h" |
| 101 #include "platform/PlatformScreen.h" | 102 #include "platform/PlatformScreen.h" |
| 102 #include "platform/RuntimeEnabledFeatures.h" | 103 #include "platform/RuntimeEnabledFeatures.h" |
| 103 #include "platform/UserGestureIndicator.h" | 104 #include "platform/UserGestureIndicator.h" |
| 104 #include "platform/geometry/FloatRect.h" | 105 #include "platform/geometry/FloatRect.h" |
| 105 #include "platform/graphics/media/MediaPlayer.h" | 106 #include "platform/graphics/media/MediaPlayer.h" |
| 106 #include "platform/weborigin/KURL.h" | 107 #include "platform/weborigin/KURL.h" |
| 107 #include "platform/weborigin/SecurityOrigin.h" | 108 #include "platform/weborigin/SecurityOrigin.h" |
| 108 #include "platform/weborigin/SecurityPolicy.h" | 109 #include "platform/weborigin/SecurityPolicy.h" |
| 109 #include "public/platform/Platform.h" | 110 #include "public/platform/Platform.h" |
| 110 #include "wtf/MainThread.h" | 111 #include "wtf/MainThread.h" |
| 111 #include "wtf/MathExtras.h" | 112 #include "wtf/MathExtras.h" |
| 112 #include "wtf/text/WTFString.h" | 113 #include "wtf/text/WTFString.h" |
| 114 |
| 113 #include <algorithm> | 115 #include <algorithm> |
| 114 | 116 |
| 115 using std::min; | 117 using std::min; |
| 116 using std::max; | 118 using std::max; |
| 117 | 119 |
| 118 namespace blink { | 120 namespace blink { |
| 119 | 121 |
| 120 class PostMessageTimer FINAL : public SuspendableTimer { | 122 class PostMessageTimer FINAL : public SuspendableTimer { |
| 121 public: | 123 public: |
| 122 PostMessageTimer(LocalDOMWindow& window, PassRefPtr<SerializedScriptValue> m
essage, const String& sourceOrigin, PassRefPtrWillBeRawPtr<LocalDOMWindow> sourc
e, PassOwnPtr<MessagePortChannelArray> channels, SecurityOrigin* targetOrigin, P
assRefPtrWillBeRawPtr<ScriptCallStack> stackTrace, UserGestureToken* userGesture
Token) | 124 PostMessageTimer(LocalDOMWindow& window, PassRefPtr<SerializedScriptValue> m
essage, const String& sourceOrigin, PassRefPtrWillBeRawPtr<LocalDOMWindow> sourc
e, PassOwnPtr<MessagePortChannelArray> channels, SecurityOrigin* targetOrigin, P
assRefPtrWillBeRawPtr<ScriptCallStack> stackTrace, UserGestureToken* userGesture
Token) |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 m_eventQueue->close(); | 376 m_eventQueue->close(); |
| 375 m_eventQueue.clear(); | 377 m_eventQueue.clear(); |
| 376 } | 378 } |
| 377 | 379 |
| 378 void LocalDOMWindow::acceptLanguagesChanged() | 380 void LocalDOMWindow::acceptLanguagesChanged() |
| 379 { | 381 { |
| 380 if (m_navigator) | 382 if (m_navigator) |
| 381 m_navigator->setLanguagesChanged(); | 383 m_navigator->setLanguagesChanged(); |
| 382 | 384 |
| 383 dispatchEvent(Event::create(EventTypeNames::languagechange)); | 385 dispatchEvent(Event::create(EventTypeNames::languagechange)); |
| 386 |
| 387 WorkerThread::notifyAcceptLanguagesChanged(navigator().languages()); |
| 384 } | 388 } |
| 385 | 389 |
| 386 PassRefPtrWillBeRawPtr<Document> LocalDOMWindow::createDocument(const String& mi
meType, const DocumentInit& init, bool forceXHTML) | 390 PassRefPtrWillBeRawPtr<Document> LocalDOMWindow::createDocument(const String& mi
meType, const DocumentInit& init, bool forceXHTML) |
| 387 { | 391 { |
| 388 RefPtrWillBeRawPtr<Document> document = nullptr; | 392 RefPtrWillBeRawPtr<Document> document = nullptr; |
| 389 if (forceXHTML) { | 393 if (forceXHTML) { |
| 390 // This is a hack for XSLTProcessor. See XSLTProcessor::createDocumentFr
omSource(). | 394 // This is a hack for XSLTProcessor. See XSLTProcessor::createDocumentFr
omSource(). |
| 391 document = Document::create(init); | 395 document = Document::create(init); |
| 392 } else { | 396 } else { |
| 393 document = DOMImplementation::createDocument(mimeType, init, init.frame(
) ? init.frame()->inViewSourceMode() : false); | 397 document = DOMImplementation::createDocument(mimeType, init, init.frame(
) ? init.frame()->inViewSourceMode() : false); |
| (...skipping 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1908 FrameDestructionObserver::trace(visitor); | 1912 FrameDestructionObserver::trace(visitor); |
| 1909 } | 1913 } |
| 1910 | 1914 |
| 1911 v8::Handle<v8::Object> LocalDOMWindow::wrap(v8::Handle<v8::Object> creationConte
xt, v8::Isolate* isolate) | 1915 v8::Handle<v8::Object> LocalDOMWindow::wrap(v8::Handle<v8::Object> creationConte
xt, v8::Isolate* isolate) |
| 1912 { | 1916 { |
| 1913 ASSERT_NOT_REACHED(); // LocalDOMWindow has [Custom=ToV8]. | 1917 ASSERT_NOT_REACHED(); // LocalDOMWindow has [Custom=ToV8]. |
| 1914 return v8::Handle<v8::Object>(); | 1918 return v8::Handle<v8::Object>(); |
| 1915 } | 1919 } |
| 1916 | 1920 |
| 1917 } // namespace blink | 1921 } // namespace blink |
| OLD | NEW |