Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / page / PageSerializer.cpp
index 9143fdd..31781a6 100644 (file)
@@ -153,16 +153,17 @@ void SerializerMarkupAccumulator::appendCustomAttributes(StringBuilder& out, con
         return;
 
     const HTMLFrameOwnerElement& frameOwner = toHTMLFrameOwnerElement(element);
-    LocalFrame* frame = frameOwner.contentFrame();
-    if (!frame)
+    Frame* frame = frameOwner.contentFrame();
+    // FIXME: RemoteFrames not currently supported here.
+    if (!frame || !frame->isLocalFrame())
         return;
 
-    KURL url = frame->document()->url();
-    if (url.isValid() && !url.isBlankURL())
+    KURL url = toLocalFrame(frame)->document()->url();
+    if (url.isValid() && !url.protocolIsAbout())
         return;
 
     // We need to give a fake location to blank frames so they can be referenced by the serialized frame.
-    url = m_serializer->urlForBlankFrame(frame);
+    url = m_serializer->urlForBlankFrame(toLocalFrame(frame));
     appendAttribute(out, element, Attribute(frameOwnerURLAttributeName(frameOwner), AtomicString(url.string())), namespaces);
 }
 
@@ -188,7 +189,8 @@ void PageSerializer::serializeFrame(LocalFrame* frame)
     ASSERT(frame->document());
     Document& document = *frame->document();
     KURL url = document.url();
-    if (!url.isValid() || url.isBlankURL()) {
+    // FIXME: This probably wants isAboutBlankURL? to exclude other about: urls (like about:srcdoc)?
+    if (!url.isValid() || url.protocolIsAbout()) {
         // For blank frames we generate a fake URL so they can be referenced by their containing frame.
         url = urlForBlankFrame(frame);
     }