| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 // The parameter delegate specifies the pointer of interface | 74 // The parameter delegate specifies the pointer of interface |
| 75 // DomSerializerDelegate provide sink interface which can receive the | 75 // DomSerializerDelegate provide sink interface which can receive the |
| 76 // individual chunks of data to be saved. | 76 // individual chunks of data to be saved. |
| 77 WebFrameSerializerImpl( | 77 WebFrameSerializerImpl( |
| 78 WebLocalFrame*, | 78 WebLocalFrame*, |
| 79 WebFrameSerializerClient*, | 79 WebFrameSerializerClient*, |
| 80 WebFrameSerializer::LinkRewritingDelegate*); | 80 WebFrameSerializer::LinkRewritingDelegate*); |
| 81 | 81 |
| 82 private: | 82 private: |
| 83 // Specified frame which need to be serialized; | 83 // Specified frame which need to be serialized; |
| 84 RawPtrWillBeMember<WebLocalFrameImpl> m_specifiedWebLocalFrameImpl; | 84 Member<WebLocalFrameImpl> m_specifiedWebLocalFrameImpl; |
| 85 // Pointer of WebFrameSerializerClient | 85 // Pointer of WebFrameSerializerClient |
| 86 WebFrameSerializerClient* m_client; | 86 WebFrameSerializerClient* m_client; |
| 87 // Pointer of WebFrameSerializer::LinkRewritingDelegate | 87 // Pointer of WebFrameSerializer::LinkRewritingDelegate |
| 88 WebFrameSerializer::LinkRewritingDelegate* m_delegate; | 88 WebFrameSerializer::LinkRewritingDelegate* m_delegate; |
| 89 // Data buffer for saving result of serialized DOM data. | 89 // Data buffer for saving result of serialized DOM data. |
| 90 StringBuilder m_dataBuffer; | 90 StringBuilder m_dataBuffer; |
| 91 | 91 |
| 92 // Web entities conversion maps. | 92 // Web entities conversion maps. |
| 93 WebEntities m_htmlEntities; | 93 WebEntities m_htmlEntities; |
| 94 WebEntities m_xmlEntities; | 94 WebEntities m_xmlEntities; |
| 95 | 95 |
| 96 class SerializeDomParam { | 96 class SerializeDomParam { |
| 97 STACK_ALLOCATED(); | 97 STACK_ALLOCATED(); |
| 98 public: | 98 public: |
| 99 SerializeDomParam(const KURL&, const WTF::TextEncoding&, Document*); | 99 SerializeDomParam(const KURL&, const WTF::TextEncoding&, Document*); |
| 100 | 100 |
| 101 const KURL& url; | 101 const KURL& url; |
| 102 const WTF::TextEncoding& textEncoding; | 102 const WTF::TextEncoding& textEncoding; |
| 103 RawPtrWillBeMember<Document> document; | 103 Member<Document> document; |
| 104 bool isHTMLDocument; // document.isHTMLDocument() | 104 bool isHTMLDocument; // document.isHTMLDocument() |
| 105 bool haveSeenDocType; | 105 bool haveSeenDocType; |
| 106 bool haveAddedCharsetDeclaration; | 106 bool haveAddedCharsetDeclaration; |
| 107 // This meta element need to be skipped when serializing DOM. | 107 // This meta element need to be skipped when serializing DOM. |
| 108 RawPtrWillBeMember<const Element> skipMetaElement; | 108 Member<const Element> skipMetaElement; |
| 109 bool haveAddedXMLProcessingDirective; | 109 bool haveAddedXMLProcessingDirective; |
| 110 // Flag indicates whether we have added additional contents before end t
ag. | 110 // Flag indicates whether we have added additional contents before end t
ag. |
| 111 // This flag will be re-assigned in each call of function | 111 // This flag will be re-assigned in each call of function |
| 112 // PostActionAfterSerializeOpenTag and it could be changed in function | 112 // PostActionAfterSerializeOpenTag and it could be changed in function |
| 113 // PreActionBeforeSerializeEndTag if the function adds new contents into | 113 // PreActionBeforeSerializeEndTag if the function adds new contents into |
| 114 // serialization stream. | 114 // serialization stream. |
| 115 bool haveAddedContentsBeforeEnd; | 115 bool haveAddedContentsBeforeEnd; |
| 116 }; | 116 }; |
| 117 | 117 |
| 118 // Before we begin serializing open tag of a element, we give the target | 118 // Before we begin serializing open tag of a element, we give the target |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 void appendAttribute( | 178 void appendAttribute( |
| 179 StringBuilder& result, | 179 StringBuilder& result, |
| 180 bool isHTMLDocument, | 180 bool isHTMLDocument, |
| 181 const String& attrName, | 181 const String& attrName, |
| 182 const String& attrValue); | 182 const String& attrValue); |
| 183 }; | 183 }; |
| 184 | 184 |
| 185 } // namespace blink | 185 } // namespace blink |
| 186 | 186 |
| 187 #endif | 187 #endif |
| OLD | NEW |