Commit 43e45d3b authored by Hitoshi Yoshida's avatar Hitoshi Yoshida Committed by Commit Bot

Web IDL: Fix use cases of [Global] and [PrimaryGlobal]

Web IDL spec says [Global] must take an argument, and
its support for [PrimaryGlobal] was removed.
This CL updates IDL files to follow its spec, but keeps
code for [PrimaryGlobal] as-is.


Bug: 792432
Change-Id: I56bc07487a5a366aed49385140b9b57a8eeb646c
Reviewed-on: https://chromium-review.googlesource.com/c/1331093Reviewed-by: default avatarKenichi Ishibashi <bashi@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Hitoshi Yoshida <peria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607153}
parent e7316d0c
...@@ -57,7 +57,7 @@ EnforceRange ...@@ -57,7 +57,7 @@ EnforceRange
Exposed=* Exposed=*
FeaturePolicy=* FeaturePolicy=*
FlexibleArrayBufferView FlexibleArrayBufferView
Global=|* Global=*
HTMLConstructor HTMLConstructor
ImmutablePrototype ImmutablePrototype
ImplementedAs=* ImplementedAs=*
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
[Global] [Global=TestIntegerIndexedGlobal]
interface TestIntegerIndexedGlobal { interface TestIntegerIndexedGlobal {
[Custom] getter boolean (unsigned long index); [Custom] getter boolean (unsigned long index);
[Custom] setter boolean (unsigned long index, Node value); [Custom] setter boolean (unsigned long index, Node value);
......
// Copyright 2015 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.
[PrimaryGlobal]
interface TestIntegerIndexedPrimaryGlobal {
[Custom] getter boolean (unsigned long index);
[Custom] setter boolean (unsigned long index, Node value);
[Custom] deleter boolean (unsigned long index);
attribute byte length;
[Custom=(PropertyGetter,PropertyEnumerator,PropertyQuery)] getter Node (DOMString name);
[Custom] setter Node (DOMString name, Node value);
[Custom] deleter boolean (DOMString name);
void voidMethodDocument(Document document);
};
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
[ [
CheckSecurity=Receiver, CheckSecurity=Receiver,
Global Global=TestInterfaceCheckSecurity
] interface TestInterfaceCheckSecurity { ] interface TestInterfaceCheckSecurity {
readonly attribute long readonlyLongAttribute; readonly attribute long readonlyLongAttribute;
attribute long longAttribute; attribute long longAttribute;
......
// 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 from the Jinja2 template
// third_party/blink/renderer/bindings/templates/interface.h.tmpl
// by the script code_generator_v8.py.
// DO NOT MODIFY!
// clang-format off
#ifndef THIRD_PARTY_BLINK_RENDERER_BINDINGS_TESTS_RESULTS_CORE_V8_TEST_INTEGER_INDEXED_PRIMARY_GLOBAL_H_
#define THIRD_PARTY_BLINK_RENDERER_BINDINGS_TESTS_RESULTS_CORE_V8_TEST_INTEGER_INDEXED_PRIMARY_GLOBAL_H_
#include "third_party/blink/renderer/bindings/core/v8/generated_code_helper.h"
#include "third_party/blink/renderer/bindings/core/v8/native_value_traits.h"
#include "third_party/blink/renderer/bindings/core/v8/to_v8_for_core.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
#include "third_party/blink/renderer/bindings/tests/idls/core/test_integer_indexed_primary_global.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
#include "third_party/blink/renderer/platform/bindings/v8_dom_wrapper.h"
#include "third_party/blink/renderer/platform/bindings/wrapper_type_info.h"
#include "third_party/blink/renderer/platform/heap/handle.h"
namespace blink {
class V8TestIntegerIndexedPrimaryGlobal {
STATIC_ONLY(V8TestIntegerIndexedPrimaryGlobal);
public:
CORE_EXPORT static bool hasInstance(v8::Local<v8::Value>, v8::Isolate*);
static v8::Local<v8::Object> findInstanceInPrototypeChain(v8::Local<v8::Value>, v8::Isolate*);
CORE_EXPORT static v8::Local<v8::FunctionTemplate> domTemplate(v8::Isolate*, const DOMWrapperWorld&);
CORE_EXPORT static v8::Local<v8::FunctionTemplate> domTemplateForNamedPropertiesObject(v8::Isolate*, const DOMWrapperWorld&);
static TestIntegerIndexedPrimaryGlobal* ToImpl(v8::Local<v8::Object> object) {
return ToScriptWrappable(object)->ToImpl<TestIntegerIndexedPrimaryGlobal>();
}
CORE_EXPORT static TestIntegerIndexedPrimaryGlobal* ToImplWithTypeCheck(v8::Isolate*, v8::Local<v8::Value>);
CORE_EXPORT static const WrapperTypeInfo wrapperTypeInfo;
static void indexedPropertyGetterCustom(uint32_t, const v8::PropertyCallbackInfo<v8::Value>&);
static void indexedPropertySetterCustom(uint32_t, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
static void indexedPropertyDeleterCustom(uint32_t, const v8::PropertyCallbackInfo<v8::Boolean>&);
static void namedPropertyGetterCustom(const AtomicString&, const v8::PropertyCallbackInfo<v8::Value>&);
static void namedPropertySetterCustom(const AtomicString&, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
static void namedPropertyQueryCustom(const AtomicString&, const v8::PropertyCallbackInfo<v8::Integer>&);
static void namedPropertyDeleterCustom(const AtomicString&, const v8::PropertyCallbackInfo<v8::Boolean>&);
static void namedPropertyEnumeratorCustom(const v8::PropertyCallbackInfo<v8::Array>&);
static const int internalFieldCount = kV8DefaultWrapperInternalFieldCount;
// Callback functions
CORE_EXPORT static void lengthAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>&);
CORE_EXPORT static void lengthAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>&);
CORE_EXPORT static void voidMethodDocumentMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&);
CORE_EXPORT static void namedPropertyGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&);
CORE_EXPORT static void namedPropertySetterCallback(v8::Local<v8::Name>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
CORE_EXPORT static void namedPropertyDeleterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Boolean>&);
CORE_EXPORT static void namedPropertyQueryCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Integer>&);
CORE_EXPORT static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::Array>&);
CORE_EXPORT static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>&);
CORE_EXPORT static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
CORE_EXPORT static void indexedPropertyDescriptorCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>&);
CORE_EXPORT static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>&);
CORE_EXPORT static void indexedPropertyDefinerCallback(uint32_t index, const v8::PropertyDescriptor&, const v8::PropertyCallbackInfo<v8::Value>&);
static void InstallRuntimeEnabledFeaturesOnTemplate(
v8::Isolate*,
const DOMWrapperWorld&,
v8::Local<v8::FunctionTemplate> interface_template);
};
template <>
struct NativeValueTraits<TestIntegerIndexedPrimaryGlobal> : public NativeValueTraitsBase<TestIntegerIndexedPrimaryGlobal> {
CORE_EXPORT static TestIntegerIndexedPrimaryGlobal* NativeValue(v8::Isolate*, v8::Local<v8::Value>, ExceptionState&);
CORE_EXPORT static TestIntegerIndexedPrimaryGlobal* NullValue() { return nullptr; }
};
template <>
struct V8TypeOf<TestIntegerIndexedPrimaryGlobal> {
typedef V8TestIntegerIndexedPrimaryGlobal Type;
};
} // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_BINDINGS_TESTS_RESULTS_CORE_V8_TEST_INTEGER_INDEXED_PRIMARY_GLOBAL_H_
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
[ [
CheckSecurity=Receiver, CheckSecurity=Receiver,
ImplementedAs=DOMWindow, ImplementedAs=DOMWindow,
PrimaryGlobal Global=Window,
Exposed=Window
] interface Window : EventTarget { ] interface Window : EventTarget {
// the current browsing context // the current browsing context
// FIXME: The spec uses the WindowProxy type for this and many other attributes. // FIXME: The spec uses the WindowProxy type for this and many other attributes.
......
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