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); |
} |
} |