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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLObjectElement.cpp

Issue 2746343002: Phase III Step 1: Make ImageResourceContent manage its own ResourceStatus (Closed)
Patch Set: Reflect comments Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights
6 * reserved. 6 * reserved.
7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 void HTMLObjectElement::RenderFallbackContent() { 386 void HTMLObjectElement::RenderFallbackContent() {
387 if (UseFallbackContent()) 387 if (UseFallbackContent())
388 return; 388 return;
389 389
390 if (!isConnected()) 390 if (!isConnected())
391 return; 391 return;
392 392
393 // Before we give up and use fallback content, check to see if this is a MIME 393 // Before we give up and use fallback content, check to see if this is a MIME
394 // type issue. 394 // type issue.
395 if (image_loader_ && image_loader_->GetImage() && 395 if (image_loader_ && image_loader_->GetImage() &&
396 image_loader_->GetImage()->GetStatus() != ResourceStatus::kLoadError) { 396 image_loader_->GetImage()->GetContentStatus() !=
397 ResourceStatus::kLoadError) {
397 service_type_ = image_loader_->GetImage()->GetResponse().MimeType(); 398 service_type_ = image_loader_->GetImage()->GetResponse().MimeType();
398 if (!IsImageType()) { 399 if (!IsImageType()) {
399 // If we don't think we have an image type anymore, then clear the image 400 // If we don't think we have an image type anymore, then clear the image
400 // from the loader. 401 // from the loader.
401 image_loader_->SetImage(0); 402 image_loader_->SetImage(0);
402 ReattachFallbackContent(); 403 ReattachFallbackContent();
403 return; 404 return;
404 } 405 }
405 } 406 }
406 407
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 465
465 bool HTMLObjectElement::WillUseFallbackContentAtLayout() const { 466 bool HTMLObjectElement::WillUseFallbackContentAtLayout() const {
466 return !HasValidClassId() && HasFallbackContent(); 467 return !HasValidClassId() && HasFallbackContent();
467 } 468 }
468 469
469 void HTMLObjectElement::AssociateWith(HTMLFormElement* form) { 470 void HTMLObjectElement::AssociateWith(HTMLFormElement* form) {
470 AssociateByParser(form); 471 AssociateByParser(form);
471 }; 472 };
472 473
473 } // namespace blink 474 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/cssom/CSSStyleImageValue.h ('k') | third_party/WebKit/Source/core/loader/ImageLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698