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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 Frame* frame = frameOwner->contentFrame(); | 156 Frame* frame = frameOwner->contentFrame(); |
157 if (!frame) | 157 if (!frame) |
158 return; | 158 return; |
159 | 159 |
160 KURL url = frame->document()->url(); | 160 KURL url = frame->document()->url(); |
161 if (url.isValid() && !url.isBlankURL()) | 161 if (url.isValid() && !url.isBlankURL()) |
162 return; | 162 return; |
163 | 163 |
164 // We need to give a fake location to blank frames so they can be referenced
by the serialized frame. | 164 // We need to give a fake location to blank frames so they can be referenced
by the serialized frame. |
165 url = m_serializer->urlForBlankFrame(frame); | 165 url = m_serializer->urlForBlankFrame(frame); |
166 appendAttribute(out, element, Attribute(frameOwnerURLAttributeName(*frameOwn
er), url.string()), namespaces); | 166 appendAttribute(out, element, Attribute(frameOwnerURLAttributeName(*frameOwn
er), AtomicString(url.string())), namespaces); |
167 } | 167 } |
168 | 168 |
169 void SerializerMarkupAccumulator::appendEndTag(Node* node) | 169 void SerializerMarkupAccumulator::appendEndTag(Node* node) |
170 { | 170 { |
171 if (node->isElementNode() && !shouldIgnoreElement(toElement(node))) | 171 if (node->isElementNode() && !shouldIgnoreElement(toElement(node))) |
172 MarkupAccumulator::appendEndTag(node); | 172 MarkupAccumulator::appendEndTag(node); |
173 } | 173 } |
174 | 174 |
175 PageSerializer::PageSerializer(Vector<SerializedResource>* resources) | 175 PageSerializer::PageSerializer(Vector<SerializedResource>* resources) |
176 : m_resources(resources) | 176 : m_resources(resources) |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 if (iter != m_blankFrameURLs.end()) | 376 if (iter != m_blankFrameURLs.end()) |
377 return iter->value; | 377 return iter->value; |
378 String url = "wyciwyg://frame/" + String::number(m_blankFrameCounter++); | 378 String url = "wyciwyg://frame/" + String::number(m_blankFrameCounter++); |
379 KURL fakeURL(ParsedURLString, url); | 379 KURL fakeURL(ParsedURLString, url); |
380 m_blankFrameURLs.add(frame, fakeURL); | 380 m_blankFrameURLs.add(frame, fakeURL); |
381 | 381 |
382 return fakeURL; | 382 return fakeURL; |
383 } | 383 } |
384 | 384 |
385 } | 385 } |
OLD | NEW |