| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 if (AXObjectCache* cache = m_popupClient->ownerElement().document().existing
AXObjectCache()) | 264 if (AXObjectCache* cache = m_popupClient->ownerElement().document().existing
AXObjectCache()) |
| 265 cache->childrenChanged(&m_popupClient->ownerElement()); | 265 cache->childrenChanged(&m_popupClient->ownerElement()); |
| 266 | 266 |
| 267 ASSERT(frame->localDOMWindow()); | 267 ASSERT(frame->localDOMWindow()); |
| 268 DOMWindowPagePopup::install(*frame->localDOMWindow(), *this, m_popupClient); | 268 DOMWindowPagePopup::install(*frame->localDOMWindow(), *this, m_popupClient); |
| 269 ASSERT(m_popupClient->ownerElement().document().existingAXObjectCache() == f
rame->document()->existingAXObjectCache()); | 269 ASSERT(m_popupClient->ownerElement().document().existingAXObjectCache() == f
rame->document()->existingAXObjectCache()); |
| 270 | 270 |
| 271 RefPtr<SharedBuffer> data = SharedBuffer::create(); | 271 RefPtr<SharedBuffer> data = SharedBuffer::create(); |
| 272 m_popupClient->writeDocument(data.get()); | 272 m_popupClient->writeDocument(data.get()); |
| 273 frame->loader().load(FrameLoadRequest(0, blankURL(), SubstituteData(data, "t
ext/html", "UTF-8", KURL(), ForceSynchronousLoad))); | 273 frame->loader().load(FrameLoadRequest(0, blankURL(), SubstituteData(data, "t
ext/html", "UTF-8", KURL(), ForceSynchronousLoad))); |
| 274 frame->setPageZoomFactor(m_popupClient->zoomFactor()); |
| 274 | 275 |
| 275 return true; | 276 return true; |
| 276 } | 277 } |
| 277 | 278 |
| 278 void WebPagePopupImpl::postMessage(const String& message) | 279 void WebPagePopupImpl::postMessage(const String& message) |
| 279 { | 280 { |
| 280 if (!m_page) | 281 if (!m_page) |
| 281 return; | 282 return; |
| 282 ScriptForbiddenScope::AllowUserAgentScript allowScript; | 283 ScriptForbiddenScope::AllowUserAgentScript allowScript; |
| 283 if (LocalDOMWindow* window = toLocalFrame(m_page->mainFrame())->localDOMWind
ow()) | 284 if (LocalDOMWindow* window = toLocalFrame(m_page->mainFrame())->localDOMWind
ow()) |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 // A WebPagePopupImpl instance usually has two references. | 532 // A WebPagePopupImpl instance usually has two references. |
| 532 // - One owned by the instance itself. It represents the visible widget. | 533 // - One owned by the instance itself. It represents the visible widget. |
| 533 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the | 534 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the |
| 534 // WebPagePopupImpl to close. | 535 // WebPagePopupImpl to close. |
| 535 // We need them because the closing operation is asynchronous and the widget | 536 // We need them because the closing operation is asynchronous and the widget |
| 536 // can be closed while the WebViewImpl is unaware of it. | 537 // can be closed while the WebViewImpl is unaware of it. |
| 537 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 538 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
| 538 } | 539 } |
| 539 | 540 |
| 540 } // namespace blink | 541 } // namespace blink |
| OLD | NEW |