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 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
863 } | 863 } |
864 | 864 |
865 bool Internals::hasAutofocusRequest() { | 865 bool Internals::hasAutofocusRequest() { |
866 return hasAutofocusRequest(0); | 866 return hasAutofocusRequest(0); |
867 } | 867 } |
868 | 868 |
869 Vector<String> Internals::formControlStateOfHistoryItem( | 869 Vector<String> Internals::formControlStateOfHistoryItem( |
870 ExceptionState& exceptionState) { | 870 ExceptionState& exceptionState) { |
871 HistoryItem* mainItem = nullptr; | 871 HistoryItem* mainItem = nullptr; |
872 if (frame()) | 872 if (frame()) |
873 mainItem = frame()->loader().currentItem(); | 873 mainItem = frame()->loader().documentLoader()->historyItem(); |
874 if (!mainItem) { | 874 if (!mainItem) { |
875 exceptionState.throwDOMException(InvalidAccessError, | 875 exceptionState.throwDOMException(InvalidAccessError, |
876 "No history item is available."); | 876 "No history item is available."); |
877 return Vector<String>(); | 877 return Vector<String>(); |
878 } | 878 } |
879 return mainItem->getDocumentState(); | 879 return mainItem->getDocumentState(); |
880 } | 880 } |
881 | 881 |
882 void Internals::setFormControlStateOfHistoryItem( | 882 void Internals::setFormControlStateOfHistoryItem( |
883 const Vector<String>& state, | 883 const Vector<String>& state, |
884 ExceptionState& exceptionState) { | 884 ExceptionState& exceptionState) { |
885 HistoryItem* mainItem = nullptr; | 885 HistoryItem* mainItem = nullptr; |
886 if (frame()) | 886 if (frame()) |
887 mainItem = frame()->loader().currentItem(); | 887 mainItem = frame()->loader().documentLoader()->historyItem(); |
888 if (!mainItem) { | 888 if (!mainItem) { |
889 exceptionState.throwDOMException(InvalidAccessError, | 889 exceptionState.throwDOMException(InvalidAccessError, |
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 { |
(...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2379 } | 2379 } |
2380 | 2380 |
2381 CallbackFunctionTest* Internals::callbackFunctionTest() const { | 2381 CallbackFunctionTest* Internals::callbackFunctionTest() const { |
2382 return CallbackFunctionTest::create(); | 2382 return CallbackFunctionTest::create(); |
2383 } | 2383 } |
2384 | 2384 |
2385 Vector<String> Internals::getReferencedFilePaths() const { | 2385 Vector<String> Internals::getReferencedFilePaths() const { |
2386 if (!frame()) | 2386 if (!frame()) |
2387 return Vector<String>(); | 2387 return Vector<String>(); |
2388 | 2388 |
2389 return frame()->loader().currentItem()->getReferencedFilePaths(); | 2389 return frame() |
| 2390 ->loader() |
| 2391 .documentLoader() |
| 2392 ->historyItem() |
| 2393 ->getReferencedFilePaths(); |
2390 } | 2394 } |
2391 | 2395 |
2392 void Internals::startStoringCompositedLayerDebugInfo( | 2396 void Internals::startStoringCompositedLayerDebugInfo( |
2393 Document* document, | 2397 Document* document, |
2394 ExceptionState& exceptionState) { | 2398 ExceptionState& exceptionState) { |
2395 DCHECK(document); | 2399 DCHECK(document); |
2396 if (!document->view()) { | 2400 if (!document->view()) { |
2397 exceptionState.throwDOMException(InvalidAccessError, | 2401 exceptionState.throwDOMException(InvalidAccessError, |
2398 "The document provided is invalid."); | 2402 "The document provided is invalid."); |
2399 return; | 2403 return; |
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3226 | 3230 |
3227 void Internals::crash() { | 3231 void Internals::crash() { |
3228 CHECK(false) << "Intentional crash"; | 3232 CHECK(false) << "Intentional crash"; |
3229 } | 3233 } |
3230 | 3234 |
3231 void Internals::setIsLowEndDevice(bool isLowEndDevice) { | 3235 void Internals::setIsLowEndDevice(bool isLowEndDevice) { |
3232 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); | 3236 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); |
3233 } | 3237 } |
3234 | 3238 |
3235 } // namespace blink | 3239 } // namespace blink |
OLD | NEW |