OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // How we handle the base tag better. | 5 // How we handle the base tag better. |
6 // Current status: | 6 // Current status: |
7 // At now the normal way we use to handling base tag is | 7 // At now the normal way we use to handling base tag is |
8 // a) For those links which have corresponding local saved files, such as | 8 // a) For those links which have corresponding local saved files, such as |
9 // savable CSS, JavaScript files, they will be written to relative URLs which | 9 // savable CSS, JavaScript files, they will be written to relative URLs which |
10 // point to local saved file. Why those links can not be resolved as absolute | 10 // point to local saved file. Why those links can not be resolved as absolute |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 #include "config.h" | 52 #include "config.h" |
53 | 53 |
54 #include "base/compiler_specific.h" | 54 #include "base/compiler_specific.h" |
55 | 55 |
56 MSVC_PUSH_WARNING_LEVEL(0); | 56 MSVC_PUSH_WARNING_LEVEL(0); |
57 #include "DocumentType.h" | 57 #include "DocumentType.h" |
58 #include "FrameLoader.h" | 58 #include "FrameLoader.h" |
59 #include "Document.h" | 59 #include "Document.h" |
60 #include "Element.h" | 60 #include "Element.h" |
61 #include "HTMLCollection.h" | 61 #include "HTMLAllCollection.h" |
62 #include "HTMLElement.h" | 62 #include "HTMLElement.h" |
63 #include "HTMLFormElement.h" | 63 #include "HTMLFormElement.h" |
64 #include "HTMLMetaElement.h" | 64 #include "HTMLMetaElement.h" |
65 #include "HTMLNames.h" | 65 #include "HTMLNames.h" |
66 #include "KURL.h" | 66 #include "KURL.h" |
67 #include "markup.h" | 67 #include "markup.h" |
68 #include "PlatformString.h" | 68 #include "PlatformString.h" |
69 #include "TextEncoding.h" | 69 #include "TextEncoding.h" |
70 MSVC_POP_WARNING(); | 70 MSVC_POP_WARNING(); |
71 #undef LOG | 71 #undef LOG |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 // Return now if user only needs to serialize specified frame, not including | 536 // Return now if user only needs to serialize specified frame, not including |
537 // all sub-frames. | 537 // all sub-frames. |
538 if (!recursive_serialization_) | 538 if (!recursive_serialization_) |
539 return; | 539 return; |
540 // Collect all frames inside the specified frame. | 540 // Collect all frames inside the specified frame. |
541 for (int i = 0; i < static_cast<int>(frames_.size()); ++i) { | 541 for (int i = 0; i < static_cast<int>(frames_.size()); ++i) { |
542 WebFrameImpl* current_frame = frames_[i]; | 542 WebFrameImpl* current_frame = frames_[i]; |
543 // Get current using document. | 543 // Get current using document. |
544 WebCore::Document* current_doc = current_frame->frame()->document(); | 544 WebCore::Document* current_doc = current_frame->frame()->document(); |
545 // Go through sub-frames. | 545 // Go through sub-frames. |
546 RefPtr<WebCore::HTMLCollection> all = current_doc->all(); | 546 RefPtr<WebCore::HTMLAllCollection> all = current_doc->all(); |
547 for (WebCore::Node* node = all->firstItem(); node != NULL; | 547 for (WebCore::Node* node = all->firstItem(); node != NULL; |
548 node = all->nextItem()) { | 548 node = all->nextItem()) { |
549 if (!node->isHTMLElement()) | 549 if (!node->isHTMLElement()) |
550 continue; | 550 continue; |
551 WebCore::Element* element = static_cast<WebCore::Element*>(node); | 551 WebCore::Element* element = static_cast<WebCore::Element*>(node); |
552 // Check frame tag and iframe tag. | 552 // Check frame tag and iframe tag. |
553 bool is_frame_element; | 553 bool is_frame_element; |
554 WebFrameImpl* web_frame = GetWebFrameImplFromElement( | 554 WebFrameImpl* web_frame = GetWebFrameImplFromElement( |
555 element, &is_frame_element); | 555 element, &is_frame_element); |
556 if (is_frame_element && web_frame) | 556 if (is_frame_element && web_frame) |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 // We have done call frames, so we send message to embedder to tell it that | 613 // We have done call frames, so we send message to embedder to tell it that |
614 // frames are finished serializing. | 614 // frames are finished serializing. |
615 DCHECK(data_buffer_.empty()); | 615 DCHECK(data_buffer_.empty()); |
616 delegate_->DidSerializeDataForFrame(GURL(), data_buffer_, | 616 delegate_->DidSerializeDataForFrame(GURL(), data_buffer_, |
617 DomSerializerDelegate::ALL_FRAMES_ARE_FINISHED); | 617 DomSerializerDelegate::ALL_FRAMES_ARE_FINISHED); |
618 | 618 |
619 return did_serialization; | 619 return did_serialization; |
620 } | 620 } |
621 | 621 |
622 } // namespace webkit_glue | 622 } // namespace webkit_glue |
OLD | NEW |