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

Side by Side Diff: Source/core/html/ImageDocument.cpp

Issue 1115353002: Update renderer to layoutObject in core/html. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 LocalFrame* frame = document()->frame(); 130 LocalFrame* frame = document()->frame();
131 Settings* settings = frame->settings(); 131 Settings* settings = frame->settings();
132 if (!frame->loader().client()->allowImage(!settings || settings->imagesEnabl ed(), document()->url())) 132 if (!frame->loader().client()->allowImage(!settings || settings->imagesEnabl ed(), document()->url()))
133 return; 133 return;
134 134
135 if (document()->cachedImage()) { 135 if (document()->cachedImage()) {
136 RELEASE_ASSERT(length <= std::numeric_limits<unsigned>::max()); 136 RELEASE_ASSERT(length <= std::numeric_limits<unsigned>::max());
137 document()->cachedImage()->appendData(data, length); 137 document()->cachedImage()->appendData(data, length);
138 } 138 }
139 // Make sure the image renderer gets created because we need the renderer 139 // Make sure the image layoutObject gets created because we need the layoutO bject
140 // to read the aspect ratio. See crbug.com/320244 140 // to read the aspect ratio. See crbug.com/320244
141 document()->updateLayoutTreeIfNeeded(); 141 document()->updateLayoutTreeIfNeeded();
142 document()->imageUpdated(); 142 document()->imageUpdated();
143 } 143 }
144 144
145 void ImageDocumentParser::finish() 145 void ImageDocumentParser::finish()
146 { 146 {
147 if (!isStopped() && document()->imageElement() && document()->cachedImage()) { 147 if (!isStopped() && document()->imageElement() && document()->cachedImage()) {
148 ImageResource* cachedImage = document()->cachedImage(); 148 ImageResource* cachedImage = document()->cachedImage();
149 cachedImage->finish(); 149 cachedImage->finish();
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 } 425 }
426 426
427 bool ImageEventListener::operator==(const EventListener& listener) 427 bool ImageEventListener::operator==(const EventListener& listener)
428 { 428 {
429 if (const ImageEventListener* imageEventListener = ImageEventListener::cast( &listener)) 429 if (const ImageEventListener* imageEventListener = ImageEventListener::cast( &listener))
430 return m_doc == imageEventListener->m_doc; 430 return m_doc == imageEventListener->m_doc;
431 return false; 431 return false;
432 } 432 }
433 433
434 } 434 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLTextFormControlElement.cpp ('k') | Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698