| Index: third_party/WebKit/fake_gen/web/api/document.cc
|
| diff --git a/third_party/WebKit/fake_gen/web/api/document.cc b/third_party/WebKit/fake_gen/web/api/document.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..18abb8123ec075f12af7322b9b4afca904d6b862
|
| --- /dev/null
|
| +++ b/third_party/WebKit/fake_gen/web/api/document.cc
|
| @@ -0,0 +1,70 @@
|
| +// 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.
|
| +
|
| +// This file has been auto-generated by code_generator_web_module.py.
|
| +// DO NOT MODIFY!
|
| +
|
| +// This file has been generated from the Jinja2 template in
|
| +// third_party/WebKit/Source/bindings/templates/web_module_interface.h.tmpl
|
| +
|
| +// clang-format off
|
| +
|
| +#include "web/api/document.h"
|
| +
|
| +#include "core/html/HTMLScriptElement.h"
|
| +#include "core/svg/SVGScriptElement.h"
|
| +#include "core/dom/Document.h"
|
| +#include "core/dom/Element.h"
|
| +#include "core/HTMLElementTypeHelpers.h"
|
| +
|
| +namespace web {
|
| +
|
| +HTMLScriptElement* HTMLScriptElement::Create(blink::HTMLScriptElement* html_script_element) {
|
| + return html_script_element ? new HTMLScriptElement(html_script_element) : nullptr;
|
| +}
|
| +
|
| +blink::HTMLScriptElement* HTMLScriptElement::GetBlinkInstance() const {
|
| + return toHTMLScriptElement(node());
|
| +}
|
| +
|
| +HTMLScriptElement::HTMLScriptElement(blink::HTMLScriptElement* html_script_element)
|
| + : Node(html_script_element) {}
|
| +
|
| +SVGScriptElement* SVGScriptElement::Create(blink::SVGScriptElement* svg_script_element) {
|
| + return svg_script_element ? new SVGScriptElement(svg_script_element) : nullptr;
|
| +}
|
| +
|
| +blink::SVGScriptElement* SVGScriptElement::GetBlinkInstance() const {
|
| + return toSVGScriptElement(node());
|
| +}
|
| +
|
| +SVGScriptElement::SVGScriptElement(blink::SVGScriptElement* svg_script_element)
|
| + : Node(svg_script_element) {}
|
| +
|
| +
|
| +Document::Document(blink::Document* document) : Node(document) {}
|
| +
|
| +Document* Document::Create(blink::Document* document) {
|
| + return document ? new Document(document) : nullptr;
|
| +}
|
| +
|
| +// TODO(dglazkov): Logic copied from Document.cpp :(
|
| +Optional<Document::CurrentScript> Document::GetCurrentScript() const {
|
| + if (blink::Element* script = document()->currentScript()) {
|
| + if (script->isInV1ShadowTree())
|
| + return WTF::nullopt;
|
| +
|
| + if (isHTMLScriptElement(script))
|
| + return CurrentScript { HTMLScriptElement::Create(toHTMLScriptElement(script)) };
|
| + else
|
| + return CurrentScript { SVGScriptElement::Create(toSVGScriptElement(script)) };
|
| + }
|
| + return WTF::nullopt;
|
| +}
|
| +
|
| +blink::Document* Document::document() const {
|
| + return blink::toDocument(node());
|
| +}
|
| +
|
| +} // namespace web
|
|
|