diff options
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/html/HTMLPictureElement.cpp')
-rw-r--r-- | chromium/third_party/WebKit/Source/core/html/HTMLPictureElement.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/chromium/third_party/WebKit/Source/core/html/HTMLPictureElement.cpp b/chromium/third_party/WebKit/Source/core/html/HTMLPictureElement.cpp new file mode 100644 index 00000000000..d5361777b0b --- /dev/null +++ b/chromium/third_party/WebKit/Source/core/html/HTMLPictureElement.cpp @@ -0,0 +1,31 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "config.h" +#include "core/html/HTMLPictureElement.h" + +#include "core/HTMLNames.h" +#include "core/dom/ElementTraversal.h" +#include "core/html/HTMLImageElement.h" + +namespace WebCore { + +using namespace HTMLNames; + +inline HTMLPictureElement::HTMLPictureElement(Document& document) + : HTMLElement(pictureTag, document) +{ + ScriptWrappable::init(this); +} + +DEFINE_NODE_FACTORY(HTMLPictureElement) + +void HTMLPictureElement::sourceOrMediaChanged() +{ + for (HTMLImageElement* imageElement = Traversal<HTMLImageElement>::firstChild(*this); imageElement; imageElement = Traversal<HTMLImageElement>::nextSibling(*imageElement)) { + imageElement->selectSourceURL(HTMLImageElement::UpdateNormal); + } +} + +} // namespace |