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. | |
dcheng
2017/02/21 21:15:10
Uhhhh. Wow.
Btw, should we be calling updateSecur
| |
905 popup->document()->setSecurityOrigin(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 2248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3160 | 3167 |
3161 void Internals::crash() { | 3168 void Internals::crash() { |
3162 CHECK(false) << "Intentional crash"; | 3169 CHECK(false) << "Intentional crash"; |
3163 } | 3170 } |
3164 | 3171 |
3165 void Internals::setIsLowEndDevice(bool isLowEndDevice) { | 3172 void Internals::setIsLowEndDevice(bool isLowEndDevice) { |
3166 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); | 3173 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); |
3167 } | 3174 } |
3168 | 3175 |
3169 } // namespace blink | 3176 } // namespace blink |
OLD | NEW |