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

Side by Side Diff: Source/core/page/PageSerializer.cpp

Issue 715633005: Rename HTMLInputElement::imageLoader() to ensureImageLoader() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add missing part Created 6 years, 1 month 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
« no previous file with comments | « Source/core/html/forms/ImageInputType.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 if (element.isStyledElement()) 223 if (element.isStyledElement())
224 retrieveResourcesForProperties(element.inlineStyle(), document); 224 retrieveResourcesForProperties(element.inlineStyle(), document);
225 225
226 if (isHTMLImageElement(element)) { 226 if (isHTMLImageElement(element)) {
227 HTMLImageElement& imageElement = toHTMLImageElement(element); 227 HTMLImageElement& imageElement = toHTMLImageElement(element);
228 KURL url = document.completeURL(imageElement.getAttribute(HTMLNames: :srcAttr)); 228 KURL url = document.completeURL(imageElement.getAttribute(HTMLNames: :srcAttr));
229 ImageResource* cachedImage = imageElement.cachedImage(); 229 ImageResource* cachedImage = imageElement.cachedImage();
230 addImageToResources(cachedImage, imageElement.renderer(), url); 230 addImageToResources(cachedImage, imageElement.renderer(), url);
231 } else if (isHTMLInputElement(element)) { 231 } else if (isHTMLInputElement(element)) {
232 HTMLInputElement& inputElement = toHTMLInputElement(element); 232 HTMLInputElement& inputElement = toHTMLInputElement(element);
233 if (inputElement.type() == InputTypeNames::image && inputElement.has ImageLoader()) { 233 if (inputElement.type() == InputTypeNames::image && inputElement.ima geLoader()) {
234 KURL url = inputElement.src(); 234 KURL url = inputElement.src();
235 ImageResource* cachedImage = inputElement.imageLoader()->image() ; 235 ImageResource* cachedImage = inputElement.imageLoader()->image() ;
236 addImageToResources(cachedImage, inputElement.renderer(), url); 236 addImageToResources(cachedImage, inputElement.renderer(), url);
237 } 237 }
238 } else if (isHTMLLinkElement(element)) { 238 } else if (isHTMLLinkElement(element)) {
239 HTMLLinkElement& linkElement = toHTMLLinkElement(element); 239 HTMLLinkElement& linkElement = toHTMLLinkElement(element);
240 if (CSSStyleSheet* sheet = linkElement.sheet()) { 240 if (CSSStyleSheet* sheet = linkElement.sheet()) {
241 KURL url = document.completeURL(linkElement.getAttribute(HTMLNam es::hrefAttr)); 241 KURL url = document.completeURL(linkElement.getAttribute(HTMLNam es::hrefAttr));
242 serializeCSSStyleSheet(*sheet, url); 242 serializeCSSStyleSheet(*sheet, url);
243 ASSERT(m_resourceURLs.contains(url)); 243 ASSERT(m_resourceURLs.contains(url));
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 if (iter != m_blankFrameURLs.end()) 381 if (iter != m_blankFrameURLs.end())
382 return iter->value; 382 return iter->value;
383 String url = "wyciwyg://frame/" + String::number(m_blankFrameCounter++); 383 String url = "wyciwyg://frame/" + String::number(m_blankFrameCounter++);
384 KURL fakeURL(ParsedURLString, url); 384 KURL fakeURL(ParsedURLString, url);
385 m_blankFrameURLs.add(frame, fakeURL); 385 m_blankFrameURLs.add(frame, fakeURL);
386 386
387 return fakeURL; 387 return fakeURL;
388 } 388 }
389 389
390 } 390 }
OLDNEW
« no previous file with comments | « Source/core/html/forms/ImageInputType.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698