Commit 149b8d69 authored by Hitoshi Yoshida's avatar Hitoshi Yoshida Committed by Commit Bot

bindings: Fix build errors with new IDL dictionary

- Updates the list of generated files
- Includes v8_foo.h instead of foo.h for IDL dictionaries
- Uses hasXxxNonNull() and XxxNonNull() APIs to access a nullable
  vector properly


Bug: 839389
Change-Id: I1c8fbb1e3cadc5568c231315b58c9a20f59951ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2439999
Commit-Queue: Hitoshi Yoshida <peria@chromium.org>
Commit-Queue: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Auto-Submit: Hitoshi Yoshida <peria@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarYuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812605}
parent ca8fab0b
...@@ -227,6 +227,8 @@ generated_dictionary_sources_in_modules = [ ...@@ -227,6 +227,8 @@ generated_dictionary_sources_in_modules = [
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_credential_creation_options.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_credential_creation_options.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_credential_data.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_credential_data.cc",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_credential_data.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_credential_data.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_credential_properties_output.cc",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_credential_properties_output.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_credential_request_options.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_credential_request_options.cc",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_credential_request_options.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_credential_request_options.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_delay_options.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_delay_options.cc",
...@@ -257,8 +259,6 @@ generated_dictionary_sources_in_modules = [ ...@@ -257,8 +259,6 @@ generated_dictionary_sources_in_modules = [
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_encoded_audio_config.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_encoded_audio_config.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_encoded_video_chunk_init.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_encoded_video_chunk_init.cc",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_encoded_video_chunk_init.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_encoded_video_chunk_init.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_encoded_video_config.cc",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_encoded_video_config.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_event_source_init.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_event_source_init.cc",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_event_source_init.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_event_source_init.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_extendable_cookie_change_event_init.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_extendable_cookie_change_event_init.cc",
...@@ -357,6 +357,8 @@ generated_dictionary_sources_in_modules = [ ...@@ -357,6 +357,8 @@ generated_dictionary_sources_in_modules = [
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_pipeline_layout_descriptor.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_pipeline_layout_descriptor.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_programmable_stage_descriptor.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_programmable_stage_descriptor.cc",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_programmable_stage_descriptor.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_programmable_stage_descriptor.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_query_set_descriptor.cc",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_query_set_descriptor.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_rasterization_state_descriptor.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_rasterization_state_descriptor.cc",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_rasterization_state_descriptor.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_rasterization_state_descriptor.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_render_bundle_descriptor.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_render_bundle_descriptor.cc",
...@@ -743,6 +745,8 @@ generated_dictionary_sources_in_modules = [ ...@@ -743,6 +745,8 @@ generated_dictionary_sources_in_modules = [
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_sensor_options.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_sensor_options.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_share_data.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_share_data.cc",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_share_data.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_share_data.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_socket_options.cc",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_socket_options.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_spatial_sensor_options.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_spatial_sensor_options.cc",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_spatial_sensor_options.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_spatial_sensor_options.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_speech_recognition_error_event_init.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_speech_recognition_error_event_init.cc",
...@@ -946,10 +950,14 @@ generated_enumeration_sources_in_modules = [ ...@@ -946,10 +950,14 @@ generated_enumeration_sources_in_modules = [
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_input_step_mode.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_input_step_mode.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_load_op.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_load_op.cc",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_load_op.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_load_op.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_pipeline_statistic_name.cc",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_pipeline_statistic_name.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_power_preference.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_power_preference.cc",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_power_preference.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_power_preference.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_primitive_topology.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_primitive_topology.cc",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_primitive_topology.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_primitive_topology.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_query_type.cc",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_query_type.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_stencil_operation.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_stencil_operation.cc",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_stencil_operation.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_stencil_operation.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_store_op.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_store_op.cc",
......
...@@ -3,9 +3,10 @@ ...@@ -3,9 +3,10 @@
// found in the LICENSE file. // found in the LICENSE file.
#include "third_party/blink/renderer/core/frame/scheduling.h" #include "third_party/blink/renderer/core/frame/scheduling.h"
#include "third_party/blink/public/platform/platform.h" #include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_is_input_pending_options.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h" #include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/frame/is_input_pending_options.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h" #include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h" #include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/scheduler/main_thread/pending_user_input.h" #include "third_party/blink/renderer/platform/scheduler/main_thread/pending_user_input.h"
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "third_party/blink/renderer/bindings/core/v8/serialization/post_message_helper.h" #include "third_party/blink/renderer/bindings/core/v8/serialization/post_message_helper.h"
#include "third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h" #include "third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h"
#include "third_party/blink/renderer/bindings/core/v8/serialization/transferables.h" #include "third_party/blink/renderer/bindings/core/v8/serialization/transferables.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_post_message_options.h"
#include "third_party/blink/renderer/core/dom/events/event_target.h" #include "third_party/blink/renderer/core/dom/events/event_target.h"
#include "third_party/blink/renderer/core/events/message_event.h" #include "third_party/blink/renderer/core/events/message_event.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h" #include "third_party/blink/renderer/core/execution_context/execution_context.h"
...@@ -16,7 +17,6 @@ ...@@ -16,7 +17,6 @@
#include "third_party/blink/renderer/core/inspector/thread_debugger.h" #include "third_party/blink/renderer/core/inspector/thread_debugger.h"
#include "third_party/blink/renderer/core/messaging/blink_transferable_message.h" #include "third_party/blink/renderer/core/messaging/blink_transferable_message.h"
#include "third_party/blink/renderer/core/messaging/message_port.h" #include "third_party/blink/renderer/core/messaging/message_port.h"
#include "third_party/blink/renderer/core/messaging/post_message_options.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h" #include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h" #include "third_party/blink/renderer/platform/bindings/script_state.h"
#include "third_party/blink/renderer/platform/weborigin/security_origin.h" #include "third_party/blink/renderer/platform/weborigin/security_origin.h"
......
...@@ -8,12 +8,12 @@ ...@@ -8,12 +8,12 @@
#include "third_party/blink/public/common/browser_interface_broker_proxy.h" #include "third_party/blink/public/common/browser_interface_broker_proxy.h"
#include "third_party/blink/public/platform/task_type.h" #include "third_party/blink/public/platform/task_type.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h" #include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_socket_options.h"
#include "third_party/blink/renderer/core/dom/dom_exception.h" #include "third_party/blink/renderer/core/dom/dom_exception.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h" #include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h" #include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h" #include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/navigator.h" #include "third_party/blink/renderer/core/frame/navigator.h"
#include "third_party/blink/renderer/modules/direct_sockets/socket_options.h"
#include "third_party/blink/renderer/platform/bindings/exception_code.h" #include "third_party/blink/renderer/platform/bindings/exception_code.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h" #include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/heap/persistent.h" #include "third_party/blink/renderer/platform/heap/persistent.h"
......
...@@ -26,9 +26,9 @@ Sanitizer* Sanitizer::Create(const SanitizerConfig* config, ...@@ -26,9 +26,9 @@ Sanitizer* Sanitizer::Create(const SanitizerConfig* config,
Sanitizer::Sanitizer(const SanitizerConfig* config) Sanitizer::Sanitizer(const SanitizerConfig* config)
: config_(const_cast<SanitizerConfig*>(config)) { : config_(const_cast<SanitizerConfig*>(config)) {
// Format dropElements to uppercases. // Format dropElements to uppercases.
if (config->hasDropElements()) { if (config->hasDropElementsNonNull()) {
Vector<String> l; Vector<String> l;
for (const String& s : config->dropElements()) { for (const String& s : config->dropElementsNonNull()) {
l.push_back(s.UpperASCII()); l.push_back(s.UpperASCII());
} }
config_->setDropElements(l); config_->setDropElements(l);
...@@ -59,7 +59,7 @@ DocumentFragment* Sanitizer::sanitize(ScriptState* script_state, ...@@ -59,7 +59,7 @@ DocumentFragment* Sanitizer::sanitize(ScriptState* script_state,
fragment->ParseHTML(input, document->QuerySelector("body")); fragment->ParseHTML(input, document->QuerySelector("body"));
// Remove all the elements in the dropElements list. // Remove all the elements in the dropElements list.
if (config_->hasDropElements()) { if (config_->hasDropElementsNonNull()) {
Node* node = fragment->firstChild(); Node* node = fragment->firstChild();
while (node) { while (node) {
...@@ -73,7 +73,7 @@ DocumentFragment* Sanitizer::sanitize(ScriptState* script_state, ...@@ -73,7 +73,7 @@ DocumentFragment* Sanitizer::sanitize(ScriptState* script_state,
String node_name = node->nodeName(); String node_name = node->nodeName();
// If the current element is dropped, remove current element entirely and // If the current element is dropped, remove current element entirely and
// proceed to its next sibling. // proceed to its next sibling.
if (config_->dropElements().Contains(node_name.UpperASCII())) { if (config_->dropElementsNonNull().Contains(node_name.UpperASCII())) {
Node* tmp = node; Node* tmp = node;
node = NodeTraversal::NextSkippingChildren(*node, fragment); node = NodeTraversal::NextSkippingChildren(*node, fragment);
tmp->remove(); tmp->remove();
......
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