Chromium Code Reviews| Index: Source/web/WebPagePopupImpl.cpp |
| diff --git a/Source/web/WebPagePopupImpl.cpp b/Source/web/WebPagePopupImpl.cpp |
| index 1250ff583a31de73aba6b1fe746d78662811ba95..4216168793139d02f85d72e4be9883506db3f0cf 100644 |
| --- a/Source/web/WebPagePopupImpl.cpp |
| +++ b/Source/web/WebPagePopupImpl.cpp |
| @@ -48,6 +48,7 @@ |
| #include "modules/accessibility/AXObjectCacheImpl.h" |
| #include "platform/EventDispatchForbiddenScope.h" |
| #include "platform/LayoutTestSupport.h" |
| +#include "platform/ScriptForbiddenScope.h" |
| #include "platform/TraceEvent.h" |
| #include "platform/heap/Handle.h" |
| #include "public/platform/WebCompositeAndReadbackAsyncCallback.h" |
| @@ -178,6 +179,12 @@ private: |
| m_popup->m_webView->client()->postAccessibilityEvent(WebAXObject(obj), static_cast<WebAXEvent>(notification)); |
| } |
| + virtual void setToolTip(const String& tooltipText, TextDirection dir) override |
| + { |
| + if (m_popup->m_webView->client()) |
| + m_popup->m_webView->client()->setToolTipText(tooltipText, toWebTextDirection(dir)); |
| + } |
| + |
| WebPagePopupImpl* m_popup; |
| }; |
| @@ -260,9 +267,23 @@ bool WebPagePopupImpl::initializePage() |
| RefPtr<SharedBuffer> data = SharedBuffer::create(); |
| m_popupClient->writeDocument(data.get()); |
| frame->loader().load(FrameLoadRequest(0, blankURL(), SubstituteData(data, "text/html", "UTF-8", KURL(), ForceSynchronousLoad))); |
| + |
| + m_popupClient->didWriteDocument(frame->document()); |
| + |
| return true; |
| } |
| +void WebPagePopupImpl::postMessage(const String& message) |
| +{ |
| + if (!m_page) |
| + return; |
| + ScriptForbiddenScope::AllowUserAgentScript allowScript; |
| + LocalDOMWindow* window = toLocalFrame(m_page->mainFrame())->localDOMWindow(); |
|
tkent
2014/12/16 05:42:39
nit:
if (LocalDOMWindow* window = toLocalFrame(m_
keishi
2014/12/16 12:21:03
Done.
|
| + if (!window) |
| + return; |
| + window->dispatchEvent(MessageEvent::create(message)); |
| +} |
| + |
| void WebPagePopupImpl::destroyPage() |
| { |
| if (!m_page) |