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

Unified Diff: third_party/WebKit/Source/core/html/HTMLImageElement.cpp

Issue 1522253002: Revert of Align HTMLImageElement relevant mutations to spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
Index: third_party/WebKit/Source/core/html/HTMLImageElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLImageElement.cpp b/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
index b9033e31d7925222a33d1dbd16abb4df5c32aa06..6c492e273da854fdbb0747be8ecc5d36c61fde20 100644
--- a/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
@@ -269,7 +269,7 @@
if (text && text->textContent() != value)
text->setTextContent(altText());
}
- } else if (name == srcAttr || ((name == srcsetAttr || name == sizesAttr) && (value != oldValue))) {
+ } else if (name == srcAttr || name == srcsetAttr || name == sizesAttr) {
selectSourceURL(ImageLoader::UpdateIgnorePreviousError);
} else if (name == usemapAttr) {
setIsLink(!value.isNull());
@@ -399,26 +399,19 @@
// If we have been inserted from a layoutObject-less document,
// our loader may have not fetched the image, so do it now.
- if ((insertionPoint->inDocument() && !imageLoader().image()) || imageWasModified || isHTMLPictureElement(insertionPoint))
+ if ((insertionPoint->inDocument() && !imageLoader().image()) || imageWasModified)
imageLoader().updateFromElement(ImageLoader::UpdateNormal, m_referrerPolicy);
return HTMLElement::insertedInto(insertionPoint);
}
-void HTMLImageElement::removedFrom(ContainerNode* insertionPoint, Node* next)
+void HTMLImageElement::removedFrom(ContainerNode* insertionPoint)
{
if (!m_form || NodeTraversal::highestAncestorOrSelf(*m_form.get()) != NodeTraversal::highestAncestorOrSelf(*this))
resetFormOwner();
if (m_listener)
document().mediaQueryMatcher().removeViewportListener(m_listener);
- HTMLElement::removedFrom(insertionPoint, next);
-
- if (isHTMLPictureElement(insertionPoint)) {
- // This is diverging from the spec because we don't want to trigger spurious downloads of fallback images.
- // See https://github.com/ResponsiveImagesCG/picture-element/issues/274
- m_bestFitImageURL = AtomicString();
- imageLoader().updateFromElement(ImageLoader::UpdateNormal, m_referrerPolicy);
- }
+ HTMLElement::removedFrom(insertionPoint);
}
int HTMLImageElement::width()
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLImageElement.h ('k') | third_party/WebKit/Source/core/html/HTMLInputElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698