| 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 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 if (!s_pagePopupDriver) | 675 if (!s_pagePopupDriver) |
| 676 s_pagePopupDriver = MockPagePopupDriver::create(page->deprecatedLocalMai
nFrame()).leakPtr(); | 676 s_pagePopupDriver = MockPagePopupDriver::create(page->deprecatedLocalMai
nFrame()).leakPtr(); |
| 677 page->chrome().client().setPagePopupDriver(s_pagePopupDriver); | 677 page->chrome().client().setPagePopupDriver(s_pagePopupDriver); |
| 678 } | 678 } |
| 679 | 679 |
| 680 PassRefPtrWillBeRawPtr<PagePopupController> Internals::pagePopupController() | 680 PassRefPtrWillBeRawPtr<PagePopupController> Internals::pagePopupController() |
| 681 { | 681 { |
| 682 return s_pagePopupDriver ? s_pagePopupDriver->pagePopupController() : 0; | 682 return s_pagePopupDriver ? s_pagePopupDriver->pagePopupController() : 0; |
| 683 } | 683 } |
| 684 | 684 |
| 685 LocalDOMWindow* Internals::pagePopupWindow() const |
| 686 { |
| 687 Document* document = contextDocument(); |
| 688 if (!document) |
| 689 return nullptr; |
| 690 Page* page = document->page(); |
| 691 if (!page) |
| 692 return nullptr; |
| 693 PagePopupDriver* pagePopupDriver = page->chrome().client().pagePopupDriver()
; |
| 694 if (!pagePopupDriver) |
| 695 return nullptr; |
| 696 return pagePopupDriver->pagePopupWindow(); |
| 697 } |
| 698 |
| 685 PassRefPtrWillBeRawPtr<ClientRect> Internals::absoluteCaretBounds(ExceptionState
& exceptionState) | 699 PassRefPtrWillBeRawPtr<ClientRect> Internals::absoluteCaretBounds(ExceptionState
& exceptionState) |
| 686 { | 700 { |
| 687 Document* document = contextDocument(); | 701 Document* document = contextDocument(); |
| 688 if (!document || !document->frame()) { | 702 if (!document || !document->frame()) { |
| 689 exceptionState.throwDOMException(InvalidAccessError, document ? "The doc
ument's frame cannot be retrieved." : "No context document can be obtained."); | 703 exceptionState.throwDOMException(InvalidAccessError, document ? "The doc
ument's frame cannot be retrieved." : "No context document can be obtained."); |
| 690 return ClientRect::create(); | 704 return ClientRect::create(); |
| 691 } | 705 } |
| 692 | 706 |
| 693 return ClientRect::create(document->frame()->selection().absoluteCaretBounds
()); | 707 return ClientRect::create(document->frame()->selection().absoluteCaretBounds
()); |
| 694 } | 708 } |
| (...skipping 1574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2269 | 2283 |
| 2270 toHTMLPlugInElement(element)->setUsePlaceholderContent(true); | 2284 toHTMLPlugInElement(element)->setUsePlaceholderContent(true); |
| 2271 } | 2285 } |
| 2272 | 2286 |
| 2273 Iterator* Internals::iterator(ScriptState* scriptState, ExceptionState& exceptio
nState) | 2287 Iterator* Internals::iterator(ScriptState* scriptState, ExceptionState& exceptio
nState) |
| 2274 { | 2288 { |
| 2275 return new InternalsIterator; | 2289 return new InternalsIterator; |
| 2276 } | 2290 } |
| 2277 | 2291 |
| 2278 } // namespace blink | 2292 } // namespace blink |
| OLD | NEW |