| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 void AppendText(StringBuilder& out, Text&) override; | 95 void AppendText(StringBuilder& out, Text&) override; |
| 96 bool ShouldIgnoreAttribute(const Element&, const Attribute&) const override; | 96 bool ShouldIgnoreAttribute(const Element&, const Attribute&) const override; |
| 97 bool ShouldIgnoreElement(const Element&) const override; | 97 bool ShouldIgnoreElement(const Element&) const override; |
| 98 void AppendElement(StringBuilder& out, const Element&, Namespaces*) override; | 98 void AppendElement(StringBuilder& out, const Element&, Namespaces*) override; |
| 99 void AppendAttribute(StringBuilder& out, | 99 void AppendAttribute(StringBuilder& out, |
| 100 const Element&, | 100 const Element&, |
| 101 const Attribute&, | 101 const Attribute&, |
| 102 Namespaces*) override; | 102 Namespaces*) override; |
| 103 void AppendStartTag(Node&, Namespaces* = nullptr) override; | 103 void AppendStartTag(Node&, Namespaces* = nullptr) override; |
| 104 void AppendEndTag(const Element&) override; | 104 void AppendEndTag(const Element&) override; |
| 105 Node* GetAuxiliaryDOMTree(const Element&, Element**) const override; |
| 105 | 106 |
| 106 private: | 107 private: |
| 107 void AppendAttributeValue(StringBuilder& out, const String& attribute_value); | 108 void AppendAttributeValue(StringBuilder& out, const String& attribute_value); |
| 108 void AppendRewrittenAttribute(StringBuilder& out, | 109 void AppendRewrittenAttribute(StringBuilder& out, |
| 109 const Element&, | 110 const Element&, |
| 110 const String& attribute_name, | 111 const String& attribute_name, |
| 111 const String& attribute_value); | 112 const String& attribute_value); |
| 112 | 113 |
| 113 FrameSerializer::Delegate& delegate_; | 114 FrameSerializer::Delegate& delegate_; |
| 114 Member<const Document> document_; | 115 Member<const Document> document_; |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 void SerializerMarkupAccumulator::AppendStartTag(Node& node, | 226 void SerializerMarkupAccumulator::AppendStartTag(Node& node, |
| 226 Namespaces* namespaces) { | 227 Namespaces* namespaces) { |
| 227 MarkupAccumulator::AppendStartTag(node, namespaces); | 228 MarkupAccumulator::AppendStartTag(node, namespaces); |
| 228 nodes_.push_back(&node); | 229 nodes_.push_back(&node); |
| 229 } | 230 } |
| 230 | 231 |
| 231 void SerializerMarkupAccumulator::AppendEndTag(const Element& element) { | 232 void SerializerMarkupAccumulator::AppendEndTag(const Element& element) { |
| 232 MarkupAccumulator::AppendEndTag(element); | 233 MarkupAccumulator::AppendEndTag(element); |
| 233 } | 234 } |
| 234 | 235 |
| 236 Node* SerializerMarkupAccumulator::GetAuxiliaryDOMTree( |
| 237 const Element& element, |
| 238 Element** enclosing_element) const { |
| 239 return delegate_.GetAuxiliaryDOMTree(element, enclosing_element); |
| 240 } |
| 241 |
| 235 void SerializerMarkupAccumulator::AppendAttributeValue( | 242 void SerializerMarkupAccumulator::AppendAttributeValue( |
| 236 StringBuilder& out, | 243 StringBuilder& out, |
| 237 const String& attribute_value) { | 244 const String& attribute_value) { |
| 238 MarkupFormatter::AppendAttributeValue(out, attribute_value, | 245 MarkupFormatter::AppendAttributeValue(out, attribute_value, |
| 239 document_->IsHTMLDocument()); | 246 document_->IsHTMLDocument()); |
| 240 } | 247 } |
| 241 | 248 |
| 242 void SerializerMarkupAccumulator::AppendRewrittenAttribute( | 249 void SerializerMarkupAccumulator::AppendRewrittenAttribute( |
| 243 StringBuilder& out, | 250 StringBuilder& out, |
| 244 const Element& element, | 251 const Element& element, |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 emits_minus = ch == '-'; | 586 emits_minus = ch == '-'; |
| 580 builder.Append(ch); | 587 builder.Append(ch); |
| 581 } | 588 } |
| 582 CString escaped_url = builder.ToString().Ascii(); | 589 CString escaped_url = builder.ToString().Ascii(); |
| 583 return String::Format("saved from url=(%04d)%s", | 590 return String::Format("saved from url=(%04d)%s", |
| 584 static_cast<int>(escaped_url.length()), | 591 static_cast<int>(escaped_url.length()), |
| 585 escaped_url.data()); | 592 escaped_url.data()); |
| 586 } | 593 } |
| 587 | 594 |
| 588 } // namespace blink | 595 } // namespace blink |
| OLD | NEW |