| 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 | 294 |
| 295 CString frame_html = | 295 CString frame_html = |
| 296 document.Encoding().Encode(text, WTF::kEntitiesForUnencodables); | 296 document.Encoding().Encode(text, WTF::kEntitiesForUnencodables); |
| 297 resources_->push_back(SerializedResource( | 297 resources_->push_back(SerializedResource( |
| 298 url, document.SuggestedMIMEType(), | 298 url, document.SuggestedMIMEType(), |
| 299 SharedBuffer::Create(frame_html.data(), frame_html.length()))); | 299 SharedBuffer::Create(frame_html.data(), frame_html.length()))); |
| 300 } | 300 } |
| 301 | 301 |
| 302 for (Node* node : serialized_nodes) { | 302 for (Node* node : serialized_nodes) { |
| 303 ASSERT(node); | 303 ASSERT(node); |
| 304 delegate_.VisitNode(node); |
| 304 if (!node->IsElementNode()) | 305 if (!node->IsElementNode()) |
| 305 continue; | 306 continue; |
| 306 | 307 |
| 307 Element& element = ToElement(*node); | 308 Element& element = ToElement(*node); |
| 308 // We have to process in-line style as it might contain some resources | 309 // We have to process in-line style as it might contain some resources |
| 309 // (typically background images). | 310 // (typically background images). |
| 310 if (element.IsStyledElement()) { | 311 if (element.IsStyledElement()) { |
| 311 RetrieveResourcesForProperties(element.InlineStyle(), document); | 312 RetrieveResourcesForProperties(element.InlineStyle(), document); |
| 312 RetrieveResourcesForProperties(element.PresentationAttributeStyle(), | 313 RetrieveResourcesForProperties(element.PresentationAttributeStyle(), |
| 313 document); | 314 document); |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 emits_minus = ch == '-'; | 580 emits_minus = ch == '-'; |
| 580 builder.Append(ch); | 581 builder.Append(ch); |
| 581 } | 582 } |
| 582 CString escaped_url = builder.ToString().Ascii(); | 583 CString escaped_url = builder.ToString().Ascii(); |
| 583 return String::Format("saved from url=(%04d)%s", | 584 return String::Format("saved from url=(%04d)%s", |
| 584 static_cast<int>(escaped_url.length()), | 585 static_cast<int>(escaped_url.length()), |
| 585 escaped_url.data()); | 586 escaped_url.data()); |
| 586 } | 587 } |
| 587 | 588 |
| 588 } // namespace blink | 589 } // namespace blink |
| OLD | NEW |