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

Unified Diff: third_party/WebKit/Source/core/html/HTMLPictureElement.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/HTMLPictureElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLPictureElement.cpp b/third_party/WebKit/Source/core/html/HTMLPictureElement.cpp
index a3d1ab407096a5db4fccb50ae2d0045c5c861783..f71379d9380dfb70f566c90e38b603870d037655 100644
--- a/third_party/WebKit/Source/core/html/HTMLPictureElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLPictureElement.cpp
@@ -9,7 +9,6 @@
#include "core/dom/ElementTraversal.h"
#include "core/frame/UseCounter.h"
#include "core/html/HTMLImageElement.h"
-#include "core/html/HTMLSourceElement.h"
#include "core/loader/ImageLoader.h"
namespace blink {
@@ -23,19 +22,10 @@
DEFINE_NODE_FACTORY(HTMLPictureElement)
-void HTMLPictureElement::sourceOrMediaChanged(HTMLElement* sourceElement, Node* next)
+void HTMLPictureElement::sourceOrMediaChanged()
{
- bool seenSource = false;
- Node* node;
- NodeVector potentialSourceNodes;
- getChildNodes(*this, potentialSourceNodes);
-
- for (unsigned i = 0; i < potentialSourceNodes.size(); ++i) {
- node = potentialSourceNodes[i].get();
- if (sourceElement == node || (next && node == next))
- seenSource = true;
- if (isHTMLImageElement(node) && seenSource)
- toHTMLImageElement(node)->selectSourceURL(ImageLoader::UpdateNormal);
+ for (HTMLImageElement* imageElement = Traversal<HTMLImageElement>::firstChild(*this); imageElement; imageElement = Traversal<HTMLImageElement>::nextSibling(*imageElement)) {
+ imageElement->selectSourceURL(ImageLoader::UpdateNormal);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLPictureElement.h ('k') | third_party/WebKit/Source/core/html/HTMLPlugInElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698