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 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
890 "No history item is available."); | 890 "No history item is available."); |
891 return; | 891 return; |
892 } | 892 } |
893 mainItem->clearDocumentState(); | 893 mainItem->clearDocumentState(); |
894 mainItem->setDocumentState(state); | 894 mainItem->setDocumentState(state); |
895 } | 895 } |
896 | 896 |
897 DOMWindow* Internals::pagePopupWindow() const { | 897 DOMWindow* Internals::pagePopupWindow() const { |
898 if (!m_document) | 898 if (!m_document) |
899 return nullptr; | 899 return nullptr; |
900 if (Page* page = m_document->page()) | 900 if (Page* page = m_document->page()) { |
901 return page->chromeClient().pagePopupWindowForTesting(); | 901 LocalDOMWindow* popup = |
| 902 toLocalDOMWindow(page->chromeClient().pagePopupWindowForTesting()); |
| 903 if (popup) { |
| 904 // We need to make the popup same origin so layout tests can access it. |
| 905 popup->document()->updateSecurityOrigin(m_document->getSecurityOrigin()); |
| 906 } |
| 907 return popup; |
| 908 } |
902 return nullptr; | 909 return nullptr; |
903 } | 910 } |
904 | 911 |
905 ClientRect* Internals::absoluteCaretBounds(ExceptionState& exceptionState) { | 912 ClientRect* Internals::absoluteCaretBounds(ExceptionState& exceptionState) { |
906 if (!frame()) { | 913 if (!frame()) { |
907 exceptionState.throwDOMException( | 914 exceptionState.throwDOMException( |
908 InvalidAccessError, "The document's frame cannot be retrieved."); | 915 InvalidAccessError, "The document's frame cannot be retrieved."); |
909 return ClientRect::create(); | 916 return ClientRect::create(); |
910 } | 917 } |
911 | 918 |
(...skipping 2253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3165 | 3172 |
3166 void Internals::crash() { | 3173 void Internals::crash() { |
3167 CHECK(false) << "Intentional crash"; | 3174 CHECK(false) << "Intentional crash"; |
3168 } | 3175 } |
3169 | 3176 |
3170 void Internals::setIsLowEndDevice(bool isLowEndDevice) { | 3177 void Internals::setIsLowEndDevice(bool isLowEndDevice) { |
3171 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); | 3178 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); |
3172 } | 3179 } |
3173 | 3180 |
3174 } // namespace blink | 3181 } // namespace blink |
OLD | NEW |