Commit 7f17692a authored by Yuki Shiino's avatar Yuki Shiino Committed by Commit Bot

bind-gen: Make web feature implementations include necessary headers

Some of Blink implementations are missing header includes about
return types.  Adds missing header include directives.

Example)

  // IDL
  TypeA foo();

  // Implementation (.h)
  TypeB* foo();  // TypeB might inherit from TypeA, but who knows?

In this case, there is no way for bindings generator to include an
appropriate header "type_b.h" because foo's return type is known as
"TypeA".  Bindings generator includes "type_a.h", but it doesn't
help handle a return value of type TypeB.

Correct implementation is either of:

  TypeA* foo();

or,

  #include "type_b.h"
  TypeB* foo();  // TypeB is known to inherit from TypeA

Bug: 839389
Change-Id: I5092b46a8579a4406a5567f68f6d4266e29eaa72
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2051797Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#740607}
parent 373c33d0
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/css/style_recalc.h" #include "third_party/blink/renderer/core/css/style_recalc.h"
#include "third_party/blink/renderer/core/dom/node.h" #include "third_party/blink/renderer/core/dom/node.h"
#include "third_party/blink/renderer/core/dom/static_node_list.h"
#include "third_party/blink/renderer/core/html/collection_type.h" #include "third_party/blink/renderer/core/html/collection_type.h"
#include "third_party/blink/renderer/platform/wtf/casting.h" #include "third_party/blink/renderer/platform/wtf/casting.h"
#include "third_party/blink/renderer/platform/wtf/vector.h" #include "third_party/blink/renderer/platform/wtf/vector.h"
...@@ -36,16 +37,15 @@ ...@@ -36,16 +37,15 @@
namespace blink { namespace blink {
class ClassCollection; class ClassCollection;
class ExceptionState;
class Element; class Element;
class ExceptionState;
class HTMLCollection; class HTMLCollection;
class NameNodeList; class NameNodeList;
template <typename NodeType>
class StaticNodeTypeList;
using StaticElementList = StaticNodeTypeList<Element>;
class RadioNodeList; class RadioNodeList;
class WhitespaceAttacher; class WhitespaceAttacher;
using StaticElementList = StaticNodeTypeList<Element>;
enum class DynamicRestyleFlags { enum class DynamicRestyleFlags {
kChildrenOrSiblingsAffectedByFocus = 1 << 0, kChildrenOrSiblingsAffectedByFocus = 1 << 0,
kChildrenOrSiblingsAffectedByHover = 1 << 1, kChildrenOrSiblingsAffectedByHover = 1 << 1,
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#define THIRD_PARTY_BLINK_RENDERER_CORE_DOM_MUTATION_RECORD_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_DOM_MUTATION_RECORD_H_
#include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/dom/static_node_list.h"
#include "third_party/blink/renderer/core/probe/async_task_id.h" #include "third_party/blink/renderer/core/probe/async_task_id.h"
#include "third_party/blink/renderer/platform/bindings/script_wrappable.h" #include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
#include "third_party/blink/renderer/platform/heap/handle.h" #include "third_party/blink/renderer/platform/heap/handle.h"
...@@ -41,8 +42,7 @@ namespace blink { ...@@ -41,8 +42,7 @@ namespace blink {
class Node; class Node;
class QualifiedName; class QualifiedName;
template <typename NodeType>
class StaticNodeTypeList;
using StaticNodeList = StaticNodeTypeList<Node>; using StaticNodeList = StaticNodeTypeList<Node>;
class CORE_EXPORT MutationRecord : public ScriptWrappable { class CORE_EXPORT MutationRecord : public ScriptWrappable {
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "third_party/blink/renderer/bindings/core/v8/file_or_usv_string_or_form_data.h" #include "third_party/blink/renderer/bindings/core/v8/file_or_usv_string_or_form_data.h"
#include "third_party/blink/renderer/core/dom/qualified_name.h" #include "third_party/blink/renderer/core/dom/qualified_name.h"
#include "third_party/blink/renderer/core/html/forms/labels_node_list.h"
#include "third_party/blink/renderer/core/html/forms/listed_element.h" #include "third_party/blink/renderer/core/html/forms/listed_element.h"
#include "third_party/blink/renderer/platform/bindings/script_wrappable.h" #include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
#include "third_party/blink/renderer/platform/wtf/casting.h" #include "third_party/blink/renderer/platform/wtf/casting.h"
...@@ -15,7 +16,6 @@ namespace blink { ...@@ -15,7 +16,6 @@ namespace blink {
class DOMTokenList; class DOMTokenList;
class HTMLElement; class HTMLElement;
class LabelsNodeList;
class ValidityStateFlags; class ValidityStateFlags;
class CORE_EXPORT ElementInternals : public ScriptWrappable, class CORE_EXPORT ElementInternals : public ScriptWrappable,
......
...@@ -32,12 +32,11 @@ ...@@ -32,12 +32,11 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_HTML_FORMS_HTML_DATA_LIST_ELEMENT_H_ #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_HTML_FORMS_HTML_DATA_LIST_ELEMENT_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_HTML_FORMS_HTML_DATA_LIST_ELEMENT_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_HTML_FORMS_HTML_DATA_LIST_ELEMENT_H_
#include "third_party/blink/renderer/core/html/forms/html_data_list_options_collection.h"
#include "third_party/blink/renderer/core/html/html_element.h" #include "third_party/blink/renderer/core/html/html_element.h"
namespace blink { namespace blink {
class HTMLDataListOptionsCollection;
class CORE_EXPORT HTMLDataListElement final : public HTMLElement { class CORE_EXPORT HTMLDataListElement final : public HTMLElement {
DEFINE_WRAPPERTYPEINFO(); DEFINE_WRAPPERTYPEINFO();
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_HTML_FORMS_LABELS_NODE_LIST_H_ #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_HTML_FORMS_LABELS_NODE_LIST_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_HTML_FORMS_LABELS_NODE_LIST_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_HTML_FORMS_LABELS_NODE_LIST_H_
#include "base/memory/scoped_refptr.h"
#include "third_party/blink/renderer/core/dom/live_node_list.h" #include "third_party/blink/renderer/core/dom/live_node_list.h"
namespace blink { namespace blink {
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/dom/element.h" #include "third_party/blink/renderer/core/dom/element.h"
#include "third_party/blink/renderer/core/html/forms/labels_node_list.h"
#include "third_party/blink/renderer/platform/text/text_direction.h" #include "third_party/blink/renderer/platform/text/text_direction.h"
#include "third_party/blink/renderer/platform/wtf/casting.h" #include "third_party/blink/renderer/platform/wtf/casting.h"
...@@ -38,7 +39,6 @@ class ExceptionState; ...@@ -38,7 +39,6 @@ class ExceptionState;
class FormAssociated; class FormAssociated;
class HTMLFormElement; class HTMLFormElement;
class KeyboardEvent; class KeyboardEvent;
class LabelsNodeList;
class StringOrTrustedScript; class StringOrTrustedScript;
class StringTreatNullAsEmptyStringOrTrustedScript; class StringTreatNullAsEmptyStringOrTrustedScript;
......
...@@ -28,13 +28,13 @@ ...@@ -28,13 +28,13 @@
#include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/html/html_element.h" #include "third_party/blink/renderer/core/html/html_element.h"
#include "third_party/blink/renderer/core/html/html_table_rows_collection.h"
namespace blink { namespace blink {
class ExceptionState; class ExceptionState;
class HTMLCollection; class HTMLCollection;
class HTMLTableCaptionElement; class HTMLTableCaptionElement;
class HTMLTableRowsCollection;
class HTMLTableSectionElement; class HTMLTableSectionElement;
class CORE_EXPORT HTMLTableElement final : public HTMLElement { class CORE_EXPORT HTMLTableElement final : public HTMLElement {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment