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

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

Issue 1112513005: Reload image bypassing the cache (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: japhet comments 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
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 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv ed. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv ed.
5 * Copyright (C) 2010 Google Inc. All rights reserved. 5 * Copyright (C) 2010 Google Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 } 631 }
632 632
633 float HTMLImageElement::sourceSize(Element& element) 633 float HTMLImageElement::sourceSize(Element& element)
634 { 634 {
635 String sizes = element.fastGetAttribute(sizesAttr); 635 String sizes = element.fastGetAttribute(sizesAttr);
636 if (!sizes.isNull()) 636 if (!sizes.isNull())
637 UseCounter::count(document(), UseCounter::Sizes); 637 UseCounter::count(document(), UseCounter::Sizes);
638 return SizesAttributeParser(MediaValuesDynamic::create(document()), sizes).l ength(); 638 return SizesAttributeParser(MediaValuesDynamic::create(document()), sizes).l ength();
639 } 639 }
640 640
641 void HTMLImageElement::forceReload() const
642 {
643 imageLoader().updateFromElement(ImageLoader::UpdateForcedReload);
644 }
645
641 void HTMLImageElement::selectSourceURL(ImageLoader::UpdateFromElementBehavior be havior) 646 void HTMLImageElement::selectSourceURL(ImageLoader::UpdateFromElementBehavior be havior)
642 { 647 {
643 if (!document().isActive()) 648 if (!document().isActive())
644 return; 649 return;
645 650
646 bool foundURL = false; 651 bool foundURL = false;
647 if (RuntimeEnabledFeatures::pictureEnabled()) { 652 if (RuntimeEnabledFeatures::pictureEnabled()) {
648 ImageCandidate candidate = findBestFitImageFromPictureParent(); 653 ImageCandidate candidate = findBestFitImageFromPictureParent();
649 if (!candidate.isEmpty()) { 654 if (!candidate.isEmpty()) {
650 setBestFitURLAndDPRFromImageCandidate(candidate); 655 setBestFitURLAndDPRFromImageCandidate(candidate);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 ensureUserAgentShadowRoot(); 729 ensureUserAgentShadowRoot();
725 } 730 }
726 731
727 bool HTMLImageElement::isOpaque() const 732 bool HTMLImageElement::isOpaque() const
728 { 733 {
729 Image* image = const_cast<HTMLImageElement*>(this)->imageContents(); 734 Image* image = const_cast<HTMLImageElement*>(this)->imageContents();
730 return image && image->currentFrameKnownToBeOpaque(); 735 return image && image->currentFrameKnownToBeOpaque();
731 } 736 }
732 737
733 } 738 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698