| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 if (it != response.httpHeaderFields().end()) { | 449 if (it != response.httpHeaderFields().end()) { |
| 450 String content = it->value; | 450 String content = it->value; |
| 451 ASSERT(m_mainResource); | 451 ASSERT(m_mainResource); |
| 452 unsigned long identifier = mainResourceIdentifier(); | 452 unsigned long identifier = mainResourceIdentifier(); |
| 453 ASSERT(identifier); | 453 ASSERT(identifier); |
| 454 if (frameLoader()->shouldInterruptLoadForXFrameOptions(content, response
.url(), identifier)) { | 454 if (frameLoader()->shouldInterruptLoadForXFrameOptions(content, response
.url(), identifier)) { |
| 455 InspectorInstrumentation::continueAfterXFrameOptionsDenied(m_frame,
this, identifier, response); | 455 InspectorInstrumentation::continueAfterXFrameOptionsDenied(m_frame,
this, identifier, response); |
| 456 String message = "Refused to display '" + response.url().elidedStrin
g() + "' in a frame because it set 'X-Frame-Options' to '" + content + "'."; | 456 String message = "Refused to display '" + response.url().elidedStrin
g() + "' in a frame because it set 'X-Frame-Options' to '" + content + "'."; |
| 457 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::
create(SecurityMessageSource, ErrorMessageLevel, message); | 457 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::
create(SecurityMessageSource, ErrorMessageLevel, message); |
| 458 consoleMessage->setRequestIdentifier(identifier); | 458 consoleMessage->setRequestIdentifier(identifier); |
| 459 frame()->document()->addMessage(consoleMessage.release()); | 459 frame()->document()->addConsoleMessage(consoleMessage.release()); |
| 460 frame()->document()->enforceSandboxFlags(SandboxOrigin); | 460 frame()->document()->enforceSandboxFlags(SandboxOrigin); |
| 461 if (FrameOwner* owner = frame()->owner()) | 461 if (FrameOwner* owner = frame()->owner()) |
| 462 owner->dispatchLoad(); | 462 owner->dispatchLoad(); |
| 463 | 463 |
| 464 // The load event might have detached this frame. In that case, the
load will already have been cancelled during detach. | 464 // The load event might have detached this frame. In that case, the
load will already have been cancelled during detach. |
| 465 if (frameLoader()) | 465 if (frameLoader()) |
| 466 cancelMainResourceLoad(ResourceError::cancelledError(m_request.u
rl())); | 466 cancelMainResourceLoad(ResourceError::cancelledError(m_request.u
rl())); |
| 467 return; | 467 return; |
| 468 } | 468 } |
| 469 } | 469 } |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR
L() | 823 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR
L() |
| 824 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn
it& init, const String& source, Document* ownerDocument) | 824 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn
it& init, const String& source, Document* ownerDocument) |
| 825 { | 825 { |
| 826 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true); | 826 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true); |
| 827 if (!source.isNull()) | 827 if (!source.isNull()) |
| 828 m_writer->appendReplacingData(source); | 828 m_writer->appendReplacingData(source); |
| 829 endWriting(m_writer.get()); | 829 endWriting(m_writer.get()); |
| 830 } | 830 } |
| 831 | 831 |
| 832 } // namespace blink | 832 } // namespace blink |
| OLD | NEW |