OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 #include "core/dom/shadow/ShadowRoot.h" | 89 #include "core/dom/shadow/ShadowRoot.h" |
90 #include "core/editing/Editor.h" | 90 #include "core/editing/Editor.h" |
91 #include "core/editing/FrameSelection.h" | 91 #include "core/editing/FrameSelection.h" |
92 #include "core/editing/InputMethodController.h" | 92 #include "core/editing/InputMethodController.h" |
93 #include "core/editing/PlainTextRange.h" | 93 #include "core/editing/PlainTextRange.h" |
94 #include "core/editing/SpellChecker.h" | 94 #include "core/editing/SpellChecker.h" |
95 #include "core/editing/TextAffinity.h" | 95 #include "core/editing/TextAffinity.h" |
96 #include "core/editing/TextIterator.h" | 96 #include "core/editing/TextIterator.h" |
97 #include "core/editing/htmlediting.h" | 97 #include "core/editing/htmlediting.h" |
98 #include "core/editing/markup.h" | 98 #include "core/editing/markup.h" |
| 99 #include "core/fetch/ResourceFetcher.h" |
99 #include "core/frame/Console.h" | 100 #include "core/frame/Console.h" |
100 #include "core/frame/LocalDOMWindow.h" | 101 #include "core/frame/LocalDOMWindow.h" |
101 #include "core/frame/FrameHost.h" | 102 #include "core/frame/FrameHost.h" |
102 #include "core/frame/FrameView.h" | 103 #include "core/frame/FrameView.h" |
103 #include "core/frame/Settings.h" | 104 #include "core/frame/Settings.h" |
104 #include "core/html/HTMLAnchorElement.h" | 105 #include "core/html/HTMLAnchorElement.h" |
105 #include "core/html/HTMLCollection.h" | 106 #include "core/html/HTMLCollection.h" |
106 #include "core/html/HTMLFormElement.h" | 107 #include "core/html/HTMLFormElement.h" |
107 #include "core/html/HTMLFrameElementBase.h" | 108 #include "core/html/HTMLFrameElementBase.h" |
108 #include "core/html/HTMLFrameOwnerElement.h" | 109 #include "core/html/HTMLFrameOwnerElement.h" |
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
867 void WebLocalFrameImpl::sendPings(const WebNode& linkNode, const WebURL& destina
tionURL) | 868 void WebLocalFrameImpl::sendPings(const WebNode& linkNode, const WebURL& destina
tionURL) |
868 { | 869 { |
869 ASSERT(frame()); | 870 ASSERT(frame()); |
870 const Node* node = linkNode.constUnwrap<Node>(); | 871 const Node* node = linkNode.constUnwrap<Node>(); |
871 if (isHTMLAnchorElement(node)) | 872 if (isHTMLAnchorElement(node)) |
872 toHTMLAnchorElement(node)->sendPings(destinationURL); | 873 toHTMLAnchorElement(node)->sendPings(destinationURL); |
873 } | 874 } |
874 | 875 |
875 bool WebLocalFrameImpl::isLoading() const | 876 bool WebLocalFrameImpl::isLoading() const |
876 { | 877 { |
877 if (!frame()) | 878 if (!frame() || !frame()->document()) |
878 return false; | 879 return false; |
879 return frame()->loader().isLoading(); | 880 return frame()->loader().stateMachine()->isDisplayingInitialEmptyDocument()
|| !frame()->document()->loadEventFinished(); |
| 881 } |
| 882 |
| 883 bool WebLocalFrameImpl::isResourceLoadInProgress() const |
| 884 { |
| 885 if (!frame() || !frame()->document()) |
| 886 return false; |
| 887 return frame()->document()->fetcher()->requestCount(); |
880 } | 888 } |
881 | 889 |
882 void WebLocalFrameImpl::stopLoading() | 890 void WebLocalFrameImpl::stopLoading() |
883 { | 891 { |
884 if (!frame()) | 892 if (!frame()) |
885 return; | 893 return; |
886 // FIXME: Figure out what we should really do here. It seems like a bug | 894 // FIXME: Figure out what we should really do here. It seems like a bug |
887 // that FrameLoader::stopLoading doesn't call stopAllLoaders. | 895 // that FrameLoader::stopLoading doesn't call stopAllLoaders. |
888 frame()->loader().stopAllLoaders(); | 896 frame()->loader().stopAllLoaders(); |
889 } | 897 } |
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1861 | 1869 |
1862 void WebLocalFrameImpl::invalidateAll() const | 1870 void WebLocalFrameImpl::invalidateAll() const |
1863 { | 1871 { |
1864 ASSERT(frame() && frame()->view()); | 1872 ASSERT(frame() && frame()->view()); |
1865 FrameView* view = frame()->view(); | 1873 FrameView* view = frame()->view(); |
1866 view->invalidateRect(view->frameRect()); | 1874 view->invalidateRect(view->frameRect()); |
1867 invalidateScrollbar(); | 1875 invalidateScrollbar(); |
1868 } | 1876 } |
1869 | 1877 |
1870 } // namespace blink | 1878 } // namespace blink |
OLD | NEW |