Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(900)

Unified Diff: Source/core/html/ImageDocument.cpp

Issue 31063004: Have Frame::loader() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLPlugInImageElement.cpp ('k') | Source/core/html/MediaDocument.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/ImageDocument.cpp
diff --git a/Source/core/html/ImageDocument.cpp b/Source/core/html/ImageDocument.cpp
index 326fdd274bb7006bf95b3bd9c4ba8c45f1529377..31c91ee530a2d609b3dde8b0585631f073932fd5 100644
--- a/Source/core/html/ImageDocument.cpp
+++ b/Source/core/html/ImageDocument.cpp
@@ -127,7 +127,7 @@ size_t ImageDocumentParser::appendBytes(const char* data, size_t length)
Frame* frame = document()->frame();
Settings* settings = frame->settings();
- if (!frame->loader()->client()->allowImage(!settings || settings->areImagesEnabled(), document()->url()))
+ if (!frame->loader().client()->allowImage(!settings || settings->areImagesEnabled(), document()->url()))
return 0;
document()->cachedImage()->appendData(data, length);
@@ -140,7 +140,7 @@ void ImageDocumentParser::finish()
if (!isStopped() && document()->imageElement()) {
ImageResource* cachedImage = document()->cachedImage();
cachedImage->finish();
- cachedImage->setResponse(document()->frame()->loader()->documentLoader()->response());
+ cachedImage->setResponse(document()->frame()->loader().documentLoader()->response());
// Report the natural image size in the page title, regardless of zoom level.
// At a zoom level of 1 the image is guaranteed to have an integer size.
@@ -184,8 +184,8 @@ void ImageDocument::createDocumentStructure()
appendChild(rootElement);
rootElement->insertedByParser();
- if (frame() && frame()->loader())
- frame()->loader()->dispatchDocumentElementAvailable();
+ if (frame())
+ frame()->loader().dispatchDocumentElementAvailable();
RefPtr<HTMLHeadElement> head = HTMLHeadElement::create(*this);
RefPtr<HTMLMetaElement> meta = HTMLMetaElement::create(*this);
« no previous file with comments | « Source/core/html/HTMLPlugInImageElement.cpp ('k') | Source/core/html/MediaDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698