[webkit-changes] [146168] trunk/Source/WebCore
Title: [146168] trunk/Source/WebCore Revision 146168 Author hara...@chromium.org Date 2013-03-18 18:28:02 -0700 (Mon, 18 Mar 2013) Log Message Unreviewed. Rebaselined run-bindings-tests after r146161. * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::setJSTestObjEnumAttr): (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::ConfigureV8TestObjTemplate): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (146167 => 146168) --- trunk/Source/WebCore/ChangeLog 2013-03-19 01:07:30 UTC (rev 146167) +++ trunk/Source/WebCore/ChangeLog 2013-03-19 01:28:02 UTC (rev 146168) @@ -1,3 +1,13 @@ +2013-03-18 Kentaro Hara + +Unreviewed. Rebaselined run-bindings-tests after r146161. + +* bindings/scripts/test/JS/JSTestObj.cpp: +(WebCore::setJSTestObjEnumAttr): +(WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg): +* bindings/scripts/test/V8/V8TestObj.cpp: +(WebCore::ConfigureV8TestObjTemplate): + 2013-03-18 Robert Flack [chromium] Small pixel differences in scroll bars after r145844 Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (146167 => 146168) --- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2013-03-19 01:07:30 UTC (rev 146167) +++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2013-03-19 01:28:02 UTC (rev 146168) @@ -1085,7 +1085,7 @@ UNUSED_PARAM(exec); JSTestObj* castedThis = jsCast(thisObject); TestObj* impl = static_cast(castedThis->impl()); -String string = value.isEmpty() ? String() : value.toString(exec)->value(exec); +String& string = value.isEmpty() ? String() : value.toString(exec)->value(exec); if (exec->hadException()) return; if (string != "" && string != "EnumValue1" && string != "EnumValue2" && string != "EnumValue3") @@ -1701,7 +1701,7 @@ TestObj* impl = static_cast(castedThis->impl()); if (exec->argumentCount() < 1) return throwVMError(exec, createNotEnoughArgumentsError(exec)); -const String enumArg(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec)); +const String& enumArg(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); if (enumArg != "" && enumArg != "EnumValue1" && enumArg != "EnumValue2" && enumArg != "EnumValue3") Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp (146167 => 146168) --- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp 2013-03-19 01:07:30 UTC (rev 146167) +++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp 2013-03-19 01:28:02 UTC (rev 146168) @@ -3401,7 +3401,7 @@ // Custom Signature 'methodWithEnumArg' const int methodWithEnumArgArgc = 1; -v8::Handle methodWithEnumArgArgv[methodWithEnumArgArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8TestEnumType::info) }; +v8::Handle methodWithEnumArgArgv[methodWithEnumArgArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8TestEnumType::info, worldType) }; v8::Handle methodWithEnumArgSignature = v8::Signature::New(desc, methodWithEnumArgArgc, methodWithEnumArgArgv); proto->Set(v8::String::NewSymbol("methodWithEnumArg"), v8::FunctionTemplate::New(TestObjV8Internal::methodWithEnumArgMethodCallback, v8Undefined(), methodWithEnumArgSignature)); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [146040] trunk
Title: [146040] trunk Revision 146040 Author hara...@chromium.org Date 2013-03-18 01:33:30 -0700 (Mon, 18 Mar 2013) Log Message Unreviewed, rolling out r146033. http://trac.webkit.org/changeset/146033 https://bugs.webkit.org/show_bug.cgi?id=112521 web audio tests are broken Source/WebCore: * Modules/webaudio/AudioNode.cpp: (WebCore::AudioNode::AudioNode): * Modules/webaudio/AudioNode.h: * Modules/webaudio/AudioScheduledSourceNode.h: * Modules/webaudio/ScriptProcessorNode.idl: LayoutTests: * webaudio/_javascript_audionode-expected.txt: * webaudio/_javascript_audionode.html: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/webaudio/_javascript_audionode-expected.txt trunk/LayoutTests/webaudio/_javascript_audionode.html trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/webaudio/AudioNode.cpp trunk/Source/WebCore/Modules/webaudio/AudioNode.h trunk/Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.h trunk/Source/WebCore/Modules/webaudio/ScriptProcessorNode.idl Diff Modified: trunk/LayoutTests/ChangeLog (146039 => 146040) --- trunk/LayoutTests/ChangeLog 2013-03-18 08:17:05 UTC (rev 146039) +++ trunk/LayoutTests/ChangeLog 2013-03-18 08:33:30 UTC (rev 146040) @@ -1,3 +1,14 @@ +2013-03-18 Kentaro Hara + +Unreviewed, rolling out r146033. +http://trac.webkit.org/changeset/146033 +https://bugs.webkit.org/show_bug.cgi?id=112521 + +web audio tests are broken + +* webaudio/_javascript_audionode-expected.txt: +* webaudio/_javascript_audionode.html: + 2013-03-18 Anton Muhin Update test expectations. Modified: trunk/LayoutTests/webaudio/_javascript_audionode-expected.txt (146039 => 146040) --- trunk/LayoutTests/webaudio/_javascript_audionode-expected.txt 2013-03-18 08:17:05 UTC (rev 146039) +++ trunk/LayoutTests/webaudio/_javascript_audionode-expected.txt 2013-03-18 08:33:30 UTC (rev 146040) @@ -16,7 +16,6 @@ PASS Successfully created ScriptProcessorNode with bufferSize = 8192. PASS Successfully created ScriptProcessorNode with bufferSize = 16384. PASS onaudioprocess was called with correct data. -PASS audioprocessWasCalled is true PASS successfullyParsed is true TEST COMPLETE Modified: trunk/LayoutTests/webaudio/_javascript_audionode.html (146039 => 146040) --- trunk/LayoutTests/webaudio/_javascript_audionode.html 2013-03-18 08:17:05 UTC (rev 146039) +++ trunk/LayoutTests/webaudio/_javascript_audionode.html 2013-03-18 08:33:30 UTC (rev 146040) @@ -75,31 +75,6 @@ } } -function performGCTest() { -// now test that ScriptProcessorNodes are not garbage collected -// if they are unreachable but connected to a running audio context. -var context = new webkitOfflineAudioContext(2, renderLengthInFrames, sampleRate); - -window.audioprocessWasCalled = false; - -context._oncomplete_ = function () { -shouldBeTrue('audioprocessWasCalled'); -finishJSTest(); -}; - -// add the scriptprocessor and callback in a nested function to be sure they'll -// be unreachable. -(function() { -var jsnode = context.createScriptProcessor(bufferSize, 0, 1); -jsnode._onaudioprocess_ = function() { -audioprocessWasCalled = true; -}; -jsnode.connect(context.destination); -})(); -gc(); -context.startRendering(); -} - function runTest() { if (window.testRunner) { testRunner.dumpAsText(); @@ -173,9 +148,8 @@ jsnode._onaudioprocess_ = processAudioData; bufferSource.noteOn(0); -context._oncomplete_ = performGCTest; +context._oncomplete_ = finishJSTest; context.startRendering(); - } runTest(); Modified: trunk/Source/WebCore/ChangeLog (146039 => 146040) --- trunk/Source/WebCore/ChangeLog 2013-03-18 08:17:05 UTC (rev 146039) +++ trunk/Source/WebCore/ChangeLog 2013-03-18 08:33:30 UTC (rev 146040) @@ -1,3 +1,17 @@ +2013-03-18 Kentaro Hara + +Unreviewed, rolling out r146033. +http://trac.webkit.org/changeset/146033 +https://bugs.webkit.org/show_bug.cgi?id=112521 + +web audio tests are broken + +* Modules/webaudio/AudioNode.cpp: +(WebCore::AudioNode::AudioNode): +* Modules/webaudio/AudioNode.h: +* Modules/webaudio/AudioScheduledSourceNode.h: +* Modules/webaudio/ScriptProcessorNode.idl: + 2013-03-18 Dominic Cooney A placeholder renderer should not be taken to imply the existence of a text renderer in single line text controls Modified: trunk/Source/WebCore/Modules/webaudio/AudioNode.cpp (146039 => 146040) --- trunk/Source/WebCore/Modules/webaudio/AudioNode.cpp 2013-03-18 08:17:05 UTC (rev 146039) +++ trunk/Source/WebCore/Modules/webaudio/AudioNode.cpp 2013-03-18 08:33:30 UTC (rev 146040) @@ -45,8 +45,7 @@ namespace WebCore { AudioNode::AudioNode(AudioContext* context, float sampleRate) -: ActiveDOMObject(context->scriptExecutionContext(), this) -, m_isInitialized(false) +: m_i
[webkit-changes] [145060] trunk/Source/WebCore
Title: [145060] trunk/Source/WebCore Revision 145060 Author hara...@chromium.org Date 2013-03-07 03:43:54 -0800 (Thu, 07 Mar 2013) Log Message Unreviewed. Rebaselined run-bindings-tests. * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (145059 => 145060) --- trunk/Source/WebCore/ChangeLog 2013-03-07 11:19:30 UTC (rev 145059) +++ trunk/Source/WebCore/ChangeLog 2013-03-07 11:43:54 UTC (rev 145060) @@ -1,3 +1,12 @@ +2013-03-07 Kentaro Hara + +Unreviewed. Rebaselined run-bindings-tests. + +* bindings/scripts/test/V8/V8TestInterface.cpp: +(WebCore): +* bindings/scripts/test/V8/V8TestObj.cpp: +(WebCore): + 2013-03-07 Takashi Sakamoto [Refactoring] Implement RuleCollector Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp (145059 => 145060) --- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp 2013-03-07 11:19:30 UTC (rev 145059) +++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp 2013-03-07 11:43:54 UTC (rev 145060) @@ -392,10 +392,10 @@ static const V8DOMConfiguration::BatchedConstant V8TestInterfaceConsts[] = { #if ENABLE(Condition11) || ENABLE(Condition12) -{"SUPPLEMENTALCONSTANT1", static_cast(1)}, +{"SUPPLEMENTALCONSTANT1", 1}, #endif #if ENABLE(Condition11) || ENABLE(Condition12) -{"SUPPLEMENTALCONSTANT2", static_cast(2)}, +{"SUPPLEMENTALCONSTANT2", 2}, #endif }; Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp (145059 => 145060) --- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp 2013-03-07 11:19:30 UTC (rev 145059) +++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp 2013-03-07 11:43:54 UTC (rev 145060) @@ -2988,20 +2988,20 @@ static const V8DOMConfiguration::BatchedConstant V8TestObjConsts[] = { #if ENABLE(Condition1) -{"CONDITIONAL_CONST", static_cast(0)}, +{"CONDITIONAL_CONST", 0}, #endif -{"CONST_VALUE_0", static_cast(0)}, -{"CONST_VALUE_1", static_cast(1)}, -{"CONST_VALUE_2", static_cast(2)}, -{"CONST_VALUE_4", static_cast(4)}, -{"CONST_VALUE_8", static_cast(8)}, -{"CONST_VALUE_9", static_cast(-1)}, -{"CONST_VALUE_10", static_cast("my constant string")}, -{"CONST_VALUE_11", static_cast(0x)}, -{"CONST_VALUE_12", static_cast(0x01)}, -{"CONST_VALUE_13", static_cast(0X20)}, -{"CONST_VALUE_14", static_cast(0x1abc)}, -{"CONST_JAVASCRIPT", static_cast(15)}, +{"CONST_VALUE_0", 0}, +{"CONST_VALUE_1", 1}, +{"CONST_VALUE_2", 2}, +{"CONST_VALUE_4", 4}, +{"CONST_VALUE_8", 8}, +{"CONST_VALUE_9", -1}, +{"CONST_VALUE_10", "my constant string"}, +{"CONST_VALUE_11", -1}, +{"CONST_VALUE_12", 1}, +{"CONST_VALUE_13", 0X20}, +{"CONST_VALUE_14", 6844}, +{"CONST_JAVASCRIPT", 15}, }; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [144711] trunk/Source/WebCore
Title: [144711] trunk/Source/WebCore Revision 144711 Author hara...@chromium.org Date 2013-03-04 19:40:47 -0800 (Mon, 04 Mar 2013) Log Message Unreviewd build fix after r144701. * platform/EventTracer.cpp: (WebCore::EventTracer::initialize): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/EventTracer.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (144710 => 144711) --- trunk/Source/WebCore/ChangeLog 2013-03-05 03:23:35 UTC (rev 144710) +++ trunk/Source/WebCore/ChangeLog 2013-03-05 03:40:47 UTC (rev 144711) @@ -1,3 +1,10 @@ +2013-03-04 Kentaro Hara + +Unreviewd build fix after r144701. + +* platform/EventTracer.cpp: +(WebCore::EventTracer::initialize): + 2013-03-04 Min Qin Fix some style issues in RenderLayerCompositor Modified: trunk/Source/WebCore/platform/EventTracer.cpp (144710 => 144711) --- trunk/Source/WebCore/platform/EventTracer.cpp 2013-03-05 03:23:35 UTC (rev 144710) +++ trunk/Source/WebCore/platform/EventTracer.cpp 2013-03-05 03:40:47 UTC (rev 144711) @@ -35,8 +35,6 @@ void EventTracer::initialize() { -// On x86 and ARM, "*p = v" with 32 bit sizes is done atomically. -ASSERT(sizeof(TraceEventAPIAtomicWord) == 4); } const unsigned char* EventTracer::getTraceCategoryEnabledFlag(const char*) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [144707] trunk/Source/WebCore
Title: [144707] trunk/Source/WebCore Revision 144707 Author hara...@chromium.org Date 2013-03-04 18:48:49 -0800 (Mon, 04 Mar 2013) Log Message Unreviewed build fix after r144701. * platform/EventTracer.cpp: (WebCore::EventTracer::initialize): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/EventTracer.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (144706 => 144707) --- trunk/Source/WebCore/ChangeLog 2013-03-05 02:46:44 UTC (rev 144706) +++ trunk/Source/WebCore/ChangeLog 2013-03-05 02:48:49 UTC (rev 144707) @@ -1,3 +1,10 @@ +2013-03-04 Kentaro Hara + +Unreviewed build fix after r144701. + +* platform/EventTracer.cpp: +(WebCore::EventTracer::initialize): + 2013-03-04 Christian Biesinger REGRESSION (r143643): Buttons containing floats render differently Modified: trunk/Source/WebCore/platform/EventTracer.cpp (144706 => 144707) --- trunk/Source/WebCore/platform/EventTracer.cpp 2013-03-05 02:46:44 UTC (rev 144706) +++ trunk/Source/WebCore/platform/EventTracer.cpp 2013-03-05 02:48:49 UTC (rev 144707) @@ -37,7 +37,6 @@ { // On x86 and ARM, "*p = v" with 32 bit sizes is done atomically. ASSERT(sizeof(TraceEventAPIAtomicWord) == 4); -return; } const unsigned char* EventTracer::getTraceCategoryEnabledFlag(const char*) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [144701] trunk/Source
Title: [144701] trunk/Source Revision 144701 Author hara...@chromium.org Date 2013-03-04 17:42:20 -0800 (Mon, 04 Mar 2013) Log Message [chromium] Implement TRACE_EVENT macros for sampling profiling https://bugs.webkit.org/show_bug.cgi?id=110932 Reviewed by Adam Barth. We are implementing TRACE_EVENT macros for sampling profiling. It works in the following mechanism: - Chromium defines global state variables for sampling profiling. (i.e. g_trace_state0, g_trace_state1, g_trace_state2 in trace_event.h) - WebKit gets the addresses of the global state variables at the initialization step. (i.e. EventTracer::initialize()) - WebKit updates the global states by using TRACE_EVENT_SAMPLING_STATE() macros every time WebKit changes its state. (e.g. DOM attribute getters/setters/methods) - A sampling thread running in Chrome reads the global states periodically and visualizes the profiling results into about://tracing. This patch implements (1) a WebKit API to get the addresses of the global states and (2) the TRACE_EVENT_SAMPLING_STATE() macro. Source/Platform: * chromium/public/Platform.h: (Platform): (WebKit::Platform::getTraceSamplingState): Source/WebCore: No tests. The sampling profiler is not enabled in Chrome by default. I manually inserted TRACE_EVENT_SAMPLING_STATE() macros and confirmed that the sampling profiling is working as expected. * platform/EventTracer.cpp: (WebCore::EventTracer::initialize): (WebCore::EventTracer::getTraceCategoryEnabledFlag): (WebCore): * platform/EventTracer.h: (WebCore): (EventTracer): * platform/chromium/EventTracerChromium.cpp: (WebCore): (WebCore::EventTracer::initialize): * platform/chromium/TraceEvent.h: Source/WebKit/chromium: * src/WebKit.cpp: (WebKit::initializeWithoutV8): Modified Paths trunk/Source/Platform/ChangeLog trunk/Source/Platform/chromium/public/Platform.h trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/EventTracer.cpp trunk/Source/WebCore/platform/EventTracer.h trunk/Source/WebCore/platform/chromium/EventTracerChromium.cpp trunk/Source/WebCore/platform/chromium/TraceEvent.h trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/src/WebKit.cpp Diff Modified: trunk/Source/Platform/ChangeLog (144700 => 144701) --- trunk/Source/Platform/ChangeLog 2013-03-05 01:17:07 UTC (rev 144700) +++ trunk/Source/Platform/ChangeLog 2013-03-05 01:42:20 UTC (rev 144701) @@ -1,3 +1,33 @@ +2013-02-26 Kentaro Hara + +[chromium] Implement TRACE_EVENT macros for sampling profiling +https://bugs.webkit.org/show_bug.cgi?id=110932 + +Reviewed by Adam Barth. + +We are implementing TRACE_EVENT macros for sampling profiling. +It works in the following mechanism: + +- Chromium defines global state variables for sampling profiling. +(i.e. g_trace_state0, g_trace_state1, g_trace_state2 in trace_event.h) + +- WebKit gets the addresses of the global state variables at the +initialization step. (i.e. EventTracer::initialize()) + +- WebKit updates the global states by using TRACE_EVENT_SAMPLING_STATE() +macros every time WebKit changes its state. (e.g. DOM attribute +getters/setters/methods) + +- A sampling thread running in Chrome reads the global states +periodically and visualizes the profiling results into about://tracing. + +This patch implements (1) a WebKit API to get the addresses of +the global states and (2) the TRACE_EVENT_SAMPLING_STATE() macro. + +* chromium/public/Platform.h: +(Platform): +(WebKit::Platform::getTraceSamplingState): + 2013-03-04 Jochen Eisinger [chromium] remove deprecated hyphenation methods from Platform Modified: trunk/Source/Platform/chromium/public/Platform.h (144700 => 144701) --- trunk/Source/Platform/chromium/public/Platform.h 2013-03-05 01:17:07 UTC (rev 144700) +++ trunk/Source/Platform/chromium/public/Platform.h 2013-03-05 01:42:20 UTC (rev 144701) @@ -377,6 +377,14 @@ // addTraceEvent is expected to be called by the trace event macros. virtual const unsigned char* getTraceCategoryEnabledFlag(const char* categoryName) { return 0; } +typedef long int TraceEventAPIAtomicWord; + +// Get a pointer to a global state of the given thread. An embedder is +// expected to update the global state as the state of the embedder changes. +// A sampling thread in the Chromium side reads the global state periodically +// and reflects the sampling profiled results into about:tracing. +virtual TraceEventAPIAtomicWord* getTraceSamplingState(const unsigned bucketName) { return 0; } + // Add a trace event to the platform tracing system. Depending on the actual // enabled state, this event may be recorded or dropped. // - phase specifies the type of event: Modified: trunk/Source/WebCore/ChangeLog (144700 => 144701) --- trunk/Source/WebCore/ChangeLog 2013-03-05 01:17:07 UTC (rev 144700) +++ trunk/So
[webkit-changes] [144594] trunk/Source/WebCore
Title: [144594] trunk/Source/WebCore Revision 144594 Author hara...@chromium.org Date 2013-03-03 17:42:53 -0800 (Sun, 03 Mar 2013) Log Message Unreviewed. Rebaselined run-bindings-tests. * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore::TestActiveDOMObjectV8Internal::indexedSecurityCheck): (TestActiveDOMObjectV8Internal): (WebCore::TestActiveDOMObjectV8Internal::namedSecurityCheck): (WebCore::ConfigureV8TestActiveDOMObjectTemplate): * bindings/scripts/test/V8/V8TestActiveDOMObject.h: (V8TestActiveDOMObject): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.h Diff Modified: trunk/Source/WebCore/ChangeLog (144593 => 144594) --- trunk/Source/WebCore/ChangeLog 2013-03-04 01:39:26 UTC (rev 144593) +++ trunk/Source/WebCore/ChangeLog 2013-03-04 01:42:53 UTC (rev 144594) @@ -1,5 +1,17 @@ 2013-03-03 Kentaro Hara +Unreviewed. Rebaselined run-bindings-tests. + +* bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: +(WebCore::TestActiveDOMObjectV8Internal::indexedSecurityCheck): +(TestActiveDOMObjectV8Internal): +(WebCore::TestActiveDOMObjectV8Internal::namedSecurityCheck): +(WebCore::ConfigureV8TestActiveDOMObjectTemplate): +* bindings/scripts/test/V8/V8TestActiveDOMObject.h: +(V8TestActiveDOMObject): + +2013-03-03 Kentaro Hara + Unreviewed build fix after r144590. * bindings/scripts/CodeGeneratorV8.pm: Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp (144593 => 144594) --- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp 2013-03-04 01:39:26 UTC (rev 144593) +++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp 2013-03-04 01:42:53 UTC (rev 144594) @@ -82,6 +82,18 @@ return TestActiveDOMObjectV8Internal::excitingAttrAttrGetter(name, info); } +bool indexedSecurityCheck(v8::Local host, uint32_t index, v8::AccessType type, v8::Local) +{ +TestActiveDOMObject* imp = V8TestActiveDOMObject::toNative(host); +return BindingSecurity::shouldAllowAccessToFrame(BindingState::instance(), imp->frame(), DoNotReportSecurityError); +} + +bool namedSecurityCheck(v8::Local host, v8::Local key, v8::AccessType type, v8::Local) +{ +TestActiveDOMObject* imp = V8TestActiveDOMObject::toNative(host); +return BindingSecurity::shouldAllowAccessToFrame(BindingState::instance(), imp->frame(), DoNotReportSecurityError); +} + static v8::Handle excitingFunctionMethod(const v8::Arguments& args) { if (args.Length() < 1) @@ -173,7 +185,7 @@ v8::Local proto = desc->PrototypeTemplate(); UNUSED_PARAM(instance); // In some cases, it will not be used. UNUSED_PARAM(proto); // In some cases, it will not be used. -instance->SetAccessCheckCallbacks(V8TestActiveDOMObject::namedSecurityCheck, V8TestActiveDOMObject::indexedSecurityCheck, v8::External::New(&V8TestActiveDOMObject::info)); +instance->SetAccessCheckCallbacks(TestActiveDOMObjectV8Internal::namedSecurityCheck, TestActiveDOMObjectV8Internal::indexedSecurityCheck, v8::External::New(&V8TestActiveDOMObject::info)); // Custom Signature 'excitingFunction' const int excitingFunctionArgc = 1; Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.h (144593 => 144594) --- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.h 2013-03-04 01:39:26 UTC (rev 144593) +++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.h 2013-03-04 01:42:53 UTC (rev 144594) @@ -44,8 +44,6 @@ static void derefObject(void*); static WrapperTypeInfo info; static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0; -static bool namedSecurityCheck(v8::Local host, v8::Local key, v8::AccessType, v8::Local data); -static bool indexedSecurityCheck(v8::Local host, uint32_t index, v8::AccessType, v8::Local data); static void installPerContextProperties(v8::Handle, TestActiveDOMObject*, v8::Isolate*) { } static void installPerContextPrototypeProperties(v8::Handle, v8::Isolate*) { } private: ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [144593] trunk/Source/WebCore
Title: [144593] trunk/Source/WebCore Revision 144593 Author hara...@chromium.org Date 2013-03-03 17:39:26 -0800 (Sun, 03 Mar 2013) Log Message Unreviewed build fix after r144590. * bindings/scripts/CodeGeneratorV8.pm: (GenerateSecurityCheckFunctions): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm Diff Modified: trunk/Source/WebCore/ChangeLog (144592 => 144593) --- trunk/Source/WebCore/ChangeLog 2013-03-04 01:36:32 UTC (rev 144592) +++ trunk/Source/WebCore/ChangeLog 2013-03-04 01:39:26 UTC (rev 144593) @@ -1,5 +1,12 @@ 2013-03-03 Kentaro Hara +Unreviewed build fix after r144590. + +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateSecurityCheckFunctions): + +2013-03-03 Kentaro Hara + Unreviewed build fix after r144587. * bindings/v8/V8Binding.cpp: Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (144592 => 144593) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-03-04 01:36:32 UTC (rev 144592) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-03-04 01:39:26 UTC (rev 144593) @@ -3595,7 +3595,7 @@ my $interfaceName = $interface->name; my $v8InterfaceName = "V8$interfaceName"; -push(@implContentDecls, <+push(@implContentInternals, < bool indexedSecurityCheck(v8::Local host, uint32_t index, v8::AccessType type, v8::Local) { $interfaceName* imp = ${v8InterfaceName}::toNative(host); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [144592] trunk/Source/WebCore
Title: [144592] trunk/Source/WebCore Revision 144592 Author hara...@chromium.org Date 2013-03-03 17:36:32 -0800 (Sun, 03 Mar 2013) Log Message Unreviewed build fix after r144587. * bindings/v8/V8Binding.cpp: (WebCore::toV8Context): * bindings/v8/V8MutationCallback.cpp: (WebCore::V8MutationCallback::V8MutationCallback): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/v8/V8Binding.cpp trunk/Source/WebCore/bindings/v8/V8MutationCallback.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (144591 => 144592) --- trunk/Source/WebCore/ChangeLog 2013-03-04 00:16:35 UTC (rev 144591) +++ trunk/Source/WebCore/ChangeLog 2013-03-04 01:36:32 UTC (rev 144592) @@ -1,3 +1,12 @@ +2013-03-03 Kentaro Hara + +Unreviewed build fix after r144587. + +* bindings/v8/V8Binding.cpp: +(WebCore::toV8Context): +* bindings/v8/V8MutationCallback.cpp: +(WebCore::V8MutationCallback::V8MutationCallback): + 2013-03-01 Kentaro Hara [V8] HTMLDocument.all should have [Replaceable] Modified: trunk/Source/WebCore/bindings/v8/V8Binding.cpp (144591 => 144592) --- trunk/Source/WebCore/bindings/v8/V8Binding.cpp 2013-03-04 00:16:35 UTC (rev 144591) +++ trunk/Source/WebCore/bindings/v8/V8Binding.cpp 2013-03-04 01:36:32 UTC (rev 144592) @@ -271,7 +271,7 @@ if (context->isDocument()) { if (Frame* frame = static_cast(context)->frame()) { // FIXME: Store the DOMWrapperWorld for the main world in the v8::Context so callers -// that are looking up their world with DOMWrapperWorld::getWorld(v8::Context::GetCurrent()) +// that are looking up their world with DOMWrapperWorld::isolatedWorld(v8::Context::GetCurrent()) // won't end up passing null here when later trying to get their v8::Context back. if (!world) return frame->script()->mainWorldContext(); Modified: trunk/Source/WebCore/bindings/v8/V8MutationCallback.cpp (144591 => 144592) --- trunk/Source/WebCore/bindings/v8/V8MutationCallback.cpp 2013-03-04 00:16:35 UTC (rev 144591) +++ trunk/Source/WebCore/bindings/v8/V8MutationCallback.cpp 2013-03-04 01:36:32 UTC (rev 144592) @@ -38,7 +38,7 @@ V8MutationCallback::V8MutationCallback(v8::Handle callback, ScriptExecutionContext* context, v8::Handle owner, v8::Isolate* isolate) : ActiveDOMCallback(context) , m_callback(callback) -, m_world(DOMWrapperWorld::getWorld(v8::Context::GetCurrent())) +, m_world(DOMWrapperWorld::isolatedWorld(v8::Context::GetCurrent())) { owner->SetHiddenValue(V8HiddenPropertyName::callback(), callback); m_callback.get().MakeWeak(isolate, this, &V8MutationCallback::weakCallback); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [144591] trunk/Source/WebCore
Title: [144591] trunk/Source/WebCore Revision 144591 Author hara...@chromium.org Date 2013-03-03 16:16:35 -0800 (Sun, 03 Mar 2013) Log Message [V8] HTMLDocument.all should have [Replaceable] https://bugs.webkit.org/show_bug.cgi?id=111230 Reviewed by Adam Barth. (Although HTMLDocument.all is already removed from the spec,) it is expected to behave as a [Replaceable] attribute. By adding a [Replaceable] IDL attribute, we can remove custom implementation of HTMLDocument.all. I confimed that exactly the same code is generated for .all getter and setter. No tests. No change in behavior. * bindings/v8/custom/V8HTMLDocumentCustom.cpp: * html/HTMLDocument.idl: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp trunk/Source/WebCore/html/HTMLDocument.idl Diff Modified: trunk/Source/WebCore/ChangeLog (144590 => 144591) --- trunk/Source/WebCore/ChangeLog 2013-03-04 00:12:06 UTC (rev 144590) +++ trunk/Source/WebCore/ChangeLog 2013-03-04 00:16:35 UTC (rev 144591) @@ -1,5 +1,25 @@ 2013-03-01 Kentaro Hara +[V8] HTMLDocument.all should have [Replaceable] +https://bugs.webkit.org/show_bug.cgi?id=111230 + +Reviewed by Adam Barth. + +(Although HTMLDocument.all is already removed from the spec,) +it is expected to behave as a [Replaceable] attribute. By adding +a [Replaceable] IDL attribute, we can remove custom implementation +of HTMLDocument.all. + +I confimed that exactly the same code is generated for .all getter +and setter. + +No tests. No change in behavior. + +* bindings/v8/custom/V8HTMLDocumentCustom.cpp: +* html/HTMLDocument.idl: + +2013-03-01 Kentaro Hara + [V8] indexedSecurityCheck() and namedSecurityCheck() should be auto-generated https://bugs.webkit.org/show_bug.cgi?id=111225 Modified: trunk/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp (144590 => 144591) --- trunk/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp 2013-03-04 00:12:06 UTC (rev 144590) +++ trunk/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp 2013-03-04 00:16:35 UTC (rev 144591) @@ -138,12 +138,6 @@ return args.Holder(); } -void V8HTMLDocument::allAttrSetterCustom(v8::Local name, v8::Local value, const v8::AccessorInfo& info) -{ -// Just emulate a normal JS behaviour---install a property on this. -info.This()->ForceSet(name, value); -} - v8::Handle wrap(HTMLDocument* impl, v8::Handle creationContext, v8::Isolate* isolate) { ASSERT(impl); Modified: trunk/Source/WebCore/html/HTMLDocument.idl (144590 => 144591) --- trunk/Source/WebCore/html/HTMLDocument.idl 2013-03-04 00:12:06 UTC (rev 144590) +++ trunk/Source/WebCore/html/HTMLDocument.idl 2013-03-04 00:16:35 UTC (rev 144591) @@ -36,7 +36,7 @@ #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT // FIXME: This should eventually be available (if they are wanted) for all languages. -[JSCustomGetter, CustomSetter, Deletable] attribute HTMLAllCollection all; +[JSCustom, Replaceable, Deletable] attribute HTMLAllCollection all; #endif void clear(); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [144590] trunk/Source/WebCore
Title: [144590] trunk/Source/WebCore Revision 144590 Author hara...@chromium.org Date 2013-03-03 16:12:06 -0800 (Sun, 03 Mar 2013) Log Message [V8] indexedSecurityCheck() and namedSecurityCheck() should be auto-generated https://bugs.webkit.org/show_bug.cgi?id=111225 Reviewed by Adam Barth. indexedSecurityCheck() and namedSecurityCheck() should be auto-generated, except for DOMWindow's ones. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (GenerateImplementation): (GenerateSecurityCheckFunctions): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::V8DOMWindow::namedSecurityCheckCustom): (WebCore::V8DOMWindow::indexedSecurityCheckCustom): * bindings/v8/custom/V8HistoryCustom.cpp: * bindings/v8/custom/V8LocationCustom.cpp: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm trunk/Source/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8HistoryCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8LocationCustom.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (144589 => 144590) --- trunk/Source/WebCore/ChangeLog 2013-03-04 00:11:08 UTC (rev 144589) +++ trunk/Source/WebCore/ChangeLog 2013-03-04 00:12:06 UTC (rev 144590) @@ -1,5 +1,27 @@ 2013-03-01 Kentaro Hara +[V8] indexedSecurityCheck() and namedSecurityCheck() should be auto-generated +https://bugs.webkit.org/show_bug.cgi?id=111225 + +Reviewed by Adam Barth. + +indexedSecurityCheck() and namedSecurityCheck() should be auto-generated, +except for DOMWindow's ones. + +No tests. No change in behavior. + +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateHeader): +(GenerateImplementation): +(GenerateSecurityCheckFunctions): +* bindings/v8/custom/V8DOMWindowCustom.cpp: +(WebCore::V8DOMWindow::namedSecurityCheckCustom): +(WebCore::V8DOMWindow::indexedSecurityCheckCustom): +* bindings/v8/custom/V8HistoryCustom.cpp: +* bindings/v8/custom/V8LocationCustom.cpp: + +2013-03-01 Kentaro Hara + [V8] Rename $implContentDecls to $implContentInternals in CodeGeneratorV8.pm https://bugs.webkit.org/show_bug.cgi?id=111214 Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (144589 => 144590) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-03-04 00:11:08 UTC (rev 144589) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-03-04 00:12:06 UTC (rev 144590) @@ -449,10 +449,10 @@ GenerateHeaderCustomCall($interface); GenerateHeaderCustomInternalFieldIndices($interface); -if ($interface->extendedAttributes->{"CheckSecurity"}) { +if ($interface->name eq "DOMWindow") { push(@headerContent, <-static bool namedSecurityCheck(v8::Local host, v8::Local key, v8::AccessType, v8::Local data); -static bool indexedSecurityCheck(v8::Local host, uint32_t index, v8::AccessType, v8::Local data); +static bool namedSecurityCheckCustom(v8::Local host, v8::Local key, v8::AccessType, v8::Local data); +static bool indexedSecurityCheckCustom(v8::Local host, uint32_t index, v8::AccessType, v8::Local data); END } @@ -2781,6 +2781,10 @@ GenerateOpaqueRootForGC($interface); } +if ($interface->extendedAttributes->{"CheckSecurity"} && $interface->name ne "DOMWindow") { +GenerateSecurityCheckFunctions($interface); +} + if ($interface->extendedAttributes->{"TypedArray"}) { my $viewType = GetTypeNameOfExternalTypedArray($interface); push(@implContent, <@@ -2961,8 +2965,8 @@ push(@implContentInternals, "} // namespace ${interfaceName}V8Internal\n\n"); my $access_check = ""; -if ($interface->extendedAttributes->{"CheckSecurity"} && !($interfaceName eq "DOMWindow")) { -$access_check = "instance->SetAccessCheckCallbacks(${v8InterfaceName}::namedSecurityCheck, ${v8InterfaceName}::indexedSecurityCheck, v8::External::New(&${v8InterfaceName}::info));"; +if ($interface->extendedAttributes->{"CheckSecurity"} && $interfaceName ne "DOMWindow") { +$access_check = "instance->SetAccessCheckCallbacks(${interfaceName}V8Internal::namedSecurityCheck, ${interfaceName}V8Internal::indexedSecurityCheck, v8::External::New(&${v8InterfaceName}::info));"; } # For the DOMWindow interface, generate the shadow object template @@ -2974,7 +2978,7 @@ V8DOMConfiguration::batchConfigureAttributes(templ, v8::Handle(), shadowAttrs, WTF_ARRAY_LENGTH(shadowAttrs), isolate); // Install a security handler with V8. -templ->SetAccessCheckCallbacks(V8DOMWindow::namedSecurityCheck, V8DOMWindow::indexedSecurityCheck, v8::External::New(&V8DOMWindow::info)); +templ->SetAccessCheckCallbacks(V8DOMWindow::namedSecurityCheckCustom, V8DOMWindow::indexedSecurityCheckCustom, v8::External::New(&V8DOMWindow::info)); templ->SetInternalFieldCount
[webkit-changes] [144587] trunk/Source/WebCore
Title: [144587] trunk/Source/WebCore Revision 144587 Author hara...@chromium.org Date 2013-03-03 16:05:48 -0800 (Sun, 03 Mar 2013) Log Message [V8] Rename getWorld() to isolatedWorld(), and getWorldForEnteredContext() to isolatedWorldForEnteredContext() https://bugs.webkit.org/show_bug.cgi?id=111212 Reviewed by Adam Barth. The rename I did in r142424 was wrong. Given that getWorld() returns 0 for the main world, it should be named isolatedWorld(). Similarly, given that getWorldForEnteredContext() returns 0 for the main world, it should be named isolatedWorldForEnteredContext(). No tests. No change in behavior. * bindings/v8/CustomElementHelpers.cpp: (WebCore::CustomElementHelpers::isFeatureAllowed): * bindings/v8/DOMDataStore.cpp: (WebCore::DOMDataStore::current): * bindings/v8/DOMWrapperWorld.cpp: (WebCore::DOMWrapperWorld::makeContextWeak): * bindings/v8/DOMWrapperWorld.h: (WebCore::DOMWrapperWorld::isolatedWorld): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy): (WebCore::ScriptController::currentWorldContext): * bindings/v8/V8Binding.h: (WebCore::isolatedWorldForEnteredContext): * bindings/v8/WorldContextHandle.cpp: (WebCore::WorldContextHandle::WorldContextHandle): * bindings/v8/custom/V8DocumentCustom.cpp: (WebCore::wrap): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::wrap): * bindings/v8/custom/V8SVGDocumentCustom.cpp: (WebCore::wrap): * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::V8XMLHttpRequest::constructorCustom): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/v8/CustomElementHelpers.cpp trunk/Source/WebCore/bindings/v8/DOMDataStore.cpp trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.cpp trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.h trunk/Source/WebCore/bindings/v8/ScriptController.cpp trunk/Source/WebCore/bindings/v8/V8Binding.h trunk/Source/WebCore/bindings/v8/WorldContextHandle.cpp trunk/Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8SVGDocumentCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (144586 => 144587) --- trunk/Source/WebCore/ChangeLog 2013-03-03 23:56:10 UTC (rev 144586) +++ trunk/Source/WebCore/ChangeLog 2013-03-04 00:05:48 UTC (rev 144587) @@ -1,5 +1,44 @@ 2013-03-01 Kentaro Hara +[V8] Rename getWorld() to isolatedWorld(), and getWorldForEnteredContext() to isolatedWorldForEnteredContext() +https://bugs.webkit.org/show_bug.cgi?id=111212 + +Reviewed by Adam Barth. + +The rename I did in r142424 was wrong. Given that getWorld() returns 0 +for the main world, it should be named isolatedWorld(). Similarly, +given that getWorldForEnteredContext() returns 0 for the main world, +it should be named isolatedWorldForEnteredContext(). + +No tests. No change in behavior. + +* bindings/v8/CustomElementHelpers.cpp: +(WebCore::CustomElementHelpers::isFeatureAllowed): +* bindings/v8/DOMDataStore.cpp: +(WebCore::DOMDataStore::current): +* bindings/v8/DOMWrapperWorld.cpp: +(WebCore::DOMWrapperWorld::makeContextWeak): +* bindings/v8/DOMWrapperWorld.h: +(WebCore::DOMWrapperWorld::isolatedWorld): +* bindings/v8/ScriptController.cpp: +(WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy): +(WebCore::ScriptController::currentWorldContext): +* bindings/v8/V8Binding.h: +(WebCore::isolatedWorldForEnteredContext): +* bindings/v8/WorldContextHandle.cpp: +(WebCore::WorldContextHandle::WorldContextHandle): +* bindings/v8/custom/V8DocumentCustom.cpp: +(WebCore::wrap): +* bindings/v8/custom/V8HTMLDocumentCustom.cpp: +(WebCore::wrap): +* bindings/v8/custom/V8SVGDocumentCustom.cpp: +(WebCore::wrap): +* bindings/v8/custom/V8XMLHttpRequestCustom.cpp: +(WebCore::V8XMLHttpRequest::constructorCustom): + +2013-03-01 Kentaro Hara + +<<< HEAD [V8] Move HTMLDocument::getNamedProperty() to DOMWindowShell https://bugs.webkit.org/show_bug.cgi?id=111223 @@ -17,7 +56,44 @@ (WebCore): (WebCore::getter): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: +=== +[V8] Rename getWorld() to isolatedWorld(), and getWorldForEnteredContext() to isolatedWorldForEnteredContext() +https://bugs.webkit.org/show_bug.cgi?id=111212 +Reviewed by Adam Barth. + +The rename I did in r142424 was wrong. Given that getWorld() returns 0 +for the main world, it should be named isolatedWorld(). Similarly, +given that getWorldForEnteredContext() returns 0 for the main world, +it should be named isolatedWorldForEnteredContext(). + +No tests. No ch
[webkit-changes] [144584] trunk/Source/WebCore
Title: [144584] trunk/Source/WebCore Revision 144584 Author hara...@chromium.org Date 2013-03-03 15:52:42 -0800 (Sun, 03 Mar 2013) Log Message [V8] Move HTMLDocument::getNamedProperty() to DOMWindowShell https://bugs.webkit.org/show_bug.cgi?id=111223 Reviewed by Adam Barth. HTMLDocument::getNamedProperty() is used by DOMWindowShell. It can be a static method in DOMWindowShell. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::getNamedProperty): (WebCore): (WebCore::getter): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp trunk/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (144583 => 144584) --- trunk/Source/WebCore/ChangeLog 2013-03-03 23:19:31 UTC (rev 144583) +++ trunk/Source/WebCore/ChangeLog 2013-03-03 23:52:42 UTC (rev 144584) @@ -1,3 +1,23 @@ +2013-03-01 Kentaro Hara + +[V8] Move HTMLDocument::getNamedProperty() to DOMWindowShell +https://bugs.webkit.org/show_bug.cgi?id=111223 + +Reviewed by Adam Barth. + +HTMLDocument::getNamedProperty() is used by DOMWindowShell. +It can be a static method in DOMWindowShell. + +No tests. No change in behavior. + +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateHeader): +* bindings/v8/V8DOMWindowShell.cpp: +(WebCore::getNamedProperty): +(WebCore): +(WebCore::getter): +* bindings/v8/custom/V8HTMLDocumentCustom.cpp: + 2013-03-03 Dan Bernstein Build fix after r144565. Reverted r144533. Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (144583 => 144584) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-03-03 23:19:31 UTC (rev 144583) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-03-03 23:52:42 UTC (rev 144584) @@ -392,7 +392,6 @@ if ($interfaceName eq "HTMLDocument") { push(@headerContent, < static v8::Local wrapInShadowObject(v8::Local wrapper, Node* impl, v8::Isolate*); -static v8::Handle getNamedProperty(HTMLDocument* htmlDocument, const AtomicString& key, v8::Handle creationContext, v8::Isolate*); END } Modified: trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp (144583 => 144584) --- trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp 2013-03-03 23:19:31 UTC (rev 144583) +++ trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp 2013-03-03 23:52:42 UTC (rev 144584) @@ -37,6 +37,8 @@ #include "Frame.h" #include "FrameLoader.h" #include "FrameLoaderClient.h" +#include "HTMLCollection.h" +#include "HTMLIFrameElement.h" #include "InspectorInstrumentation.h" #include "Page.h" #include "RuntimeEnabledFeatures.h" @@ -46,6 +48,7 @@ #include "V8DOMWindow.h" #include "V8Document.h" #include "V8GCForContextDispose.h" +#include "V8HTMLCollection.h" #include "V8HTMLDocument.h" #include "V8HiddenPropertyName.h" #include "V8Initializer.h" @@ -427,13 +430,32 @@ updateSecurityOrigin(); } +static v8::Handle getNamedProperty(HTMLDocument* htmlDocument, const AtomicString& key, v8::Handle creationContext, v8::Isolate* isolate) +{ +if (!htmlDocument->hasNamedItem(key.impl()) && !htmlDocument->hasExtraNamedItem(key.impl())) +return v8Undefined(); + +RefPtr items = htmlDocument->documentNamedItems(key); +if (items->isEmpty()) +return v8Undefined(); + +if (items->hasExactlyOneItem()) { +Node* node = items->item(0); +Frame* frame = 0; +if (node->hasTagName(HTMLNames::iframeTag) && (frame = static_cast(node)->contentFrame())) +return toV8(frame->document()->domWindow(), creationContext, isolate); +return toV8(node, creationContext, isolate); +} +return toV8(items.release(), creationContext, isolate); +} + static v8::Handle getter(v8::Local property, const v8::AccessorInfo& info) { // FIXME: Consider passing AtomicStringImpl directly. AtomicString name = toWebCoreAtomicString(property); HTMLDocument* htmlDocument = V8HTMLDocument::toNative(info.Holder()); ASSERT(htmlDocument); -v8::Handle result = V8HTMLDocument::getNamedProperty(htmlDocument, name, info.Holder(), info.GetIsolate()); +v8::Handle result = getNamedProperty(htmlDocument, name, info.Holder(), info.GetIsolate()); if (!result.IsEmpty()) return result; v8::Handle prototype = info.Holder()->GetPrototype(); Modified: trunk/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp (144583 => 144584) --- trunk/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp 2013-03-03 23:19:31 UTC (rev 144583) +++ trunk/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp 2013-03-03 23:52:42 UTC (rev 144584) @@ -80,27 +80,6 @@ return shadow; } -
[webkit-changes] [144563] trunk/Source/WebCore
Title: [144563] trunk/Source/WebCore Revision 144563 Author hara...@chromium.org Date 2013-03-03 00:52:17 -0800 (Sun, 03 Mar 2013) Log Message [V8] Remove TranslateParameter() from CodeGeneratorV8.pm https://bugs.webkit.org/show_bug.cgi?id=111218 Reviewed by Adam Barth. TranslateParameter() does nothing. It tries to convert TimeoutHandler to DOMString, but there is no non-custom method that uses TimeoutHandler. The only place where TimeoutHandler is used in the WebKit IDL is setTimeout() and setInterval(). However, the latest spec uses 'any' instead of TimeoutHandler. http://dev.w3.org/html5/spec-LC/timers.html Thus, this patch updates the IDL declarations of setTimeout() and setInterval() according to the spec. By this change, TimeoutHandler is gone away from the WebKit IDL. (Anyway this IDL change has no effect, because setTimeout() and setInterval() are written in custom bindings.) No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateParametersCheck): * page/DOMWindow.idl: * workers/WorkerContext.idl: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm trunk/Source/WebCore/page/DOMWindow.idl trunk/Source/WebCore/workers/WorkerContext.idl Diff Modified: trunk/Source/WebCore/ChangeLog (144562 => 144563) --- trunk/Source/WebCore/ChangeLog 2013-03-03 08:46:03 UTC (rev 144562) +++ trunk/Source/WebCore/ChangeLog 2013-03-03 08:52:17 UTC (rev 144563) @@ -1,3 +1,28 @@ +2013-03-03 Kentaro Hara + +[V8] Remove TranslateParameter() from CodeGeneratorV8.pm +https://bugs.webkit.org/show_bug.cgi?id=111218 + +Reviewed by Adam Barth. + +TranslateParameter() does nothing. It tries to convert TimeoutHandler to DOMString, +but there is no non-custom method that uses TimeoutHandler. + +The only place where TimeoutHandler is used in the WebKit IDL is setTimeout() and setInterval(). +However, the latest spec uses 'any' instead of TimeoutHandler. +http://dev.w3.org/html5/spec-LC/timers.html +Thus, this patch updates the IDL declarations of setTimeout() and setInterval() +according to the spec. By this change, TimeoutHandler is gone away from the WebKit IDL. +(Anyway this IDL change has no effect, because setTimeout() and setInterval() are written +in custom bindings.) + +No tests. No change in behavior. + +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateParametersCheck): +* page/DOMWindow.idl: +* workers/WorkerContext.idl: + 2013-03-03 James Weatherall keydown and keyup events have zero keycode for some numeric pad keys under Chromium on Linux Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (144562 => 144563) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-03-03 08:46:03 UTC (rev 144562) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-03-03 08:52:17 UTC (rev 144563) @@ -1762,7 +1762,6 @@ my %replacements = (); foreach my $parameter (@{$function->parameters}) { -TranslateParameter($parameter); my $nativeType = GetNativeTypeFromSignature($parameter, $paramIndex); # Optional arguments with [Optional] should generate an early call with fewer arguments. @@ -3935,16 +3934,6 @@ return GetNativeType($type, 1); } -sub TranslateParameter -{ -my $signature = shift; - -# The IDL uses some pseudo-types which don't really exist. -if ($signature->type eq "TimeoutHandler") { -$signature->type("DOMString"); -} -} - sub TypeCanFailConversion { my $signature = shift; Modified: trunk/Source/WebCore/page/DOMWindow.idl (144562 => 144563) --- trunk/Source/WebCore/page/DOMWindow.idl 2013-03-03 08:46:03 UTC (rev 144562) +++ trunk/Source/WebCore/page/DOMWindow.idl 2013-03-03 08:52:17 UTC (rev 144563) @@ -194,14 +194,9 @@ #endif // Timers -[Custom] long setTimeout(in [Optional=DefaultIsUndefined] TimeoutHandler handler, - in [Optional=DefaultIsUndefined] long timeout); -// [Custom] long setTimeout(in TimeoutHandler handler, in long timeout, arguments...); -// [Custom] long setTimeout(in DOMString code, in long timeout); +[Custom] long setTimeout(in any handler, in [Optional=DefaultIsUndefined] long timeout); void clearTimeout(in [Optional=DefaultIsUndefined] long handle); -[Custom] long setInterval(in TimeoutHandler handler, in long timeout); -// [Custom] long setInterval(in TimeoutHandler handler, in long timeout, arguments...); -// [Custom] long setInterval(in DOMString code, in long timeout); +[Custom] long setInterval(in any handler, in [Optional=DefaultIsUndefined] long timeout); void clearInterval(in [Optional=DefaultIsUndefined] long handle); #if defined(ENABLE_REQUEST_ANIMATION_FRAME) && ENABLE_REQUEST_ANIMATION_FRAME Modified: trunk/Source/WebCore/workers/WorkerContext.idl
[webkit-changes] [144526] trunk
Title: [144526] trunk Revision 144526 Author hara...@chromium.org Date 2013-03-01 21:18:43 -0800 (Fri, 01 Mar 2013) Log Message Style recalculation takes too long when adding whitespace text nodes https://bugs.webkit.org/show_bug.cgi?id=110786 Reviewed by Darin Adler. Source/WebCore: // This takes 216 msec. for (var i = 0; i < 1500; ++i) { document.body.appendChild(document.createTextNode('x')); document.body.appendChild(document.createElement('div')); document.body.appendChild(document.createTextNode('x')); } // But this takes 25.3 seconds. for (var i = 0; i < 1500; ++i) { document.body.appendChild(document.createTextNode(' ')); document.body.appendChild(document.createElement('div')); document.body.appendChild(document.createTextNode(' ')); } The reason is that we do not create renderers for empty text nodes and thus we are hitting the worst O(N^2) case in Node::attach(). (See FIXME in Node::attach().) This patch adds a logic to bail out the loop to avoid the O(N^2) case. Specifically, the patch bails out the loop if we encounter a text node for which we again decided not to create a renderer. This bail out is reasonable because the fact that we again decided not to create a renderer for the text node indicates that there will be no affect of the result of Text::textRendererIsNeeded() of the rest of the sibling nodes. Performance test: https://bugs.webkit.org/attachment.cgi?id=190545 Performance result in Chromium/Linux: 25.3 sec => 48 msec ! Test: perf/append-text-nodes-without-renderers.html (for performance) fast/dynamic/create-renderer-for-whitespace-only-text.html (for correctness) The loop was introduced in r29054. We have to make sure that all layout tests that were updated in r29054 pass with this patch. See http://trac.webkit.org/changeset/29054. * dom/Node.cpp: (WebCore::Node::attach): LayoutTests: * fast/html/details-nested-2-expected.txt: Sometimes anonymous blocks are left without being cleaned up (for some reason). With this patch, one anonymouse block is removed at the clean-up phase (for some reason). Anyway the new behavior is an expected behavior. * platform/chromium-mac/fast/html/details-nested-2-expected.txt: Ditto. * platform/chromium-win/fast/html/details-nested-2-expected.txt: Ditto. * platform/efl/fast/html/details-nested-2-expected.txt: Ditto. * platform/mac/fast/html/details-nested-2-expected.txt: Ditto. * platform/qt/fast/html/details-nested-2-expected.txt: Ditto. * perf/append-text-nodes-without-renderers-expected.txt: Added. For performance test. * perf/append-text-nodes-without-renderers.html: Added. Ditto. Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/fast/html/details-nested-2-expected.txt trunk/LayoutTests/platform/chromium-mac/fast/html/details-nested-2-expected.txt trunk/LayoutTests/platform/chromium-win/fast/html/details-nested-2-expected.txt trunk/LayoutTests/platform/efl/fast/html/details-nested-2-expected.txt trunk/LayoutTests/platform/mac/fast/html/details-nested-2-expected.txt trunk/LayoutTests/platform/qt/fast/html/details-nested-2-expected.txt trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/dom/Node.cpp Added Paths trunk/LayoutTests/perf/append-text-nodes-without-renderers-expected.txt trunk/LayoutTests/perf/append-text-nodes-without-renderers.html Diff Modified: trunk/LayoutTests/ChangeLog (144525 => 144526) --- trunk/LayoutTests/ChangeLog 2013-03-02 05:17:53 UTC (rev 144525) +++ trunk/LayoutTests/ChangeLog 2013-03-02 05:18:43 UTC (rev 144526) @@ -1,3 +1,21 @@ +2013-03-01 Kentaro Hara + +Style recalculation takes too long when adding whitespace text nodes +https://bugs.webkit.org/show_bug.cgi?id=110786 + +Reviewed by Darin Adler. + +* fast/html/details-nested-2-expected.txt: Sometimes anonymous blocks are left without +being cleaned up (for some reason). With this patch, one anonymouse block is removed at +the clean-up phase (for some reason). Anyway the new behavior is an expected behavior. +* platform/chromium-mac/fast/html/details-nested-2-expected.txt: Ditto. +* platform/chromium-win/fast/html/details-nested-2-expected.txt: Ditto. +* platform/efl/fast/html/details-nested-2-expected.txt: Ditto. +* platform/mac/fast/html/details-nested-2-expected.txt: Ditto. +* platform/qt/fast/html/details-nested-2-expected.txt: Ditto. +* perf/append-text-nodes-without-renderers-expected.txt: Added. For performance test. +* perf/append-text-nodes-without-renderers.html: Added. Ditto. + 2013-03-01 Jason Anderssen Move markerTextForListItem from TestRunner to Internals Modified: trunk/LayoutTests/fast/html/details-nested-2-expected.txt (144525 => 144526) --- trunk/LayoutTests/fast/html/details-nested-2-expected.txt 2013-03-02 05:17:53 UTC (rev 144525) +++ trunk/LayoutTests/fast/html/details-nested-2-expected.txt 2013-03-02 05:18:43 UTC (rev 144526) @@ -9,7 +9,6 @@ RenderText
[webkit-changes] [144381] trunk/Source/WebCore
Title: [144381] trunk/Source/WebCore Revision 144381 Author hara...@chromium.org Date 2013-02-28 15:25:38 -0800 (Thu, 28 Feb 2013) Log Message [V8] Remove the world->isMainWorld() check from minorGCPrologue() https://bugs.webkit.org/show_bug.cgi?id=14 Reviewed by Adam Barth. A couple of weeks ago, I introduced the following check to minorGCPrologue() in r142419. void minorGCPrologue() { // A minor GC can handle the main world only. DOMWrapperWorld* world = worldForEnteredContextWithoutContextCheck(); if (world && world->isMainWorld()) { MinorGCWrapperVisitor visitor(isolate); v8::V8::VisitHandlesForPartialDependence(isolate, &visitor); visitor.notifyFinished(); } } - The check makes no sense. A GC should not care about what world we are in. There is no concept of worlds in GC. - worldForEnteredContextWithoutContextCheck() returns 0 for the main world. So if a GC runs in the main world, the minor DOM GC is skipped. - worldForEnteredContextWithoutContextCheck() caused a Chromium crash (https://code.google.com/p/chromium/issues/detail?id=177587) We should remove the check. No tests. No change in behavior. * bindings/v8/DOMWrapperWorld.h: (WebCore::DOMWrapperWorld::getWorld): * bindings/v8/V8Binding.h: * bindings/v8/V8GCController.cpp: (WebCore::V8GCController::minorGCPrologue): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.h trunk/Source/WebCore/bindings/v8/V8Binding.h trunk/Source/WebCore/bindings/v8/V8GCController.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (144380 => 144381) --- trunk/Source/WebCore/ChangeLog 2013-02-28 23:24:59 UTC (rev 144380) +++ trunk/Source/WebCore/ChangeLog 2013-02-28 23:25:38 UTC (rev 144381) @@ -1,3 +1,41 @@ +2013-02-28 Kentaro Hara + +[V8] Remove the world->isMainWorld() check from minorGCPrologue() +https://bugs.webkit.org/show_bug.cgi?id=14 + +Reviewed by Adam Barth. + +A couple of weeks ago, I introduced the following check to minorGCPrologue() in r142419. + + void minorGCPrologue() { +// A minor GC can handle the main world only. +DOMWrapperWorld* world = worldForEnteredContextWithoutContextCheck(); +if (world && world->isMainWorld()) { + MinorGCWrapperVisitor visitor(isolate); + v8::V8::VisitHandlesForPartialDependence(isolate, &visitor); + visitor.notifyFinished(); +} + } + +- The check makes no sense. A GC should not care about what world we are in. +There is no concept of worlds in GC. + +- worldForEnteredContextWithoutContextCheck() returns 0 for the main world. +So if a GC runs in the main world, the minor DOM GC is skipped. + +- worldForEnteredContextWithoutContextCheck() caused a Chromium crash +(https://code.google.com/p/chromium/issues/detail?id=177587) + +We should remove the check. + +No tests. No change in behavior. + +* bindings/v8/DOMWrapperWorld.h: +(WebCore::DOMWrapperWorld::getWorld): +* bindings/v8/V8Binding.h: +* bindings/v8/V8GCController.cpp: +(WebCore::V8GCController::minorGCPrologue): + 2013-02-28 Bruno de Oliveira Abinader Create GraphicsContext3DState to aggregate state objects Modified: trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.h (144380 => 144381) --- trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.h 2013-02-28 23:24:59 UTC (rev 144380) +++ trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.h 2013-02-28 23:25:38 UTC (rev 144381) @@ -67,10 +67,6 @@ assertContextHasCorrectPrototype(context); return static_cast(context->GetAlignedPointerFromEmbedderData(v8ContextIsolatedWorld)); } -static DOMWrapperWorld* getWorldWithoutContextCheck(v8::Handle context) -{ -return static_cast(context->GetAlignedPointerFromEmbedderData(v8ContextIsolatedWorld)); -} // Associates an isolated world (see above for description) with a security // origin. XMLHttpRequest instances used in that world will be considered Modified: trunk/Source/WebCore/bindings/v8/V8Binding.h (144380 => 144381) --- trunk/Source/WebCore/bindings/v8/V8Binding.h 2013-02-28 23:24:59 UTC (rev 144380) +++ trunk/Source/WebCore/bindings/v8/V8Binding.h 2013-02-28 23:25:38 UTC (rev 144381) @@ -458,22 +458,6 @@ return DOMWrapperWorld::getWorld(context); } -// This is a slightly different version of worldForEnteredContext(). -// The difference is just that worldForEnteredContextWithoutContextCheck() -// does not call assertContextHasCorrectPrototype() (which is enabled on -// Debug builds only). Because assertContextHasCorrectPrototype() crashes -// if it is called when a current context is not completely initialized, -// you have to use worldForEnteredContextWithoutContextCheck() if you need -// to get a DOMWrapperWorld
[webkit-changes] [144322] trunk/Source/WebCore
Title: [144322] trunk/Source/WebCore Revision 144322 Author hara...@chromium.org Date 2013-02-28 10:00:51 -0800 (Thu, 28 Feb 2013) Log Message Unreviewed, rolling out r144157. http://trac.webkit.org/changeset/144157 https://bugs.webkit.org/show_bug.cgi?id=110794 It broke chromium windows build * bindings/scripts/CodeGeneratorV8.pm: (GenerateNamedConstructor): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore::V8TestNamedConstructorConstructorCallback): (WebCore::V8TestNamedConstructorConstructor::GetTemplate): * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: (WebCore::v8HTMLImageElementConstructorMethodCustom): (WebCore::V8HTMLImageElementConstructor::GetTemplate): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp trunk/Source/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (144321 => 144322) --- trunk/Source/WebCore/ChangeLog 2013-02-28 17:19:55 UTC (rev 144321) +++ trunk/Source/WebCore/ChangeLog 2013-02-28 18:00:51 UTC (rev 144322) @@ -1,3 +1,20 @@ +2013-02-28 Kentaro Hara + +Unreviewed, rolling out r144157. +http://trac.webkit.org/changeset/144157 +https://bugs.webkit.org/show_bug.cgi?id=110794 + +It broke chromium windows build + +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateNamedConstructor): +* bindings/scripts/test/V8/V8TestNamedConstructor.cpp: +(WebCore::V8TestNamedConstructorConstructorCallback): +(WebCore::V8TestNamedConstructorConstructor::GetTemplate): +* bindings/v8/custom/V8HTMLImageElementConstructor.cpp: +(WebCore::v8HTMLImageElementConstructorMethodCustom): +(WebCore::V8HTMLImageElementConstructor::GetTemplate): + 2013-02-26 David Hyatt [New Multicolumn] Rewrite the painting/stacking model to be spec compliant. Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (144321 => 144322) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-28 17:19:55 UTC (rev 144321) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-28 18:00:51 UTC (rev 144322) @@ -2157,8 +2157,11 @@ } } +my $maybeObserveFeature = GenerateFeatureObservation($function->signature->extendedAttributes->{"V8MeasureAs"}); + my @beforeArgumentList; my @afterArgumentList; + my $toActiveDOMObject = "0"; if ($codeGenerator->InheritsExtendedAttribute($interface, "ActiveDOMObject")) { $toActiveDOMObject = "${v8InterfaceName}::toActiveDOMObject"; @@ -2173,10 +2176,10 @@ push(@implContent, < WrapperTypeInfo ${v8InterfaceName}Constructor::info = { ${v8InterfaceName}Constructor::GetTemplate, ${v8InterfaceName}::derefObject, $toActiveDOMObject, $toEventTarget, 0, ${v8InterfaceName}::installPerContextPrototypeProperties, 0, WrapperTypeObjectPrototype }; -static v8::Handle namedConstructor(const v8::Arguments& args) +static v8::Handle ${v8InterfaceName}ConstructorCallback(const v8::Arguments& args) { +${maybeObserveFeature} END -push(@implContent, GenerateFeatureObservation($function->signature->extendedAttributes->{"V8MeasureAs"})); push(@implContent, GenerateConstructorHeader()); push(@implContent, < Document* document = currentDocument(BindingState::instance()); @@ -2231,18 +2234,16 @@ V8DOMWrapper::associateObjectWithWrapper(impl.release(), &${v8InterfaceName}Constructor::info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent); return wrapper; END + if ($raisesExceptions) { push(@implContent, "fail:\n"); push(@implContent, "return setDOMException(ec, args.GetIsolate());\n"); } + +push(@implContent, "}\n"); + push(@implContent, <-} -static v8::Handle namedConstructorCallback(const v8::Arguments& args) -{ -return namedConstructor(args); -} - v8::Persistent ${v8InterfaceName}Constructor::GetTemplate(v8::Isolate* isolate) { static v8::Persistent cachedTemplate; @@ -2250,7 +2251,7 @@ return cachedTemplate; v8::HandleScope scope; -v8::Local result = v8::FunctionTemplate::New(namedConstructorCallback); +v8::Local result = v8::FunctionTemplate::New(${v8InterfaceName}ConstructorCallback); v8::Local instance = result->InstanceTemplate(); instance->SetInternalFieldCount(${v8InterfaceName}::internalFieldCount); Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp (144321 => 144322) --- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp 2013-02-28 17:19:55 UTC (rev 144321) +++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp 2013-02-28 18:00:51 UTC (rev 144322) @@ -74,8 +74,9 @@ WrapperTypeInfo V8TestNamedConstructorConstructor::info = { V8TestNamedConstructorConstructor::GetTemplate, V8TestNa
[webkit-changes] [144194] trunk/Source/WebCore
Title: [144194] trunk/Source/WebCore Revision 144194 Author hara...@chromium.org Date 2013-02-27 08:42:06 -0800 (Wed, 27 Feb 2013) Log Message [V8] Generate a wrapper function for ReplaceableAttrSetter() https://bugs.webkit.org/show_bug.cgi?id=110781 Reviewed by Adam Barth. This is one of steps to insert TRACE_EVENT_STATE() macros into DOM bindings. This patch introduces an indirection function for xxxReplaceableAttrSetter(), like this: // For non-custom replaceable setters (Note: One implementation is enough for all replaceable setters in one interface.) void V8XXX:::ReplaceableAttrSetterCallback(...) { V8XXX::ReplaceableAttrSetter(...); } // For custom replaceable setters. (Note: This is treated as a normal custom setter.) void xxxAttrSetterCallback(...) { return xxxAttrSetterCustom(...); } No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateReplaceableAttrSetterCallback): (GenerateReplaceableAttrSetter): (GenerateSingleBatchedAttribute): (GenerateImplementation): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::TestObjReplaceableAttrSetterCallback): (TestObjV8Internal): (WebCore): * bindings/scripts/test/V8/V8TestTypedefs.cpp: (WebCore::TestTypedefsV8Internal::TestTypedefsReplaceableAttrSetterCallback): (TestTypedefsV8Internal): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestTypedefs.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (144193 => 144194) --- trunk/Source/WebCore/ChangeLog 2013-02-27 16:26:05 UTC (rev 144193) +++ trunk/Source/WebCore/ChangeLog 2013-02-27 16:42:06 UTC (rev 144194) @@ -1,3 +1,41 @@ +2013-02-25 Kentaro Hara + +[V8] Generate a wrapper function for ReplaceableAttrSetter() +https://bugs.webkit.org/show_bug.cgi?id=110781 + +Reviewed by Adam Barth. + +This is one of steps to insert TRACE_EVENT_STATE() macros +into DOM bindings. This patch introduces an indirection function +for xxxReplaceableAttrSetter(), like this: + +// For non-custom replaceable setters (Note: One implementation +is enough for all replaceable setters in one interface.) +void V8XXX:::ReplaceableAttrSetterCallback(...) { + V8XXX::ReplaceableAttrSetter(...); +} + +// For custom replaceable setters. (Note: This is treated as +a normal custom setter.) +void xxxAttrSetterCallback(...) { + return xxxAttrSetterCustom(...); +} + +No tests. No change in behavior. + +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateReplaceableAttrSetterCallback): +(GenerateReplaceableAttrSetter): +(GenerateSingleBatchedAttribute): +(GenerateImplementation): +* bindings/scripts/test/V8/V8TestObj.cpp: +(WebCore::TestObjV8Internal::TestObjReplaceableAttrSetterCallback): +(TestObjV8Internal): +(WebCore): +* bindings/scripts/test/V8/V8TestTypedefs.cpp: +(WebCore::TestTypedefsV8Internal::TestTypedefsReplaceableAttrSetterCallback): +(TestTypedefsV8Internal): + 2013-02-27 Allan Sandfeld Jensen [Qt] Flash objects won't load until scrolling page Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (144193 => 144194) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-27 16:26:05 UTC (rev 144193) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-27 16:42:06 UTC (rev 144194) @@ -1155,6 +1155,18 @@ push(@implContentDecls, "#endif // ${conditionalString}\n\n") if $conditionalString; } +sub GenerateReplaceableAttrSetterCallback +{ +my $interface = shift; +my $interfaceName = $interface->name; + +push(@implContentDecls, "static void ${interfaceName}ReplaceableAttrSetterCallback(v8::Local name, v8::Local value, const v8::AccessorInfo& info)\n"); +push(@implContentDecls, "{\n"); +push(@implContentDecls, GenerateFeatureObservation($interface->extendedAttributes->{"V8MeasureAs"})); +push(@implContentDecls, "return ${interfaceName}V8Internal::${interfaceName}ReplaceableAttrSetter(name, value, info);\n"); +push(@implContentDecls, "}\n\n"); +} + sub GenerateReplaceableAttrSetter { my $interface = shift; @@ -1164,8 +1176,6 @@ static void ${interfaceName}ReplaceableAttrSetter(v8::Local name, v8::Local value, const v8::AccessorInfo& info) { END -push(@implContentDecls, GenerateFeatureObservation($interface->extendedAttributes->{"V8MeasureAs"})); - if ($interface->extendedAttributes->{"CheckSecurity"}) { AddToImplIncludes("Frame.h"); push(@implContentDecls, <@@ -2339,14 +2349,14 @@ } $data = "" $getter = "${interfaceName}V8Internal::${interfaceName}ConstructorGetter"; -$setter = "${interfaceName}V8Internal::${inter
[webkit-changes] [144157] trunk/Source/WebCore
Title: [144157] trunk/Source/WebCore Revision 144157 Author hara...@chromium.org Date 2013-02-27 01:09:20 -0800 (Wed, 27 Feb 2013) Log Message [V8] Generate a wrapper function for named constructor callbacks https://bugs.webkit.org/show_bug.cgi?id=110794 Reviewed by Adam Barth. This would be the final step of generating wrapper functions. The patch generates the following wrapper function for named constructor callbacks. Handle namedConstructorCallback(...) { return namedConstructor(...); } No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateNamedConstructor): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore::namedConstructor): (WebCore::namedConstructorCallback): (WebCore): (WebCore::V8TestNamedConstructorConstructor::GetTemplate): * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: (WebCore::namedConstructor): (WebCore::namedConstructorCallback): (WebCore): (WebCore::V8HTMLImageElementConstructor::GetTemplate): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp trunk/Source/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (144156 => 144157) --- trunk/Source/WebCore/ChangeLog 2013-02-27 09:02:55 UTC (rev 144156) +++ trunk/Source/WebCore/ChangeLog 2013-02-27 09:09:20 UTC (rev 144157) @@ -1,3 +1,34 @@ +2013-02-27 Kentaro Hara + +[V8] Generate a wrapper function for named constructor callbacks +https://bugs.webkit.org/show_bug.cgi?id=110794 + +Reviewed by Adam Barth. + +This would be the final step of generating wrapper functions. +The patch generates the following wrapper function for named +constructor callbacks. + +Handle namedConstructorCallback(...) +{ +return namedConstructor(...); +} + +No tests. No change in behavior. + +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateNamedConstructor): +* bindings/scripts/test/V8/V8TestNamedConstructor.cpp: +(WebCore::namedConstructor): +(WebCore::namedConstructorCallback): +(WebCore): +(WebCore::V8TestNamedConstructorConstructor::GetTemplate): +* bindings/v8/custom/V8HTMLImageElementConstructor.cpp: +(WebCore::namedConstructor): +(WebCore::namedConstructorCallback): +(WebCore): +(WebCore::V8HTMLImageElementConstructor::GetTemplate): + 2013-02-26 Andrey Kosyakov Web Inspector: show raster tasks on Timeline Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (144156 => 144157) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-27 09:02:55 UTC (rev 144156) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-27 09:09:20 UTC (rev 144157) @@ -2147,11 +2147,8 @@ } } -my $maybeObserveFeature = GenerateFeatureObservation($function->signature->extendedAttributes->{"V8MeasureAs"}); - my @beforeArgumentList; my @afterArgumentList; - my $toActiveDOMObject = "0"; if ($codeGenerator->InheritsExtendedAttribute($interface, "ActiveDOMObject")) { $toActiveDOMObject = "${v8InterfaceName}::toActiveDOMObject"; @@ -2166,10 +2163,10 @@ push(@implContent, < WrapperTypeInfo ${v8InterfaceName}Constructor::info = { ${v8InterfaceName}Constructor::GetTemplate, ${v8InterfaceName}::derefObject, $toActiveDOMObject, $toEventTarget, 0, ${v8InterfaceName}::installPerContextPrototypeProperties, 0, WrapperTypeObjectPrototype }; -static v8::Handle ${v8InterfaceName}ConstructorCallback(const v8::Arguments& args) +static v8::Handle namedConstructor(const v8::Arguments& args) { -${maybeObserveFeature} END +push(@implContent, GenerateFeatureObservation($function->signature->extendedAttributes->{"V8MeasureAs"})); push(@implContent, GenerateConstructorHeader()); push(@implContent, < Document* document = currentDocument(BindingState::instance()); @@ -2224,16 +2221,18 @@ V8DOMWrapper::associateObjectWithWrapper(impl.release(), &${v8InterfaceName}Constructor::info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent); return wrapper; END - if ($raisesExceptions) { push(@implContent, "fail:\n"); push(@implContent, "return setDOMException(ec, args.GetIsolate());\n"); } - -push(@implContent, "}\n"); - push(@implContent, <+} +static v8::Handle namedConstructorCallback(const v8::Arguments& args) +{ +return namedConstructor(args); +} + v8::Persistent ${v8InterfaceName}Constructor::GetTemplate(v8::Isolate* isolate) { static v8::Persistent cachedTemplate; @@ -2241,7 +2240,7 @@ return cachedTemplate; v8::HandleScope scope; -v8::Local result = v8::FunctionTemplate::New(${v8InterfaceName}ConstructorCallback); +v8::Local result = v8::Func
[webkit-changes] [144142] trunk/Source/WebCore
Title: [144142] trunk/Source/WebCore Revision 144142 Author hara...@chromium.org Date 2013-02-26 21:11:04 -0800 (Tue, 26 Feb 2013) Log Message [V8] Remove Event::dataTransferAttrGetterCustom() and Event::valueAttrSetterCustom() https://bugs.webkit.org/show_bug.cgi?id=110666 Reviewed by Adam Barth. Event::dataTransferAttrGetterCustom() is not used (i.e. the custom method is not registered to V8). Event::valueAttrSetterCustom() is declared but not implemented. We can remove them. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeaderCustomCall): * bindings/v8/custom/V8EventCustom.cpp: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm trunk/Source/WebCore/bindings/v8/custom/V8EventCustom.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (144141 => 144142) --- trunk/Source/WebCore/ChangeLog 2013-02-27 05:02:14 UTC (rev 144141) +++ trunk/Source/WebCore/ChangeLog 2013-02-27 05:11:04 UTC (rev 144142) @@ -1,3 +1,21 @@ +2013-02-26 Kentaro Hara + +[V8] Remove Event::dataTransferAttrGetterCustom() and Event::valueAttrSetterCustom() +https://bugs.webkit.org/show_bug.cgi?id=110666 + +Reviewed by Adam Barth. + +Event::dataTransferAttrGetterCustom() is not used +(i.e. the custom method is not registered to V8). +Event::valueAttrSetterCustom() is declared but not +implemented. We can remove them. + +No tests. No change in behavior. + +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateHeaderCustomCall): +* bindings/v8/custom/V8EventCustom.cpp: + 2013-02-26 Dimitri Glazkov SelectorQuery should not ever use ResolvingStyle mode. Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (144141 => 144142) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-27 05:02:14 UTC (rev 144141) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-27 05:11:04 UTC (rev 144142) @@ -728,10 +728,6 @@ if ($interface->extendedAttributes->{"CustomCall"}) { push(@headerContent, "static v8::Handle callAsFunctionCallback(const v8::Arguments&);\n"); } -if ($interface->name eq "Event") { -push(@headerContent, "static v8::Handle dataTransferAttrGetterCustom(v8::Local name, const v8::AccessorInfo&);\n"); -push(@headerContent, "static void valueAttrSetterCustom(v8::Local name, v8::Local, const v8::AccessorInfo&);\n"); -} if ($interface->name eq "Location") { push(@headerContent, "static v8::Handle assignAttrGetterCustom(v8::Local name, const v8::AccessorInfo&);\n"); push(@headerContent, "static v8::Handle reloadAttrGetterCustom(v8::Local name, const v8::AccessorInfo&);\n"); Modified: trunk/Source/WebCore/bindings/v8/custom/V8EventCustom.cpp (144141 => 144142) --- trunk/Source/WebCore/bindings/v8/custom/V8EventCustom.cpp 2013-02-27 05:02:14 UTC (rev 144141) +++ trunk/Source/WebCore/bindings/v8/custom/V8EventCustom.cpp 2013-02-27 05:11:04 UTC (rev 144142) @@ -42,16 +42,6 @@ namespace WebCore { -v8::Handle V8Event::dataTransferAttrGetterCustom(v8::Local name, const v8::AccessorInfo& info) -{ -Event* event = V8Event::toNative(info.Holder()); - -if (event->isDragEvent()) -return toV8Fast(static_cast(event)->clipboard(), info, event); - -return v8::Undefined(); -} - v8::Handle V8Event::clipboardDataAttrGetterCustom(v8::Local name, const v8::AccessorInfo& info) { Event* event = V8Event::toNative(info.Holder()); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [144038] trunk/Source/WebCore
Title: [144038] trunk/Source/WebCore Revision 144038 Author hara...@chromium.org Date 2013-02-26 04:33:03 -0800 (Tue, 26 Feb 2013) Log Message [V8] Rename BatchedCallback to BatchedMethod https://bugs.webkit.org/show_bug.cgi?id=110791 Reviewed by Adam Barth. Now 'Callback' is used to refer to functions that are called back by V8. DOM methods should be referred to as 'Method's. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateImplementation): * bindings/scripts/test/V8/V8Float64Array.cpp: (WebCore): (WebCore::ConfigureV8Float64ArrayTemplate): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: (WebCore): (WebCore::ConfigureV8TestCustomNamedGetterTemplate): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore): (WebCore::ConfigureV8TestEventTargetTemplate): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore): (WebCore::ConfigureV8TestInterfaceTemplate): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore): (WebCore::ConfigureV8TestMediaQueryListListenerTemplate): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore): (WebCore::ConfigureV8TestObjTemplate): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore): (WebCore::ConfigureV8TestSerializedScriptValueInterfaceTemplate): * bindings/scripts/test/V8/V8TestTypedefs.cpp: (WebCore): (WebCore::ConfigureV8TestTypedefsTemplate): * bindings/v8/V8DOMConfiguration.cpp: (WebCore::V8DOMConfiguration::batchConfigureCallbacks): (WebCore::V8DOMConfiguration::configureTemplate): * bindings/v8/V8DOMConfiguration.h: (V8DOMConfiguration): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm trunk/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestTypedefs.cpp trunk/Source/WebCore/bindings/v8/V8DOMConfiguration.cpp trunk/Source/WebCore/bindings/v8/V8DOMConfiguration.h Diff Modified: trunk/Source/WebCore/ChangeLog (144037 => 144038) --- trunk/Source/WebCore/ChangeLog 2013-02-26 12:01:24 UTC (rev 144037) +++ trunk/Source/WebCore/ChangeLog 2013-02-26 12:33:03 UTC (rev 144038) @@ -1,3 +1,47 @@ +2013-02-26 Kentaro Hara + +[V8] Rename BatchedCallback to BatchedMethod +https://bugs.webkit.org/show_bug.cgi?id=110791 + +Reviewed by Adam Barth. + +Now 'Callback' is used to refer to functions that are called back +by V8. DOM methods should be referred to as 'Method's. + +No tests. No change in behavior. + +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateImplementation): +* bindings/scripts/test/V8/V8Float64Array.cpp: +(WebCore): +(WebCore::ConfigureV8Float64ArrayTemplate): +* bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: +(WebCore): +(WebCore::ConfigureV8TestCustomNamedGetterTemplate): +* bindings/scripts/test/V8/V8TestEventTarget.cpp: +(WebCore): +(WebCore::ConfigureV8TestEventTargetTemplate): +* bindings/scripts/test/V8/V8TestInterface.cpp: +(WebCore): +(WebCore::ConfigureV8TestInterfaceTemplate): +* bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: +(WebCore): +(WebCore::ConfigureV8TestMediaQueryListListenerTemplate): +* bindings/scripts/test/V8/V8TestObj.cpp: +(WebCore): +(WebCore::ConfigureV8TestObjTemplate): +* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: +(WebCore): +(WebCore::ConfigureV8TestSerializedScriptValueInterfaceTemplate): +* bindings/scripts/test/V8/V8TestTypedefs.cpp: +(WebCore): +(WebCore::ConfigureV8TestTypedefsTemplate): +* bindings/v8/V8DOMConfiguration.cpp: +(WebCore::V8DOMConfiguration::batchConfigureCallbacks): +(WebCore::V8DOMConfiguration::configureTemplate): +* bindings/v8/V8DOMConfiguration.h: +(V8DOMConfiguration): + 2013-02-26 Takashi Toyoshima Add User-Agent header in opening handshake headers. Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (144037 => 144038) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-26 12:01:24 UTC (rev 144037) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-26 12:33:03 UTC (rev 144038) @@ -2888,7 +2888,7 @@ next if !IsStandardFunction($interface, $function); if (!$has_callbacks) { $has_callbacks = 1; -push(@implContent, "static const V
[webkit-changes] [144022] trunk/Source/WebCore
Title: [144022] trunk/Source/WebCore Revision 144022 Author hara...@chromium.org Date 2013-02-26 01:06:12 -0800 (Tue, 26 Feb 2013) Log Message [V8] Overloaded constructors don't need header declarations https://bugs.webkit.org/show_bug.cgi?id=110799 Reviewed by Adam Barth. They are implemented as static functions in cpp files. Header declarations are not needed. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): * bindings/scripts/test/V8/V8TestOverloadedConstructors.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm trunk/Source/WebCore/bindings/scripts/test/V8/V8TestOverloadedConstructors.h Diff Modified: trunk/Source/WebCore/ChangeLog (144021 => 144022) --- trunk/Source/WebCore/ChangeLog 2013-02-26 09:04:57 UTC (rev 144021) +++ trunk/Source/WebCore/ChangeLog 2013-02-26 09:06:12 UTC (rev 144022) @@ -1,3 +1,19 @@ +2013-02-26 Kentaro Hara + +[V8] Overloaded constructors don't need header declarations +https://bugs.webkit.org/show_bug.cgi?id=110799 + +Reviewed by Adam Barth. + +They are implemented as static functions in cpp files. +Header declarations are not needed. + +No tests. No change in behavior. + +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateHeader): +* bindings/scripts/test/V8/V8TestOverloadedConstructors.h: + 2013-02-26 Sheriff Bot Unreviewed, rolling out r144016. Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (144021 => 144022) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-26 09:04:57 UTC (rev 144021) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-26 09:06:12 UTC (rev 144022) @@ -503,14 +503,6 @@ private: END -if (IsConstructable($interface) && @{$interface->constructors} > 1) { -for (my $i = 1; $i <= @{$interface->constructors}; $i++) { - push(@headerContent, < constructor${i}Callback(const v8::Arguments&); -END -} -} - my $noToV8 = $interface->extendedAttributes->{"SuppressToJSObject"}; my $noWrap = $interface->extendedAttributes->{"V8NoWrapperCache"} || $noToV8; if (!$noWrap) { Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestOverloadedConstructors.h (144021 => 144022) --- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestOverloadedConstructors.h 2013-02-26 09:04:57 UTC (rev 144021) +++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestOverloadedConstructors.h 2013-02-26 09:06:12 UTC (rev 144022) @@ -48,10 +48,6 @@ static void installPerContextProperties(v8::Handle, TestOverloadedConstructors*, v8::Isolate*) { } static void installPerContextPrototypeProperties(v8::Handle, v8::Isolate*) { } private: -static v8::Handle constructor1Callback(const v8::Arguments&); -static v8::Handle constructor2Callback(const v8::Arguments&); -static v8::Handle constructor3Callback(const v8::Arguments&); -static v8::Handle constructor4Callback(const v8::Arguments&); friend v8::Handle wrap(TestOverloadedConstructors*, v8::Handle creationContext, v8::Isolate*); static v8::Handle createWrapper(PassRefPtr, v8::Handle creationContext, v8::Isolate*); }; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [143974] trunk/Source/WebCore
Title: [143974] trunk/Source/WebCore Revision 143974 Author hara...@chromium.org Date 2013-02-25 14:21:52 -0800 (Mon, 25 Feb 2013) Log Message Unreviewed build fix after r143965. * bindings/scripts/CodeGeneratorV8.pm: (GenerateOverloadedConstructorCallback): * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp: (WebCore::TestOverloadedConstructorsV8Internal::constructor): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm trunk/Source/WebCore/bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (143973 => 143974) --- trunk/Source/WebCore/ChangeLog 2013-02-25 22:12:41 UTC (rev 143973) +++ trunk/Source/WebCore/ChangeLog 2013-02-25 22:21:52 UTC (rev 143974) @@ -1,3 +1,12 @@ +2013-02-25 Kentaro Hara + +Unreviewed build fix after r143965. + +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateOverloadedConstructorCallback): +* bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp: +(WebCore::TestOverloadedConstructorsV8Internal::constructor): + 2013-02-25 Gustavo Noronha Silva Build fix for gtk2-based library. Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (143973 => 143974) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-25 22:12:41 UTC (rev 143973) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-25 22:21:52 UTC (rev 143974) @@ -1927,7 +1927,7 @@ my ($numMandatoryParams, $parametersCheck) = GenerateFunctionParametersCheck($constructor); $leastNumMandatoryParams = $numMandatoryParams if ($numMandatoryParams < $leastNumMandatoryParams); push(@implContentDecls, "if ($parametersCheck)\n"); -push(@implContentDecls, "return $interfaceNameV8Internal::$name(args);\n"); +push(@implContentDecls, "return ${interfaceName}V8Internal::${name}(args);\n"); } if ($leastNumMandatoryParams >= 1) { push(@implContentDecls, "if (args.Length() < $leastNumMandatoryParams)\n"); Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp (143973 => 143974) --- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp 2013-02-25 22:12:41 UTC (rev 143973) +++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp 2013-02-25 22:21:52 UTC (rev 143974) @@ -122,13 +122,13 @@ static v8::Handle constructor(const v8::Arguments& args) { if ((args.Length() == 1 && (V8ArrayBuffer::HasInstance(args[0], args.GetIsolate() -return constructor1(args); +return TestOverloadedConstructorsV8Internal::constructor1(args); if ((args.Length() == 1 && (V8ArrayBufferView::HasInstance(args[0], args.GetIsolate() -return constructor2(args); +return TestOverloadedConstructorsV8Internal::constructor2(args); if ((args.Length() == 1 && (V8Blob::HasInstance(args[0], args.GetIsolate() -return constructor3(args); +return TestOverloadedConstructorsV8Internal::constructor3(args); if (args.Length() == 1) -return constructor4(args); +return TestOverloadedConstructorsV8Internal::constructor4(args); if (args.Length() < 1) return throwNotEnoughArgumentsError(args.GetIsolate()); return throwTypeError(0, args.GetIsolate()); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [143855] trunk/Source/WebCore
Title: [143855] trunk/Source/WebCore Revision 143855 Author hara...@chromium.org Date 2013-02-23 17:38:08 -0800 (Sat, 23 Feb 2013) Log Message WebCore fails to link in Chromium official build https://bugs.webkit.org/show_bug.cgi?id=110701 Reviewed by Abhishek Arya. This is a follow-up fix for r143853. In WebCore.gyp, we need to increase the shard of 'webcore_rendering' as well. No tests. No change in behavior. * WebCore.gyp/WebCore.gyp: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/WebCore.gyp/WebCore.gyp Diff Modified: trunk/Source/WebCore/ChangeLog (143854 => 143855) --- trunk/Source/WebCore/ChangeLog 2013-02-24 00:17:03 UTC (rev 143854) +++ trunk/Source/WebCore/ChangeLog 2013-02-24 01:38:08 UTC (rev 143855) @@ -1,5 +1,19 @@ 2013-02-23 Kentaro Hara +WebCore fails to link in Chromium official build +https://bugs.webkit.org/show_bug.cgi?id=110701 + +Reviewed by Abhishek Arya. + +This is a follow-up fix for r143853. In WebCore.gyp, we need to +increase the shard of 'webcore_rendering' as well. + +No tests. No change in behavior. + +* WebCore.gyp/WebCore.gyp: + +2013-02-23 Kentaro Hara + Unreviewed, rolling out r143844. http://trac.webkit.org/changeset/143844 https://bugs.webkit.org/show_bug.cgi?id=110241 Modified: trunk/Source/WebCore/WebCore.gyp/WebCore.gyp (143854 => 143855) --- trunk/Source/WebCore/WebCore.gyp/WebCore.gyp 2013-02-24 00:17:03 UTC (rev 143854) +++ trunk/Source/WebCore/WebCore.gyp/WebCore.gyp 2013-02-24 01:38:08 UTC (rev 143855) @@ -1992,6 +1992,11 @@ ['exclude', 'AllInOne\\.cpp$'], ], 'conditions': [ +# Shard this taret into parts to work around linker limitations. +# on link time code generation builds. +['OS=="win" and buildtype=="Official"', { + 'msvs_shard': 3, +}], ['use_default_render_theme==0', { 'sources/': [ ['exclude', 'rendering/RenderThemeChromiumDefault.*'], ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [143854] trunk/Source/WebCore
Title: [143854] trunk/Source/WebCore Revision 143854 Author hara...@chromium.org Date 2013-02-23 16:17:03 -0800 (Sat, 23 Feb 2013) Log Message Unreviewed, rolling out r143844. http://trac.webkit.org/changeset/143844 https://bugs.webkit.org/show_bug.cgi?id=110241 It broke Chromium Mac Release Build * WebCore.gyp/WebCore.gyp: * WebCore.gyp/WebCoreGTK.gyp: Removed. * WebCore.gypi: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/WebCore.gyp/WebCore.gyp trunk/Source/WebCore/WebCore.gypi Removed Paths trunk/Source/WebCore/WebCore.gyp/WebCoreGTK.gyp Diff Modified: trunk/Source/WebCore/ChangeLog (143853 => 143854) --- trunk/Source/WebCore/ChangeLog 2013-02-23 23:33:40 UTC (rev 143853) +++ trunk/Source/WebCore/ChangeLog 2013-02-24 00:17:03 UTC (rev 143854) @@ -1,3 +1,15 @@ +2013-02-23 Kentaro Hara + +Unreviewed, rolling out r143844. +http://trac.webkit.org/changeset/143844 +https://bugs.webkit.org/show_bug.cgi?id=110241 + +It broke Chromium Mac Release Build + +* WebCore.gyp/WebCore.gyp: +* WebCore.gyp/WebCoreGTK.gyp: Removed. +* WebCore.gypi: + 2013-02-23 Adam Barth WebCore fails to link in Chromium official build Modified: trunk/Source/WebCore/WebCore.gyp/WebCore.gyp (143853 => 143854) --- trunk/Source/WebCore/WebCore.gyp/WebCore.gyp 2013-02-23 23:33:40 UTC (rev 143853) +++ trunk/Source/WebCore/WebCore.gyp/WebCore.gyp 2013-02-24 00:17:03 UTC (rev 143854) @@ -49,29 +49,113 @@ 'enable_wexit_time_destructors': 1, 'webcore_include_dirs': [ -'../bindings/v8', -'../bindings/v8/custom', -'../bridge/jni/v8', -'../Modules/filesystem/chromium', -'../Modules/indexeddb/chromium', -'../Modules/webdatabase/chromium', -'../accessibility/chromium', -'../dom/default/chromium', -'../page/chromium', -'../page/scrolling/chromium', -'../platform/audio/chromium', -'../platform/chromium', -'../platform/chromium/support', -'../platform/graphics/chromium', -'../platform/graphics/chromium/cc', -'../platform/graphics/filters/skia', -'../platform/graphics/skia', -'../platform/mediastream/chromium', -'../platform/network/chromium', -'../plugins/chromium', -'../workers/chromium', -'../../ThirdParty/glu', -'<@(shared_webcore_include_dirs)', + '../', + '../..', + '../Modules/battery', + '../Modules/filesystem', + '../Modules/filesystem/chromium', + '../Modules/gamepad', + '../Modules/geolocation', + '../Modules/indexeddb', + '../Modules/indexeddb/chromium', + '../Modules/mediasource', + '../Modules/mediastream', + '../Modules/navigatorcontentutils', + '../Modules/notifications', + '../Modules/proximity', + '../Modules/quota', + '../Modules/speech', + '../Modules/webaudio', + '../Modules/webdatabase', + '../Modules/webdatabase/chromium', + '../Modules/websockets', + '../accessibility', + '../accessibility/chromium', + '../bindings', + '../bindings/generic', + '../bindings/v8', + '../bindings/v8/custom', + '../bridge', + '../bridge/jni', + '../bridge/jni/v8', + '../css', + '../dom', + '../dom/default', + '../dom/default/chromium', + '../editing', + '../fileapi', + '../history', + '../html', + '../html/canvas', + '../html/parser', + '../html/shadow', + '../html/track', + '../inspector', + '../loader', + '../loader/appcache', + '../loader/archive', + '../loader/archive/cf', + '../loader/archive/mhtml', + '../loader/cache', + '../loader/icon', + '../mathml', + '../page', + '../page/animation', + '../page/chromium', + '../page/scrolling', + '../page/scrolling/chromium', + '../platform', + '../platform/animation', + '../platform/audio', + '../platform/audio/chromium', + '../platform/chromium', + '../platform/chromium/support', + '../platform/graphics', + '../platform/graphics/chromium', + '../platform/graphics/chromium/cc', + '../platform/graphics/cpu/arm', + '../platform/graphics/cpu/arm/filters', + '../platform/graphics/filters', + '../platform/graphics/filters/skia', + '../platform/graphics/gpu', + '../platform/graphics/opentype', + '../platform/graphics/skia', + '../platform/graphics/transforms', + '../platform/image-decoders', + '../platform/image-decoders/bmp', + '../platform/image-decoders/gif', + '../platform/image-decoders/ico', + '../platform/image-decoders/jpeg', + '../platform/image-decoders/png', + '../platform/image-decoders/skia', + '../platform/image-decoders/webp', + '../platform/image-encoders/skia', + '../platform/leveldb
[webkit-changes] [143851] trunk/Source/WebCore
Title: [143851] trunk/Source/WebCore Revision 143851 Author hara...@chromium.org Date 2013-02-23 14:37:30 -0800 (Sat, 23 Feb 2013) Log Message [V8] Rename constructorCallbackCustom() to constructorCustom() https://bugs.webkit.org/show_bug.cgi?id=110671 Reviewed by Adam Barth. his is one of steps to insert TRACE_EVENT_STATE() macros into DOM bindings. See https://bugs.webkit.org/show_bug.cgi?id=110667#c0 In the new world, "Callback" is used to indicate that it is a function called back by V8. Currently "Callback" is used for both V8 callbacks, DOM methods and DOM constructors. This patch fixes the inconsistency. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (GenerateCustomConstructorCallback): * bindings/v8/custom/V8ArrayBufferCustom.cpp: (WebCore::V8ArrayBuffer::constructorCustom): * bindings/v8/custom/V8AudioContextCustom.cpp: (WebCore::V8AudioContext::constructorCustom): * bindings/v8/custom/V8BlobCustom.cpp: (WebCore::V8Blob::constructorCustom): * bindings/v8/custom/V8DOMFormDataCustom.cpp: (WebCore::V8DOMFormData::constructorCustom): * bindings/v8/custom/V8DataViewCustom.cpp: (WebCore::V8DataView::constructorCustom): * bindings/v8/custom/V8MessageChannelCustom.cpp: (WebCore::V8MessageChannel::constructorCustom): * bindings/v8/custom/V8MutationObserverCustom.cpp: (WebCore::V8MutationObserver::constructorCustom): * bindings/v8/custom/V8WebKitPointCustom.cpp: (WebCore::V8WebKitPoint::constructorCustom): * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::V8XMLHttpRequest::constructorCustom): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm trunk/Source/WebCore/bindings/v8/custom/V8ArrayBufferCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8AudioContextCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8BlobCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8DOMFormDataCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8DataViewCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8MessageChannelCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8MutationObserverCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8WebKitPointCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (143850 => 143851) --- trunk/Source/WebCore/ChangeLog 2013-02-23 22:23:22 UTC (rev 143850) +++ trunk/Source/WebCore/ChangeLog 2013-02-23 22:37:30 UTC (rev 143851) @@ -1,5 +1,45 @@ 2013-02-23 Kentaro Hara +[V8] Rename constructorCallbackCustom() to constructorCustom() +https://bugs.webkit.org/show_bug.cgi?id=110671 + +Reviewed by Adam Barth. + +his is one of steps to insert TRACE_EVENT_STATE() macros +into DOM bindings. +See https://bugs.webkit.org/show_bug.cgi?id=110667#c0 + +In the new world, "Callback" is used to indicate that it +is a function called back by V8. Currently "Callback" is +used for both V8 callbacks, DOM methods and DOM constructors. +This patch fixes the inconsistency. + +No tests. No change in behavior. + +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateHeader): +(GenerateCustomConstructorCallback): +* bindings/v8/custom/V8ArrayBufferCustom.cpp: +(WebCore::V8ArrayBuffer::constructorCustom): +* bindings/v8/custom/V8AudioContextCustom.cpp: +(WebCore::V8AudioContext::constructorCustom): +* bindings/v8/custom/V8BlobCustom.cpp: +(WebCore::V8Blob::constructorCustom): +* bindings/v8/custom/V8DOMFormDataCustom.cpp: +(WebCore::V8DOMFormData::constructorCustom): +* bindings/v8/custom/V8DataViewCustom.cpp: +(WebCore::V8DataView::constructorCustom): +* bindings/v8/custom/V8MessageChannelCustom.cpp: +(WebCore::V8MessageChannel::constructorCustom): +* bindings/v8/custom/V8MutationObserverCustom.cpp: +(WebCore::V8MutationObserver::constructorCustom): +* bindings/v8/custom/V8WebKitPointCustom.cpp: +(WebCore::V8WebKitPoint::constructorCustom): +* bindings/v8/custom/V8XMLHttpRequestCustom.cpp: +(WebCore::V8XMLHttpRequest::constructorCustom): + +2013-02-23 Kentaro Hara + [V8] Rename xxxCallback() to xxxMethod(), and xxxCallbackCustom() to xxxMethodCustom() https://bugs.webkit.org/show_bug.cgi?id=110669 Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (143850 => 143851) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-23 22:23:22 UTC (rev 143850) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-23 22:37:30 UTC (rev 143851) @@ -413,7 +413,7 @@ } if (HasCustomConstructor($interface)) { push(@headerContent, <-static v8::Handle constructorCallbackCustom(const v8::Arguments&); +static v8::Handle constructorCustom(const v8::Arguments&); END } @@ -1990,7 +1990,7 @@
[webkit-changes] [143806] trunk/Source/WebCore
Title: [143806] trunk/Source/WebCore Revision 143806 Author hara...@chromium.org Date 2013-02-22 15:04:36 -0800 (Fri, 22 Feb 2013) Log Message Unreviewed build fix. Added missing #if PLATFORM(CHROMIUM). * dom/Document.cpp: (WebCore::Document::recalcStyle): * page/FrameView.cpp: (WebCore::FrameView::layout): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/dom/Document.cpp trunk/Source/WebCore/page/FrameView.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (143805 => 143806) --- trunk/Source/WebCore/ChangeLog 2013-02-22 23:00:57 UTC (rev 143805) +++ trunk/Source/WebCore/ChangeLog 2013-02-22 23:04:36 UTC (rev 143806) @@ -1,5 +1,14 @@ 2013-02-22 Kentaro Hara +Unreviewed build fix. Added missing #if PLATFORM(CHROMIUM). + +* dom/Document.cpp: +(WebCore::Document::recalcStyle): +* page/FrameView.cpp: +(WebCore::FrameView::layout): + +2013-02-22 Kentaro Hara + Document::styleRecalc() and FrameView::layout() should be traced https://bugs.webkit.org/show_bug.cgi?id=110646 Modified: trunk/Source/WebCore/dom/Document.cpp (143805 => 143806) --- trunk/Source/WebCore/dom/Document.cpp 2013-02-22 23:00:57 UTC (rev 143805) +++ trunk/Source/WebCore/dom/Document.cpp 2013-02-22 23:04:36 UTC (rev 143806) @@ -1755,7 +1755,9 @@ if (m_inStyleRecalc) return; // Guard against re-entrancy. -dwh +#if PLATFORM(CHROMIUM) TRACE_EVENT0("webkit", "Document::recalcStyle"); +#endif // FIXME: We should update style on our ancestor chain before proceeding (especially for seamless), // however doing so currently causes several tests to crash, as Frame::setDocument calls Document::attach Modified: trunk/Source/WebCore/page/FrameView.cpp (143805 => 143806) --- trunk/Source/WebCore/page/FrameView.cpp 2013-02-22 23:00:57 UTC (rev 143805) +++ trunk/Source/WebCore/page/FrameView.cpp 2013-02-22 23:04:36 UTC (rev 143806) @@ -1044,7 +1044,9 @@ if (m_inLayout) return; +#if PLATFORM(CHROMIUM) TRACE_EVENT0("webkit", "FrameView::layout"); +#endif // Protect the view from being deleted during layout (in recalcStyle) RefPtr protector(this); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [143805] trunk/Source/WebCore
Title: [143805] trunk/Source/WebCore Revision 143805 Author hara...@chromium.org Date 2013-02-22 15:00:57 -0800 (Fri, 22 Feb 2013) Log Message Document::styleRecalc() and FrameView::layout() should be traced https://bugs.webkit.org/show_bug.cgi?id=110646 Reviewed by Ojan Vafai. Document::styleRecalc() and FrameView::layout() are key factors for web page rendering performance. We should add TRACE_EVENT() macros to these functions. * dom/Document.cpp: (WebCore::Document::recalcStyle): * page/FrameView.cpp: (WebCore::FrameView::layout): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/dom/Document.cpp trunk/Source/WebCore/page/FrameView.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (143804 => 143805) --- trunk/Source/WebCore/ChangeLog 2013-02-22 22:57:14 UTC (rev 143804) +++ trunk/Source/WebCore/ChangeLog 2013-02-22 23:00:57 UTC (rev 143805) @@ -1,3 +1,19 @@ +2013-02-22 Kentaro Hara + +Document::styleRecalc() and FrameView::layout() should be traced +https://bugs.webkit.org/show_bug.cgi?id=110646 + +Reviewed by Ojan Vafai. + +Document::styleRecalc() and FrameView::layout() are key factors +for web page rendering performance. We should add TRACE_EVENT() +macros to these functions. + +* dom/Document.cpp: +(WebCore::Document::recalcStyle): +* page/FrameView.cpp: +(WebCore::FrameView::layout): + 2013-02-22 Eric Seidel Teach the html5lib tests how to test the threaded HTML parser Modified: trunk/Source/WebCore/dom/Document.cpp (143804 => 143805) --- trunk/Source/WebCore/dom/Document.cpp 2013-02-22 22:57:14 UTC (rev 143804) +++ trunk/Source/WebCore/dom/Document.cpp 2013-02-22 23:00:57 UTC (rev 143805) @@ -240,6 +240,10 @@ #include "DOMSecurityPolicy.h" #endif +#if PLATFORM(CHROMIUM) +#include "TraceEvent.h" +#endif + using namespace std; using namespace WTF; using namespace Unicode; @@ -1751,6 +1755,8 @@ if (m_inStyleRecalc) return; // Guard against re-entrancy. -dwh +TRACE_EVENT0("webkit", "Document::recalcStyle"); + // FIXME: We should update style on our ancestor chain before proceeding (especially for seamless), // however doing so currently causes several tests to crash, as Frame::setDocument calls Document::attach // before setting the DOMWindow on the Frame, or the SecurityOrigin on the document. The attach, in turn Modified: trunk/Source/WebCore/page/FrameView.cpp (143804 => 143805) --- trunk/Source/WebCore/page/FrameView.cpp 2013-02-22 22:57:14 UTC (rev 143804) +++ trunk/Source/WebCore/page/FrameView.cpp 2013-02-22 23:00:57 UTC (rev 143805) @@ -93,6 +93,10 @@ #include "TextAutosizer.h" #endif +#if PLATFORM(CHROMIUM) +#include "TraceEvent.h" +#endif + namespace WebCore { using namespace HTMLNames; @@ -1040,6 +1044,8 @@ if (m_inLayout) return; +TRACE_EVENT0("webkit", "FrameView::layout"); + // Protect the view from being deleted during layout (in recalcStyle) RefPtr protector(this); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [143737] trunk/Source/WebCore
Title: [143737] trunk/Source/WebCore Revision 143737 Author hara...@chromium.org Date 2013-02-22 08:54:03 -0800 (Fri, 22 Feb 2013) Log Message [V8] Add comments to checkTypeOrDieTrying() https://bugs.webkit.org/show_bug.cgi?id=110553 Reviewed by Adam Barth. It is mysterious how the check is helpful. We need comments. No tests. Just added comments. * bindings/scripts/CodeGeneratorV8.pm: (GenerateImplementation): * bindings/v8/ScriptWrappable.h: (ScriptWrappable): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm trunk/Source/WebCore/bindings/v8/ScriptWrappable.h Diff Modified: trunk/Source/WebCore/ChangeLog (143736 => 143737) --- trunk/Source/WebCore/ChangeLog 2013-02-22 16:51:50 UTC (rev 143736) +++ trunk/Source/WebCore/ChangeLog 2013-02-22 16:54:03 UTC (rev 143737) @@ -1,3 +1,19 @@ +2013-02-22 Kentaro Hara + +[V8] Add comments to checkTypeOrDieTrying() +https://bugs.webkit.org/show_bug.cgi?id=110553 + +Reviewed by Adam Barth. + +It is mysterious how the check is helpful. We need comments. + +No tests. Just added comments. + +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateImplementation): +* bindings/v8/ScriptWrappable.h: +(ScriptWrappable): + 2013-02-22 Jessie Berlin 32-bit build fix after r143706 Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (143736 => 143737) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-22 16:51:50 UTC (rev 143736) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-22 16:54:03 UTC (rev 143737) @@ -2647,6 +2647,15 @@ push(@implContentDecls, < #if ENABLE(BINDING_INTEGRITY) +// This checks if a DOM object that is about to be wrapped is valid. +// Specifically, it checks that a vtable of the DOM object is equal to +// a vtable of an expected class. +// Due to a dangling pointer, the DOM object you are wrapping might be +// already freed or realloced. If freed, the check will fail because +// a free list pointer should be stored at the head of the DOM object. +// If realloced, the check will fail because the vtable of the DOM object +// differs from the expected vtable (unless the same class of DOM object +// is realloced on the slot). inline void checkTypeOrDieTrying(${nativeType}* object) { void* actualVTablePointer = *(reinterpret_cast(object)); Modified: trunk/Source/WebCore/bindings/v8/ScriptWrappable.h (143736 => 143737) --- trunk/Source/WebCore/bindings/v8/ScriptWrappable.h 2013-02-22 16:51:50 UTC (rev 143736) +++ trunk/Source/WebCore/bindings/v8/ScriptWrappable.h 2013-02-22 16:54:03 UTC (rev 143737) @@ -70,6 +70,8 @@ m_maskedWrapper.Clear(); } +// Stores a masked wrapper to prevent attackers from overwriting this field +// with a phony wrapper. v8::Persistent m_maskedWrapper; static inline v8::Object* maskOrUnmaskPointer(const v8::Object* object) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [143636] trunk/Source/WebCore
Title: [143636] trunk/Source/WebCore Revision 143636 Author hara...@chromium.org Date 2013-02-21 11:56:03 -0800 (Thu, 21 Feb 2013) Log Message [V8] Rename add{Node,Object}ToGroup() to add{Node,Object}WrapperToGroup() https://bugs.webkit.org/show_bug.cgi?id=110404 Reviewed by Adam Barth. The current function name is confusing (See discussion in bug 110396). We should rename the functions so that it becomes clear that "Node"/"Object" refers to a type of a wrapper in the second argument. No tests. No change in behavior. * bindings/v8/V8GCController.cpp: (WebCore::WrapperGrouper::addObjectWrapperToGroup): (WebCore::WrapperGrouper::addNodeWrapperToGroup): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/v8/V8GCController.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (143635 => 143636) --- trunk/Source/WebCore/ChangeLog 2013-02-21 19:39:58 UTC (rev 143635) +++ trunk/Source/WebCore/ChangeLog 2013-02-21 19:56:03 UTC (rev 143636) @@ -1,3 +1,21 @@ +2013-02-21 Kentaro Hara + +[V8] Rename add{Node,Object}ToGroup() to add{Node,Object}WrapperToGroup() +https://bugs.webkit.org/show_bug.cgi?id=110404 + +Reviewed by Adam Barth. + +The current function name is confusing +(See discussion in bug 110396). We should rename the functions +so that it becomes clear that "Node"/"Object" refers to a type +of a wrapper in the second argument. + +No tests. No change in behavior. + +* bindings/v8/V8GCController.cpp: +(WebCore::WrapperGrouper::addObjectWrapperToGroup): +(WebCore::WrapperGrouper::addNodeWrapperToGroup): + 2013-02-21 Vivek Galatage [JS Binding] ScriptObject default constructor should initialize the Script State to 0 Modified: trunk/Source/WebCore/bindings/v8/V8GCController.cpp (143635 => 143636) --- trunk/Source/WebCore/bindings/v8/V8GCController.cpp 2013-02-21 19:39:58 UTC (rev 143635) +++ trunk/Source/WebCore/bindings/v8/V8GCController.cpp 2013-02-21 19:56:03 UTC (rev 143636) @@ -90,12 +90,12 @@ m_liveObjects.append(V8PerIsolateData::current()->ensureLiveRoot()); } -void addObjectToGroup(void* root, v8::Persistent wrapper) +void addObjectWrapperToGroup(void* root, v8::Persistent wrapper) { m_connections.append(ImplicitConnection(root, wrapper)); } -void addNodeToGroup(Node* root, v8::Persistent wrapper) +void addNodeWrapperToGroup(Node* root, v8::Persistent wrapper) { m_connections.append(ImplicitConnection(root, wrapper)); } @@ -311,7 +311,7 @@ MutationObserver* observer = static_cast(object); HashSet observedNodes = observer->getObservedNodes(); for (HashSet::iterator it = observedNodes.begin(); it != observedNodes.end(); ++it) -m_grouper.addObjectToGroup(V8GCController::opaqueRootForGC(*it, m_isolate), wrapper); +m_grouper.addObjectWrapperToGroup(V8GCController::opaqueRootForGC(*it, m_isolate), wrapper); } else { ActiveDOMObject* activeDOMObject = type->toActiveDOMObject(wrapper); if (activeDOMObject && activeDOMObject->hasPendingActivity()) @@ -328,9 +328,9 @@ if (node->hasEventListeners()) addImplicitReferencesForNodeWithEventListeners(node, wrapper); -m_grouper.addNodeToGroup(V8GCController::opaqueRootForGC(node, m_isolate), wrapper); +m_grouper.addNodeWrapperToGroup(V8GCController::opaqueRootForGC(node, m_isolate), wrapper); } else if (classId == v8DOMObjectClassId) { -m_grouper.addObjectToGroup(type->opaqueRootForGC(object, wrapper, m_isolate), wrapper); +m_grouper.addObjectWrapperToGroup(type->opaqueRootForGC(object, wrapper, m_isolate), wrapper); } else { ASSERT_NOT_REACHED(); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [143374] trunk/Source/WebCore
Title: [143374] trunk/Source/WebCore Revision 143374 Author hara...@chromium.org Date 2013-02-19 12:47:51 -0800 (Tue, 19 Feb 2013) Log Message Unreviewed. Rebaselined run-bindings-tests. * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (143373 => 143374) --- trunk/Source/WebCore/ChangeLog 2013-02-19 20:43:48 UTC (rev 143373) +++ trunk/Source/WebCore/ChangeLog 2013-02-19 20:47:51 UTC (rev 143374) @@ -1,3 +1,12 @@ +2013-02-19 Kentaro Hara + +Unreviewed. Rebaselined run-bindings-tests. + +* bindings/scripts/test/JS/JSTestNamedConstructor.cpp: +(WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor): +* bindings/scripts/test/JS/JSTestObj.cpp: +(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString): + 2013-02-19 ChangSeok Oh [GTK][AC] Implement matrix transform animation with clutter ac backend Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp (143373 => 143374) --- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp 2013-02-19 20:43:48 UTC (rev 143373) +++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp 2013-02-19 20:47:51 UTC (rev 143374) @@ -84,7 +84,7 @@ const String& str2(exec->argument(1).isEmpty() ? String() : exec->argument(1).toString(exec)->value(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); -const String& str3(MissingIsNullString(exec, 2).isEmpty() ? String() : MissingIsNullString(exec, 2).toString(exec)->value(exec)); +const String& str3(argumentOrNull(exec, 2).isEmpty() ? String() : argumentOrNull(exec, 2).toString(exec)->value(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); RefPtr object = TestNamedConstructor::createForJSConstructor(castedThis->document(), str1, str2, str3, ec); Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (143373 => 143374) --- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2013-02-19 20:43:48 UTC (rev 143373) +++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2013-02-19 20:47:51 UTC (rev 143374) @@ -1973,7 +1973,7 @@ JSTestObj* castedThis = jsCast(asObject(thisValue)); ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info); TestObj* impl = static_cast(castedThis->impl()); -const String& str(MissingIsNullString(exec, 0).isEmpty() ? String() : MissingIsNullString(exec, 0).toString(exec)->value(exec)); +const String& str(argumentOrNull(exec, 0).isEmpty() ? String() : argumentOrNull(exec, 0).toString(exec)->value(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); impl->methodWithOptionalStringIsNullString(str); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [143308] trunk/Source/WebCore
Title: [143308] trunk/Source/WebCore Revision 143308 Author hara...@chromium.org Date 2013-02-19 01:00:37 -0800 (Tue, 19 Feb 2013) Log Message Unreviewed build fix. Fixed warning caused by r143305. * bindings/scripts/CodeGeneratorJS.pm: (GenerateParametersCheck): * bindings/scripts/CodeGeneratorV8.pm: (GenerateParametersCheck): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm Diff Modified: trunk/Source/WebCore/ChangeLog (143307 => 143308) --- trunk/Source/WebCore/ChangeLog 2013-02-19 08:55:32 UTC (rev 143307) +++ trunk/Source/WebCore/ChangeLog 2013-02-19 09:00:37 UTC (rev 143308) @@ -1,5 +1,14 @@ 2013-02-19 Kentaro Hara +Unreviewed build fix. Fixed warning caused by r143305. + +* bindings/scripts/CodeGeneratorJS.pm: +(GenerateParametersCheck): +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateParametersCheck): + +2013-02-19 Kentaro Hara + Unreviewed build fix after r143304. * bindings/js/JSDOMBinding.h: Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (143307 => 143308) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2013-02-19 08:55:32 UTC (rev 143307) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2013-02-19 09:00:37 UTC (rev 143308) @@ -2755,7 +2755,7 @@ } } -push(@$outputArray, "" . GetNativeTypeFromSignature($parameter) . " $name(" . JSValueToNative($parameter, $optional eq "DefaultIsNullString" ? "argumentOrNull(exec, $argsIndex)" : "exec->argument($argsIndex)") . ");\n"); +push(@$outputArray, "" . GetNativeTypeFromSignature($parameter) . " $name(" . JSValueToNative($parameter, $optional && $optional eq "DefaultIsNullString" ? "argumentOrNull(exec, $argsIndex)" : "exec->argument($argsIndex)") . ");\n"); # If a parameter is "an index" and it's negative it should throw an INDEX_SIZE_ERR exception. # But this needs to be done in the bindings, because the type is unsigned and the fact that it Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (143307 => 143308) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-19 08:55:32 UTC (rev 143307) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-19 09:00:37 UTC (rev 143308) @@ -1812,7 +1812,7 @@ $parameterCheckString .= "V8TRYCATCH(Vector<$nativeElementType>, $parameterName, toNativeArguments<$nativeElementType>(args, $paramIndex));\n"; } } elsif ($nativeType =~ /^V8StringResource/) { -my $value = JSValueToNative($parameter, $optional eq "DefaultIsNullString" ? "argumentOrNull(args, $paramIndex)" : "args[$paramIndex]", "args.GetIsolate()"); +my $value = JSValueToNative($parameter, $optional && $optional eq "DefaultIsNullString" ? "argumentOrNull(args, $paramIndex)" : "args[$paramIndex]", "args.GetIsolate()"); $parameterCheckString .= "" . ConvertToV8StringResource($parameter, $nativeType, $parameterName, $value) . "\n"; } else { # If the "StrictTypeChecking" extended attribute is present, and the argument's type is an @@ -1830,7 +1830,7 @@ } } $parameterCheckString .= "V8TRYCATCH($nativeType, $parameterName, " . - JSValueToNative($parameter, $optional eq "DefaultIsNullString" ? "argumentOrNull(args, $paramIndex)" : "args[$paramIndex]", "args.GetIsolate()") . ");\n"; + JSValueToNative($parameter, $optional && $optional eq "DefaultIsNullString" ? "argumentOrNull(args, $paramIndex)" : "args[$paramIndex]", "args.GetIsolate()") . ");\n"; if ($nativeType eq 'Dictionary') { $parameterCheckString .= "if (!$parameterName.isUndefinedOrNull() && !$parameterName.isObject())\n"; $parameterCheckString .= "return throwTypeError(\"Not an object.\", args.GetIsolate());\n"; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [143306] trunk/Source/WebCore
Title: [143306] trunk/Source/WebCore Revision 143306 Author hara...@chromium.org Date 2013-02-19 00:23:49 -0800 (Tue, 19 Feb 2013) Log Message Unreviewed build fix after r143304. * bindings/js/JSDOMBinding.h: (WebCore::argumentOrNull): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/js/JSDOMBinding.h Diff Modified: trunk/Source/WebCore/ChangeLog (143305 => 143306) --- trunk/Source/WebCore/ChangeLog 2013-02-19 08:21:57 UTC (rev 143305) +++ trunk/Source/WebCore/ChangeLog 2013-02-19 08:23:49 UTC (rev 143306) @@ -1,5 +1,12 @@ 2013-02-19 Kentaro Hara +Unreviewed build fix after r143304. + +* bindings/js/JSDOMBinding.h: +(WebCore::argumentOrNull): + +2013-02-19 Kentaro Hara + [V8] Remove redundant usage of MAYBE_MISSING_PARAMETER() macro https://bugs.webkit.org/show_bug.cgi?id=109899 Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.h (143305 => 143306) --- trunk/Source/WebCore/bindings/js/JSDOMBinding.h 2013-02-19 08:21:57 UTC (rev 143305) +++ trunk/Source/WebCore/bindings/js/JSDOMBinding.h 2013-02-19 08:23:49 UTC (rev 143306) @@ -256,7 +256,7 @@ inline JSC::JSValue argumentOrNull(JSC::ExecState* exec, int index) { -return index >= exec->argumentCount() ? JSValue() : exec->argument(index); +return index >= exec->argumentCount() ? JSC::JSValue() : exec->argument(index); } const JSC::HashTable* getHashTableForGlobalData(JSC::JSGlobalData&, const JSC::HashTable* staticTable); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [143075] trunk/Source/WebCore
Title: [143075] trunk/Source/WebCore Revision 143075 Author hara...@chromium.org Date 2013-02-15 17:24:03 -0800 (Fri, 15 Feb 2013) Log Message [V8] An "EvenTarget" type in IDL should be converted to EventTarget*, not to Node* https://bugs.webkit.org/show_bug.cgi?id=109895 Reviewed by Adam Barth. Currently an "EventTarget" type in IDL is converted to Node*. This is wrong because there are non-Node interfaces that inherit a EventTarget. We should convert an "EventTarget" type to EventTarget*. This will fix FIXMEs in CodeGeneratorV8.pm. * bindings/scripts/CodeGeneratorV8.pm: (GetNativeType): (JSValueToNative): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm Diff Modified: trunk/Source/WebCore/ChangeLog (143074 => 143075) --- trunk/Source/WebCore/ChangeLog 2013-02-16 01:20:38 UTC (rev 143074) +++ trunk/Source/WebCore/ChangeLog 2013-02-16 01:24:03 UTC (rev 143075) @@ -1,3 +1,19 @@ +2013-02-15 Kentaro Hara + +[V8] An "EvenTarget" type in IDL should be converted to EventTarget*, not to Node* +https://bugs.webkit.org/show_bug.cgi?id=109895 + +Reviewed by Adam Barth. + +Currently an "EventTarget" type in IDL is converted to Node*. +This is wrong because there are non-Node interfaces that inherit +a EventTarget. We should convert an "EventTarget" type to EventTarget*. +This will fix FIXMEs in CodeGeneratorV8.pm. + +* bindings/scripts/CodeGeneratorV8.pm: +(GetNativeType): +(JSValueToNative): + 2013-02-15 Simon Fraser REGRESSION (r142505?): Crashes in WebCore::ScrollingStateNode::appendChild when using back/forward buttons Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (143074 => 143075) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-16 01:20:38 UTC (rev 143074) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-16 01:24:03 UTC (rev 143075) @@ -3830,11 +3830,6 @@ return "Range::CompareHow" if $type eq "CompareHow"; return "DOMTimeStamp" if $type eq "DOMTimeStamp"; return "double" if $type eq "Date"; - -# FIXME: When EventTarget is an interface and not a mixin, fix this so that -# EventTarget can be passed as a parameter. -return "Node*" if $type eq "EventTarget" and $isParameter; - return "ScriptValue" if $type eq "any"; return "Dictionary" if $type eq "Dictionary"; @@ -3940,14 +3935,8 @@ return "MediaQueryListListener::create(" . $value . ")"; } -# Default, assume autogenerated type conversion routines -# FIXME: When EventTarget is an interface and not a mixin, fix this to use -# V8EventTarget::HasInstance etc. if ($type eq "EventTarget") { -AddToImplIncludes("V8Node.h"); - -# EventTarget is not in DOM hierarchy, but all Nodes are EventTarget. -return "V8Node::HasInstance($value, $getIsolate) ? V8Node::toNative(v8::Handle::Cast($value)) : 0"; +return "V8DOMWrapper::isDOMWrapper($value) ? toWrapperTypeInfo(v8::Handle::Cast($value))->toEventTarget(v8::Handle::Cast($value)) : 0"; } if ($type eq "XPathNSResolver") { ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [142951] trunk/Source/WebCore
Title: [142951] trunk/Source/WebCore Revision 142951 Author hara...@chromium.org Date 2013-02-14 18:07:25 -0800 (Thu, 14 Feb 2013) Log Message Unreviewed. Rebaselined run-bindings-tests. * bindings/scripts/test/CPP/WebDOMTestObj.cpp: (WebDOMTestObj::anyAttribute): (WebDOMTestObj::setAnyAttribute): * bindings/scripts/test/CPP/WebDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_get_any_attribute): * bindings/scripts/test/JS/JSTestTypedefs.cpp: (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp): * bindings/scripts/test/V8/V8TestTypedefs.cpp: (WebCore::TestTypedefsV8Internal::funcWithClampCallback): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestTypedefs.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (142950 => 142951) --- trunk/Source/WebCore/ChangeLog 2013-02-15 02:02:18 UTC (rev 142950) +++ trunk/Source/WebCore/ChangeLog 2013-02-15 02:07:25 UTC (rev 142951) @@ -1,3 +1,18 @@ +2013-02-14 Kentaro Hara + +Unreviewed. Rebaselined run-bindings-tests. + +* bindings/scripts/test/CPP/WebDOMTestObj.cpp: +(WebDOMTestObj::anyAttribute): +(WebDOMTestObj::setAnyAttribute): +* bindings/scripts/test/CPP/WebDOMTestObj.h: +* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: +(webkit_dom_test_obj_get_any_attribute): +* bindings/scripts/test/JS/JSTestTypedefs.cpp: +(WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp): +* bindings/scripts/test/V8/V8TestTypedefs.cpp: +(WebCore::TestTypedefsV8Internal::funcWithClampCallback): + 2013-02-14 Christian Biesinger Convert media controls from DeprecatedFlexibleBox to FlexibleBox Modified: trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp (142950 => 142951) --- trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp 2013-02-15 02:02:18 UTC (rev 142950) +++ trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp 2013-02-15 02:07:25 UTC (rev 142951) @@ -31,11 +31,11 @@ #include "WebDOMDictionary.h" #include "WebDOMDocument.h" #include "WebDOMNode.h" +#include "WebDOMObject.h" #include "WebDOMSVGPoint.h" #include "WebDOMString.h" #include "WebDOMTestObj.h" #include "WebDOMa.h" -#include "WebDOMany.h" #include "WebDOMb.h" #include "WebDOMbool.h" #include "WebDOMd.h" @@ -43,7 +43,6 @@ #include "WebExceptionHandler.h" #include "WebNativeEventListener.h" #include "a.h" -#include "any.h" #include "b.h" #include "bool.h" #include "d.h" @@ -537,15 +536,15 @@ } #endif -WebDOMany WebDOMTestObj::anyAttribute() const +WebDOMObject WebDOMTestObj::anyAttribute() const { if (!impl()) -return WebDOMany(); +return WebDOMObject(); return toWebKit(WTF::getPtr(impl()->anyAttribute())); } -void WebDOMTestObj::setAnyAttribute(const WebDOMany& newAnyAttribute) +void WebDOMTestObj::setAnyAttribute(const WebDOMObject& newAnyAttribute) { if (!impl()) return; Modified: trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h (142950 => 142951) --- trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h 2013-02-15 02:02:18 UTC (rev 142950) +++ trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h 2013-02-15 02:07:25 UTC (rev 142951) @@ -34,11 +34,11 @@ class WebDOMDocument; class WebDOMEventListener; class WebDOMNode; +class WebDOMObject; class WebDOMSVGPoint; class WebDOMString; class WebDOMTestObj; class WebDOMa; -class WebDOMany; class WebDOMb; class WebDOMbool; class WebDOMd; @@ -129,8 +129,8 @@ int conditionalAttr3() const; void setConditionalAttr3(int); #endif -WebDOMany anyAttribute() const; -void setAnyAttribute(const WebDOMany&); +WebDOMObject anyAttribute() const; +void setAnyAttribute(const WebDOMObject&); WebDOMDocument contentDocument() const; WebDOMSVGPoint mutablePoint() const; void setMutablePoint(const WebDOMSVGPoint&); Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp (142950 => 142951) --- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp 2013-02-15 02:02:18 UTC (rev 142950) +++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp 2013-02-15 02:07:25 UTC (rev 142951) @@ -33,7 +33,6 @@ #include "WebKitDOMSerializedScriptValuePrivate.h" #include "WebKitDOMTestObjPrivate.h" #include "WebKitDOMaPrivate.h" -#include "WebKitDOManyPrivate.h" #include "WebKitDOMbPrivate.h" #include "WebKitDOMboolPrivate.h" #include "WebKitDOMdPrivate.h" @@ -2150,7 +2149,7 @@ g_return_val_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self), 0); WebCore::TestObj* item = WebKit::core(self)
[webkit-changes] [142939] trunk/Source/WebCore
Title: [142939] trunk/Source/WebCore Revision 142939 Author hara...@chromium.org Date 2013-02-14 16:38:19 -0800 (Thu, 14 Feb 2013) Log Message [V8] CodeGeneratorV8.pm can assume that DOMWindow has [CheckSecurity] https://bugs.webkit.org/show_bug.cgi?id=109788 Reviewed by Adam Barth. There is code like this: if ($extendedAttr{"CheckSecurity"} || $interfaceName eq "DOMWindow") This check is redundant. DOMWindow has [CheckSecurity]. We can remove the DOMWindow check. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateReplaceableAttrSetter): (GenerateFunctionCallback): (GenerateNonStandardFunction): (GenerateImplementation): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm Diff Modified: trunk/Source/WebCore/ChangeLog (142938 => 142939) --- trunk/Source/WebCore/ChangeLog 2013-02-15 00:36:52 UTC (rev 142938) +++ trunk/Source/WebCore/ChangeLog 2013-02-15 00:38:19 UTC (rev 142939) @@ -1,3 +1,25 @@ +2013-02-14 Kentaro Hara + +[V8] CodeGeneratorV8.pm can assume that DOMWindow has [CheckSecurity] +https://bugs.webkit.org/show_bug.cgi?id=109788 + +Reviewed by Adam Barth. + +There is code like this: + + if ($extendedAttr{"CheckSecurity"} || $interfaceName eq "DOMWindow") + +This check is redundant. DOMWindow has [CheckSecurity]. We can remove the +DOMWindow check. + +No tests. No change in behavior. + +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateReplaceableAttrSetter): +(GenerateFunctionCallback): +(GenerateNonStandardFunction): +(GenerateImplementation): + 2013-02-14 Joshua Bell [V8] IndexedDB: Remove unused creationContext paramter from idbKeyToV8Value Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (142938 => 142939) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-15 00:36:52 UTC (rev 142938) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-15 00:38:19 UTC (rev 142939) @@ -1150,7 +1150,7 @@ END push(@implContentDecls, GenerateFeatureObservation($interface->extendedAttributes->{"V8MeasureAs"})); -if ($interfaceName eq "DOMWindow" || $interface->extendedAttributes->{"CheckSecurity"}) { +if ($interface->extendedAttributes->{"CheckSecurity"}) { AddToImplIncludes("Frame.h"); push(@implContentDecls, < ${interfaceName}* imp = V8${interfaceName}::toNative(info.Holder()); @@ -1573,9 +1573,7 @@ } # Check domain security if needed -if (($interface->extendedAttributes->{"CheckSecurity"} -|| $interfaceName eq "DOMWindow") -&& !$function->signature->extendedAttributes->{"DoNotCheckSecurity"}) { +if ($interface->extendedAttributes->{"CheckSecurity"} && !$function->signature->extendedAttributes->{"DoNotCheckSecurity"}) { # We have not find real use cases yet. AddToImplIncludes("Frame.h"); push(@implContentDecls, <@@ -2385,8 +2383,7 @@ $conditional = "if (${enable_function}(impl->document()))\n"; } -if ($attrExt->{"DoNotCheckSecurity"} && -($interface->extendedAttributes->{"CheckSecurity"} || $interfaceName eq "DOMWindow")) { +if ($interface->extendedAttributes->{"CheckSecurity"} && $attrExt->{"DoNotCheckSecurity"}) { # Functions that are marked DoNotCheckSecurity are always readable but if they are changed # and then accessed on a different domain we do not return the underlying value but instead # return a new copy of the original function. This is achieved by storing the changed value @@ -2763,7 +2760,7 @@ # If the function does not need domain security check, we need to # generate an access getter that returns different function objects # for different calling context. -if (($interface->extendedAttributes->{"CheckSecurity"} || ($interfaceName eq "DOMWindow")) && $function->signature->extendedAttributes->{"DoNotCheckSecurity"}) { +if ($interface->extendedAttributes->{"CheckSecurity"} && $function->signature->extendedAttributes->{"DoNotCheckSecurity"}) { if (!HasCustomMethod($function->signature->extendedAttributes) || $function->{overloadIndex} == 1) { GenerateDomainSafeFunctionGetter($function, $interfaceName); $needsDomainSafeFunctionSetter = 1; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [142935] trunk/Source/WebCore
Title: [142935] trunk/Source/WebCore Revision 142935 Author hara...@chromium.org Date 2013-02-14 16:25:17 -0800 (Thu, 14 Feb 2013) Log Message Replace 'DOMObject' with 'any' https://bugs.webkit.org/show_bug.cgi?id=109793 Reviewed by Dimitri Glazkov. In the Web IDL spec, there is no type named 'DOMObject'. It should be 'any'. We should replace all 'DOMObject's in WebKit IDLs with 'any's. * Modules/webdatabase/SQLResultSetRowList.idl: * bindings/scripts/CodeGeneratorCPP.pm: (GetClassName): (AddIncludesForType): * bindings/scripts/CodeGeneratorGObject.pm: (GenerateFunction): * bindings/scripts/CodeGeneratorJS.pm: (AddIncludesForType): (GenerateImplementation): (JSValueToNative): (NativeToJSValue): * bindings/scripts/CodeGeneratorV8.pm: (GetNativeType): (JSValueToNative): (GetV8HeaderName): * dom/CustomEvent.idl: * dom/MessageEvent.idl: * dom/PopStateEvent.idl: * fileapi/FileReader.idl: * html/HTMLCanvasElement.idl: * html/HTMLElement.idl: * html/canvas/DataView.idl: * inspector/InjectedScriptHost.idl: * inspector/InspectorFrontendHost.idl: * inspector/_javascript_CallFrame.idl: * page/DOMWindow.idl: * page/Location.idl: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/webdatabase/SQLResultSetRowList.idl trunk/Source/WebCore/bindings/scripts/CodeGeneratorCPP.pm trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm trunk/Source/WebCore/dom/CustomEvent.idl trunk/Source/WebCore/dom/MessageEvent.idl trunk/Source/WebCore/dom/PopStateEvent.idl trunk/Source/WebCore/fileapi/FileReader.idl trunk/Source/WebCore/html/HTMLCanvasElement.idl trunk/Source/WebCore/html/HTMLElement.idl trunk/Source/WebCore/html/canvas/DataView.idl trunk/Source/WebCore/inspector/InjectedScriptHost.idl trunk/Source/WebCore/inspector/InspectorFrontendHost.idl trunk/Source/WebCore/inspector/_javascript_CallFrame.idl trunk/Source/WebCore/page/DOMWindow.idl trunk/Source/WebCore/page/Location.idl Diff Modified: trunk/Source/WebCore/ChangeLog (142934 => 142935) --- trunk/Source/WebCore/ChangeLog 2013-02-15 00:17:51 UTC (rev 142934) +++ trunk/Source/WebCore/ChangeLog 2013-02-15 00:25:17 UTC (rev 142935) @@ -1,5 +1,43 @@ 2013-02-14 Kentaro Hara +Replace 'DOMObject' with 'any' +https://bugs.webkit.org/show_bug.cgi?id=109793 + +Reviewed by Dimitri Glazkov. + +In the Web IDL spec, there is no type named 'DOMObject'. +It should be 'any'. We should replace all 'DOMObject's in WebKit IDLs with 'any's. + +* Modules/webdatabase/SQLResultSetRowList.idl: +* bindings/scripts/CodeGeneratorCPP.pm: +(GetClassName): +(AddIncludesForType): +* bindings/scripts/CodeGeneratorGObject.pm: +(GenerateFunction): +* bindings/scripts/CodeGeneratorJS.pm: +(AddIncludesForType): +(GenerateImplementation): +(JSValueToNative): +(NativeToJSValue): +* bindings/scripts/CodeGeneratorV8.pm: +(GetNativeType): +(JSValueToNative): +(GetV8HeaderName): +* dom/CustomEvent.idl: +* dom/MessageEvent.idl: +* dom/PopStateEvent.idl: +* fileapi/FileReader.idl: +* html/HTMLCanvasElement.idl: +* html/HTMLElement.idl: +* html/canvas/DataView.idl: +* inspector/InjectedScriptHost.idl: +* inspector/InspectorFrontendHost.idl: +* inspector/_javascript_CallFrame.idl: +* page/DOMWindow.idl: +* page/Location.idl: + +2013-02-14 Kentaro Hara + [V8] Remove GenerateEventListenerCallback() from CodeGeneratorV8.pm https://bugs.webkit.org/show_bug.cgi?id=109786 Modified: trunk/Source/WebCore/Modules/webdatabase/SQLResultSetRowList.idl (142934 => 142935) --- trunk/Source/WebCore/Modules/webdatabase/SQLResultSetRowList.idl 2013-02-15 00:17:51 UTC (rev 142934) +++ trunk/Source/WebCore/Modules/webdatabase/SQLResultSetRowList.idl 2013-02-15 00:25:17 UTC (rev 142935) @@ -33,5 +33,5 @@ ImplementationLacksVTable ] interface SQLResultSetRowList { readonly attribute unsigned long length; -[Custom] DOMObject item(in unsigned long index); +[Custom] any item(in unsigned long index); }; Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorCPP.pm (142934 => 142935) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorCPP.pm 2013-02-15 00:17:51 UTC (rev 142934) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorCPP.pm 2013-02-15 00:25:17 UTC (rev 142935) @@ -123,7 +123,7 @@ # special cases return "WebDOMString" if $codeGenerator->IsStringType($name) or $name eq "SerializedScriptValue"; -return "WebDOMObject" if $name eq "DOMObject"; +return "WebDOMObject" if $name eq "any"; return "bool" if $name eq "boolean"; return $name if $codeGenerator->IsPrimitiveType($name); @@ -298,7 +298,7 @@ return; } -if
[webkit-changes] [142934] trunk/Source/WebCore
Title: [142934] trunk/Source/WebCore Revision 142934 Author hara...@chromium.org Date 2013-02-14 16:17:51 -0800 (Thu, 14 Feb 2013) Log Message [V8] Remove GenerateEventListenerCallback() from CodeGeneratorV8.pm https://bugs.webkit.org/show_bug.cgi?id=109786 Reviewed by Adam Barth. Some code is duplicated between GenerateEventListenerCallback() and GenerateFunctionCallback(). By inlining GenerateEventListenerCallback() into GenerateFunctionCallback(), we can remove the duplication. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateFunctionCallback): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm Diff Modified: trunk/Source/WebCore/ChangeLog (142933 => 142934) --- trunk/Source/WebCore/ChangeLog 2013-02-15 00:16:43 UTC (rev 142933) +++ trunk/Source/WebCore/ChangeLog 2013-02-15 00:17:51 UTC (rev 142934) @@ -1,3 +1,19 @@ +2013-02-14 Kentaro Hara + +[V8] Remove GenerateEventListenerCallback() from CodeGeneratorV8.pm +https://bugs.webkit.org/show_bug.cgi?id=109786 + +Reviewed by Adam Barth. + +Some code is duplicated between GenerateEventListenerCallback() +and GenerateFunctionCallback(). By inlining GenerateEventListenerCallback() +into GenerateFunctionCallback(), we can remove the duplication. + +No tests. No change in behavior. + +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateFunctionCallback): + 2013-02-14 Ojan Vafai Intrinsic and preferred widths on replaced elements are wrong in many cases Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (142933 => 142934) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-15 00:16:43 UTC (rev 142933) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-15 00:17:51 UTC (rev 142934) @@ -1369,49 +1369,6 @@ push(@implContentDecls, "#endif // ${conditionalString}\n\n") if $conditionalString; } -sub GenerateEventListenerCallback -{ -my $interfaceName = shift; -my $requiresHiddenDependency = shift; -my $function = shift; -my $name = $function->signature->name; -my $lookupType = ($name eq "addEventListener") ? "OrCreate" : "Only"; -my $passRefPtrHandling = ($name eq "addEventListener") ? "" : ".get()"; -my $hiddenDependencyAction = ($name eq "addEventListener") ? "create" : "remove"; - -AddToImplIncludes("V8EventListenerList.h"); -push(@implContentDecls, < ${name}Callback(const v8::Arguments& args) -{ -END -if (HasCustomMethod($function->signature->extendedAttributes)) { -push(@implContentDecls, < listener = V8EventListenerList::getEventListener(args[1], false, ListenerFind${lookupType}); -if (listener) { -V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource, stringResource, args[0]); -V8${interfaceName}::toNative(args.Holder())->${name}(stringResource, listener${passRefPtrHandling}, args[2]->BooleanValue()); -END -if ($requiresHiddenDependency) { -push(@implContentDecls, < sub GenerateParametersCheckExpression { my $numParameters = shift; @@ -1536,17 +1493,6 @@ $name = $name . $function->{overloadIndex}; } -# Adding and removing event listeners are not standard callback behavior, -# but they are extremely consistent across the various interfaces that take event listeners, -# so we can generate them as a "special case". -if ($name eq "addEventListener") { -GenerateEventListenerCallback($interfaceName, !$codeGenerator->InheritsInterface($interface, "Node"), $function); -return; -} elsif ($name eq "removeEventListener") { -GenerateEventListenerCallback($interfaceName, !$codeGenerator->InheritsInterface($interface, "Node"), $function); -return; -} - my $conditionalString = $codeGenerator->GenerateConditionalString($function->signature); push(@implContentDecls, "#if ${conditionalString}\n\n") if $conditionalString; push(@implContentDecls, <@@ -1566,6 +1512,33 @@ return; } +if ($name eq "addEventListener" || $name eq "removeEventListener") { +my $lookupType = ($name eq "addEventListener") ? "OrCreate" : "Only"; +my $passRefPtrHandling = ($name eq "addEventListener") ? "" : ".get()"; +my $hiddenDependencyAction = ($name eq "addEventListener") ? "create" : "remove"; + +AddToImplIncludes("V8EventListenerList.h"); +push(@implContentDecls, < listener = V8EventListenerList::getEventListener(args[1], false, ListenerFind${lookupType}); +if (listener) { +V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource, stringResource, args[0]); +V8${interfaceName}::toNative(args.Holder())->${name}(stringResource, listener${passRefPtrHandling}, args[2]->BooleanValue()); +END +if (!$codeGenerator->InheritsInterface($interface, "Node")) { +push(@implContentDecls, < push(@implContentDec
[webkit-changes] [142864] trunk
Title: [142864] trunk Revision 142864 Author hara...@chromium.org Date 2013-02-14 03:18:12 -0800 (Thu, 14 Feb 2013) Log Message [V8] Rename XXXAccessorGetter() to XXXAttrGetterCustom(), and XXXAccessorSetter() to XXXAttrSetterCustom() https://bugs.webkit.org/show_bug.cgi?id=109679 Reviewed by Adam Barth. For naming consistency and clarification. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (GenerateHeaderCustomCall): (GenerateNormalAttrGetter): (GenerateNormalAttrSetter): (GenerateImplementation): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter): (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::customAttrAttrGetter): (WebCore::TestObjV8Internal::customAttrAttrSetter): * bindings/scripts/test/V8/V8TestObj.h: (V8TestObj): * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp: (WebCore::V8AudioBufferSourceNode::bufferAttrSetterCustom): * bindings/v8/custom/V8BiquadFilterNodeCustom.cpp: (WebCore::V8BiquadFilterNode::typeAttrSetterCustom): * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp: (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrGetterCustom): (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrSetterCustom): (WebCore::V8CanvasRenderingContext2D::fillStyleAttrGetterCustom): (WebCore::V8CanvasRenderingContext2D::fillStyleAttrSetterCustom): * bindings/v8/custom/V8ClipboardCustom.cpp: (WebCore::V8Clipboard::typesAttrGetterCustom): * bindings/v8/custom/V8CoordinatesCustom.cpp: (WebCore::V8Coordinates::altitudeAttrGetterCustom): (WebCore::V8Coordinates::altitudeAccuracyAttrGetterCustom): (WebCore::V8Coordinates::headingAttrGetterCustom): (WebCore::V8Coordinates::speedAttrGetterCustom): * bindings/v8/custom/V8CustomEventCustom.cpp: (WebCore::V8CustomEvent::detailAttrGetterCustom): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::V8DOMWindow::eventAttrGetterCustom): (WebCore::V8DOMWindow::eventAttrSetterCustom): (WebCore::V8DOMWindow::locationAttrSetterCustom): (WebCore::V8DOMWindow::openerAttrSetterCustom): * bindings/v8/custom/V8DeviceMotionEventCustom.cpp: (WebCore::V8DeviceMotionEvent::accelerationAttrGetterCustom): (WebCore::V8DeviceMotionEvent::accelerationIncludingGravityAttrGetterCustom): (WebCore::V8DeviceMotionEvent::rotationRateAttrGetterCustom): (WebCore::V8DeviceMotionEvent::intervalAttrGetterCustom): * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp: (WebCore::V8DeviceOrientationEvent::alphaAttrGetterCustom): (WebCore::V8DeviceOrientationEvent::betaAttrGetterCustom): (WebCore::V8DeviceOrientationEvent::gammaAttrGetterCustom): (WebCore::V8DeviceOrientationEvent::absoluteAttrGetterCustom): * bindings/v8/custom/V8DocumentLocationCustom.cpp: (WebCore::V8Document::locationAttrGetterCustom): (WebCore::V8Document::locationAttrSetterCustom): * bindings/v8/custom/V8EventCustom.cpp: (WebCore::V8Event::dataTransferAttrGetterCustom): (WebCore::V8Event::clipboardDataAttrGetterCustom): * bindings/v8/custom/V8FileReaderCustom.cpp: (WebCore::V8FileReader::resultAttrGetterCustom): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::V8HTMLDocument::allAttrSetterCustom): * bindings/v8/custom/V8HTMLElementCustom.cpp: (WebCore::V8HTMLElement::itemValueAttrGetterCustom): (WebCore::V8HTMLElement::itemValueAttrSetterCustom): * bindings/v8/custom/V8HTMLFrameElementCustom.cpp: (WebCore::V8HTMLFrameElement::locationAttrSetterCustom): * bindings/v8/custom/V8HTMLInputElementCustom.cpp: (WebCore::V8HTMLInputElement::selectionStartAttrGetterCustom): (WebCore::V8HTMLInputElement::selectionStartAttrSetterCustom): (WebCore::V8HTMLInputElement::selectionEndAttrGetterCustom): (WebCore::V8HTMLInputElement::selectionEndAttrSetterCustom): (WebCore::V8HTMLInputElement::selectionDirectionAttrGetterCustom): (WebCore::V8HTMLInputElement::selectionDirectionAttrSetterCustom): * bindings/v8/custom/V8HTMLLinkElementCustom.cpp: (WebCore::V8HTMLLinkElement::sizesAttrGetterCustom): (WebCore::V8HTMLLinkElement::sizesAttrSetterCustom): * bindings/v8/custom/V8HTMLMediaElementCustom.cpp: (WebCore::V8HTMLMediaElement::controllerAttrSetterCustom): * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: (WebCore::V8HTMLOptionsCollection::lengthAttrSetterCustom): * bindings/v8/custom/V8HistoryCustom.cpp: (WebCore::V8History::stateAttrGetterCustom): * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp: (WebCore::V8JavaScriptCallFrame::scopeChainAttrGetterCustom): (WebCore::V8JavaScriptCallFrame::thisObjectAttrGetterCustom): (WebCore::V8JavaScriptCallFrame::typeAttrGetterCustom): * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::V8Location::hashAttrSetterCustom): (WebCore::V8Location::hostAttrSetterCustom): (WebCore::V8Location::hostnameAttrSetterCustom): (WebCore::V8Location::hrefAttrSetterCustom): (WebCore::V8Location::pathnameAttrSetterCustom): (WebCore::V8Location::portAttrSetterCustom): (WebCore::V8Location::proto
[webkit-changes] [142833] trunk/Source/WebCore
Title: [142833] trunk/Source/WebCore Revision 142833 Author hara...@chromium.org Date 2013-02-13 17:35:17 -0800 (Wed, 13 Feb 2013) Log Message [V8] Generate wrapper methods for custom getters/setters https://bugs.webkit.org/show_bug.cgi?id=109666 Reviewed by Adam Barth. Currently V8 directly calls back custom getters/setters written in custom binding files. This makes it impossible for code generators to hook custom getters/setters (e.g. Code generators cannot insert a code for FeatureObservation into custom getters/setters). To solve the problem, we should generate wrapper methods for custom getters/setters. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (GenerateNormalAttrSetter): (GenerateSingleBatchedAttribute): (GenerateImplementation): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter): (TestInterfaceV8Internal): (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter): (WebCore): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::customAttrAttrGetter): (TestObjV8Internal): (WebCore::TestObjV8Internal::customAttrAttrSetter): (WebCore): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (142832 => 142833) --- trunk/Source/WebCore/ChangeLog 2013-02-14 01:32:32 UTC (rev 142832) +++ trunk/Source/WebCore/ChangeLog 2013-02-14 01:35:17 UTC (rev 142833) @@ -1,3 +1,34 @@ +2013-02-13 Kentaro Hara + +[V8] Generate wrapper methods for custom getters/setters +https://bugs.webkit.org/show_bug.cgi?id=109666 + +Reviewed by Adam Barth. + +Currently V8 directly calls back custom getters/setters written +in custom binding files. This makes it impossible for code generators +to hook custom getters/setters (e.g. Code generators cannot insert a code +for FeatureObservation into custom getters/setters). To solve the problem, +we should generate wrapper methods for custom getters/setters. + +No tests. No change in behavior. + +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateNormalAttrGetter): +(GenerateNormalAttrSetter): +(GenerateSingleBatchedAttribute): +(GenerateImplementation): +* bindings/scripts/test/V8/V8TestInterface.cpp: +(WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter): +(TestInterfaceV8Internal): +(WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter): +(WebCore): +* bindings/scripts/test/V8/V8TestObj.cpp: +(WebCore::TestObjV8Internal::customAttrAttrGetter): +(TestObjV8Internal): +(WebCore::TestObjV8Internal::customAttrAttrSetter): +(WebCore): + 2013-02-13 Vineet Chaudhary HTMLCollections namedItem() methods should return null than undefined for empty collections. Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (142832 => 142833) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-14 01:32:32 UTC (rev 142832) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-14 01:35:17 UTC (rev 142833) @@ -898,6 +898,16 @@ END push(@implContentDecls, GenerateFeatureObservation($attrExt->{"V8MeasureAs"})); +if (HasCustomGetter($attrExt)) { +push(@implContentDecls, < if ($svgNativeType) { my $svgWrappedNativeType = $codeGenerator->GetSVGWrappedTypeNeedingTearOff($interfaceName); if ($svgWrappedNativeType =~ /List/) { @@ -1174,6 +1184,16 @@ push(@implContentDecls, "static void ${attrName}AttrSetter(v8::Local name, v8::Local value, const v8::AccessorInfo& info)\n{\n"); push(@implContentDecls, GenerateFeatureObservation($attribute->signature->extendedAttributes->{"V8MeasureAs"})); +if (HasCustomSetter($attrExt)) { +push(@implContentDecls, < # If the "StrictTypeChecking" extended attribute is present, and the attribute's type is an # interface type, then if the incoming value does not implement that interface, a TypeError is # thrown rather than silently passing NULL to the C++ code. @@ -2304,17 +2324,9 @@ $getter = "${interfaceName}V8Internal::${attrName}AttrGetter"; $setter = "${interfaceName}V8Internal::${attrName}AttrSetter"; -if ($attrExt->{"Replaceable"}) { +if (!HasCustomSetter($attrExt) && $attrExt->{"Replaceable"}) { $setter = "${interfaceName}V8Internal::${interfaceName}ReplaceableAttrSetter"; } - -if (HasCustomSetter($attrExt)) { -$setter = "V8${customAccessor}AccessorSetter"; -} - -if (HasCustomGetter($attrExt)) { -$getter = "V8${customAccessor}AccessorGetter"; -}
[webkit-changes] [142737] trunk/Source/WebCore
Title: [142737] trunk/Source/WebCore Revision 142737 Author hara...@chromium.org Date 2013-02-13 04:57:21 -0800 (Wed, 13 Feb 2013) Log Message Unreviewed, rolling out r142730. http://trac.webkit.org/changeset/142730 https://bugs.webkit.org/show_bug.cgi?id=109666 chromium browser tests are failing * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (GenerateNormalAttrSetter): (GenerateSingleBatchedAttribute): (GenerateImplementation): * bindings/scripts/test/V8/V8TestInterface.cpp: (TestInterfaceV8Internal): (WebCore): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (142736 => 142737) --- trunk/Source/WebCore/ChangeLog 2013-02-13 11:59:49 UTC (rev 142736) +++ trunk/Source/WebCore/ChangeLog 2013-02-13 12:57:21 UTC (rev 142737) @@ -1,3 +1,22 @@ +2013-02-13 Kentaro Hara + +Unreviewed, rolling out r142730. +http://trac.webkit.org/changeset/142730 +https://bugs.webkit.org/show_bug.cgi?id=109666 + +chromium browser tests are failing + +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateNormalAttrGetter): +(GenerateNormalAttrSetter): +(GenerateSingleBatchedAttribute): +(GenerateImplementation): +* bindings/scripts/test/V8/V8TestInterface.cpp: +(TestInterfaceV8Internal): +(WebCore): +* bindings/scripts/test/V8/V8TestObj.cpp: +(WebCore): + 2013-02-13 Tamas Czene OpenCL implementation of Flood SVG filters. Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (142736 => 142737) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-13 11:59:49 UTC (rev 142736) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-13 12:57:21 UTC (rev 142737) @@ -898,16 +898,6 @@ END push(@implContentDecls, GenerateFeatureObservation($attrExt->{"V8MeasureAs"})); -if (HasCustomGetter($attrExt)) { -push(@implContentDecls, < if ($svgNativeType) { my $svgWrappedNativeType = $codeGenerator->GetSVGWrappedTypeNeedingTearOff($interfaceName); if ($svgWrappedNativeType =~ /List/) { @@ -1184,16 +1174,6 @@ push(@implContentDecls, "static void ${attrName}AttrSetter(v8::Local name, v8::Local value, const v8::AccessorInfo& info)\n{\n"); push(@implContentDecls, GenerateFeatureObservation($attribute->signature->extendedAttributes->{"V8MeasureAs"})); -if (HasCustomSetter($attrExt)) { -push(@implContentDecls, < # If the "StrictTypeChecking" extended attribute is present, and the attribute's type is an # interface type, then if the incoming value does not implement that interface, a TypeError is # thrown rather than silently passing NULL to the C++ code. @@ -2327,6 +2307,14 @@ if ($attrExt->{"Replaceable"}) { $setter = "${interfaceName}V8Internal::${interfaceName}ReplaceableAttrSetter"; } + +if (HasCustomSetter($attrExt)) { +$setter = "V8${customAccessor}AccessorSetter"; +} + +if (HasCustomGetter($attrExt)) { +$getter = "V8${customAccessor}AccessorGetter"; +} } # Read only attributes @@ -2724,11 +2712,13 @@ AddToImplIncludes("SerializedScriptValue.h"); } -GenerateNormalAttrGetter($attribute, $interface); +if (!HasCustomGetter($attrExt)) { +GenerateNormalAttrGetter($attribute, $interface); +} if ($attrExt->{"Replaceable"}) { $hasReplaceable = 1; -} elsif (!IsReadonly($attribute)) { +} elsif (!HasCustomSetter($attrExt) && !IsReadonly($attribute)) { GenerateNormalAttrSetter($attribute, $interface); } } Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp (142736 => 142737) --- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp 2013-02-13 11:59:49 UTC (rev 142736) +++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp 2013-02-13 12:57:21 UTC (rev 142737) @@ -131,24 +131,6 @@ #if ENABLE(Condition11) || ENABLE(Condition12) -static v8::Handle supplementalStr3AttrGetter(v8::Local name, const v8::AccessorInfo& info) -{ -return V8TestInterface::supplementalStr3AccessorGetter(name, info); -} - -#endif // ENABLE(Condition11) || ENABLE(Condition12) - -#if ENABLE(Condition11) || ENABLE(Condition12) - -static void supplementalStr3AttrSetter(v8::Local name, v8::Local value, const v8::AccessorInfo& info) -{ -V8TestInterface::supplementalStr3AccessorSetter(name, value, info); -} - -#endif // ENABLE(Condition11) || ENABLE(Condition12) - -#if ENABLE(Condition11) || ENABLE(Condition12) - static v8::Handle supplementalNo
[webkit-changes] [142730] trunk/Source/WebCore
Title: [142730] trunk/Source/WebCore Revision 142730 Author hara...@chromium.org Date 2013-02-13 01:43:48 -0800 (Wed, 13 Feb 2013) Log Message [V8] Generate wrapper methods for custom getters/setters https://bugs.webkit.org/show_bug.cgi?id=109666 Reviewed by Adam Barth. Currently V8 directly calls back custom getters/setters written in custom binding files. This makes it impossible for code generators to hook custom getters/setters (e.g. Code generators cannot insert a code for FeatureObservation into custom getters/setters). We should generate wrapper methods for custom getters/setters. In the future, I will insert TRACE_EVENT() macros into these wrapper methods to profile DOM getters/setters/methods. * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (GenerateNormalAttrSetter): (GenerateSingleBatchedAttribute): (GenerateImplementation): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter): (TestInterfaceV8Internal): (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter): (WebCore): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::customAttrAttrGetter): (TestObjV8Internal): (WebCore::TestObjV8Internal::customAttrAttrSetter): (WebCore): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (142729 => 142730) --- trunk/Source/WebCore/ChangeLog 2013-02-13 09:27:14 UTC (rev 142729) +++ trunk/Source/WebCore/ChangeLog 2013-02-13 09:43:48 UTC (rev 142730) @@ -1,3 +1,35 @@ +2013-02-12 Kentaro Hara + +[V8] Generate wrapper methods for custom getters/setters +https://bugs.webkit.org/show_bug.cgi?id=109666 + +Reviewed by Adam Barth. + +Currently V8 directly calls back custom getters/setters written +in custom binding files. This makes it impossible for code generators +to hook custom getters/setters (e.g. Code generators cannot insert a code +for FeatureObservation into custom getters/setters). We should generate +wrapper methods for custom getters/setters. + +In the future, I will insert TRACE_EVENT() macros into these wrapper methods +to profile DOM getters/setters/methods. + +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateNormalAttrGetter): +(GenerateNormalAttrSetter): +(GenerateSingleBatchedAttribute): +(GenerateImplementation): +* bindings/scripts/test/V8/V8TestInterface.cpp: +(WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter): +(TestInterfaceV8Internal): +(WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter): +(WebCore): +* bindings/scripts/test/V8/V8TestObj.cpp: +(WebCore::TestObjV8Internal::customAttrAttrGetter): +(TestObjV8Internal): +(WebCore::TestObjV8Internal::customAttrAttrSetter): +(WebCore): + 2013-02-13 Sheriff Bot Unreviewed, rolling out r142611. Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (142729 => 142730) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-13 09:27:14 UTC (rev 142729) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-13 09:43:48 UTC (rev 142730) @@ -898,6 +898,16 @@ END push(@implContentDecls, GenerateFeatureObservation($attrExt->{"V8MeasureAs"})); +if (HasCustomGetter($attrExt)) { +push(@implContentDecls, < if ($svgNativeType) { my $svgWrappedNativeType = $codeGenerator->GetSVGWrappedTypeNeedingTearOff($interfaceName); if ($svgWrappedNativeType =~ /List/) { @@ -1174,6 +1184,16 @@ push(@implContentDecls, "static void ${attrName}AttrSetter(v8::Local name, v8::Local value, const v8::AccessorInfo& info)\n{\n"); push(@implContentDecls, GenerateFeatureObservation($attribute->signature->extendedAttributes->{"V8MeasureAs"})); +if (HasCustomSetter($attrExt)) { +push(@implContentDecls, < # If the "StrictTypeChecking" extended attribute is present, and the attribute's type is an # interface type, then if the incoming value does not implement that interface, a TypeError is # thrown rather than silently passing NULL to the C++ code. @@ -2307,14 +2327,6 @@ if ($attrExt->{"Replaceable"}) { $setter = "${interfaceName}V8Internal::${interfaceName}ReplaceableAttrSetter"; } - -if (HasCustomSetter($attrExt)) { -$setter = "V8${customAccessor}AccessorSetter"; -} - -if (HasCustomGetter($attrExt)) { -$getter = "V8${customAccessor}AccessorGetter"; -} } # Read only attributes @@ -2712,13 +2724,11 @@ AddToImplIncludes("SerializedScriptValue.h"); } -if (!HasCusto
[webkit-changes] [142727] trunk/Source/WebCore
Title: [142727] trunk/Source/WebCore Revision 142727 Author hara...@chromium.org Date 2013-02-13 00:10:02 -0800 (Wed, 13 Feb 2013) Log Message [V8] There is no XXXConstructor that requires a custom getter https://bugs.webkit.org/show_bug.cgi?id=109667 Reviewed by Adam Barth. Currently '[Custom] attribute XXXConstructor xxx' generates XXXAttrGetter(). However, there is no XXXConstructor with [Custom]. In addition, it does make no sense to generate XXXAttrGetter() for such cases. We can remove the logic from CodeGeneratorV8.pm. * bindings/scripts/CodeGeneratorV8.pm: (GenerateSingleBatchedAttribute): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm Diff Modified: trunk/Source/WebCore/ChangeLog (142726 => 142727) --- trunk/Source/WebCore/ChangeLog 2013-02-13 07:34:47 UTC (rev 142726) +++ trunk/Source/WebCore/ChangeLog 2013-02-13 08:10:02 UTC (rev 142727) @@ -1,3 +1,18 @@ +2013-02-13 Kentaro Hara + +[V8] There is no XXXConstructor that requires a custom getter +https://bugs.webkit.org/show_bug.cgi?id=109667 + +Reviewed by Adam Barth. + +Currently '[Custom] attribute XXXConstructor xxx' generates +XXXAttrGetter(). However, there is no XXXConstructor with [Custom]. +In addition, it does make no sense to generate XXXAttrGetter() for such cases. +We can remove the logic from CodeGeneratorV8.pm. + +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateSingleBatchedAttribute): + 2013-02-12 Hajime Morrita [Internals] setShadowDOMEnabled() shouldn't be used except a few tests. Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (142726 => 142727) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-13 07:34:47 UTC (rev 142726) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-13 08:10:02 UTC (rev 142727) @@ -2296,12 +2296,8 @@ if ($constructorType !~ /Constructor$/ || $attribute->signature->extendedAttributes->{"V8CustomConstructor"} || $attribute->signature->extendedAttributes->{"CustomConstructor"}) { AddToImplIncludes("V8${constructorType}.h", $attribute->signature->extendedAttributes->{"Conditional"}); } -if ($customAccessor) { -$getter = "V8${customAccessor}AccessorGetter"; -} else { -$data = "" -$getter = "${interfaceName}V8Internal::${interfaceName}ConstructorGetter"; -} +$data = "" +$getter = "${interfaceName}V8Internal::${interfaceName}ConstructorGetter"; $setter = "${interfaceName}V8Internal::${interfaceName}ReplaceableAttrSetter"; } else { # Default Getter and Setter ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [142565] trunk/Source/WebCore
Title: [142565] trunk/Source/WebCore Revision 142565 Author hara...@chromium.org Date 2013-02-11 18:06:13 -0800 (Mon, 11 Feb 2013) Log Message [V8] ScheduledAction::m_context can be empty, so we shouldn't retrieve an Isolate by using m_context->GetIsolate() https://bugs.webkit.org/show_bug.cgi?id=109523 Reviewed by Adam Barth. Chromium bug: https://code.google.com/p/chromium/issues/detail?id=175307#makechanges Currently ScheduledAction is retrieving an Isolate by using m_context->GetIsolate(). This can crash because ScheduledAction::m_context can be empty. Specifically, ScheduledAction::m_context is set to ScriptController::currentWorldContext(), which can return an empty handle when a frame does not exist. In addition, 'if(context.IsEmpty())' in ScheduledAction.cpp implies that it can be empty. Alternately, we should pass an Isolate explicitly when a ScheduledAction is instantiated. No tests. The Chromium crash report doesn't provide enough information to reproduce the bug. * bindings/v8/ScheduledAction.cpp: (WebCore::ScheduledAction::ScheduledAction): (WebCore): (WebCore::ScheduledAction::~ScheduledAction): * bindings/v8/ScheduledAction.h: (ScheduledAction): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::WindowSetTimeoutImpl): * bindings/v8/custom/V8WorkerContextCustom.cpp: (WebCore::SetTimeoutOrInterval): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/v8/ScheduledAction.cpp trunk/Source/WebCore/bindings/v8/ScheduledAction.h trunk/Source/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (142564 => 142565) --- trunk/Source/WebCore/ChangeLog 2013-02-12 01:58:38 UTC (rev 142564) +++ trunk/Source/WebCore/ChangeLog 2013-02-12 02:06:13 UTC (rev 142565) @@ -1,3 +1,35 @@ +2013-02-11 Kentaro Hara + +[V8] ScheduledAction::m_context can be empty, so we shouldn't +retrieve an Isolate by using m_context->GetIsolate() +https://bugs.webkit.org/show_bug.cgi?id=109523 + +Reviewed by Adam Barth. + +Chromium bug: https://code.google.com/p/chromium/issues/detail?id=175307#makechanges + +Currently ScheduledAction is retrieving an Isolate by using m_context->GetIsolate(). +This can crash because ScheduledAction::m_context can be empty. Specifically, +ScheduledAction::m_context is set to ScriptController::currentWorldContext(), +which can return an empty handle when a frame does not exist. In addition, +'if(context.IsEmpty())' in ScheduledAction.cpp implies that it can be empty. + +Alternately, we should pass an Isolate explicitly when a ScheduledAction is instantiated. + +No tests. The Chromium crash report doesn't provide enough information +to reproduce the bug. + +* bindings/v8/ScheduledAction.cpp: +(WebCore::ScheduledAction::ScheduledAction): +(WebCore): +(WebCore::ScheduledAction::~ScheduledAction): +* bindings/v8/ScheduledAction.h: +(ScheduledAction): +* bindings/v8/custom/V8DOMWindowCustom.cpp: +(WebCore::WindowSetTimeoutImpl): +* bindings/v8/custom/V8WorkerContextCustom.cpp: +(WebCore::SetTimeoutOrInterval): + 2013-02-11 Adenilson Cavalcanti Build fix: r142549 broke EFL build Modified: trunk/Source/WebCore/bindings/v8/ScheduledAction.cpp (142564 => 142565) --- trunk/Source/WebCore/bindings/v8/ScheduledAction.cpp 2013-02-12 01:58:38 UTC (rev 142564) +++ trunk/Source/WebCore/bindings/v8/ScheduledAction.cpp 2013-02-12 02:06:13 UTC (rev 142565) @@ -49,21 +49,28 @@ namespace WebCore { -ScheduledAction::ScheduledAction(v8::Handle context, v8::Handle function, int argc, v8::Handle argv[]) +ScheduledAction::ScheduledAction(v8::Handle context, v8::Handle function, int argc, v8::Handle argv[], v8::Isolate* isolate) : m_context(context) , m_function(function) , m_code(String(), KURL(), TextPosition::belowRangePosition()) +, m_isolate(isolate) { -v8::Isolate* isolate = m_context->GetIsolate(); m_args.reserveCapacity(argc); for (int i = 0; i < argc; ++i) -m_args.append(v8::Persistent::New(isolate, argv[i])); +m_args.append(v8::Persistent::New(m_isolate, argv[i])); } +ScheduledAction::ScheduledAction(v8::Handle context, const String& code, const KURL& url, v8::Isolate* isolate) +: m_context(context) +, m_code(code, url) +, m_isolate(isolate) +{ +} + ScheduledAction::~ScheduledAction() { for (size_t i = 0; i < m_args.size(); ++i) { -m_args[i].Dispose(m_context->GetIsolate()); +m_args[i].Dispose(m_isolate); m_args[i].Clear(); } } Modified: trunk/Source/WebCore/bindings/v8/ScheduledAction.h (142564 => 142565) --- trunk/Source/WebCore/bindings/v8/ScheduledAction.h 2013-02-12 01:58:38 UTC (rev 142564) +++ trunk/Source/WebCore/bindings/v8/ScheduledAction.h 201
[webkit-changes] [142550] trunk/Source/WebCore
Title: [142550] trunk/Source/WebCore Revision 142550 Author hara...@chromium.org Date 2013-02-11 16:46:58 -0800 (Mon, 11 Feb 2013) Log Message Build fix after r142528 https://bugs.webkit.org/show_bug.cgi?id=109520 Reviewed by Eric Seidel. r142528 changed GIFImageReader from a struct to a class. We also need to fix a forward declaration. No tests. * platform/image-decoders/gif/GIFImageDecoder.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/image-decoders/gif/GIFImageDecoder.h Diff Modified: trunk/Source/WebCore/ChangeLog (142549 => 142550) --- trunk/Source/WebCore/ChangeLog 2013-02-12 00:39:54 UTC (rev 142549) +++ trunk/Source/WebCore/ChangeLog 2013-02-12 00:46:58 UTC (rev 142550) @@ -1,3 +1,17 @@ +2013-02-11 Kentaro Hara + +Build fix after r142528 +https://bugs.webkit.org/show_bug.cgi?id=109520 + +Reviewed by Eric Seidel. + +r142528 changed GIFImageReader from a struct to a class. +We also need to fix a forward declaration. + +No tests. + +* platform/image-decoders/gif/GIFImageDecoder.h: + 2013-02-11 Nico Weber Remove web intents code Modified: trunk/Source/WebCore/platform/image-decoders/gif/GIFImageDecoder.h (142549 => 142550) --- trunk/Source/WebCore/platform/image-decoders/gif/GIFImageDecoder.h 2013-02-12 00:39:54 UTC (rev 142549) +++ trunk/Source/WebCore/platform/image-decoders/gif/GIFImageDecoder.h 2013-02-12 00:46:58 UTC (rev 142550) @@ -29,7 +29,7 @@ #include "ImageDecoder.h" #include -struct GIFImageReader; +class GIFImageReader; namespace WebCore { ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [142449] trunk/LayoutTests
Title: [142449] trunk/LayoutTests Revision 142449 Author hara...@chromium.org Date 2013-02-11 03:42:07 -0800 (Mon, 11 Feb 2013) Log Message Unreviewed gardening. Marked editing/spelling/spellcheck-async.html as [ Pass Failure ]. * platform/chromium/TestExpectations: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/chromium/TestExpectations Diff Modified: trunk/LayoutTests/ChangeLog (142448 => 142449) --- trunk/LayoutTests/ChangeLog 2013-02-11 11:36:39 UTC (rev 142448) +++ trunk/LayoutTests/ChangeLog 2013-02-11 11:42:07 UTC (rev 142449) @@ -1,5 +1,12 @@ 2013-02-11 Kentaro Hara +Unreviewed gardening. Marked editing/spelling/spellcheck-async.html +as [ Pass Failure ]. + +* platform/chromium/TestExpectations: + +2013-02-11 Kentaro Hara + Unreviewed gardening. Added [Timeout] to http/tests/misc/window-dot-stop.html. * platform/chromium/TestExpectations: Modified: trunk/LayoutTests/platform/chromium/TestExpectations (142448 => 142449) --- trunk/LayoutTests/platform/chromium/TestExpectations 2013-02-11 11:36:39 UTC (rev 142448) +++ trunk/LayoutTests/platform/chromium/TestExpectations 2013-02-11 11:42:07 UTC (rev 142449) @@ -1017,6 +1017,8 @@ webkit.org/b/105005 [ Debug ] fast/css/variables/case-insensitive.html [ Pass Crash ] +webkit.org/b/109415 editing/spelling/spellcheck-async.html [ Pass Failure ] + # ResourceRequest needs to support setTimeoutInterval webkit.org/b/98397 http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-aborted.html [ Skip ] webkit.org/b/98397 http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-abortedonmain.html [ Skip ] ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [142448] trunk/LayoutTests
Title: [142448] trunk/LayoutTests Revision 142448 Author hara...@chromium.org Date 2013-02-11 03:36:39 -0800 (Mon, 11 Feb 2013) Log Message Unreviewed gardening. Added [Timeout] to http/tests/misc/window-dot-stop.html. * platform/chromium/TestExpectations: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/chromium/TestExpectations Diff Modified: trunk/LayoutTests/ChangeLog (142447 => 142448) --- trunk/LayoutTests/ChangeLog 2013-02-11 11:29:03 UTC (rev 142447) +++ trunk/LayoutTests/ChangeLog 2013-02-11 11:36:39 UTC (rev 142448) @@ -1,3 +1,9 @@ +2013-02-11 Kentaro Hara + +Unreviewed gardening. Added [Timeout] to http/tests/misc/window-dot-stop.html. + +* platform/chromium/TestExpectations: + 2013-02-11 Zan Dobersek Unreviewed GTK gardening. Modified: trunk/LayoutTests/platform/chromium/TestExpectations (142447 => 142448) --- trunk/LayoutTests/platform/chromium/TestExpectations 2013-02-11 11:29:03 UTC (rev 142447) +++ trunk/LayoutTests/platform/chromium/TestExpectations 2013-02-11 11:36:39 UTC (rev 142448) @@ -3646,7 +3646,7 @@ webkit.org/b/93566 [ Debug ] fast/parser/iframe-sets-parent-to-_javascript_-url.html [ Failure Pass ] webkit.org/b/93567 [ Debug ] fast/parser/_javascript_-url-compat-mode.html [ Failure Pass ] webkit.org/b/93569 [ Debug ] http/tests/navigation/lockedhistory-iframe.html [ Failure Pass Timeout ] -webkit.org/b/93568 [ Debug ] http/tests/misc/window-dot-stop.html [ Failure Pass ] +webkit.org/b/93568 [ Debug ] http/tests/misc/window-dot-stop.html [ Failure Pass Timeout ] # V8 does not support static attributes webkit.org/b/93488 fast/notifications/notifications-permission.html [ Skip ] ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [142442] trunk/LayoutTests
Title: [142442] trunk/LayoutTests Revision 142442 Author hara...@chromium.org Date 2013-02-11 02:22:03 -0800 (Mon, 11 Feb 2013) Log Message Unreviewed gardening. Mark svg/custom/foreign-object-skew.svg as [ ImageOnlyFailure Pass ]. * platform/chromium/TestExpectations: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/chromium/TestExpectations Diff Modified: trunk/LayoutTests/ChangeLog (142441 => 142442) --- trunk/LayoutTests/ChangeLog 2013-02-11 10:11:46 UTC (rev 142441) +++ trunk/LayoutTests/ChangeLog 2013-02-11 10:22:03 UTC (rev 142442) @@ -1,3 +1,10 @@ +2013-02-11 Kentaro Hara + +Unreviewed gardening. Mark svg/custom/foreign-object-skew.svg +as [ ImageOnlyFailure Pass ]. + +* platform/chromium/TestExpectations: + 2013-02-11 John J. Barton Web Inspector: Don't throw exceptions in WebInspector.Color Modified: trunk/LayoutTests/platform/chromium/TestExpectations (142441 => 142442) --- trunk/LayoutTests/platform/chromium/TestExpectations 2013-02-11 10:11:46 UTC (rev 142441) +++ trunk/LayoutTests/platform/chromium/TestExpectations 2013-02-11 10:22:03 UTC (rev 142442) @@ -1353,6 +1353,8 @@ webkit.org/b/83303 [ Win ] svg/custom/mouse-move-on-svg-root-standalone.svg [ ImageOnlyFailure Pass ] webkit.org/b/83303 [ Win ] svg/custom/mouse-move-on-svg-root.xhtml [ ImageOnlyFailure Pass ] +webkit.org/b/109413 [ Linux Mac ] svg/custom/foreign-object-skew.svg [ ImageOnlyFailure Pass ] + # This fails image 5-10% of the time. Probably a race condition on timers. webkit.org/b/83471 svg/as-image/animated-svg-as-image-same-image.html [ ImageOnlyFailure Pass ] ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [142432] trunk/LayoutTests
Title: [142432] trunk/LayoutTests Revision 142432 Author hara...@chromium.org Date 2013-02-10 22:54:34 -0800 (Sun, 10 Feb 2013) Log Message Unreviewed gardening. Rebaselined an image. * platform/chromium-mac/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/chromium-mac/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png Diff Modified: trunk/LayoutTests/ChangeLog (142431 => 142432) --- trunk/LayoutTests/ChangeLog 2013-02-11 06:53:06 UTC (rev 142431) +++ trunk/LayoutTests/ChangeLog 2013-02-11 06:54:34 UTC (rev 142432) @@ -1,5 +1,11 @@ 2013-02-10 Kentaro Hara +Unreviewed gardening. Rebaselined an image. + +* platform/chromium-mac/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png: + +2013-02-10 Kentaro Hara + Unreviewed gardening. Marked http/tests/css/css-image-loading.html as SLOW. * platform/chromium/TestExpectations: Modified: trunk/LayoutTests/platform/chromium-mac/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png (Binary files differ) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [142431] trunk/LayoutTests
Title: [142431] trunk/LayoutTests Revision 142431 Author hara...@chromium.org Date 2013-02-10 22:53:06 -0800 (Sun, 10 Feb 2013) Log Message Unreviewed gardening. Marked http/tests/css/css-image-loading.html as SLOW. * platform/chromium/TestExpectations: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/chromium/TestExpectations Diff Modified: trunk/LayoutTests/ChangeLog (142430 => 142431) --- trunk/LayoutTests/ChangeLog 2013-02-11 06:47:37 UTC (rev 142430) +++ trunk/LayoutTests/ChangeLog 2013-02-11 06:53:06 UTC (rev 142431) @@ -1,5 +1,11 @@ 2013-02-10 Kentaro Hara +Unreviewed gardening. Marked http/tests/css/css-image-loading.html as SLOW. + +* platform/chromium/TestExpectations: + +2013-02-10 Kentaro Hara + Unreviewed gardening. Rebaselined an image. * platform/chromium-mac-snowleopard/svg/custom/foreign-object-skew-expected.png: Modified: trunk/LayoutTests/platform/chromium/TestExpectations (142430 => 142431) --- trunk/LayoutTests/platform/chromium/TestExpectations 2013-02-11 06:47:37 UTC (rev 142430) +++ trunk/LayoutTests/platform/chromium/TestExpectations 2013-02-11 06:53:06 UTC (rev 142431) @@ -97,6 +97,7 @@ webkit.org/b/107587 [ Win7 Debug ] platform/chromium/virtual/gpu/fast/hidpi/clip-text-in-hidpi.html [ Pass Slow ] webkit.org/b/107587 [ Win7 Debug ] platform/chromium/virtual/gpu/fast/hidpi/device-scale-factor-paint.html [ Pass Slow ] webkit.org/b/107587 [ Win7 Debug ] platform/chromium/virtual/gpu/fast/hidpi/focus-rings.html [ Pass Slow ] +webkit.org/b/109400 [ Win ] http/tests/css/css-image-loading.html [ Pass Slow ] crbug.com/24182 [ Mac Debug ] fast/frames/remove-frame-with-scrollbars-crash.html [ Pass Slow ] crbug.com/24182 [ Mac Debug ] fast/forms/post-popup-no-multiple-windows.html [ Pass Slow ] ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [142430] trunk/LayoutTests
Title: [142430] trunk/LayoutTests Revision 142430 Author hara...@chromium.org Date 2013-02-10 22:47:37 -0800 (Sun, 10 Feb 2013) Log Message Unreviewed gardening. Rebaselined an image. * platform/chromium-mac-snowleopard/svg/custom/foreign-object-skew-expected.png: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/chromium-mac-snowleopard/svg/custom/foreign-object-skew-expected.png Diff Modified: trunk/LayoutTests/ChangeLog (142429 => 142430) --- trunk/LayoutTests/ChangeLog 2013-02-11 06:38:41 UTC (rev 142429) +++ trunk/LayoutTests/ChangeLog 2013-02-11 06:47:37 UTC (rev 142430) @@ -6,6 +6,12 @@ 2013-02-10 Kentaro Hara +Unreviewed gardening. Rebaselined an image. + +* platform/chromium-mac-snowleopard/svg/custom/foreign-object-skew-expected.png: + +2013-02-10 Kentaro Hara + Unreviewed gardening. Marked fast/frames/seamless/seamless-inherited-origin.html as FAIL. * platform/chromium/TestExpectations: Modified: trunk/LayoutTests/platform/chromium-mac-snowleopard/svg/custom/foreign-object-skew-expected.png (Binary files differ) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [142426] trunk/LayoutTests
Title: [142426] trunk/LayoutTests Revision 142426 Author hara...@chromium.org Date 2013-02-10 20:37:00 -0800 (Sun, 10 Feb 2013) Log Message Unreviewed gardening. Rebaselined an image. * platform/chromium-mac-snowleopard/svg/custom/foreign-object-skew-expected.png: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/chromium-mac-snowleopard/svg/custom/foreign-object-skew-expected.png Diff Modified: trunk/LayoutTests/ChangeLog (142425 => 142426) --- trunk/LayoutTests/ChangeLog 2013-02-11 04:29:54 UTC (rev 142425) +++ trunk/LayoutTests/ChangeLog 2013-02-11 04:37:00 UTC (rev 142426) @@ -1,5 +1,11 @@ 2013-02-10 Kentaro Hara +Unreviewed gardening. Rebaselined an image. + +* platform/chromium-mac-snowleopard/svg/custom/foreign-object-skew-expected.png: + +2013-02-10 Kentaro Hara + Unreviewed gardening. Marked fast/frames/seamless/seamless-inherited-origin.html as FAIL. * platform/chromium/TestExpectations: Modified: trunk/LayoutTests/platform/chromium-mac-snowleopard/svg/custom/foreign-object-skew-expected.png (Binary files differ) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [142424] trunk/Source/WebCore
Title: [142424] trunk/Source/WebCore Revision 142424 Author hara...@chromium.org Date 2013-02-10 20:14:56 -0800 (Sun, 10 Feb 2013) Log Message [V8] Rename isolated() to getWorld(), rename worldForEnteredContextIfIsolated() to worldForEnteredContext() https://bugs.webkit.org/show_bug.cgi?id=109039 Reviewed by Adam Barth. This is a follow-up patch for r141983. Rename methods for consistency. No tests. No change in behavior. * bindings/v8/DOMDataStore.cpp: (WebCore::DOMDataStore::current): * bindings/v8/DOMWrapperWorld.h: (WebCore::DOMWrapperWorld::getWorld): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy): (WebCore::ScriptController::currentWorldContext): * bindings/v8/V8Binding.h: (WebCore::worldForEnteredContext): * bindings/v8/WorldContextHandle.cpp: (WebCore::WorldContextHandle::WorldContextHandle): * bindings/v8/custom/V8DocumentCustom.cpp: (WebCore::wrap): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::wrap): * bindings/v8/custom/V8SVGDocumentCustom.cpp: (WebCore::wrap): * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::V8XMLHttpRequest::constructorCallbackCustom): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/v8/DOMDataStore.cpp trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.cpp trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.h trunk/Source/WebCore/bindings/v8/ScriptController.cpp trunk/Source/WebCore/bindings/v8/V8Binding.h trunk/Source/WebCore/bindings/v8/WorldContextHandle.cpp trunk/Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8SVGDocumentCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (142423 => 142424) --- trunk/Source/WebCore/ChangeLog 2013-02-11 02:54:14 UTC (rev 142423) +++ trunk/Source/WebCore/ChangeLog 2013-02-11 04:14:56 UTC (rev 142424) @@ -1,3 +1,35 @@ +2013-02-06 Kentaro Hara + +[V8] Rename isolated() to getWorld(), rename worldForEnteredContextIfIsolated() to worldForEnteredContext() +https://bugs.webkit.org/show_bug.cgi?id=109039 + +Reviewed by Adam Barth. + +This is a follow-up patch for r141983. +Rename methods for consistency. + +No tests. No change in behavior. + +* bindings/v8/DOMDataStore.cpp: +(WebCore::DOMDataStore::current): +* bindings/v8/DOMWrapperWorld.h: +(WebCore::DOMWrapperWorld::getWorld): +* bindings/v8/ScriptController.cpp: +(WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy): +(WebCore::ScriptController::currentWorldContext): +* bindings/v8/V8Binding.h: +(WebCore::worldForEnteredContext): +* bindings/v8/WorldContextHandle.cpp: +(WebCore::WorldContextHandle::WorldContextHandle): +* bindings/v8/custom/V8DocumentCustom.cpp: +(WebCore::wrap): +* bindings/v8/custom/V8HTMLDocumentCustom.cpp: +(WebCore::wrap): +* bindings/v8/custom/V8SVGDocumentCustom.cpp: +(WebCore::wrap): +* bindings/v8/custom/V8XMLHttpRequestCustom.cpp: +(WebCore::V8XMLHttpRequest::constructorCallbackCustom): + 2013-02-10 Alexandre Elias [chromium] Fix Android scrollbar size Modified: trunk/Source/WebCore/bindings/v8/DOMDataStore.cpp (142423 => 142424) --- trunk/Source/WebCore/bindings/v8/DOMDataStore.cpp 2013-02-11 02:54:14 UTC (rev 142423) +++ trunk/Source/WebCore/bindings/v8/DOMDataStore.cpp 2013-02-11 04:14:56 UTC (rev 142424) @@ -66,7 +66,7 @@ return data->domDataStore(); if (DOMWrapperWorld::isolatedWorldsExist()) { -DOMWrapperWorld* isolatedWorld = DOMWrapperWorld::isolated(v8::Context::GetEntered()); +DOMWrapperWorld* isolatedWorld = DOMWrapperWorld::getWorld(v8::Context::GetEntered()); if (UNLIKELY(!!isolatedWorld)) return isolatedWorld->isolatedWorldDOMDataStore(); } Modified: trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.cpp (142423 => 142424) --- trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.cpp 2013-02-11 02:54:14 UTC (rev 142423) +++ trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.cpp 2013-02-11 04:14:56 UTC (rev 142424) @@ -83,7 +83,7 @@ void DOMWrapperWorld::makeContextWeak(v8::Handle context) { ASSERT(isIsolatedWorld()); -ASSERT(isolated(context) == this); +ASSERT(getWorld(context) == this); v8::Isolate* isolate = context->GetIsolate(); v8::Persistent::New(isolate, context).MakeWeak(isolate, this, isolatedWorldWeakCallback); // Matching deref is in weak callback. Modified: trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.h (142423 => 142424) --- trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.h 2013-02-11 02:54:14 UTC (rev 142423) +++ trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.h 2013-02-11 04:14:56 UTC (rev 142424) @@ -62,8
[webkit-changes] [142421] trunk/LayoutTests
Title: [142421] trunk/LayoutTests Revision 142421 Author hara...@chromium.org Date 2013-02-10 17:29:44 -0800 (Sun, 10 Feb 2013) Log Message Unreviewed gardening. Marked fast/frames/seamless/seamless-inherited-origin.html as FAIL. * platform/chromium/TestExpectations: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/chromium/TestExpectations Diff Modified: trunk/LayoutTests/ChangeLog (142420 => 142421) --- trunk/LayoutTests/ChangeLog 2013-02-11 01:23:41 UTC (rev 142420) +++ trunk/LayoutTests/ChangeLog 2013-02-11 01:29:44 UTC (rev 142421) @@ -1,5 +1,11 @@ 2013-02-10 Kentaro Hara +Unreviewed gardening. Marked fast/frames/seamless/seamless-inherited-origin.html as FAIL. + +* platform/chromium/TestExpectations: + +2013-02-10 Kentaro Hara + Unreviewed gardening. Rebaselined svg/custom/foreign-object-skew.svg. * platform/chromium-mac-snowleopard/svg/custom/foreign-object-skew-expected.png: Modified: trunk/LayoutTests/platform/chromium/TestExpectations (142420 => 142421) --- trunk/LayoutTests/platform/chromium/TestExpectations 2013-02-11 01:23:41 UTC (rev 142420) +++ trunk/LayoutTests/platform/chromium/TestExpectations 2013-02-11 01:29:44 UTC (rev 142421) @@ -1073,6 +1073,8 @@ webkit.org/b/60109 [ Win Linux Mac Release ] inspector/elements/edit-dom-actions.html [ Pass Slow ] webkit.org/b/60109 [ Win Mac Debug ] inspector/elements/edit-dom-actions.html [ Skip ] +webkit.org/b/109391 fast/frames/seamless/seamless-inherited-origin.html [ Failure ] + webkit.org/b/90488 [ Mac Debug ] inspector/elements/edit-style-attribute.html [ Pass Timeout ] webkit.org/b/74654 http/tests/inspector/network/network-worker.html ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [142420] trunk/LayoutTests
Title: [142420] trunk/LayoutTests Revision 142420 Author hara...@chromium.org Date 2013-02-10 17:23:41 -0800 (Sun, 10 Feb 2013) Log Message Unreviewed gardening. Rebaselined svg/custom/foreign-object-skew.svg. * platform/chromium-mac-snowleopard/svg/custom/foreign-object-skew-expected.png: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/chromium-mac-snowleopard/svg/custom/foreign-object-skew-expected.png Diff Modified: trunk/LayoutTests/ChangeLog (142419 => 142420) --- trunk/LayoutTests/ChangeLog 2013-02-11 01:16:19 UTC (rev 142419) +++ trunk/LayoutTests/ChangeLog 2013-02-11 01:23:41 UTC (rev 142420) @@ -1,3 +1,9 @@ +2013-02-10 Kentaro Hara + +Unreviewed gardening. Rebaselined svg/custom/foreign-object-skew.svg. + +* platform/chromium-mac-snowleopard/svg/custom/foreign-object-skew-expected.png: + 2013-02-10 Tim Horton REGRESSION (r132422): Page content and scrollbars are incorrectly offset after restoring a page from the page cache Modified: trunk/LayoutTests/platform/chromium-mac-snowleopard/svg/custom/foreign-object-skew-expected.png (Binary files differ) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [142419] trunk/Source/WebCore
Title: [142419] trunk/Source/WebCore Revision 142419 Author hara...@chromium.org Date 2013-02-10 17:16:19 -0800 (Sun, 10 Feb 2013) Log Message [V8] Remove V8GCController::m_edenNodes and make minor DOM GC more precise https://bugs.webkit.org/show_bug.cgi?id=108579 Reviewed by Adam Barth. Currently V8GCController::m_edenNodes stores a list of nodes whose wrappers have been created since the latest GC. The reason why we needed m_edenNodes is that there was no way to know a list of wrappers in the new space of V8. By using m_edenNodes, we had been approximating 'wrappers in the new space' by 'wrappers that have been created since the latest GC'. Now V8 provides VisitHandlesForPartialDependence(), with which WebKit can know a list of wrappers in the new space. By using the API, we can remove V8GCController::m_edenNodes. The benefit is that (1) we no longer need to keep m_edenNodes and that (2) it enables more precise minor DOM GC (Remember that m_edenNodes was just an approximation). Performance benchmark: https://bugs.webkit.org/attachment.cgi?id=185940 The benchmark runs 300 iterations, each of which creates 10 elements. The benchmark measures average, min, median, max and stdev of execution times of the 300 iterations. This will tell us the worst-case overhead of this change. Before: mean=59.91ms, min=39ms, median=42ms, max=258ms, stdev=47.48ms After: mean=58.75ms, min=35ms, median=41ms, max=250ms, stdev=47.32ms As shown above, I couldn't observe any performance regression. No tests. No change in behavior. * bindings/v8/DOMDataStore.h: (WebCore::DOMDataStore::setWrapperInObject): * bindings/v8/DOMWrapperWorld.h: (DOMWrapperWorld): (WebCore::DOMWrapperWorld::getWorldWithoutContextCheck): * bindings/v8/V8Binding.h: (WebCore): (WebCore::worldForEnteredContextIfIsolated): (WebCore::worldForEnteredContextWithoutContextCheck): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::initializeIfNeeded): * bindings/v8/V8GCController.cpp: (WebCore::gcTree): (WebCore): (MinorGCWrapperVisitor): (WebCore::MinorGCWrapperVisitor::MinorGCWrapperVisitor): (WebCore::MinorGCWrapperVisitor::notifyFinished): (WebCore::MajorGCWrapperVisitor::MajorGCWrapperVisitor): (WebCore::V8GCController::gcPrologue): (WebCore::V8GCController::minorGCPrologue): (WebCore::V8GCController::majorGCPrologue): * bindings/v8/V8GCController.h: (V8GCController): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/v8/DOMDataStore.h trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.h trunk/Source/WebCore/bindings/v8/V8Binding.h trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp trunk/Source/WebCore/bindings/v8/V8GCController.cpp trunk/Source/WebCore/bindings/v8/V8GCController.h Diff Modified: trunk/Source/WebCore/ChangeLog (142418 => 142419) --- trunk/Source/WebCore/ChangeLog 2013-02-10 21:50:01 UTC (rev 142418) +++ trunk/Source/WebCore/ChangeLog 2013-02-11 01:16:19 UTC (rev 142419) @@ -1,3 +1,62 @@ +2013-02-04 Kentaro Hara + +[V8] Remove V8GCController::m_edenNodes and make minor DOM GC more precise +https://bugs.webkit.org/show_bug.cgi?id=108579 + +Reviewed by Adam Barth. + +Currently V8GCController::m_edenNodes stores a list of nodes whose +wrappers have been created since the latest GC. The reason why we +needed m_edenNodes is that there was no way to know a list of wrappers +in the new space of V8. By using m_edenNodes, we had been approximating +'wrappers in the new space' by 'wrappers that have been created since +the latest GC'. + +Now V8 provides VisitHandlesForPartialDependence(), with which WebKit +can know a list of wrappers in the new space. By using the API, we can +remove V8GCController::m_edenNodes. The benefit is that (1) we no longer +need to keep m_edenNodes and that (2) it enables more precise minor +DOM GC (Remember that m_edenNodes was just an approximation). + +Performance benchmark: https://bugs.webkit.org/attachment.cgi?id=185940 +The benchmark runs 300 iterations, each of which creates 10 elements. +The benchmark measures average, min, median, max and stdev of execution times +of the 300 iterations. This will tell us the worst-case overhead of this change. + +Before: + mean=59.91ms, min=39ms, median=42ms, max=258ms, stdev=47.48ms + +After: + mean=58.75ms, min=35ms, median=41ms, max=250ms, stdev=47.32ms + +As shown above, I couldn't observe any performance regression. + +No tests. No change in behavior. + +* bindings/v8/DOMDataStore.h: +(WebCore::DOMDataStore::setWrapperInObject): +* bindings/v8/DOMWrapperWorld.h: +(DOMWrapperWorld): +(WebCore::DOMWrapperWorld::getWorldWithoutContextCheck): +* bindings/v8/V8Binding.h: +(WebCore): +(WebCore::worldForEnteredContextIfIsolated): +(WebCore::worldFo
[webkit-changes] [142329] trunk/Source/WebCore
Title: [142329] trunk/Source/WebCore Revision 142329 Author hara...@chromium.org Date 2013-02-08 16:20:17 -0800 (Fri, 08 Feb 2013) Log Message {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator should be in FocusEvent.cpp https://bugs.webkit.org/show_bug.cgi?id=109265 Reviewed by Dimitri Glazkov. Conventionally we put XXXEventDispatchMediator to XXXEvent.cpp. We should move {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator to FocusEvent.cpp. No tests. No change in behavior. * dom/EventDispatchMediator.cpp: * dom/EventDispatchMediator.h: * dom/FocusEvent.cpp: (WebCore::FocusEventDispatchMediator::create): (WebCore): (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator): (WebCore::FocusEventDispatchMediator::dispatchEvent): (WebCore::BlurEventDispatchMediator::create): (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator): (WebCore::BlurEventDispatchMediator::dispatchEvent): (WebCore::FocusInEventDispatchMediator::create): (WebCore::FocusInEventDispatchMediator::FocusInEventDispatchMediator): (WebCore::FocusInEventDispatchMediator::dispatchEvent): (WebCore::FocusOutEventDispatchMediator::create): (WebCore::FocusOutEventDispatchMediator::FocusOutEventDispatchMediator): (WebCore::FocusOutEventDispatchMediator::dispatchEvent): * dom/FocusEvent.h: (WebCore): (FocusEventDispatchMediator): (BlurEventDispatchMediator): (FocusInEventDispatchMediator): (FocusOutEventDispatchMediator): * dom/UIEvent.cpp: * dom/UIEvent.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/dom/EventDispatchMediator.cpp trunk/Source/WebCore/dom/EventDispatchMediator.h trunk/Source/WebCore/dom/FocusEvent.cpp trunk/Source/WebCore/dom/FocusEvent.h trunk/Source/WebCore/dom/UIEvent.cpp trunk/Source/WebCore/dom/UIEvent.h Diff Modified: trunk/Source/WebCore/ChangeLog (142328 => 142329) --- trunk/Source/WebCore/ChangeLog 2013-02-09 00:13:47 UTC (rev 142328) +++ trunk/Source/WebCore/ChangeLog 2013-02-09 00:20:17 UTC (rev 142329) @@ -1,3 +1,40 @@ +2013-02-08 Kentaro Hara + +{FocusIn,FocusOut,Focus,Blur}EventDispatchMediator should be in FocusEvent.cpp +https://bugs.webkit.org/show_bug.cgi?id=109265 + +Reviewed by Dimitri Glazkov. + +Conventionally we put XXXEventDispatchMediator to XXXEvent.cpp. +We should move {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator to FocusEvent.cpp. + +No tests. No change in behavior. + +* dom/EventDispatchMediator.cpp: +* dom/EventDispatchMediator.h: +* dom/FocusEvent.cpp: +(WebCore::FocusEventDispatchMediator::create): +(WebCore): +(WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator): +(WebCore::FocusEventDispatchMediator::dispatchEvent): +(WebCore::BlurEventDispatchMediator::create): +(WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator): +(WebCore::BlurEventDispatchMediator::dispatchEvent): +(WebCore::FocusInEventDispatchMediator::create): +(WebCore::FocusInEventDispatchMediator::FocusInEventDispatchMediator): +(WebCore::FocusInEventDispatchMediator::dispatchEvent): +(WebCore::FocusOutEventDispatchMediator::create): +(WebCore::FocusOutEventDispatchMediator::FocusOutEventDispatchMediator): +(WebCore::FocusOutEventDispatchMediator::dispatchEvent): +* dom/FocusEvent.h: +(WebCore): +(FocusEventDispatchMediator): +(BlurEventDispatchMediator): +(FocusInEventDispatchMediator): +(FocusOutEventDispatchMediator): +* dom/UIEvent.cpp: +* dom/UIEvent.h: + 2013-02-08 Jer Noble Unreviewed build fix. MSVC (and other compilers) need a default: case in switch statement. Modified: trunk/Source/WebCore/dom/EventDispatchMediator.cpp (142328 => 142329) --- trunk/Source/WebCore/dom/EventDispatchMediator.cpp 2013-02-09 00:13:47 UTC (rev 142328) +++ trunk/Source/WebCore/dom/EventDispatchMediator.cpp 2013-02-09 00:20:17 UTC (rev 142329) @@ -52,38 +52,4 @@ return dispatcher->dispatchEvent(m_event.get()); } -PassRefPtr FocusEventDispatchMediator::create(PassRefPtr event, PassRefPtr oldFocusedNode) -{ -return adoptRef(new FocusEventDispatchMediator(event, oldFocusedNode)); -} - -FocusEventDispatchMediator::FocusEventDispatchMediator(PassRefPtr event, PassRefPtr oldFocusedNode) -: EventDispatchMediator(event) -, m_oldFocusedNode(oldFocusedNode) -{ -} - -bool FocusEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) const -{ -dispatcher->adjustRelatedTarget(event(), m_oldFocusedNode); -return EventDispatchMediator::dispatchEvent(dispatcher); -} - -PassRefPtr BlurEventDispatchMediator::create(PassRefPtr event, PassRefPtr newFocusedNode) -{ -return adoptRef(new BlurEventDispatchMediator(event, newFocusedNode)); -} - -BlurEventDispatchMediator::BlurEventDispatchMediator(PassRefPtr event, PassRefPtr newFocusedNode) -: EventDispatchMediator(event) -, m_newFo
[webkit-changes] [142240] trunk
Title: [142240] trunk Revision 142240 Author hara...@chromium.org Date 2013-02-08 00:05:49 -0800 (Fri, 08 Feb 2013) Log Message Support a relatedTarget attribute on focus/blur events https://bugs.webkit.org/show_bug.cgi?id=109176 Reviewed by Ojan Vafai. In bug 76216, we supported a relatedTarget attribute on focusin/focusout events. We should also support it on focus/blur events. See http://lists.w3.org/Archives/Public/www-dom/2012OctDec/0061.html for the www-dom discussion. Source/WebCore: Test: fast/dom/shadow/shadow-boundary-events.html fast/events/related-target-focusevent.html * dom/EventDispatchMediator.cpp: (WebCore::FocusEventDispatchMediator::create): (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator): (WebCore::BlurEventDispatchMediator::create): (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator): * dom/EventDispatchMediator.h: (FocusEventDispatchMediator): (BlurEventDispatchMediator): * dom/Node.cpp: (WebCore::Node::dispatchFocusInEvent): (WebCore::Node::dispatchFocusOutEvent): (WebCore::Node::dispatchFocusEvent): (WebCore::Node::dispatchBlurEvent): LayoutTests: * fast/dom/shadow/shadow-boundary-events-expected.txt: * fast/dom/shadow/shadow-boundary-events.html: * fast/events/related-target-focusevent-expected.txt: * fast/events/related-target-focusevent.html: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/fast/dom/shadow/shadow-boundary-events-expected.txt trunk/LayoutTests/fast/dom/shadow/shadow-boundary-events.html trunk/LayoutTests/fast/events/related-target-focusevent-expected.txt trunk/LayoutTests/fast/events/related-target-focusevent.html trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/dom/EventDispatchMediator.cpp trunk/Source/WebCore/dom/EventDispatchMediator.h trunk/Source/WebCore/dom/Node.cpp Diff Modified: trunk/LayoutTests/ChangeLog (142239 => 142240) --- trunk/LayoutTests/ChangeLog 2013-02-08 07:58:37 UTC (rev 142239) +++ trunk/LayoutTests/ChangeLog 2013-02-08 08:05:49 UTC (rev 142240) @@ -1,3 +1,21 @@ +2013-02-08 Kentaro Hara + +Support a relatedTarget attribute on focus/blur events +https://bugs.webkit.org/show_bug.cgi?id=109176 + +Reviewed by Ojan Vafai. + +In bug 76216, we supported a relatedTarget attribute on +focusin/focusout events. We should also support it on focus/blur events. + +See http://lists.w3.org/Archives/Public/www-dom/2012OctDec/0061.html +for the www-dom discussion. + +* fast/dom/shadow/shadow-boundary-events-expected.txt: +* fast/dom/shadow/shadow-boundary-events.html: +* fast/events/related-target-focusevent-expected.txt: +* fast/events/related-target-focusevent.html: + 2013-02-07 Yury Semikhatsky Web Inspector: reduce number of native memory instrumentation categories Modified: trunk/LayoutTests/fast/dom/shadow/shadow-boundary-events-expected.txt (142239 => 142240) --- trunk/LayoutTests/fast/dom/shadow/shadow-boundary-events-expected.txt 2013-02-08 07:58:37 UTC (rev 142239) +++ trunk/LayoutTests/fast/dom/shadow/shadow-boundary-events-expected.txt 2013-02-08 08:05:49 UTC (rev 142240) @@ -71,13 +71,13 @@ Move focus from a node to its sibling node. All nodes are outside of shadow boundary. Moving focus from divB to divC -PASS dispatchedEvent("focus") is ["divC(@divA)(capturing phase)", "divC(@divC)"] -PASS dispatchedEvent("blur") is ["divB(@divA)(capturing phase)", "divB(@divB)"] +PASS dispatchedEvent("focus") is ["divC(<-divB)(@divA)(capturing phase)", "divC(<-divB)(@divC)"] +PASS dispatchedEvent("blur") is ["divB(<-divC)(@divA)(capturing phase)", "divB(<-divC)(@divB)"] Old focused node and new focused node exist in separated subtrees, crossing shadow boundaries. Making sure that an event is not dispatched beyond the lowest common boundary. Moving focus from shadowD/shadowF/shadowG/divH to shadowD/shadowK/divL -PASS dispatchedEvent("focus") is ["shadowK(@divJ)(capturing phase)", "shadowK(@shadowK)", "divL(@divL)"] -PASS dispatchedEvent("blur") is ["shadowF(@divE)(capturing phase)", "shadowF(@shadowF)", "shadowG(@shadowG)", "divH(@divH)"] +PASS dispatchedEvent("focus") is ["shadowK(<-shadowF)(@divJ)(capturing phase)", "shadowK(<-shadowF)(@shadowK)", "divL(<-shadowF)(@divL)"] +PASS dispatchedEvent("blur") is ["shadowF(<-shadowK)(@divE)(capturing phase)", "shadowF(<-shadowK)(@shadowF)", "shadowG(<-shadowK)(@shadowG)", "divH(<-shadowK)(@divH)"] PASS successfullyParsed is true TEST COMPLETE Modified: trunk/LayoutTests/fast/dom/shadow/shadow-boundary-events.html (142239 => 142240) --- trunk/LayoutTests/fast/dom/shadow/shadow-boundary-events.html 2013-02-08 07:58:37 UTC (rev 142239) +++ trunk/LayoutTests/fast/dom/shadow/shadow-boundary-events.html 2013-02-08 08:05:49 UTC (rev 142240) @@ -194,13 +194,13 @@ // Test for focus/blur events. Event listners should be registerd on captureing phase. moveFocus('divB', 'divC', 'Move focus from a node to i
[webkit-changes] [142226] trunk/Source/WebCore
Title: [142226] trunk/Source/WebCore Revision 142226 Author hara...@chromium.org Date 2013-02-07 21:37:26 -0800 (Thu, 07 Feb 2013) Log Message [V8] enum V8HiddenPropertyCreationType is not used https://bugs.webkit.org/show_bug.cgi?id=109250 Reviewed by Adam Barth. V8HiddenPropertyCreationType is always NewSymbol. We can remove the enum. No tests. No change in behavior. * bindings/v8/V8HiddenPropertyName.cpp: (WebCore::hiddenReferenceName): * bindings/v8/V8HiddenPropertyName.h: (WebCore): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/v8/V8HiddenPropertyName.cpp trunk/Source/WebCore/bindings/v8/V8HiddenPropertyName.h Diff Modified: trunk/Source/WebCore/ChangeLog (142225 => 142226) --- trunk/Source/WebCore/ChangeLog 2013-02-08 05:32:45 UTC (rev 142225) +++ trunk/Source/WebCore/ChangeLog 2013-02-08 05:37:26 UTC (rev 142226) @@ -1,3 +1,19 @@ +2013-02-07 Kentaro Hara + +[V8] enum V8HiddenPropertyCreationType is not used +https://bugs.webkit.org/show_bug.cgi?id=109250 + +Reviewed by Adam Barth. + +V8HiddenPropertyCreationType is always NewSymbol. We can remove the enum. + +No tests. No change in behavior. + +* bindings/v8/V8HiddenPropertyName.cpp: +(WebCore::hiddenReferenceName): +* bindings/v8/V8HiddenPropertyName.h: +(WebCore): + 2013-02-07 Sheriff Bot Unreviewed, rolling out r142212. Modified: trunk/Source/WebCore/bindings/v8/V8HiddenPropertyName.cpp (142225 => 142226) --- trunk/Source/WebCore/bindings/v8/V8HiddenPropertyName.cpp 2013-02-08 05:32:45 UTC (rev 142225) +++ trunk/Source/WebCore/bindings/v8/V8HiddenPropertyName.cpp 2013-02-08 05:37:26 UTC (rev 142226) @@ -55,20 +55,13 @@ V8_HIDDEN_PROPERTIES(V8_DEFINE_HIDDEN_PROPERTY); -static v8::Handle hiddenReferenceName(const char* name, unsigned length, V8HiddenPropertyCreationType type = NewSymbol) +static v8::Handle hiddenReferenceName(const char* name, unsigned length) { ASSERT(length); Vector prefixedName; prefixedName.append(V8_HIDDEN_PROPERTY_PREFIX, sizeof(V8_HIDDEN_PROPERTY_PREFIX) - 1); prefixedName.append(name, length); -switch (type) { -case NewSymbol: -return v8::String::NewSymbol(prefixedName.data(), static_cast(prefixedName.size())); -case NewString: -return v8::String::New(prefixedName.data(), static_cast(prefixedName.size())); -} -ASSERT_NOT_REACHED(); -return v8::Handle(); +return v8::String::NewSymbol(prefixedName.data(), static_cast(prefixedName.size())); } void V8HiddenPropertyName::setNamedHiddenReference(v8::Handle parent, const char* name, v8::Handle child) Modified: trunk/Source/WebCore/bindings/v8/V8HiddenPropertyName.h (142225 => 142226) --- trunk/Source/WebCore/bindings/v8/V8HiddenPropertyName.h 2013-02-08 05:32:45 UTC (rev 142225) +++ trunk/Source/WebCore/bindings/v8/V8HiddenPropertyName.h 2013-02-08 05:37:26 UTC (rev 142226) @@ -48,8 +48,6 @@ V(toStringString) \ V(typedArrayHiddenCopyMethod) -enum V8HiddenPropertyCreationType { NewSymbol, NewString }; - class V8HiddenPropertyName { public: V8HiddenPropertyName() { } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [142217] trunk/Source/WebCore
Title: [142217] trunk/Source/WebCore Revision 142217 Author hara...@chromium.org Date 2013-02-07 18:11:03 -0800 (Thu, 07 Feb 2013) Log Message [V8] Move V8DOMWrapper::setNamedHiddenReference() to V8HiddenPropertyName.h https://bugs.webkit.org/show_bug.cgi?id=109186 Reviewed by Adam Barth. V8HiddenPropertyName.h is a right place for setNamedHiddenReference(). No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::readOnlyTestObjAttrAttrGetter): * bindings/v8/V8DOMWrapper.cpp: * bindings/v8/V8DOMWrapper.h: (V8DOMWrapper): * bindings/v8/V8HiddenPropertyName.cpp: (WebCore::V8HiddenPropertyName::hiddenReferenceName): (WebCore::V8HiddenPropertyName::setNamedHiddenReference): (WebCore): * bindings/v8/V8HiddenPropertyName.h: (V8HiddenPropertyName): (WebCore::V8HiddenPropertyName::V8HiddenPropertyName): * bindings/v8/custom/V8MessageChannelCustom.cpp: (WebCore::V8MessageChannel::constructorCallbackCustom): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::toV8Object): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp trunk/Source/WebCore/bindings/v8/V8DOMWrapper.cpp trunk/Source/WebCore/bindings/v8/V8DOMWrapper.h trunk/Source/WebCore/bindings/v8/V8HiddenPropertyName.cpp trunk/Source/WebCore/bindings/v8/V8HiddenPropertyName.h trunk/Source/WebCore/bindings/v8/custom/V8MessageChannelCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (142216 => 142217) --- trunk/Source/WebCore/ChangeLog 2013-02-08 01:42:58 UTC (rev 142216) +++ trunk/Source/WebCore/ChangeLog 2013-02-08 02:11:03 UTC (rev 142217) @@ -1,3 +1,33 @@ +2013-02-07 Kentaro Hara + +[V8] Move V8DOMWrapper::setNamedHiddenReference() to V8HiddenPropertyName.h +https://bugs.webkit.org/show_bug.cgi?id=109186 + +Reviewed by Adam Barth. + +V8HiddenPropertyName.h is a right place for setNamedHiddenReference(). + +No tests. No change in behavior. + +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateNormalAttrGetter): +* bindings/scripts/test/V8/V8TestObj.cpp: +(WebCore::TestObjV8Internal::readOnlyTestObjAttrAttrGetter): +* bindings/v8/V8DOMWrapper.cpp: +* bindings/v8/V8DOMWrapper.h: +(V8DOMWrapper): +* bindings/v8/V8HiddenPropertyName.cpp: +(WebCore::V8HiddenPropertyName::hiddenReferenceName): +(WebCore::V8HiddenPropertyName::setNamedHiddenReference): +(WebCore): +* bindings/v8/V8HiddenPropertyName.h: +(V8HiddenPropertyName): +(WebCore::V8HiddenPropertyName::V8HiddenPropertyName): +* bindings/v8/custom/V8MessageChannelCustom.cpp: +(WebCore::V8MessageChannel::constructorCallbackCustom): +* bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: +(WebCore::toV8Object): + 2013-02-07 Elliott Sprehn getComputedStyle() doesn't report intermediate values during a transition of a pseudo element Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (142216 => 142217) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-08 01:42:58 UTC (rev 142216) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-08 02:11:03 UTC (rev 142217) @@ -1049,7 +1049,7 @@ push(@implContentDecls, "if (wrapper.IsEmpty()) {\n"); push(@implContentDecls, "wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());\n"); # FIXME: Could use wrap here since the wrapper is empty. push(@implContentDecls, "if (!wrapper.IsEmpty())\n"); -push(@implContentDecls, "V8DOMWrapper::setNamedHiddenReference(info.Holder(), \"${attrName}\", wrapper);\n"); +push(@implContentDecls, "V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), \"${attrName}\", wrapper);\n"); push(@implContentDecls, "}\n"); push(@implContentDecls, "return wrapper;\n"); push(@implContentDecls, "}\n\n"); Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp (142216 => 142217) --- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp 2013-02-08 01:42:58 UTC (rev 142216) +++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp 2013-02-08 02:11:03 UTC (rev 142217) @@ -123,7 +123,7 @@ if (wrapper.IsEmpty()) { wrapper = toV8(result.get(), info.Holder(), info.GetIsolate()); if (!wrapper.IsEmpty()) -V8DOMWrapper::setNamedHiddenReference(info.Holder(), "readOnlyTestObjAttr", wrapper); +V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "readOnlyTestObjAttr", wrapper); } return wrapper; } Modified: trunk/Source/WebCore/bindings/v8/V8DOMWrapper.cpp (142
[webkit-changes] [142209] trunk/Source/WebCore
Title: [142209] trunk/Source/WebCore Revision 142209 Author hara...@chromium.org Date 2013-02-07 17:06:30 -0800 (Thu, 07 Feb 2013) Log Message [V8] #ifndef NDEBUG is redundant for assertContextHasCorrectPrototype() https://bugs.webkit.org/show_bug.cgi?id=109167 Reviewed by Andreas Kling. Given that assertContextHasCorrectPrototype() is anyway empty in a release build, we don't need to surround it with #ifndef NDEBUG. No tests. No change in behavior. * bindings/v8/DOMWrapperWorld.cpp: (WebCore::DOMWrapperWorld::assertContextHasCorrectPrototype): * bindings/v8/DOMWrapperWorld.h: (DOMWrapperWorld): (WebCore::DOMWrapperWorld::isolated): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.cpp trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.h Diff Modified: trunk/Source/WebCore/ChangeLog (142208 => 142209) --- trunk/Source/WebCore/ChangeLog 2013-02-08 00:59:19 UTC (rev 142208) +++ trunk/Source/WebCore/ChangeLog 2013-02-08 01:06:30 UTC (rev 142209) @@ -1,3 +1,21 @@ +2013-02-07 Kentaro Hara + +[V8] #ifndef NDEBUG is redundant for assertContextHasCorrectPrototype() +https://bugs.webkit.org/show_bug.cgi?id=109167 + +Reviewed by Andreas Kling. + +Given that assertContextHasCorrectPrototype() is anyway empty in a release +build, we don't need to surround it with #ifndef NDEBUG. + +No tests. No change in behavior. + +* bindings/v8/DOMWrapperWorld.cpp: +(WebCore::DOMWrapperWorld::assertContextHasCorrectPrototype): +* bindings/v8/DOMWrapperWorld.h: +(DOMWrapperWorld): +(WebCore::DOMWrapperWorld::isolated): + 2013-02-07 Alexei Svitkine Chromium: Hang parsing bidi control chars on Mac OS X 10.6 Modified: trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.cpp (142208 => 142209) --- trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.cpp 2013-02-08 00:59:19 UTC (rev 142208) +++ trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.cpp 2013-02-08 01:06:30 UTC (rev 142209) @@ -67,13 +67,11 @@ return cachedNormalWorld.get(); } -#ifndef NDEBUG void DOMWrapperWorld::assertContextHasCorrectPrototype(v8::Handle context) { ASSERT(isMainThread()); ASSERT(V8DOMWrapper::isWrapperOfType(toInnerGlobalObject(context), &V8DOMWindow::info)); } -#endif static void isolatedWorldWeakCallback(v8::Isolate* isolate, v8::Persistent object, void* parameter) { Modified: trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.h (142208 => 142209) --- trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.h 2013-02-08 00:59:19 UTC (rev 142208) +++ trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.h 2013-02-08 01:06:30 UTC (rev 142209) @@ -60,14 +60,11 @@ void makeContextWeak(v8::Handle); void setIsolatedWorldField(v8::Handle); -#ifndef NDEBUG + static void assertContextHasCorrectPrototype(v8::Handle); -#endif static DOMWrapperWorld* isolated(v8::Handle context) { -#ifndef NDEBUG assertContextHasCorrectPrototype(context); -#endif return static_cast(context->GetAlignedPointerFromEmbedderData(v8ContextIsolatedWorld)); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [142205] trunk
Title: [142205] trunk Revision 142205 Author hara...@chromium.org Date 2013-02-07 16:37:49 -0800 (Thu, 07 Feb 2013) Log Message Implement FocusEvent constructor https://bugs.webkit.org/show_bug.cgi?id=109170 Reviewed by Adam Barth. Editor's draft: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm FocusEvent constructor should be implemented under a DOM4_EVENTS_CONSTRUCTOR flag, which is enabled on Chromium and Safari. Source/WebCore: Test: fast/events/constructors/focus-event-constructor.html * dom/FocusEvent.cpp: (WebCore::FocusEventInit::FocusEventInit): (WebCore): (WebCore::FocusEvent::FocusEvent): * dom/FocusEvent.h: (FocusEventInit): (WebCore): (WebCore::FocusEvent::create): (FocusEvent): * dom/FocusEvent.idl: * page/DOMWindow.idl: LayoutTests: * fast/dom/constructed-objects-prototypes-expected.txt: * fast/events/constructors/focus-event-constructor-expected.txt: Added. * fast/events/constructors/focus-event-constructor.html: Added. * platform/efl/TestExpectations: * platform/gtk/TestExpectations: * platform/qt/TestExpectations: * platform/win/TestExpectations: * platform/wincairo/TestExpectations: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/fast/dom/constructed-objects-prototypes-expected.txt trunk/LayoutTests/platform/efl/TestExpectations trunk/LayoutTests/platform/gtk/TestExpectations trunk/LayoutTests/platform/qt/TestExpectations trunk/LayoutTests/platform/win/TestExpectations trunk/LayoutTests/platform/wincairo/TestExpectations trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/dom/FocusEvent.cpp trunk/Source/WebCore/dom/FocusEvent.h trunk/Source/WebCore/dom/FocusEvent.idl trunk/Source/WebCore/page/DOMWindow.idl Added Paths trunk/LayoutTests/fast/events/constructors/focus-event-constructor-expected.txt trunk/LayoutTests/fast/events/constructors/focus-event-constructor.html Diff Modified: trunk/LayoutTests/ChangeLog (142204 => 142205) --- trunk/LayoutTests/ChangeLog 2013-02-08 00:35:17 UTC (rev 142204) +++ trunk/LayoutTests/ChangeLog 2013-02-08 00:37:49 UTC (rev 142205) @@ -1,3 +1,24 @@ +2013-02-07 Kentaro Hara + +Implement FocusEvent constructor +https://bugs.webkit.org/show_bug.cgi?id=109170 + +Reviewed by Adam Barth. + +Editor's draft: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm + +FocusEvent constructor should be implemented under a DOM4_EVENTS_CONSTRUCTOR +flag, which is enabled on Chromium and Safari. + +* fast/dom/constructed-objects-prototypes-expected.txt: +* fast/events/constructors/focus-event-constructor-expected.txt: Added. +* fast/events/constructors/focus-event-constructor.html: Added. +* platform/efl/TestExpectations: +* platform/gtk/TestExpectations: +* platform/qt/TestExpectations: +* platform/win/TestExpectations: +* platform/wincairo/TestExpectations: + 2013-02-07 Elliott Sprehn HTML parser should queue MutationRecords for its operations Modified: trunk/LayoutTests/fast/dom/constructed-objects-prototypes-expected.txt (142204 => 142205) --- trunk/LayoutTests/fast/dom/constructed-objects-prototypes-expected.txt 2013-02-08 00:35:17 UTC (rev 142204) +++ trunk/LayoutTests/fast/dom/constructed-objects-prototypes-expected.txt 2013-02-08 00:37:49 UTC (rev 142205) @@ -21,6 +21,8 @@ PASS (new inner.ErrorEvent()).constructor.isInner is true PASS (new inner.Event()).isInner is true PASS (new inner.Event()).constructor.isInner is true +PASS (new inner.FocusEvent()).isInner is true +PASS (new inner.FocusEvent()).constructor.isInner is true PASS (new inner.FormData()).isInner is true PASS (new inner.FormData()).constructor.isInner is true PASS (new inner.HashChangeEvent()).isInner is true Added: trunk/LayoutTests/fast/events/constructors/focus-event-constructor-expected.txt (0 => 142205) --- trunk/LayoutTests/fast/events/constructors/focus-event-constructor-expected.txt (rev 0) +++ trunk/LayoutTests/fast/events/constructors/focus-event-constructor-expected.txt 2013-02-08 00:37:49 UTC (rev 142205) @@ -0,0 +1,56 @@ +This tests the constructor for the FocusEvent DOM class. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS new FocusEvent('eventType').bubbles is false +PASS new FocusEvent('eventType').cancelable is false +PASS new FocusEvent('eventType').view is null +PASS new FocusEvent('eventType').detail is 0 +PASS new FocusEvent('eventType').relatedTarget is null +PASS new FocusEvent('eventType', { bubbles: false }).bubbles is false +PASS new FocusEvent('eventType', { bubbles: true }).bubbles is true +PASS new FocusEvent('eventType', { cancelable: false }).cancelable is false +PASS new FocusEvent('eventType', { cancelable: true }).cancelable is true +PASS new FocusEvent('eventType', { view: window }).view is window +PASS new FocusEvent('eventType', { view: this }).view is this +PASS new FocusEvent('eventType', { view:
[webkit-changes] [142202] trunk/Source/WebCore
Title: [142202] trunk/Source/WebCore Revision 142202 Author hara...@chromium.org Date 2013-02-07 16:30:33 -0800 (Thu, 07 Feb 2013) Log Message Fix FIXMEs in WindowFeatures.h https://bugs.webkit.org/show_bug.cgi?id=109151 Reviewed by Adam Barth. 1. // FIXME: We can delete this constructor once V8 showModalDialog is // changed to use DOMWindow. This FIXME is not right. The WindowFeatures() constructor is used by other ports too (e.g. WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp). So we should remove the FIXME. 2. // FIXME: We can make these functions private non-member functions // once V8 showModalDialog is changed to use DOMWindow. Given that V8 now uses DOMWindow in showModalDialog(), we can make the methods private. No tests. No change in behavior. * page/WindowFeatures.h: (WebCore): (WebCore::WindowFeatures::WindowFeatures): (WindowFeatures): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/page/WindowFeatures.h Diff Modified: trunk/Source/WebCore/ChangeLog (142201 => 142202) --- trunk/Source/WebCore/ChangeLog 2013-02-08 00:27:31 UTC (rev 142201) +++ trunk/Source/WebCore/ChangeLog 2013-02-08 00:30:33 UTC (rev 142202) @@ -1,3 +1,30 @@ +2013-02-07 Kentaro Hara + +Fix FIXMEs in WindowFeatures.h +https://bugs.webkit.org/show_bug.cgi?id=109151 + +Reviewed by Adam Barth. + +1. // FIXME: We can delete this constructor once V8 showModalDialog is + // changed to use DOMWindow. + +This FIXME is not right. The WindowFeatures() constructor is used by +other ports too (e.g. WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp). +So we should remove the FIXME. + +2. // FIXME: We can make these functions private non-member functions + // once V8 showModalDialog is changed to use DOMWindow. + +Given that V8 now uses DOMWindow in showModalDialog(), we can make the +methods private. + +No tests. No change in behavior. + +* page/WindowFeatures.h: +(WebCore): +(WebCore::WindowFeatures::WindowFeatures): +(WindowFeatures): + 2013-02-07 Adam Barth fast/parser/document-write-noscript.html fails for threaded HTML parser Modified: trunk/Source/WebCore/page/WindowFeatures.h (142201 => 142202) --- trunk/Source/WebCore/page/WindowFeatures.h 2013-02-08 00:27:31 UTC (rev 142201) +++ trunk/Source/WebCore/page/WindowFeatures.h 2013-02-08 00:30:33 UTC (rev 142202) @@ -34,60 +34,56 @@ namespace WebCore { -class FloatRect; +class FloatRect; -struct WindowFeatures { -// FIXME: We can delete this constructor once V8 showModalDialog is changed to use DOMWindow. -WindowFeatures() -: xSet(false) -, ySet(false) -, widthSet(false) -, heightSet(false) -, menuBarVisible(true) -, statusBarVisible(true) -, toolBarVisible(true) -, locationBarVisible(true) -, scrollbarsVisible(true) -, resizable(true) -, fullscreen(false) -, dialog(false) -{ -} +struct WindowFeatures { +WindowFeatures() +: xSet(false) +, ySet(false) +, widthSet(false) +, heightSet(false) +, menuBarVisible(true) +, statusBarVisible(true) +, toolBarVisible(true) +, locationBarVisible(true) +, scrollbarsVisible(true) +, resizable(true) +, fullscreen(false) +, dialog(false) +{ +} +explicit WindowFeatures(const String& windowFeaturesString); +WindowFeatures(const String& dialogFeaturesString, const FloatRect& screenAvailableRect); -explicit WindowFeatures(const String& windowFeaturesString); -WindowFeatures(const String& dialogFeaturesString, const FloatRect& screenAvailableRect); +float x; +bool xSet; +float y; +bool ySet; +float width; +bool widthSet; +float height; +bool heightSet; -float x; -bool xSet; -float y; -bool ySet; -float width; -bool widthSet; -float height; -bool heightSet; +bool menuBarVisible; +bool statusBarVisible; +bool toolBarVisible; +bool locationBarVisible; +bool scrollbarsVisible; +bool resizable; -bool menuBarVisible; -bool statusBarVisible; -bool toolBarVisible; -bool locationBarVisible; -bool scrollbarsVisible; -bool resizable; +bool fullscreen; +bool dialog; -bool fullscreen; -bool dialog; +Vector additionalFeatures; -Vector additionalFeatures; +private: +typedef HashMap DialogFeaturesMap; +static void parseDialogFeatures(const String&, HashMap&); +static bool boolFeature(const DialogFeaturesMap&, const char* key, bool defaultValue = false); +static float floatFeature(const DialogFeaturesMap&,
[webkit-changes] [142154] trunk/Source/WebCore
Title: [142154] trunk/Source/WebCore Revision 142154 Author hara...@chromium.org Date 2013-02-07 10:57:09 -0800 (Thu, 07 Feb 2013) Log Message [V8] StringCache::m_stringCache should be HashMap> https://bugs.webkit.org/show_bug.cgi?id=109123 Reviewed by Adam Barth. Currently StringCache::m_stringCache is implemented as HashMap. Given that v8::String* can change when a GC is triggered, it is dangerous to store a raw pointer. We should use HashMap> instead. This is a possible fix for an IndexedDB crash (https://bugs.webkit.org/show_bug.cgi?id=105363), although I'm not sure if this patch fixes the crash. (I couldn't reproduce the crash.) No tests. This change highly depends on GC behavior and thus it is difficult to make a reliable test case. * bindings/v8/V8ValueCache.cpp: (WebCore::makeExternalString): * bindings/v8/V8ValueCache.h: (StringCache): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/v8/V8ValueCache.cpp trunk/Source/WebCore/bindings/v8/V8ValueCache.h Diff Modified: trunk/Source/WebCore/ChangeLog (142153 => 142154) --- trunk/Source/WebCore/ChangeLog 2013-02-07 18:49:45 UTC (rev 142153) +++ trunk/Source/WebCore/ChangeLog 2013-02-07 18:57:09 UTC (rev 142154) @@ -1,3 +1,26 @@ +2013-02-07 Kentaro Hara + +[V8] StringCache::m_stringCache should be HashMap> +https://bugs.webkit.org/show_bug.cgi?id=109123 + +Reviewed by Adam Barth. + +Currently StringCache::m_stringCache is implemented as +HashMap. Given that v8::String* +can change when a GC is triggered, it is dangerous to store a raw pointer. +We should use HashMap> instead. + +This is a possible fix for an IndexedDB crash (https://bugs.webkit.org/show_bug.cgi?id=105363), +although I'm not sure if this patch fixes the crash. (I couldn't reproduce the crash.) + +No tests. This change highly depends on GC behavior and thus it is +difficult to make a reliable test case. + +* bindings/v8/V8ValueCache.cpp: +(WebCore::makeExternalString): +* bindings/v8/V8ValueCache.h: +(StringCache): + 2013-01-27 Robert Hogan CSS 2.1 failure: floats-149 fails Modified: trunk/Source/WebCore/bindings/v8/V8ValueCache.cpp (142153 => 142154) --- trunk/Source/WebCore/bindings/v8/V8ValueCache.cpp 2013-02-07 18:49:45 UTC (rev 142153) +++ trunk/Source/WebCore/bindings/v8/V8ValueCache.cpp 2013-02-07 18:57:09 UTC (rev 142154) @@ -85,16 +85,13 @@ if (!stringImpl->length()) return v8::String::Empty(isolate); -v8::String* cachedV8String = m_stringCache.get(stringImpl); -if (cachedV8String) { -v8::Persistent handle(cachedV8String); -if (handle.IsWeak()) { -m_lastStringImpl = stringImpl; -m_lastV8String = handle; -if (handleType == ReturnUnsafeHandle) -return handle; -return v8::Local::New(handle); -} +v8::Persistent cachedV8String = m_stringCache.get(stringImpl); +if (cachedV8String.IsWeak()) { +m_lastStringImpl = stringImpl; +m_lastV8String = cachedV8String; +if (handleType == ReturnUnsafeHandle) +return cachedV8String; +return v8::Local::New(cachedV8String); } v8::Local newString = makeExternalString(String(stringImpl)); @@ -108,7 +105,7 @@ stringImpl->ref(); wrapper.MarkIndependent(); wrapper.MakeWeak(isolate, stringImpl, cachedStringCallback); -m_stringCache.set(stringImpl, *wrapper); +m_stringCache.set(stringImpl, wrapper); m_lastStringImpl = stringImpl; m_lastV8String = wrapper; Modified: trunk/Source/WebCore/bindings/v8/V8ValueCache.h (142153 => 142154) --- trunk/Source/WebCore/bindings/v8/V8ValueCache.h 2013-02-07 18:49:45 UTC (rev 142153) +++ trunk/Source/WebCore/bindings/v8/V8ValueCache.h 2013-02-07 18:57:09 UTC (rev 142154) @@ -71,7 +71,7 @@ private: v8::Handle v8ExternalStringSlow(StringImpl*, ReturnHandleType, v8::Isolate*); -HashMap m_stringCache; +HashMap > m_stringCache; v8::Persistent m_lastV8String; // Note: RefPtr is a must as we cache by StringImpl* equality, not identity // hence lastStringImpl might be not a key of the cache (in sense of identity) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [142124] trunk/Source/WebCore
Title: [142124] trunk/Source/WebCore Revision 142124 Author hara...@chromium.org Date 2013-02-07 07:56:18 -0800 (Thu, 07 Feb 2013) Log Message Remove #if USE(V8) from IDBRequest.h https://bugs.webkit.org/show_bug.cgi?id=109163 Reviewed by Andreas Kling. The header included inside the #if USE(V8) macro is not used. We can simply remove it. No tests. No change in behavior. * Modules/indexeddb/IDBRequest.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h Diff Modified: trunk/Source/WebCore/ChangeLog (142123 => 142124) --- trunk/Source/WebCore/ChangeLog 2013-02-07 15:53:50 UTC (rev 142123) +++ trunk/Source/WebCore/ChangeLog 2013-02-07 15:56:18 UTC (rev 142124) @@ -1,3 +1,17 @@ +2013-02-07 Kentaro Hara + +Remove #if USE(V8) from IDBRequest.h +https://bugs.webkit.org/show_bug.cgi?id=109163 + +Reviewed by Andreas Kling. + +The header included inside the #if USE(V8) macro is not used. +We can simply remove it. + +No tests. No change in behavior. + +* Modules/indexeddb/IDBRequest.h: + 2013-02-07 Stephen Chenney GraphicsContext::drawImageBuffer is inefficient Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h (142123 => 142124) --- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h 2013-02-07 15:53:50 UTC (rev 142123) +++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h 2013-02-07 15:56:18 UTC (rev 142124) @@ -44,9 +44,6 @@ #include "IDBCursor.h" #include "IDBCursorBackendInterface.h" #include "ScriptWrappable.h" -#if USE(V8) -#include "WorldContextHandle.h" -#endif namespace WebCore { ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [142103] trunk/Source/WebCore
Title: [142103] trunk/Source/WebCore Revision 142103 Author hara...@chromium.org Date 2013-02-07 05:37:24 -0800 (Thu, 07 Feb 2013) Log Message Unreviewed, rolling out r142077. http://trac.webkit.org/changeset/142077 https://bugs.webkit.org/show_bug.cgi?id=108579 fast/filesystem/workers/file-writer-empty-blob.html is broken * bindings/v8/DOMDataStore.h: (WebCore::DOMDataStore::setWrapperInObject): * bindings/v8/DOMWrapperWorld.h: (DOMWrapperWorld): (WebCore::DOMWrapperWorld::isolated): * bindings/v8/V8Binding.h: (WebCore): (WebCore::worldForEnteredContextIfIsolated): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::initializeIfNeeded): * bindings/v8/V8GCController.cpp: (WebCore::WrapperVisitor::WrapperVisitor): (WebCore): (WebCore::gcTree): (WebCore::V8GCController::didCreateWrapperForNode): (WebCore::V8GCController::gcPrologue): (WebCore::V8GCController::minorGCPrologue): (WebCore::V8GCController::majorGCPrologue): * bindings/v8/V8GCController.h: (V8GCController): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/v8/DOMDataStore.h trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.h trunk/Source/WebCore/bindings/v8/V8Binding.h trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp trunk/Source/WebCore/bindings/v8/V8GCController.cpp trunk/Source/WebCore/bindings/v8/V8GCController.h Diff Modified: trunk/Source/WebCore/ChangeLog (142102 => 142103) --- trunk/Source/WebCore/ChangeLog 2013-02-07 13:36:25 UTC (rev 142102) +++ trunk/Source/WebCore/ChangeLog 2013-02-07 13:37:24 UTC (rev 142103) @@ -1,3 +1,32 @@ +2013-02-07 Kentaro Hara + +Unreviewed, rolling out r142077. +http://trac.webkit.org/changeset/142077 +https://bugs.webkit.org/show_bug.cgi?id=108579 + +fast/filesystem/workers/file-writer-empty-blob.html is broken + +* bindings/v8/DOMDataStore.h: +(WebCore::DOMDataStore::setWrapperInObject): +* bindings/v8/DOMWrapperWorld.h: +(DOMWrapperWorld): +(WebCore::DOMWrapperWorld::isolated): +* bindings/v8/V8Binding.h: +(WebCore): +(WebCore::worldForEnteredContextIfIsolated): +* bindings/v8/V8DOMWindowShell.cpp: +(WebCore::V8DOMWindowShell::initializeIfNeeded): +* bindings/v8/V8GCController.cpp: +(WebCore::WrapperVisitor::WrapperVisitor): +(WebCore): +(WebCore::gcTree): +(WebCore::V8GCController::didCreateWrapperForNode): +(WebCore::V8GCController::gcPrologue): +(WebCore::V8GCController::minorGCPrologue): +(WebCore::V8GCController::majorGCPrologue): +* bindings/v8/V8GCController.h: +(V8GCController): + 2013-02-07 Tony Gentilcore Call XSSAuditor.filterToken() from threaded HTML parser Modified: trunk/Source/WebCore/bindings/v8/DOMDataStore.h (142102 => 142103) --- trunk/Source/WebCore/bindings/v8/DOMDataStore.h 2013-02-07 13:36:25 UTC (rev 142102) +++ trunk/Source/WebCore/bindings/v8/DOMDataStore.h 2013-02-07 13:37:24 UTC (rev 142103) @@ -164,6 +164,13 @@ object->setWrapper(wrapper); wrapper.MakeWeak(isolate, object, weakCallback); } +static void setWrapperInObject(Node* object, v8::Persistent wrapper, v8::Isolate* isolate) +{ +ASSERT(object->wrapper().IsEmpty()); +object->setWrapper(wrapper); +V8GCController::didCreateWrapperForNode(object); +wrapper.MakeWeak(isolate, static_cast(object), weakCallback); +} static void weakCallback(v8::Isolate*, v8::Persistent, void* context); Modified: trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.h (142102 => 142103) --- trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.h 2013-02-07 13:36:25 UTC (rev 142102) +++ trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.h 2013-02-07 13:37:24 UTC (rev 142103) @@ -63,7 +63,6 @@ #ifndef NDEBUG static void assertContextHasCorrectPrototype(v8::Handle); #endif -// FIXME: Rename this method to getWorld(). static DOMWrapperWorld* isolated(v8::Handle context) { #ifndef NDEBUG @@ -71,10 +70,6 @@ #endif return static_cast(context->GetAlignedPointerFromEmbedderData(v8ContextIsolatedWorld)); } -static DOMWrapperWorld* getWorldWithoutContextCheck(v8::Handle context) -{ -return static_cast(context->GetAlignedPointerFromEmbedderData(v8ContextIsolatedWorld)); -} // Associates an isolated world (see above for description) with a security // origin. XMLHttpRequest instances used in that world will be considered Modified: trunk/Source/WebCore/bindings/v8/V8Binding.h (142102 => 142103) --- trunk/Source/WebCore/bindings/v8/V8Binding.h 2013-02-07 13:36:25 UTC (rev 142102) +++ trunk/Source/WebCore/bindings/v8/V8Binding.h 2013-02-07 13:37:24 UTC (rev 142103) @@ -437,31 +437,13 @@ // a context, if the window is currently being displayed in the Frame. Frame* toFrameIfNotDetached(v8::Handle); -// FIXME: Rename this method to worldForEnte
[webkit-changes] [142077] trunk/Source/WebCore
Title: [142077] trunk/Source/WebCore Revision 142077 Author hara...@chromium.org Date 2013-02-07 00:42:13 -0800 (Thu, 07 Feb 2013) Log Message [V8] Remove V8GCController::m_edenNodes and make minor DOM GC more precise https://bugs.webkit.org/show_bug.cgi?id=108579 Reviewed by Adam Barth. Currently V8GCController::m_edenNodes stores a list of nodes whose wrappers have been created since the latest GC. The reason why we needed m_edenNodes is that there was no way to know a list of wrappers in the new space of V8. By using m_edenNodes, we had been approximating 'wrappers in the new space' by 'wrappers that have been created since the latest GC'. Now V8 provides VisitHandlesForPartialDependence(), with which WebKit can know a list of wrappers in the new space. By using the API, we can remove V8GCController::m_edenNodes. The benefit is that (1) we no longer need to keep m_edenNodes and that (2) it enables more precise minor DOM GC (Remember that m_edenNodes was just an approximation). Performance benchmark: https://bugs.webkit.org/attachment.cgi?id=185940 The benchmark runs 300 iterations, each of which creates 10 elements. The benchmark measures average, min, median, max and stdev of execution times of the 300 iterations. This will tell us the worst-case overhead of this change. Before: mean=59.91ms, min=39ms, median=42ms, max=258ms, stdev=47.48ms After: mean=58.75ms, min=35ms, median=41ms, max=250ms, stdev=47.32ms As shown above, I couldn't observe any performance regression. No tests. No change in behavior. * bindings/v8/DOMDataStore.h: (WebCore::DOMDataStore::setWrapperInObject): * bindings/v8/DOMWrapperWorld.h: (DOMWrapperWorld): (WebCore::DOMWrapperWorld::getWorldWithoutContextCheck): * bindings/v8/V8Binding.h: (WebCore): (WebCore::worldForEnteredContextIfIsolated): (WebCore::worldForEnteredContextWithoutContextCheck): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::initializeIfNeeded): * bindings/v8/V8GCController.cpp: (WebCore::gcTree): (WebCore): (MinorGCWrapperVisitor): (WebCore::MinorGCWrapperVisitor::MinorGCWrapperVisitor): (WebCore::MinorGCWrapperVisitor::notifyFinished): (WebCore::MajorGCWrapperVisitor::MajorGCWrapperVisitor): (WebCore::V8GCController::gcPrologue): (WebCore::V8GCController::minorGCPrologue): (WebCore::V8GCController::majorGCPrologue): * bindings/v8/V8GCController.h: (V8GCController): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/v8/DOMDataStore.h trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.h trunk/Source/WebCore/bindings/v8/V8Binding.h trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp trunk/Source/WebCore/bindings/v8/V8GCController.cpp trunk/Source/WebCore/bindings/v8/V8GCController.h Diff Modified: trunk/Source/WebCore/ChangeLog (142076 => 142077) --- trunk/Source/WebCore/ChangeLog 2013-02-07 08:40:17 UTC (rev 142076) +++ trunk/Source/WebCore/ChangeLog 2013-02-07 08:42:13 UTC (rev 142077) @@ -1,3 +1,62 @@ +2013-02-04 Kentaro Hara + +[V8] Remove V8GCController::m_edenNodes and make minor DOM GC more precise +https://bugs.webkit.org/show_bug.cgi?id=108579 + +Reviewed by Adam Barth. + +Currently V8GCController::m_edenNodes stores a list of nodes whose +wrappers have been created since the latest GC. The reason why we +needed m_edenNodes is that there was no way to know a list of wrappers +in the new space of V8. By using m_edenNodes, we had been approximating +'wrappers in the new space' by 'wrappers that have been created since +the latest GC'. + +Now V8 provides VisitHandlesForPartialDependence(), with which WebKit +can know a list of wrappers in the new space. By using the API, we can +remove V8GCController::m_edenNodes. The benefit is that (1) we no longer +need to keep m_edenNodes and that (2) it enables more precise minor +DOM GC (Remember that m_edenNodes was just an approximation). + +Performance benchmark: https://bugs.webkit.org/attachment.cgi?id=185940 +The benchmark runs 300 iterations, each of which creates 10 elements. +The benchmark measures average, min, median, max and stdev of execution times +of the 300 iterations. This will tell us the worst-case overhead of this change. + +Before: + mean=59.91ms, min=39ms, median=42ms, max=258ms, stdev=47.48ms + +After: + mean=58.75ms, min=35ms, median=41ms, max=250ms, stdev=47.32ms + +As shown above, I couldn't observe any performance regression. + +No tests. No change in behavior. + +* bindings/v8/DOMDataStore.h: +(WebCore::DOMDataStore::setWrapperInObject): +* bindings/v8/DOMWrapperWorld.h: +(DOMWrapperWorld): +(WebCore::DOMWrapperWorld::getWorldWithoutContextCheck): +* bindings/v8/V8Binding.h: +(WebCore): +(WebCore::worldForEnteredContextIfIsolated): +(WebCore::worldFo
[webkit-changes] [142075] trunk/Source/WebCore
Title: [142075] trunk/Source/WebCore Revision 142075 Author hara...@chromium.org Date 2013-02-07 00:38:55 -0800 (Thu, 07 Feb 2013) Log Message Remove DOMWindow::parseModalDialogFeatures() https://bugs.webkit.org/show_bug.cgi?id=109139 Reviewed by Kent Tamura. No one uses the method. FIXME is saying: // FIXME: We can remove this function once V8 showModalDialog is changed to use DOMWindow. Given that V8's showModalDialog() is now using DOMWindow, we can remove it. No tests. No change in behavior. * page/DOMWindow.cpp: * page/DOMWindow.h: (DOMWindow): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/page/DOMWindow.cpp trunk/Source/WebCore/page/DOMWindow.h Diff Modified: trunk/Source/WebCore/ChangeLog (142074 => 142075) --- trunk/Source/WebCore/ChangeLog 2013-02-07 08:38:04 UTC (rev 142074) +++ trunk/Source/WebCore/ChangeLog 2013-02-07 08:38:55 UTC (rev 142075) @@ -1,3 +1,22 @@ +2013-02-06 Kentaro Hara + +Remove DOMWindow::parseModalDialogFeatures() +https://bugs.webkit.org/show_bug.cgi?id=109139 + +Reviewed by Kent Tamura. + +No one uses the method. FIXME is saying: + + // FIXME: We can remove this function once V8 showModalDialog is changed to use DOMWindow. + +Given that V8's showModalDialog() is now using DOMWindow, we can remove it. + +No tests. No change in behavior. + +* page/DOMWindow.cpp: +* page/DOMWindow.h: +(DOMWindow): + 2013-02-06 Ilya Tikhonovsky Web Inspector: Native Memory Instrumentation: reduce native heap snapshot runtime memory footprint Modified: trunk/Source/WebCore/page/DOMWindow.cpp (142074 => 142075) --- trunk/Source/WebCore/page/DOMWindow.cpp 2013-02-07 08:38:04 UTC (rev 142074) +++ trunk/Source/WebCore/page/DOMWindow.cpp 2013-02-07 08:38:55 UTC (rev 142075) @@ -349,12 +349,6 @@ return window; } -// FIXME: We can remove this function once V8 showModalDialog is changed to use DOMWindow. -void DOMWindow::parseModalDialogFeatures(const String& string, HashMap& map) -{ -WindowFeatures::parseDialogFeatures(string, map); -} - bool DOMWindow::allowPopUp(Frame* firstFrame) { ASSERT(firstFrame); Modified: trunk/Source/WebCore/page/DOMWindow.h (142074 => 142075) --- trunk/Source/WebCore/page/DOMWindow.h 2013-02-07 08:38:04 UTC (rev 142074) +++ trunk/Source/WebCore/page/DOMWindow.h 2013-02-07 08:38:55 UTC (rev 142075) @@ -122,9 +122,6 @@ static FloatRect adjustWindowRect(Page*, const FloatRect& pendingChanges); -// FIXME: We can remove this function once V8 showModalDialog is changed to use DOMWindow. -static void parseModalDialogFeatures(const String&, HashMap&); - bool allowPopUp(); // Call on first window, not target window. static bool allowPopUp(Frame* firstFrame); static bool canShowModalDialog(const Frame*); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [142072] trunk
Title: [142072] trunk Revision 142072 Author hara...@chromium.org Date 2013-02-07 00:30:00 -0800 (Thu, 07 Feb 2013) Log Message WebKit's focus events are UIEvents (instead of FocusEvent) and thus don't expose .relatedTarget https://bugs.webkit.org/show_bug.cgi?id=76216 Reviewed by Eric Seidel. Spec: http://www.w3.org/TR/DOM-Level-3-Events/#events-FocusEvent This patch creates a new FocusEvent class with a relatedTarget attribute. Now when focusin or focusout events are dispatched, a FocusEvent is created with the relatedTarget attribute set accordingly. Source/WebCore: Test: fast/events/related-target-focusevent.html * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * dom/DOMAllInOne.cpp: * dom/Event.cpp: (WebCore::Event::isFocusEvent): (WebCore): * dom/Event.h: (Event): * dom/EventContext.cpp: (WebCore::EventContext::handleLocalEvents): * dom/EventNames.in: * dom/FocusEvent.h: Added. (WebCore): (FocusEvent): (WebCore::FocusEvent::create): (WebCore::FocusEvent::relatedTarget): (WebCore::FocusEvent::setRelatedTarget): (WebCore::toFocusEvent): * dom/FocusEvent.idl: Added. * dom/Node.cpp: (WebCore::Node::dispatchFocusInEvent): (WebCore::Node::dispatchFocusOutEvent): LayoutTests: * fast/dom/shadow/shadow-boundary-events-expected.txt: * fast/dom/shadow/shadow-boundary-events.html: * fast/events/related-target-focusevent-expected.txt: Added. * fast/events/related-target-focusevent.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/fast/dom/shadow/shadow-boundary-events-expected.txt trunk/LayoutTests/fast/dom/shadow/shadow-boundary-events.html trunk/Source/WebCore/CMakeLists.txt trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/DerivedSources.cpp trunk/Source/WebCore/DerivedSources.make trunk/Source/WebCore/DerivedSources.pri trunk/Source/WebCore/GNUmakefile.list.am trunk/Source/WebCore/Target.pri trunk/Source/WebCore/WebCore.gypi trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj trunk/Source/WebCore/dom/DOMAllInOne.cpp trunk/Source/WebCore/dom/Event.cpp trunk/Source/WebCore/dom/Event.h trunk/Source/WebCore/dom/EventContext.cpp trunk/Source/WebCore/dom/EventNames.in trunk/Source/WebCore/dom/Node.cpp Added Paths trunk/LayoutTests/fast/events/related-target-focusevent-expected.txt trunk/LayoutTests/fast/events/related-target-focusevent.html trunk/Source/WebCore/dom/FocusEvent.cpp trunk/Source/WebCore/dom/FocusEvent.h trunk/Source/WebCore/dom/FocusEvent.idl Diff Modified: trunk/LayoutTests/ChangeLog (142071 => 142072) --- trunk/LayoutTests/ChangeLog 2013-02-07 08:25:26 UTC (rev 142071) +++ trunk/LayoutTests/ChangeLog 2013-02-07 08:30:00 UTC (rev 142072) @@ -1,3 +1,21 @@ +2013-02-03 Kentaro Hara + +WebKit's focus events are UIEvents (instead of FocusEvent) and thus don't expose .relatedTarget +https://bugs.webkit.org/show_bug.cgi?id=76216 + +Reviewed by Eric Seidel. + +Spec: http://www.w3.org/TR/DOM-Level-3-Events/#events-FocusEvent + +This patch creates a new FocusEvent class with a relatedTarget attribute. +Now when focusin or focusout events are dispatched, a FocusEvent is created with +the relatedTarget attribute set accordingly. + +* fast/dom/shadow/shadow-boundary-events-expected.txt: +* fast/dom/shadow/shadow-boundary-events.html: +* fast/events/related-target-focusevent-expected.txt: Added. +* fast/events/related-target-focusevent.html: Added. + 2013-02-06 Mike West Entity-header extension headers honored on 304 responses. Modified: trunk/LayoutTests/fast/dom/shadow/shadow-boundary-events-expected.txt (142071 => 142072) --- trunk/LayoutTests/fast/dom/shadow/shadow-boundary-events-expected.txt 2013-02-07 08:25:26 UTC (rev 142071) +++ trunk/LayoutTests/fast/dom/shadow/shadow-boundary-events-expected.txt 2013-02-07 08:30:00 UTC (rev 142072) @@ -61,13 +61,13 @@ Move focus from a node to its sibling node. All nodes are outside of shadow boundary. Moving focus from divB to divC -PASS dispatchedEvent("focusin") is ["divC(@divC)", "divC(@divA)"] -PASS dispatchedEvent("focusout") is ["divB(@divB)", "divB(@divA)"] +PASS dispatchedEvent("focusin") is ["divC(<-divB)(@divC)", "divC(<-divB)(@divA)"] +PASS dispatchedEvent("focusout") is ["divB(<-divC)(@divB)", "divB(<-divC)(@divA)"] Old focused node and new focused node exist in separated subtrees, crossing shadow boundaries. Making sure that an event is not dispatched beyond the lowest common boundary. Moving focus from shadowD/shadowF/shadowG/divH to shadowD/shadowK/divL -PASS dispatchedEvent("focusin") is ["divL(@divL)", "shadowK(@shadowK)", "shadowK(@divJ)"] -PASS dispatchedEvent("focusout") is ["divH(@divH)", "shadowG(@shadowG)", "shadowF(@shadowF)", "shadowF(@divE)"] +PASS dispatchedEvent("focusin") is ["divL(<-shadowF)(@divL)", "shadowK(<-shadowF)(@shadowK)", "shadowK(<-s
[webkit-changes] [141983] trunk/Source/WebCore
Title: [141983] trunk/Source/WebCore Revision 141983 Author hara...@chromium.org Date 2013-02-06 03:40:49 -0800 (Wed, 06 Feb 2013) Log Message [V8] Remove V8GCController::m_edenNodes and make minor DOM GC more precise https://bugs.webkit.org/show_bug.cgi?id=108579 Reviewed by Adam Barth. Currently V8GCController::m_edenNodes stores a list of nodes whose wrappers have been created since the latest GC. The reason why we needed m_edenNodes is that there was no way to know a list of wrappers in the new space of V8. By using m_edenNodes, we had been approximating 'wrappers in the new space' by 'wrappers that have been created since the latest GC'. Now V8 provides VisitHandlesForPartialDependence(), with which WebKit can know a list of wrappers in the new space. By using the API, we can remove V8GCController::m_edenNodes. The benefit is that (1) we no longer need to keep m_edenNodes and that (2) it enables more precise minor DOM GC (Remember that m_edenNodes was just an approximation). Performance benchmark: https://bugs.webkit.org/attachment.cgi?id=185940 The benchmark runs 300 iterations, each of which creates 10 elements. The benchmark measures average, min, median, max and stdev of execution times of the 300 iterations. This will tell us the worst-case overhead of this change. Before: mean=59.91ms, min=39ms, median=42ms, max=258ms, stdev=47.48ms After: mean=58.75ms, min=35ms, median=41ms, max=250ms, stdev=47.32ms As shown above, I couldn't observe any performance regression. No tests. No change in behavior. * bindings/v8/DOMDataStore.h: (WebCore::DOMDataStore::setWrapperInObject): * bindings/v8/DOMWrapperWorld.h: (DOMWrapperWorld): (WebCore::DOMWrapperWorld::getWorldWithoutContextCheck): * bindings/v8/V8Binding.h: (WebCore): (WebCore::worldForEnteredContextIfIsolated): (WebCore::worldForEnteredContextWithoutContextCheck): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::initializeIfNeeded): * bindings/v8/V8GCController.cpp: (WebCore::gcTree): (WebCore): (MinorGCWrapperVisitor): (WebCore::MinorGCWrapperVisitor::MinorGCWrapperVisitor): (WebCore::MinorGCWrapperVisitor::notifyFinished): (WebCore::MajorGCWrapperVisitor::MajorGCWrapperVisitor): (WebCore::V8GCController::gcPrologue): (WebCore::V8GCController::minorGCPrologue): (WebCore::V8GCController::majorGCPrologue): * bindings/v8/V8GCController.h: (V8GCController): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/v8/DOMDataStore.h trunk/Source/WebCore/bindings/v8/DOMWrapperWorld.h trunk/Source/WebCore/bindings/v8/V8Binding.h trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp trunk/Source/WebCore/bindings/v8/V8GCController.cpp trunk/Source/WebCore/bindings/v8/V8GCController.h Diff Modified: trunk/Source/WebCore/ChangeLog (141982 => 141983) --- trunk/Source/WebCore/ChangeLog 2013-02-06 11:32:16 UTC (rev 141982) +++ trunk/Source/WebCore/ChangeLog 2013-02-06 11:40:49 UTC (rev 141983) @@ -1,3 +1,62 @@ +2013-02-04 Kentaro Hara + +[V8] Remove V8GCController::m_edenNodes and make minor DOM GC more precise +https://bugs.webkit.org/show_bug.cgi?id=108579 + +Reviewed by Adam Barth. + +Currently V8GCController::m_edenNodes stores a list of nodes whose +wrappers have been created since the latest GC. The reason why we +needed m_edenNodes is that there was no way to know a list of wrappers +in the new space of V8. By using m_edenNodes, we had been approximating +'wrappers in the new space' by 'wrappers that have been created since +the latest GC'. + +Now V8 provides VisitHandlesForPartialDependence(), with which WebKit +can know a list of wrappers in the new space. By using the API, we can +remove V8GCController::m_edenNodes. The benefit is that (1) we no longer +need to keep m_edenNodes and that (2) it enables more precise minor +DOM GC (Remember that m_edenNodes was just an approximation). + +Performance benchmark: https://bugs.webkit.org/attachment.cgi?id=185940 +The benchmark runs 300 iterations, each of which creates 10 elements. +The benchmark measures average, min, median, max and stdev of execution times +of the 300 iterations. This will tell us the worst-case overhead of this change. + +Before: + mean=59.91ms, min=39ms, median=42ms, max=258ms, stdev=47.48ms + +After: + mean=58.75ms, min=35ms, median=41ms, max=250ms, stdev=47.32ms + +As shown above, I couldn't observe any performance regression. + +No tests. No change in behavior. + +* bindings/v8/DOMDataStore.h: +(WebCore::DOMDataStore::setWrapperInObject): +* bindings/v8/DOMWrapperWorld.h: +(DOMWrapperWorld): +(WebCore::DOMWrapperWorld::getWorldWithoutContextCheck): +* bindings/v8/V8Binding.h: +(WebCore): +(WebCore::worldForEnteredContextIfIsolated): +(WebCore::worldFo
[webkit-changes] [141977] trunk/Source/WebCore
Title: [141977] trunk/Source/WebCore Revision 141977 Author hara...@chromium.org Date 2013-02-06 00:55:20 -0800 (Wed, 06 Feb 2013) Log Message [V8] Pass an Isolate to remaining GetTemplate()s https://bugs.webkit.org/show_bug.cgi?id=109001 Reviewed by Adam Barth. No tests. No change in behavior. * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::V8DOMWindow::namedSecurityCheck): Because this method is a callback from V8, we cannot change its signature to receive an Isolate. (WebCore::V8DOMWindow::indexedSecurityCheck): Ditto. * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (GenerateToV8Converters): * bindings/scripts/test/V8/V8Float64Array.cpp: (WebCore::V8Float64Array::createWrapper): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore::V8TestActiveDOMObject::createWrapper): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: (WebCore::V8TestCustomNamedGetter::createWrapper): * bindings/scripts/test/V8/V8TestEventConstructor.cpp: (WebCore::V8TestEventConstructor::createWrapper): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore::V8TestEventTarget::createWrapper): * bindings/scripts/test/V8/V8TestException.cpp: (WebCore::V8TestException::createWrapper): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::V8TestInterface::createWrapper): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore::V8TestMediaQueryListListener::createWrapper): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore::V8TestNamedConstructor::createWrapper): * bindings/scripts/test/V8/V8TestNode.cpp: (WebCore::V8TestNode::createWrapper): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::V8TestObj::createWrapper): * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp: (WebCore::V8TestOverloadedConstructors::createWrapper): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::V8TestSerializedScriptValueInterface::createWrapper): * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::createWrapper): * bindings/v8/V8DOMWrapper.h: (V8DOMWrapper): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::V8HTMLDocument::wrapInShadowObject): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm trunk/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestException.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNode.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp trunk/Source/WebCore/bindings/v8/V8DOMWrapper.cpp trunk/Source/WebCore/bindings/v8/V8DOMWrapper.h trunk/Source/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (141976 => 141977) --- trunk/Source/WebCore/ChangeLog 2013-02-06 08:27:21 UTC (rev 141976) +++ trunk/Source/WebCore/ChangeLog 2013-02-06 08:55:20 UTC (rev 141977) @@ -1,3 +1,53 @@ +2013-02-06 Kentaro Hara + +[V8] Pass an Isolate to remaining GetTemplate()s +https://bugs.webkit.org/show_bug.cgi?id=109001 + +Reviewed by Adam Barth. + +No tests. No change in behavior. + +* bindings/v8/custom/V8DOMWindowCustom.cpp: +(WebCore::V8DOMWindow::namedSecurityCheck): Because this method is a callback from V8, +we cannot change its signature to receive an Isolate. +(WebCore::V8DOMWindow::indexedSecurityCheck): Ditto. + +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateHeader): +(GenerateToV8Converters): +* bindings/scripts/test/V8/V8Float64Array.cpp: +(WebCore::V8Float64Array::createWrapper): +* bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: +(WebCore::V8TestActiveDOMObject::createWrapper): +* bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: +(WebCore::V8TestCustomNamedGetter::createWrapper): +* bindings/scripts/test/V8/V8TestEventConstructor.cpp: +(WebCore::V8TestEventConstructor::createWrapper): +* bindings/scripts/test/V8/V8TestEventTarget.cpp: +(WebCore::V8TestEventTarget::createWrapper): +* bindings/scripts/test/V8/V8TestException.cpp: +(WebCore::V8TestException::createWrapper): +* bindings/scripts/test/V8/V8TestInterfa
[webkit-changes] [141972] trunk/Source/WebCore
Title: [141972] trunk/Source/WebCore Revision 141972 Author hara...@chromium.org Date 2013-02-05 23:44:53 -0800 (Tue, 05 Feb 2013) Log Message Add #if USE(V8) to Node::V8CollectableDuringMinorGCFlag https://bugs.webkit.org/show_bug.cgi?id=109009 Reviewed by Kent Tamura. Node flags should be saved. V8CollectableDuringMinorGCFlag is used by V8 only. * dom/Node.h: (Node): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/dom/Node.h Diff Modified: trunk/Source/WebCore/ChangeLog (141971 => 141972) --- trunk/Source/WebCore/ChangeLog 2013-02-06 07:41:12 UTC (rev 141971) +++ trunk/Source/WebCore/ChangeLog 2013-02-06 07:44:53 UTC (rev 141972) @@ -1,3 +1,15 @@ +2013-02-05 Kentaro Hara + +Add #if USE(V8) to Node::V8CollectableDuringMinorGCFlag +https://bugs.webkit.org/show_bug.cgi?id=109009 + +Reviewed by Kent Tamura. + +Node flags should be saved. V8CollectableDuringMinorGCFlag is used by V8 only. + +* dom/Node.h: +(Node): + 2013-02-05 Vsevolod Vlasov Web Inspector: Add ending slashes automatically to file mappings. Modified: trunk/Source/WebCore/dom/Node.h (141971 => 141972) --- trunk/Source/WebCore/dom/Node.h 2013-02-06 07:41:12 UTC (rev 141971) +++ trunk/Source/WebCore/dom/Node.h 2013-02-06 07:44:53 UTC (rev 141972) @@ -380,8 +380,10 @@ bool hasEventTargetData() const { return getFlag(HasEventTargetDataFlag); } void setHasEventTargetData(bool flag) { setFlag(flag, HasEventTargetDataFlag); } +#if USE(V8) bool isV8CollectableDuringMinorGC() const { return getFlag(V8CollectableDuringMinorGCFlag); } void setV8CollectableDuringMinorGC(bool flag) { setFlag(flag, V8CollectableDuringMinorGCFlag); } +#endif enum ShouldSetAttached { SetAttached, @@ -718,7 +720,9 @@ HasCustomCallbacksFlag = 1 << 21, HasScopedHTMLStyleChildFlag = 1 << 22, HasEventTargetDataFlag = 1 << 23, +#if USE(V8) V8CollectableDuringMinorGCFlag = 1 << 24, +#endif NeedsShadowTreeWalkerFlag = 1 << 25, IsInShadowTreeFlag = 1 << 26, ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [141948] trunk/Source/WebCore
Title: [141948] trunk/Source/WebCore Revision 141948 Author hara...@chromium.org Date 2013-02-05 16:28:34 -0800 (Tue, 05 Feb 2013) Log Message [V8] Remove deprecatedV8String() and deprecatedV8Integer() https://bugs.webkit.org/show_bug.cgi?id=108919 Reviewed by Adam Barth. No tests. No change in behavior. * bindings/v8/V8Binding.cpp: (WebCore::toXPathNSResolver): * bindings/v8/V8Binding.h: * bindings/v8/custom/V8CustomXPathNSResolver.cpp: (WebCore::V8CustomXPathNSResolver::create): (WebCore::V8CustomXPathNSResolver::V8CustomXPathNSResolver): (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI): * bindings/v8/custom/V8CustomXPathNSResolver.h: (V8CustomXPathNSResolver): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/v8/V8Binding.cpp trunk/Source/WebCore/bindings/v8/V8Binding.h trunk/Source/WebCore/bindings/v8/custom/V8CustomXPathNSResolver.cpp trunk/Source/WebCore/bindings/v8/custom/V8CustomXPathNSResolver.h Diff Modified: trunk/Source/WebCore/ChangeLog (141947 => 141948) --- trunk/Source/WebCore/ChangeLog 2013-02-06 00:05:31 UTC (rev 141947) +++ trunk/Source/WebCore/ChangeLog 2013-02-06 00:28:34 UTC (rev 141948) @@ -1,3 +1,22 @@ +2013-02-05 Kentaro Hara + +[V8] Remove deprecatedV8String() and deprecatedV8Integer() +https://bugs.webkit.org/show_bug.cgi?id=108919 + +Reviewed by Adam Barth. + +No tests. No change in behavior. + +* bindings/v8/V8Binding.cpp: +(WebCore::toXPathNSResolver): +* bindings/v8/V8Binding.h: +* bindings/v8/custom/V8CustomXPathNSResolver.cpp: +(WebCore::V8CustomXPathNSResolver::create): +(WebCore::V8CustomXPathNSResolver::V8CustomXPathNSResolver): +(WebCore::V8CustomXPathNSResolver::lookupNamespaceURI): +* bindings/v8/custom/V8CustomXPathNSResolver.h: +(V8CustomXPathNSResolver): + 2013-02-05 Vineet Chaudhary formenctype to have empty string as default value. Modified: trunk/Source/WebCore/bindings/v8/V8Binding.cpp (141947 => 141948) --- trunk/Source/WebCore/bindings/v8/V8Binding.cpp 2013-02-06 00:05:31 UTC (rev 141947) +++ trunk/Source/WebCore/bindings/v8/V8Binding.cpp 2013-02-06 00:28:34 UTC (rev 141948) @@ -208,7 +208,7 @@ if (V8XPathNSResolver::HasInstance(value, isolate)) resolver = V8XPathNSResolver::toNative(v8::Handle::Cast(value)); else if (value->IsObject()) -resolver = V8CustomXPathNSResolver::create(value->ToObject()); +resolver = V8CustomXPathNSResolver::create(value->ToObject(), isolate); return resolver; } Modified: trunk/Source/WebCore/bindings/v8/V8Binding.h (141947 => 141948) --- trunk/Source/WebCore/bindings/v8/V8Binding.h 2013-02-06 00:05:31 UTC (rev 141947) +++ trunk/Source/WebCore/bindings/v8/V8Binding.h 2013-02-06 00:28:34 UTC (rev 141948) @@ -152,12 +152,6 @@ return V8PerIsolateData::from(isolate)->stringCache()->v8ExternalString(string.impl(), handleType, isolate); } -// FIXME: All call sites of this method should use v8String(). -inline v8::Handle deprecatedV8String(const String& string) -{ -return v8String(string, v8::Isolate::GetCurrent()); -} - inline v8::Handle v8StringOrNull(const String& string, v8::Isolate* isolate, ReturnHandleType handleType = ReturnLocalHandle) { ASSERT(isolate); @@ -179,12 +173,6 @@ return V8PerIsolateData::from(isolate)->integerCache()->v8Integer(value, isolate); } -// FIXME: All call sites of this method should use v8Integer(). -inline v8::Handle deprecatedV8Integer(int value) -{ -return v8Integer(value, v8::Isolate::GetCurrent()); -} - inline v8::Handle v8UnsignedInteger(unsigned value, v8::Isolate* isolate) { ASSERT(isolate); Modified: trunk/Source/WebCore/bindings/v8/custom/V8CustomXPathNSResolver.cpp (141947 => 141948) --- trunk/Source/WebCore/bindings/v8/custom/V8CustomXPathNSResolver.cpp 2013-02-06 00:05:31 UTC (rev 141947) +++ trunk/Source/WebCore/bindings/v8/custom/V8CustomXPathNSResolver.cpp 2013-02-06 00:28:34 UTC (rev 141948) @@ -41,13 +41,14 @@ namespace WebCore { -PassRefPtr V8CustomXPathNSResolver::create(v8::Handle resolver) +PassRefPtr V8CustomXPathNSResolver::create(v8::Handle resolver, v8::Isolate* isolate) { -return adoptRef(new V8CustomXPathNSResolver(resolver)); +return adoptRef(new V8CustomXPathNSResolver(resolver, isolate)); } -V8CustomXPathNSResolver::V8CustomXPathNSResolver(v8::Handle resolver) +V8CustomXPathNSResolver::V8CustomXPathNSResolver(v8::Handle resolver, v8::Isolate* isolate) : m_resolver(resolver) +, m_isolate(isolate) { } @@ -77,7 +78,7 @@ tryCatch.SetVerbose(true); // Print exceptions to console. const int argc = 1; -v8::Handle argv[argc] = { deprecatedV8String(prefix) }; +v8::Handle argv[argc] = { v8String(prefix, m_isolate) }; v8::Handle function = lookupNamespaceURIFunc.IsEmpty() ? v8::Handle::Cast(m_r
[webkit-changes] [141944] trunk/Source/WebCore
Title: [141944] trunk/Source/WebCore Revision 141944 Author hara...@chromium.org Date 2013-02-05 15:43:25 -0800 (Tue, 05 Feb 2013) Log Message [JSC] Clean up CodeGeneratorJS.pm by introducing HasCustom{Getter,Setter,Method} https://bugs.webkit.org/show_bug.cgi?id=108898 Reviewed by Sam Weinig. No tests. No change in behavior. * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): (HasCustomGetter): (HasCustomSetter): (HasCustomMethod): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm Diff Modified: trunk/Source/WebCore/ChangeLog (141943 => 141944) --- trunk/Source/WebCore/ChangeLog 2013-02-05 23:42:19 UTC (rev 141943) +++ trunk/Source/WebCore/ChangeLog 2013-02-05 23:43:25 UTC (rev 141944) @@ -1,3 +1,19 @@ +2013-02-05 Kentaro Hara + +[JSC] Clean up CodeGeneratorJS.pm by introducing HasCustom{Getter,Setter,Method} +https://bugs.webkit.org/show_bug.cgi?id=108898 + +Reviewed by Sam Weinig. + +No tests. No change in behavior. + +* bindings/scripts/CodeGeneratorJS.pm: +(GenerateHeader): +(GenerateImplementation): +(HasCustomGetter): +(HasCustomSetter): +(HasCustomMethod): + 2013-02-05 Dana Jansens [chromium] Provide compositor offscreen context through the WebLayerTreeViewClient interface Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (141943 => 141944) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2013-02-05 23:42:19 UTC (rev 141943) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2013-02-05 23:43:25 UTC (rev 141944) @@ -896,9 +896,8 @@ if ($numAttributes > 0) { foreach (@{$interface->attributes}) { my $attribute = $_; -$numCustomAttributes++ if $attribute->signature->extendedAttributes->{"Custom"} || $attribute->signature->extendedAttributes->{"JSCustom"}; -$numCustomAttributes++ if ($attribute->signature->extendedAttributes->{"CustomGetter"} || $attribute->signature->extendedAttributes->{"JSCustomGetter"}); -$numCustomAttributes++ if ($attribute->signature->extendedAttributes->{"CustomSetter"} || $attribute->signature->extendedAttributes->{"JSCustomSetter"}); +$numCustomAttributes++ if HasCustomGetter($attribute->signature->extendedAttributes); +$numCustomAttributes++ if HasCustomSetter($attribute->signature->extendedAttributes); if ($attribute->signature->extendedAttributes->{"CachedAttribute"}) { my $conditionalString = $codeGenerator->GenerateConditionalString($attribute->signature); push(@headerContent, "#if ${conditionalString}\n") if $conditionalString; @@ -921,13 +920,13 @@ foreach my $attribute (@{$interface->attributes}) { my $conditionalString = $codeGenerator->GenerateConditionalString($attribute->signature); -if ($attribute->signature->extendedAttributes->{"Custom"} || $attribute->signature->extendedAttributes->{"JSCustom"} || $attribute->signature->extendedAttributes->{"CustomGetter"} || $attribute->signature->extendedAttributes->{"JSCustomGetter"}) { +if (HasCustomGetter($attribute->signature->extendedAttributes)) { push(@headerContent, "#if ${conditionalString}\n") if $conditionalString; my $methodName = $codeGenerator->WK_lcfirst($attribute->signature->name); push(@headerContent, "JSC::JSValue " . $methodName . "(JSC::ExecState*) const;\n"); push(@headerContent, "#endif\n") if $conditionalString; } -if (($attribute->signature->extendedAttributes->{"Custom"} || $attribute->signature->extendedAttributes->{"JSCustom"} || $attribute->signature->extendedAttributes->{"CustomSetter"} || $attribute->signature->extendedAttributes->{"JSCustomSetter"}) && !IsReadonly($attribute)) { +if (HasCustomSetter($attribute->signature->extendedAttributes) && !IsReadonly($attribute)) { push(@headerContent, "#if ${conditionalString}\n") if $conditionalString; push(@headerContent, "void set" . $codeGenerator->WK_ucfirst($attribute->signature->name) . "(JSC::ExecState*, JSC::JSValue);\n"); push(@headerContent, "#endif\n") if $conditionalString; @@ -936,13 +935,13 @@ } foreach my $function (@{$interface->functions}) { -$numCustomFunctions++ if $function->signature->extendedAttributes->{"Custom"} || $function->signature->extendedAttributes->{"JSCustom"}; +$numCustomFunctions++ if HasCustomMethod($function->signature->extendedAttributes); } if ($numCustomFunctions > 0) { push(@headerContent, "\n// Custom functions\n"); foreach my $function (@{$interface->functions}) { -next unless $function->signature->extendedAttributes->{"Custom"} or $function->signature->exten
[webkit-changes] [141860] trunk/Source/WebCore
Title: [141860] trunk/Source/WebCore Revision 141860 Author hara...@chromium.org Date 2013-02-04 22:53:56 -0800 (Mon, 04 Feb 2013) Log Message [V8] Clean up CodeGeneratorV8.pm by introducing HasCustom{Getter,Setter,Method} https://bugs.webkit.org/show_bug.cgi?id=108896 Reviewed by Adam Barth. No tests. No change in generated code. * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (HasCustomGetter): (HasCustomSetter): (HasCustomMethod): (GetFunctionTemplateCallbackName): (GenerateSingleBatchedAttribute): (GenerateImplementation): (RequiresCustomSignature): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm Diff Modified: trunk/Source/WebCore/ChangeLog (141859 => 141860) --- trunk/Source/WebCore/ChangeLog 2013-02-05 06:35:18 UTC (rev 141859) +++ trunk/Source/WebCore/ChangeLog 2013-02-05 06:53:56 UTC (rev 141860) @@ -1,3 +1,22 @@ +2013-02-04 Kentaro Hara + +[V8] Clean up CodeGeneratorV8.pm by introducing HasCustom{Getter,Setter,Method} +https://bugs.webkit.org/show_bug.cgi?id=108896 + +Reviewed by Adam Barth. + +No tests. No change in generated code. + +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateHeader): +(HasCustomGetter): +(HasCustomSetter): +(HasCustomMethod): +(GetFunctionTemplateCallbackName): +(GenerateSingleBatchedAttribute): +(GenerateImplementation): +(RequiresCustomSignature): + 2013-02-04 Kent Tamura Fix crash by type change on focus Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (141859 => 141860) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-05 06:35:18 UTC (rev 141859) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-05 06:53:56 UTC (rev 141860) @@ -394,7 +394,7 @@ my $name = $function->signature->name; my $attrExt = $function->signature->extendedAttributes; -if (($attrExt->{"Custom"} || $attrExt->{"V8Custom"}) && !$attrExt->{"ImplementedBy"} && $function->{overloadIndex} == 1) { +if (HasCustomMethod($attrExt) && !$attrExt->{"ImplementedBy"} && $function->{overloadIndex} == 1) { my $conditionalString = $codeGenerator->GenerateConditionalString($function->signature); push(@headerContent, "#if ${conditionalString}\n") if $conditionalString; push(@headerContent, <@@ -422,18 +422,14 @@ my $name = $attribute->signature->name; my $attrExt = $attribute->signature->extendedAttributes; my $conditionalString = $codeGenerator->GenerateConditionalString($attribute->signature); -if (($attrExt->{"V8CustomGetter"} || $attrExt->{"CustomGetter"} || - $attrExt->{"V8Custom"} || $attrExt->{"Custom"}) && -!$attrExt->{"ImplementedBy"}) { +if (HasCustomGetter($attrExt) && !$attrExt->{"ImplementedBy"}) { push(@headerContent, "#if ${conditionalString}\n") if $conditionalString; push(@headerContent, < static v8::Handle ${name}AccessorGetter(v8::Local name, const v8::AccessorInfo&); END push(@headerContent, "#endif // ${conditionalString}\n") if $conditionalString; } -if (($attrExt->{"V8CustomSetter"} || $attrExt->{"CustomSetter"} || - $attrExt->{"V8Custom"} || $attrExt->{"Custom"}) && -!$attrExt->{"ImplementedBy"}) { +if (HasCustomSetter($attrExt) && !$attrExt->{"ImplementedBy"}) { push(@headerContent, "#if ${conditionalString}\n") if $conditionalString; push(@headerContent, < static void ${name}AccessorSetter(v8::Local name, v8::Local, const v8::AccessorInfo&); @@ -757,6 +753,24 @@ return $interface->extendedAttributes->{"CustomConstructor"} || $interface->extendedAttributes->{"V8CustomConstructor"}; } +sub HasCustomGetter +{ +my $attrExt = shift; +return $attrExt->{"Custom"} || $attrExt->{"V8Custom"} || $attrExt->{"CustomGetter"} || $attrExt->{"V8CustomGetter"}; +} + +sub HasCustomSetter +{ +my $attrExt = shift; +return $attrExt->{"Custom"} || $attrExt->{"V8Custom"} || $attrExt->{"CustomSetter"} || $attrExt->{"V8CustomSetter"}; +} + +sub HasCustomMethod +{ +my $attrExt = shift; +return $attrExt->{"Custom"} || $attrExt->{"V8Custom"}; +} + sub IsReadonly { my $attribute = shift; @@ -1343,12 +1357,7 @@ my $name = $function->signature->name; -if ($function->signature->extendedAttributes->{"Custom"} || -$function->signature->extendedAttributes->{"V8Custom"}) { -if ($function->signature->extendedAttributes->{"Custom"} && -$function->signature->extendedAttributes->{"V8Custom"}) { -die "Custom and V8Custom should be mutually exclusive!" -} +if (HasCustomMethod($function->signature->extendedAttributes)) { return "V8${interfaceName}::${name}Callback"; } else { return "${inte
[webkit-changes] [141857] trunk/Source/WebCore
Title: [141857] trunk/Source/WebCore Revision 141857 Author hara...@chromium.org Date 2013-02-04 22:08:40 -0800 (Mon, 04 Feb 2013) Log Message [V8] Pass an Isolate to opaqueRootForGC() https://bugs.webkit.org/show_bug.cgi?id=108886 Reviewed by Adam Barth. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateOpaqueRootForGC): (GenerateHeader): * bindings/v8/V8GCController.cpp: (WebCore::V8GCController::opaqueRootForGC): * bindings/v8/WrapperTypeInfo.h: (WebCore): (WebCore::WrapperTypeInfo::opaqueRootForGC): * bindings/v8/custom/V8NodeListCustom.cpp: (WebCore::V8NodeList::opaqueRootForGC): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm trunk/Source/WebCore/bindings/v8/V8GCController.cpp trunk/Source/WebCore/bindings/v8/V8GCController.h trunk/Source/WebCore/bindings/v8/WrapperTypeInfo.h trunk/Source/WebCore/bindings/v8/custom/V8NodeListCustom.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (141856 => 141857) --- trunk/Source/WebCore/ChangeLog 2013-02-05 05:56:45 UTC (rev 141856) +++ trunk/Source/WebCore/ChangeLog 2013-02-05 06:08:40 UTC (rev 141857) @@ -1,3 +1,23 @@ +2013-02-04 Kentaro Hara + +[V8] Pass an Isolate to opaqueRootForGC() +https://bugs.webkit.org/show_bug.cgi?id=108886 + +Reviewed by Adam Barth. + +No tests. No change in behavior. + +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateOpaqueRootForGC): +(GenerateHeader): +* bindings/v8/V8GCController.cpp: +(WebCore::V8GCController::opaqueRootForGC): +* bindings/v8/WrapperTypeInfo.h: +(WebCore): +(WebCore::WrapperTypeInfo::opaqueRootForGC): +* bindings/v8/custom/V8NodeListCustom.cpp: +(WebCore::V8NodeList::opaqueRootForGC): + 2013-02-04 Wei James Heap-buffer-overflow in WebCore::AudioBufferSourceNode::process Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (141856 => 141857) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-05 05:56:45 UTC (rev 141856) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-05 06:08:40 UTC (rev 141857) @@ -187,9 +187,9 @@ } push(@implContent, <-void* V8${interfaceName}::opaqueRootForGC(void* object, v8::Persistent wrapper) +void* V8${interfaceName}::opaqueRootForGC(void* object, v8::Persistent wrapper, v8::Isolate* isolate) { -ASSERT(!wrapper.IsIndependent()); +ASSERT(!wrapper.IsIndependent(isolate)); ${interfaceName}* impl = static_cast<${interfaceName}*>(object); END if (GetGenerateIsReachable($interface) eq "ImplDocument" || @@ -207,7 +207,7 @@ push(@implContent, < if (Node* owner = impl->${methodName}()) -return V8GCController::opaqueRootForGC(owner); +return V8GCController::opaqueRootForGC(owner, isolate); END } @@ -365,7 +365,7 @@ END if (NeedsCustomOpaqueRootForGC($interface)) { -push(@headerContent, "static void* opaqueRootForGC(void*, v8::Persistent);\n"); +push(@headerContent, "static void* opaqueRootForGC(void*, v8::Persistent, v8::Isolate*);\n"); } if ($codeGenerator->InheritsExtendedAttribute($interface, "ActiveDOMObject")) { Modified: trunk/Source/WebCore/bindings/v8/V8GCController.cpp (141856 => 141857) --- trunk/Source/WebCore/bindings/v8/V8GCController.cpp 2013-02-05 05:56:45 UTC (rev 141856) +++ trunk/Source/WebCore/bindings/v8/V8GCController.cpp 2013-02-05 06:08:40 UTC (rev 141857) @@ -156,7 +156,7 @@ v8::V8::AddImplicitReferences(wrapper, listeners.data(), listeners.size()); } -Node* V8GCController::opaqueRootForGC(Node* node) +Node* V8GCController::opaqueRootForGC(Node* node, v8::Isolate*) { // FIXME: Remove the special handling for image elements. // The same special handling is in V8GCController::gcTree(). @@ -213,7 +213,7 @@ MutationObserver* observer = static_cast(object); HashSet observedNodes = observer->getObservedNodes(); for (HashSet::iterator it = observedNodes.begin(); it != observedNodes.end(); ++it) -m_grouper.addNodeToGroup(V8GCController::opaqueRootForGC(*it), wrapper); +m_grouper.addNodeToGroup(V8GCController::opaqueRootForGC(*it, m_isolate), wrapper); } else { ActiveDOMObject* activeDOMObject = type->toActiveDOMObject(wrapper); if (activeDOMObject && activeDOMObject->hasPendingActivity()) @@ -230,9 +230,9 @@ if (node->hasEventListeners()) addImplicitReferencesForNodeWithEventListeners(node, wrapper); -m_grouper.addNodeToGroup(V8GCController::opaqueRootForGC(node), wrapper); +m_grouper.addNodeToGroup(V8GCController::opaqueRootForGC(node, m_isolate), wrapper); } else if (classId == v8DOMObjectClassId) { -m_grouper.addObjectToGroup(type->opaqueRootForGC(object, wrapper), wrapper); +
[webkit-changes] [141856] trunk/LayoutTests
Title: [141856] trunk/LayoutTests Revision 141856 Author hara...@chromium.org Date 2013-02-04 21:56:45 -0800 (Mon, 04 Feb 2013) Log Message Add missing tests for default values of event constructors https://bugs.webkit.org/show_bug.cgi?id=108885 Reviewed by Adam Barth. Spec: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm#constructor-keyboardevent * fast/events/constructors/keyboard-event-constructor-expected.txt: * fast/events/constructors/keyboard-event-constructor.html: * fast/events/constructors/mouse-event-constructor-expected.txt: * fast/events/constructors/mouse-event-constructor.html: * fast/events/constructors/wheel-event-constructor-expected.txt: * fast/events/constructors/wheel-event-constructor.html: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/fast/events/constructors/keyboard-event-constructor-expected.txt trunk/LayoutTests/fast/events/constructors/keyboard-event-constructor.html trunk/LayoutTests/fast/events/constructors/mouse-event-constructor-expected.txt trunk/LayoutTests/fast/events/constructors/mouse-event-constructor.html trunk/LayoutTests/fast/events/constructors/wheel-event-constructor-expected.txt trunk/LayoutTests/fast/events/constructors/wheel-event-constructor.html Diff Modified: trunk/LayoutTests/ChangeLog (141855 => 141856) --- trunk/LayoutTests/ChangeLog 2013-02-05 05:22:22 UTC (rev 141855) +++ trunk/LayoutTests/ChangeLog 2013-02-05 05:56:45 UTC (rev 141856) @@ -1,3 +1,19 @@ +2013-02-04 Kentaro Hara + +Add missing tests for default values of event constructors +https://bugs.webkit.org/show_bug.cgi?id=108885 + +Reviewed by Adam Barth. + +Spec: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm#constructor-keyboardevent + +* fast/events/constructors/keyboard-event-constructor-expected.txt: +* fast/events/constructors/keyboard-event-constructor.html: +* fast/events/constructors/mouse-event-constructor-expected.txt: +* fast/events/constructors/mouse-event-constructor.html: +* fast/events/constructors/wheel-event-constructor-expected.txt: +* fast/events/constructors/wheel-event-constructor.html: + 2013-02-04 Gregg Tavares Add Support Files for WebGL Conformance Tests Modified: trunk/LayoutTests/fast/events/constructors/keyboard-event-constructor-expected.txt (141855 => 141856) --- trunk/LayoutTests/fast/events/constructors/keyboard-event-constructor-expected.txt 2013-02-05 05:22:22 UTC (rev 141855) +++ trunk/LayoutTests/fast/events/constructors/keyboard-event-constructor-expected.txt 2013-02-05 05:56:45 UTC (rev 141856) @@ -7,6 +7,12 @@ PASS new KeyboardEvent('eventType').cancelable is false PASS new KeyboardEvent('eventType').view is null PASS new KeyboardEvent('eventType').detail is 0 +PASS new KeyboardEvent('eventType').keyIdentifier is "" +PASS new KeyboardEvent('eventType').keyLocation is 0 +PASS new KeyboardEvent('eventType').ctrlKey is false +PASS new KeyboardEvent('eventType').altKey is false +PASS new KeyboardEvent('eventType').shiftKey is false +PASS new KeyboardEvent('eventType').metaKey is false PASS new KeyboardEvent('eventType', { bubbles: false }).bubbles is false PASS new KeyboardEvent('eventType', { bubbles: true }).bubbles is true PASS new KeyboardEvent('eventType', { cancelable: false }).cancelable is false Modified: trunk/LayoutTests/fast/events/constructors/keyboard-event-constructor.html (141855 => 141856) --- trunk/LayoutTests/fast/events/constructors/keyboard-event-constructor.html 2013-02-05 05:22:22 UTC (rev 141855) +++ trunk/LayoutTests/fast/events/constructors/keyboard-event-constructor.html 2013-02-05 05:56:45 UTC (rev 141856) @@ -15,6 +15,12 @@ shouldBe("new KeyboardEvent('eventType').cancelable", "false"); shouldBe("new KeyboardEvent('eventType').view", "null"); shouldBe("new KeyboardEvent('eventType').detail", "0"); +shouldBeEqualToString("new KeyboardEvent('eventType').keyIdentifier", ""); +shouldBe("new KeyboardEvent('eventType').keyLocation", "0"); +shouldBe("new KeyboardEvent('eventType').ctrlKey", "false"); +shouldBe("new KeyboardEvent('eventType').altKey", "false"); +shouldBe("new KeyboardEvent('eventType').shiftKey", "false"); +shouldBe("new KeyboardEvent('eventType').metaKey", "false"); // bubbles is passed. shouldBe("new KeyboardEvent('eventType', { bubbles: false }).bubbles", "false"); Modified: trunk/LayoutTests/fast/events/constructors/mouse-event-constructor-expected.txt (141855 => 141856) --- trunk/LayoutTests/fast/events/constructors/mouse-event-constructor-expected.txt 2013-02-05 05:22:22 UTC (rev 141855) +++ trunk/LayoutTests/fast/events/constructors/mouse-event-constructor-expected.txt 2013-02-05 05:56:45 UTC (rev 141856) @@ -7,6 +7,16 @@ PASS new MouseEvent('eventType').cancelable is false PASS new MouseEvent('eventType').view is null PASS new MouseEvent('eventType').detail is 0 +PASS new MouseEvent('eventType').screenX is 0 +PASS new MouseEvent('eventType')
[webkit-changes] [141826] trunk
Title: [141826] trunk Revision 141826 Author hara...@chromium.org Date 2013-02-04 15:55:06 -0800 (Mon, 04 Feb 2013) Log Message Implement WheelEvent::deltaMode https://bugs.webkit.org/show_bug.cgi?id=108455 Reviewed by Adam Barth. Source/WebCore: Per the spec, WheelEvent::deltaMode should return DOM_DELTA_PIXEL or DOM_DELTA_LINE or DOM_DELTA_PAGE. Spec: http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm#constructor-wheelevent Test: fast/event/wheel-event-constructor.html * dom/WheelEvent.cpp: (WebCore::WheelEventInit::WheelEventInit): (WebCore::WheelEvent::WheelEvent): (WebCore::WheelEvent::initWheelEvent): (WebCore::deltaMode): * dom/WheelEvent.h: (WheelEventInit): (WebCore::WheelEvent::create): (WebCore::WheelEvent::deltaMode): (WheelEvent): * dom/WheelEvent.idl: * page/EventHandler.cpp: (WebCore::wheelGranularityToScrollGranularity): Source/WebKit/chromium: * src/WebInputEventConversion.cpp: (WebKit::WebMouseWheelEventBuilder::WebMouseWheelEventBuilder): LayoutTests: Per the spec, WheelEvent::deltaMode should return DOM_DELTA_PIXEL or DOM_DELTA_LINE or DOM_DELTA_PAGE. Spec: http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm#constructor-wheelevent * fast/events/constructors/wheel-event-constructor-expected.txt: * fast/events/constructors/wheel-event-constructor.html: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/fast/events/constructors/wheel-event-constructor-expected.txt trunk/LayoutTests/fast/events/constructors/wheel-event-constructor.html trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/dom/WheelEvent.cpp trunk/Source/WebCore/dom/WheelEvent.h trunk/Source/WebCore/dom/WheelEvent.idl trunk/Source/WebCore/page/EventHandler.cpp trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/src/WebInputEventConversion.cpp Diff Modified: trunk/LayoutTests/ChangeLog (141825 => 141826) --- trunk/LayoutTests/ChangeLog 2013-02-04 23:54:12 UTC (rev 141825) +++ trunk/LayoutTests/ChangeLog 2013-02-04 23:55:06 UTC (rev 141826) @@ -1,3 +1,19 @@ +2013-01-31 Kentaro Hara + +Implement WheelEvent::deltaMode +https://bugs.webkit.org/show_bug.cgi?id=108455 + +Reviewed by Adam Barth. + +Per the spec, WheelEvent::deltaMode should return +DOM_DELTA_PIXEL or DOM_DELTA_LINE or DOM_DELTA_PAGE. + +Spec: http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents +https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm#constructor-wheelevent + +* fast/events/constructors/wheel-event-constructor-expected.txt: +* fast/events/constructors/wheel-event-constructor.html: + 2013-02-04 Dima Gorbik WebVTT , and elements should have default styles Modified: trunk/LayoutTests/fast/events/constructors/wheel-event-constructor-expected.txt (141825 => 141826) --- trunk/LayoutTests/fast/events/constructors/wheel-event-constructor-expected.txt 2013-02-04 23:54:12 UTC (rev 141825) +++ trunk/LayoutTests/fast/events/constructors/wheel-event-constructor-expected.txt 2013-02-04 23:55:06 UTC (rev 141826) @@ -174,6 +174,31 @@ PASS new WheelEvent('eventType', { wheelDeltaY: {} }).wheelDeltaY is 0 PASS new WheelEvent('eventType', { wheelDeltaY: {moemoe: 12345} }).wheelDeltaY is 0 PASS new WheelEvent('eventType', { wheelDeltaY: {valueOf: function () { return 12345; }} }).wheelDeltaY is 12345 +PASS new WheelEvent('eventType', { deltaMode: 0 }).deltaMode is 0 +PASS new WheelEvent('eventType', { deltaMode: 1 }).deltaMode is 1 +PASS new WheelEvent('eventType', { deltaMode: 4294967294 }).deltaMode is 4294967294 +PASS new WheelEvent('eventType', { deltaMode: 4294967295 }).deltaMode is 4294967295 +PASS new WheelEvent('eventType', { deltaMode: WheelEvent.DOM_DELTA_PIXEL }).deltaMode is WheelEvent.DOM_DELTA_PIXEL +PASS new WheelEvent('eventType', { deltaMode: WheelEvent.DOM_DELTA_LINE }).deltaMode is WheelEvent.DOM_DELTA_LINE +PASS new WheelEvent('eventType', { deltaMode: WheelEvent.DOM_DELTA_PAGE }).deltaMode is WheelEvent.DOM_DELTA_PAGE +PASS new WheelEvent('eventType', { deltaMode: 9007199254740991 }).deltaMode is 4294967295 +PASS new WheelEvent('eventType', { deltaMode: 18446744073709551615 }).deltaMode is 0 +PASS new WheelEvent('eventType', { deltaMode: 12345678901234567890 }).deltaMode is 3944679424 +PASS new WheelEvent('eventType', { deltaMode: -1 }).deltaMode is 4294967295 +PASS new WheelEvent('eventType', { deltaMode: 123.45 }).deltaMode is 123 +PASS new WheelEvent('eventType', { deltaMode: NaN }).deltaMode is 0 +PASS new WheelEvent('eventType', { deltaMode: undefined }).deltaMode is 0 +PASS new WheelEvent('eventType', { deltaMode: null }).deltaMode is 0 +PASS new WheelEvent('eventType', { deltaMode: '' }).deltaMode is 0 +PASS new WheelEvent('eventType', { deltaMode: '12345' }).deltaMode is 12345 +PASS new WheelEvent('eventType', { deltaMode: '12345a' }).deltaMode is 0 +PA
[webkit-changes] [141730] trunk/Source/WebCore
Title: [141730] trunk/Source/WebCore Revision 141730 Author hara...@chromium.org Date 2013-02-03 19:22:44 -0800 (Sun, 03 Feb 2013) Log Message [V8] Simplify CodeGeneratorV8.pm by using InheritsExtendedAttribute("EventTarget") https://bugs.webkit.org/show_bug.cgi?id=108441 Reviewed by Adam Barth. A complicated condition in GetInternalFields() can be simplified by using InheritsExtendedAttribute("EventTarget"). No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GetInternalFields): * dom/EventTarget.idl: Added [EventTarget] which should have been added. * svg/SVGElementInstance.idl: Ditto. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm trunk/Source/WebCore/dom/EventTarget.idl trunk/Source/WebCore/svg/SVGElementInstance.cpp trunk/Source/WebCore/svg/SVGElementInstance.idl Diff Modified: trunk/Source/WebCore/ChangeLog (141729 => 141730) --- trunk/Source/WebCore/ChangeLog 2013-02-04 03:09:17 UTC (rev 141729) +++ trunk/Source/WebCore/ChangeLog 2013-02-04 03:22:44 UTC (rev 141730) @@ -1,3 +1,20 @@ +2013-02-03 Kentaro Hara + +[V8] Simplify CodeGeneratorV8.pm by using InheritsExtendedAttribute("EventTarget") +https://bugs.webkit.org/show_bug.cgi?id=108441 + +Reviewed by Adam Barth. + +A complicated condition in GetInternalFields() can be simplified +by using InheritsExtendedAttribute("EventTarget"). + +No tests. No change in behavior. + +* bindings/scripts/CodeGeneratorV8.pm: +(GetInternalFields): +* dom/EventTarget.idl: Added [EventTarget] which should have been added. +* svg/SVGElementInstance.idl: Ditto. + 2013-02-03 Gustavo Noronha Silva [Soup] Do not use local variables for the client Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (141729 => 141730) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-04 03:09:17 UTC (rev 141729) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-04 03:22:44 UTC (rev 141730) @@ -616,18 +616,11 @@ my $interface = shift; my @customInternalFields = (); -# We can't ask whether a parent type has a given extendedAttribute, -# so special-case AbstractWorker and WorkerContext to include all sub-types. # Event listeners on DOM nodes are explicitly supported in the GC controller. -# FIXME: Simplify this when all EventTargets are subtypes of EventTarget. -if (!$codeGenerator->InheritsInterface($interface, "Node") -&& ($interface->extendedAttributes->{"EventTarget"} -|| $interface->extendedAttributes->{"IsWorkerContext"} -|| $codeGenerator->InheritsInterface($interface, "AbstractWorker") -|| $codeGenerator->InheritsInterface($interface, "EventTarget"))) { +if (!$codeGenerator->InheritsInterface($interface, "Node") && +$codeGenerator->InheritsExtendedAttribute($interface, "EventTarget")) { push(@customInternalFields, "eventListenerCacheIndex"); } - return @customInternalFields; } Modified: trunk/Source/WebCore/dom/EventTarget.idl (141729 => 141730) --- trunk/Source/WebCore/dom/EventTarget.idl 2013-02-04 03:09:17 UTC (rev 141729) +++ trunk/Source/WebCore/dom/EventTarget.idl 2013-02-04 03:22:44 UTC (rev 141730) @@ -25,7 +25,8 @@ OmitConstructor, CustomToJSObject, JSCustomToNativeObject, -V8NoWrapperCache +V8NoWrapperCache, +EventTarget ] interface EventTarget { [ObjCLegacyUnnamedParameters] void addEventListener(in DOMString type, in EventListener listener, Modified: trunk/Source/WebCore/svg/SVGElementInstance.cpp (141729 => 141730) --- trunk/Source/WebCore/svg/SVGElementInstance.cpp 2013-02-04 03:09:17 UTC (rev 141729) +++ trunk/Source/WebCore/svg/SVGElementInstance.cpp 2013-02-04 03:22:44 UTC (rev 141730) @@ -186,9 +186,7 @@ EventTargetData* SVGElementInstance::eventTargetData() { -// EventTarget would use these methods if we were actually using its add/removeEventListener logic. -// As we're forwarding those calls to the correspondingElement(), no one should ever call this function. -ASSERT_NOT_REACHED(); +// Since no event listeners are added to an SVGElementInstance, we don't have eventTargetData. return 0; } Modified: trunk/Source/WebCore/svg/SVGElementInstance.idl (141729 => 141730) --- trunk/Source/WebCore/svg/SVGElementInstance.idl 2013-02-04 03:09:17 UTC (rev 141729) +++ trunk/Source/WebCore/svg/SVGElementInstance.idl 2013-02-04 03:22:44 UTC (rev 141730) @@ -28,7 +28,8 @@ Conditional=SVG, JSCustomMarkFunction, JSGenerateToNativeObject, -JSGenerateToJSObject +JSGenerateToJSObject, +EventTarget ] interface SVGElementInstance #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C : Object, EventTarget ___ webkit-changes mailing li
[webkit-changes] [141719] trunk/Source/WebCore
Title: [141719] trunk/Source/WebCore Revision 141719 Author hara...@chromium.org Date 2013-02-03 15:53:55 -0800 (Sun, 03 Feb 2013) Log Message [V8] Pass an Isolate to HasInstance() (part 3) https://bugs.webkit.org/show_bug.cgi?id=108622 Reviewed by Adam Barth. This is one of efforts to pass an Isolate to GetTemplate(). No tests. No change in behavior. * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::isHTMLAllCollectionCallback): (WebCore::V8InjectedScriptHost::typeCallback): (WebCore::V8InjectedScriptHost::getEventListenersCallback): * bindings/v8/custom/V8NodeCustom.cpp: (WebCore::V8Node::insertBeforeCallback): (WebCore::V8Node::replaceChildCallback): (WebCore::V8Node::removeChildCallback): (WebCore::V8Node::appendChildCallback): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::toWebGLUniformLocation): (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback): (WebCore::V8WebGLRenderingContext::getProgramParameterCallback): (WebCore::V8WebGLRenderingContext::getShaderParameterCallback): (WebCore::V8WebGLRenderingContext::getUniformCallback): (WebCore::vertexAttribAndUniformHelperf): (WebCore::uniformHelperi): (WebCore::uniformMatrixHelper): * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::isDocumentType): (WebCore::V8XMLHttpRequest::sendCallback): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8NodeCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (141718 => 141719) --- trunk/Source/WebCore/ChangeLog 2013-02-03 23:26:25 UTC (rev 141718) +++ trunk/Source/WebCore/ChangeLog 2013-02-03 23:53:55 UTC (rev 141719) @@ -1,5 +1,38 @@ 2013-02-03 Kentaro Hara +[V8] Pass an Isolate to HasInstance() (part 3) +https://bugs.webkit.org/show_bug.cgi?id=108622 + +Reviewed by Adam Barth. + +This is one of efforts to pass an Isolate to GetTemplate(). + +No tests. No change in behavior. + +* bindings/v8/custom/V8InjectedScriptHostCustom.cpp: +(WebCore::V8InjectedScriptHost::isHTMLAllCollectionCallback): +(WebCore::V8InjectedScriptHost::typeCallback): +(WebCore::V8InjectedScriptHost::getEventListenersCallback): +* bindings/v8/custom/V8NodeCustom.cpp: +(WebCore::V8Node::insertBeforeCallback): +(WebCore::V8Node::replaceChildCallback): +(WebCore::V8Node::removeChildCallback): +(WebCore::V8Node::appendChildCallback): +* bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: +(WebCore::toWebGLUniformLocation): +(WebCore::V8WebGLRenderingContext::getAttachedShadersCallback): +(WebCore::V8WebGLRenderingContext::getProgramParameterCallback): +(WebCore::V8WebGLRenderingContext::getShaderParameterCallback): +(WebCore::V8WebGLRenderingContext::getUniformCallback): +(WebCore::vertexAttribAndUniformHelperf): +(WebCore::uniformHelperi): +(WebCore::uniformMatrixHelper): +* bindings/v8/custom/V8XMLHttpRequestCustom.cpp: +(WebCore::isDocumentType): +(WebCore::V8XMLHttpRequest::sendCallback): + +2013-02-03 Kentaro Hara + [V8] Pass an Isolate to HasInstance() (part 2) https://bugs.webkit.org/show_bug.cgi?id=108620 Modified: trunk/Source/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp (141718 => 141719) --- trunk/Source/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp 2013-02-03 23:26:25 UTC (rev 141718) +++ trunk/Source/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp 2013-02-03 23:53:55 UTC (rev 141719) @@ -112,7 +112,7 @@ return v8Boolean(false, args.GetIsolate()); v8::HandleScope handleScope; -return v8::Boolean::New(V8HTMLAllCollection::HasInstance(args[0])); +return v8::Boolean::New(V8HTMLAllCollection::HasInstance(args[0], args.GetIsolate())); } v8::Handle V8InjectedScriptHost::typeCallback(const v8::Arguments& args) @@ -133,19 +133,19 @@ return v8::String::NewSymbol("date"); if (value->IsRegExp()) return v8::String::NewSymbol("regexp"); -if (V8Node::HasInstance(value)) +if (V8Node::HasInstance(value, args.GetIsolate())) return v8::String::NewSymbol("node"); -if (V8NodeList::HasInstance(value)) +if (V8NodeList::HasInstance(value, args.GetIsolate())) return v8::String::NewSymbol("array"); -if (V8HTMLCollection::HasInstance(value)) +if (V8HTMLCollection::HasInstance(value, args.GetIsolate())) return v8::String::NewSymbol("array"); -if (V8Int8Array::HasInstance(value) || V8Int16Array::HasInstance(value) || V8Int32Array::HasInstance(value)) +if (V8Int8Array::HasInstance(value, args.GetIsolate()) || V8Int16Array::HasInstance(value, a
[webkit-changes] [141718] trunk/Source/WebCore
Title: [141718] trunk/Source/WebCore Revision 141718 Author hara...@chromium.org Date 2013-02-03 15:26:25 -0800 (Sun, 03 Feb 2013) Log Message [V8] Pass an Isolate to HasInstance() (part 2) https://bugs.webkit.org/show_bug.cgi?id=108620 Reviewed by Adam Barth. This is one of efforts to pass an Isolate to GetTemplate(). No tests. No change in behavior. * bindings/v8/custom/V8ArrayBufferViewCustom.h: (WebCore::constructWebGLArray): (WebCore::setWebGLArrayHelper): * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp: (WebCore::V8AudioBufferSourceNode::bufferAccessorSetter): * bindings/v8/custom/V8BlobCustom.cpp: (WebCore::V8Blob::constructorCallbackCustom): * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp: (WebCore::toCanvasStyle): (WebCore::V8CanvasRenderingContext2D::strokeStyleAccessorSetter): * bindings/v8/custom/V8ClipboardCustom.cpp: (WebCore::V8Clipboard::setDragImageCallback): * bindings/v8/custom/V8CryptoCustom.cpp: (WebCore::V8Crypto::getRandomValuesCallback): * bindings/v8/custom/V8DOMFormDataCustom.cpp: (WebCore::V8DOMFormData::constructorCallbackCustom): (WebCore::V8DOMFormData::appendCallback): * bindings/v8/custom/V8DataViewCustom.cpp: (WebCore::V8DataView::constructorCallbackCustom): * bindings/v8/custom/V8DocumentCustom.cpp: (WebCore::V8Document::evaluateCallback): * bindings/v8/custom/V8HTMLMediaElementCustom.cpp: (WebCore::V8HTMLMediaElement::controllerAccessorSetter): * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: (WebCore::V8HTMLOptionsCollection::addCallback): * bindings/v8/custom/V8HTMLSelectElementCustom.cpp: (WebCore::removeElement): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/v8/custom/V8ArrayBufferViewCustom.h trunk/Source/WebCore/bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8BlobCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8ClipboardCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8CryptoCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8DOMFormDataCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8DataViewCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8HTMLMediaElementCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8HTMLSelectElementCustom.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (141717 => 141718) --- trunk/Source/WebCore/ChangeLog 2013-02-03 18:35:51 UTC (rev 141717) +++ trunk/Source/WebCore/ChangeLog 2013-02-03 23:26:25 UTC (rev 141718) @@ -1,3 +1,42 @@ +2013-02-03 Kentaro Hara + +[V8] Pass an Isolate to HasInstance() (part 2) +https://bugs.webkit.org/show_bug.cgi?id=108620 + +Reviewed by Adam Barth. + +This is one of efforts to pass an Isolate to GetTemplate(). + +No tests. No change in behavior. + +* bindings/v8/custom/V8ArrayBufferViewCustom.h: +(WebCore::constructWebGLArray): +(WebCore::setWebGLArrayHelper): +* bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp: +(WebCore::V8AudioBufferSourceNode::bufferAccessorSetter): +* bindings/v8/custom/V8BlobCustom.cpp: +(WebCore::V8Blob::constructorCallbackCustom): +* bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp: +(WebCore::toCanvasStyle): +(WebCore::V8CanvasRenderingContext2D::strokeStyleAccessorSetter): +* bindings/v8/custom/V8ClipboardCustom.cpp: +(WebCore::V8Clipboard::setDragImageCallback): +* bindings/v8/custom/V8CryptoCustom.cpp: +(WebCore::V8Crypto::getRandomValuesCallback): +* bindings/v8/custom/V8DOMFormDataCustom.cpp: +(WebCore::V8DOMFormData::constructorCallbackCustom): +(WebCore::V8DOMFormData::appendCallback): +* bindings/v8/custom/V8DataViewCustom.cpp: +(WebCore::V8DataView::constructorCallbackCustom): +* bindings/v8/custom/V8DocumentCustom.cpp: +(WebCore::V8Document::evaluateCallback): +* bindings/v8/custom/V8HTMLMediaElementCustom.cpp: +(WebCore::V8HTMLMediaElement::controllerAccessorSetter): +* bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: +(WebCore::V8HTMLOptionsCollection::addCallback): +* bindings/v8/custom/V8HTMLSelectElementCustom.cpp: +(WebCore::removeElement): + 2013-02-03 Mike West Cleanup: 'ExceptionCode& ec', not 'ExceptionCode &ec'. Modified: trunk/Source/WebCore/bindings/v8/custom/V8ArrayBufferViewCustom.h (141717 => 141718) --- trunk/Source/WebCore/bindings/v8/custom/V8ArrayBufferViewCustom.h 2013-02-03 18:35:51 UTC (rev 141717) +++ trunk/Source/WebCore/bindings/v8/custom/V8ArrayBufferViewCustom.h 2013-02-03 23:26:25 UTC (rev 141718) @@ -139,12 +139,12 @@ } // See whether the first argument is a ArrayBuffer. -if (V8ArrayBuffer::HasInst
[webkit-changes] [141577] trunk/Source/WebCore
Title: [141577] trunk/Source/WebCore Revision 141577 Author hara...@chromium.org Date 2013-02-01 03:49:35 -0800 (Fri, 01 Feb 2013) Log Message Unreviewed, rolling out r141548. http://trac.webkit.org/changeset/141548 https://bugs.webkit.org/show_bug.cgi?id=108579 userscript-plugin-document.html is flaky * bindings/v8/DOMDataStore.h: (WebCore::DOMDataStore::setWrapperInObject): * bindings/v8/V8GCController.cpp: (WebCore): (WebCore::gcTree): (WebCore::V8GCController::didCreateWrapperForNode): (WebCore::V8GCController::gcPrologue): (WebCore::V8GCController::minorGCPrologue): (WebCore::V8GCController::majorGCPrologue): * bindings/v8/V8GCController.h: (V8GCController): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/v8/DOMDataStore.h trunk/Source/WebCore/bindings/v8/V8GCController.cpp trunk/Source/WebCore/bindings/v8/V8GCController.h Diff Modified: trunk/Source/WebCore/ChangeLog (141576 => 141577) --- trunk/Source/WebCore/ChangeLog 2013-02-01 11:39:56 UTC (rev 141576) +++ trunk/Source/WebCore/ChangeLog 2013-02-01 11:49:35 UTC (rev 141577) @@ -1,3 +1,23 @@ +2013-02-01 Kentaro Hara + +Unreviewed, rolling out r141548. +http://trac.webkit.org/changeset/141548 +https://bugs.webkit.org/show_bug.cgi?id=108579 + +userscript-plugin-document.html is flaky + +* bindings/v8/DOMDataStore.h: +(WebCore::DOMDataStore::setWrapperInObject): +* bindings/v8/V8GCController.cpp: +(WebCore): +(WebCore::gcTree): +(WebCore::V8GCController::didCreateWrapperForNode): +(WebCore::V8GCController::gcPrologue): +(WebCore::V8GCController::minorGCPrologue): +(WebCore::V8GCController::majorGCPrologue): +* bindings/v8/V8GCController.h: +(V8GCController): + 2013-02-01 Andrey Adaikin Web Inspector: fix jscompiler warnings Modified: trunk/Source/WebCore/bindings/v8/DOMDataStore.h (141576 => 141577) --- trunk/Source/WebCore/bindings/v8/DOMDataStore.h 2013-02-01 11:39:56 UTC (rev 141576) +++ trunk/Source/WebCore/bindings/v8/DOMDataStore.h 2013-02-01 11:49:35 UTC (rev 141577) @@ -164,6 +164,13 @@ object->setWrapper(wrapper); wrapper.MakeWeak(object, weakCallback); } +static void setWrapperInObject(Node* object, v8::Persistent wrapper) +{ +ASSERT(object->wrapper().IsEmpty()); +object->setWrapper(wrapper); +V8GCController::didCreateWrapperForNode(object); +wrapper.MakeWeak(static_cast(object), weakCallback); +} static void weakCallback(v8::Persistent, void* context); Modified: trunk/Source/WebCore/bindings/v8/V8GCController.cpp (141576 => 141577) --- trunk/Source/WebCore/bindings/v8/V8GCController.cpp 2013-02-01 11:39:56 UTC (rev 141576) +++ trunk/Source/WebCore/bindings/v8/V8GCController.cpp 2013-02-01 11:49:35 UTC (rev 141577) @@ -178,104 +178,13 @@ return node; } -static void gcTree(Node* startNode) -{ -Vector, initialNodeVectorSize> newSpaceWrappers; - -// We traverse a DOM tree in the DFS order starting from startNode. -// The traversal order does not matter for correctness but does matter for performance. -Node* node = startNode; -// To make each minor GC time bounded, we might need to give up -// traversing at some point for a large DOM tree. That being said, -// I could not observe the need even in pathological test cases. -do { -ASSERT(node); -if (!node->wrapper().IsEmpty()) { -// FIXME: Remove the special handling for image elements. -// The same special handling is in V8GCController::opaqueRootForGC(). -// Maybe should image elements be active DOM nodes? -// See https://code.google.com/p/chromium/issues/detail?id=164882 -if (!node->isV8CollectableDuringMinorGC() || (node->hasTagName(HTMLNames::imgTag) && static_cast(node)->hasPendingActivity())) { -// This node is not in the new space of V8. This indicates that -// the minor GC cannot anyway judge reachability of this DOM tree. -// Thus we give up traversing the DOM tree. -return; -} -node->setV8CollectableDuringMinorGC(false); -newSpaceWrappers.append(node->wrapper()); -} -if (node->firstChild()) { -node = node->firstChild(); -continue; -} -while (!node->nextSibling()) { -if (!node->parentNode()) -break; -node = node->parentNode(); -} -if (node->parentNode()) -node = node->nextSibling(); -} while (node != startNode); - -// We completed the DOM tree traversal. All wrappers in the DOM tree are -// stored in newSpaceWrappers and are expected to exist in the new space of V8. -// We report those wrappers to V8 as an object group. -for (size_t i = 0; i < newSpaceWrappers.size(); i++)
[webkit-changes] [141564] trunk/Source/WebCore
Title: [141564] trunk/Source/WebCore Revision 141564 Author hara...@chromium.org Date 2013-02-01 02:09:47 -0800 (Fri, 01 Feb 2013) Log Message Unreviewed build fix after r141553. * bindings/scripts/CodeGeneratorV8.pm: (GenerateImplementation): * bindings/scripts/test/V8/V8Float64Array.cpp: (WebCore::V8Float64Array::HasInstance): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore::V8TestActiveDOMObject::HasInstance): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: (WebCore::V8TestCustomNamedGetter::HasInstance): * bindings/scripts/test/V8/V8TestEventConstructor.cpp: (WebCore::V8TestEventConstructor::HasInstance): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore::V8TestEventTarget::HasInstance): * bindings/scripts/test/V8/V8TestException.cpp: (WebCore::V8TestException::HasInstance): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::V8TestInterface::HasInstance): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore::V8TestMediaQueryListListener::HasInstance): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore::V8TestNamedConstructor::HasInstance): * bindings/scripts/test/V8/V8TestNode.cpp: (WebCore::V8TestNode::HasInstance): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::V8TestObj::HasInstance): * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp: (WebCore::V8TestOverloadedConstructors::HasInstance): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::V8TestSerializedScriptValueInterface::HasInstance): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm trunk/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestException.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNode.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (141563 => 141564) --- trunk/Source/WebCore/ChangeLog 2013-02-01 10:07:25 UTC (rev 141563) +++ trunk/Source/WebCore/ChangeLog 2013-02-01 10:09:47 UTC (rev 141564) @@ -1,3 +1,36 @@ +2013-02-01 Kentaro Hara + +Unreviewed build fix after r141553. + +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateImplementation): +* bindings/scripts/test/V8/V8Float64Array.cpp: +(WebCore::V8Float64Array::HasInstance): +* bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: +(WebCore::V8TestActiveDOMObject::HasInstance): +* bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: +(WebCore::V8TestCustomNamedGetter::HasInstance): +* bindings/scripts/test/V8/V8TestEventConstructor.cpp: +(WebCore::V8TestEventConstructor::HasInstance): +* bindings/scripts/test/V8/V8TestEventTarget.cpp: +(WebCore::V8TestEventTarget::HasInstance): +* bindings/scripts/test/V8/V8TestException.cpp: +(WebCore::V8TestException::HasInstance): +* bindings/scripts/test/V8/V8TestInterface.cpp: +(WebCore::V8TestInterface::HasInstance): +* bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: +(WebCore::V8TestMediaQueryListListener::HasInstance): +* bindings/scripts/test/V8/V8TestNamedConstructor.cpp: +(WebCore::V8TestNamedConstructor::HasInstance): +* bindings/scripts/test/V8/V8TestNode.cpp: +(WebCore::V8TestNode::HasInstance): +* bindings/scripts/test/V8/V8TestObj.cpp: +(WebCore::V8TestObj::HasInstance): +* bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp: +(WebCore::V8TestOverloadedConstructors::HasInstance): +* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: +(WebCore::V8TestSerializedScriptValueInterface::HasInstance): + 2013-02-01 Vsevolod Vlasov Web Inspector: Sources panel navigator reveal and expand fixes. Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (141563 => 141564) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-01 10:07:25 UTC (rev 141563) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-01 10:09:47 UTC (rev 141564) @@ -3150,6 +3150,8 @@ bool ${v8InterfaceName}::HasInstance(v8::Handle value, v8::Isolate* isolate) { +if (!isolate)
[webkit-changes] [141553] trunk/Source/WebCore
Title: [141553] trunk/Source/WebCore Revision 141553 Author hara...@chromium.org Date 2013-02-01 00:45:57 -0800 (Fri, 01 Feb 2013) Log Message [V8] Add a temporary optional Isolate parameter to HasInstance() https://bugs.webkit.org/show_bug.cgi?id=108567 Reviewed by Adam Barth. The optional Isolate parameter will be removed once all call sites have an Isolate. It will require several patches. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (GenerateNormalAttrSetter): (GenerateParametersCheckExpression): (GenerateParametersCheck): (GenerateImplementation): * bindings/scripts/test/V8/V8Float64Array.cpp: (WebCore::V8Float64Array::HasInstance): * bindings/scripts/test/V8/V8Float64Array.h: (V8Float64Array): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore::V8TestActiveDOMObject::HasInstance): * bindings/scripts/test/V8/V8TestActiveDOMObject.h: (V8TestActiveDOMObject): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: (WebCore::V8TestCustomNamedGetter::HasInstance): * bindings/scripts/test/V8/V8TestCustomNamedGetter.h: (V8TestCustomNamedGetter): * bindings/scripts/test/V8/V8TestEventConstructor.cpp: (WebCore::V8TestEventConstructor::HasInstance): * bindings/scripts/test/V8/V8TestEventConstructor.h: (V8TestEventConstructor): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore::V8TestEventTarget::HasInstance): * bindings/scripts/test/V8/V8TestEventTarget.h: (V8TestEventTarget): * bindings/scripts/test/V8/V8TestException.cpp: (WebCore::V8TestException::HasInstance): * bindings/scripts/test/V8/V8TestException.h: (V8TestException): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::V8TestInterface::HasInstance): * bindings/scripts/test/V8/V8TestInterface.h: (V8TestInterface): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore::V8TestMediaQueryListListener::HasInstance): * bindings/scripts/test/V8/V8TestMediaQueryListListener.h: (V8TestMediaQueryListListener): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore::V8TestNamedConstructor::HasInstance): * bindings/scripts/test/V8/V8TestNamedConstructor.h: (V8TestNamedConstructor): * bindings/scripts/test/V8/V8TestNode.cpp: (WebCore::V8TestNode::HasInstance): * bindings/scripts/test/V8/V8TestNode.h: (V8TestNode): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::overloadedMethodCallback): (WebCore::TestObjV8Internal::variadicNodeMethodCallback): (WebCore::V8TestObj::HasInstance): * bindings/scripts/test/V8/V8TestObj.h: (V8TestObj): * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp: (WebCore::V8TestOverloadedConstructors::constructorCallback): (WebCore::V8TestOverloadedConstructors::HasInstance): * bindings/scripts/test/V8/V8TestOverloadedConstructors.h: (V8TestOverloadedConstructors): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::V8TestSerializedScriptValueInterface::HasInstance): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h: (V8TestSerializedScriptValueInterface): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm trunk/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.h trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.h trunk/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.h trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.h trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.h trunk/Source/WebCore/bindings/scripts/test/V8/V8TestException.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestException.h trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.h trunk/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.h trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.h trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNode.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNode.h trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.h trunk/Source/WebCore/bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestOverloadedConstructors.h trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h Diff Modified
[webkit-changes] [141548] trunk/Source/WebCore
Title: [141548] trunk/Source/WebCore Revision 141548 Author hara...@chromium.org Date 2013-02-01 00:27:10 -0800 (Fri, 01 Feb 2013) Log Message [V8] Remove V8GCController::m_edenNodes https://bugs.webkit.org/show_bug.cgi?id=108579 Reviewed by Adam Barth. Currently V8GCController::m_edenNodes stores a list of nodes whose wrappers have been created since the latest GC. The reason why we needed m_edenNodes is that there was no way to know a list of wrappers in the new space of V8. By using m_edenNodes, we had been approximating 'wrappers in the new space' by 'wrappers that have been created since the latest GC'. Now V8 provides VisitHandlesForPartialDependence(), with which WebKit can know a list of wrappers in the new space. By using the API, we can remove V8GCController::m_edenNodes. The benefit is that (1) we no longer need to keep m_edenNodes and that (2) it enables more precise minor DOM GC (Remember that m_edenNodes was just an approximation). Performance benchmark: https://bugs.webkit.org/attachment.cgi?id=185940 The benchmark runs 300 iterations, each of which creates 10 elements. The benchmark measures average, min, median, max and stdev of execution times of the 300 iterations. This will tell us the worst-case overhead of this change. Before: mean=59.91ms, min=39ms, median=42ms, max=258ms, stdev=47.48ms After: mean=58.75ms, min=35ms, median=41ms, max=250ms, stdev=47.32ms As shown above, I couldn't observe any performance regression. No tests. No change in behavior. * bindings/v8/DOMDataStore.h: (WebCore::DOMDataStore::setWrapperInObject): * bindings/v8/V8GCController.cpp: (WebCore::gcTree): (WebCore): (MinorGCWrapperVisitor): (WebCore::MinorGCWrapperVisitor::notifyFinished): (WebCore::V8GCController::gcPrologue): (WebCore::V8GCController::minorGCPrologue): (WebCore::V8GCController::majorGCPrologue): * bindings/v8/V8GCController.h: (V8GCController): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/v8/DOMDataStore.h trunk/Source/WebCore/bindings/v8/V8GCController.cpp trunk/Source/WebCore/bindings/v8/V8GCController.h Diff Modified: trunk/Source/WebCore/ChangeLog (141547 => 141548) --- trunk/Source/WebCore/ChangeLog 2013-02-01 08:19:35 UTC (rev 141547) +++ trunk/Source/WebCore/ChangeLog 2013-02-01 08:27:10 UTC (rev 141548) @@ -1,3 +1,51 @@ +2013-02-01 Kentaro Hara + +[V8] Remove V8GCController::m_edenNodes +https://bugs.webkit.org/show_bug.cgi?id=108579 + +Reviewed by Adam Barth. + +Currently V8GCController::m_edenNodes stores a list of nodes whose +wrappers have been created since the latest GC. The reason why we +needed m_edenNodes is that there was no way to know a list of wrappers +in the new space of V8. By using m_edenNodes, we had been approximating +'wrappers in the new space' by 'wrappers that have been created since +the latest GC'. + +Now V8 provides VisitHandlesForPartialDependence(), with which WebKit +can know a list of wrappers in the new space. By using the API, we can +remove V8GCController::m_edenNodes. The benefit is that (1) we no longer +need to keep m_edenNodes and that (2) it enables more precise minor +DOM GC (Remember that m_edenNodes was just an approximation). + +Performance benchmark: https://bugs.webkit.org/attachment.cgi?id=185940 +The benchmark runs 300 iterations, each of which creates 10 elements. +The benchmark measures average, min, median, max and stdev of execution times +of the 300 iterations. This will tell us the worst-case overhead of this change. + +Before: + mean=59.91ms, min=39ms, median=42ms, max=258ms, stdev=47.48ms + +After: + mean=58.75ms, min=35ms, median=41ms, max=250ms, stdev=47.32ms + +As shown above, I couldn't observe any performance regression. + +No tests. No change in behavior. + +* bindings/v8/DOMDataStore.h: +(WebCore::DOMDataStore::setWrapperInObject): +* bindings/v8/V8GCController.cpp: +(WebCore::gcTree): +(WebCore): +(MinorGCWrapperVisitor): +(WebCore::MinorGCWrapperVisitor::notifyFinished): +(WebCore::V8GCController::gcPrologue): +(WebCore::V8GCController::minorGCPrologue): +(WebCore::V8GCController::majorGCPrologue): +* bindings/v8/V8GCController.h: +(V8GCController): + 2013-02-01 Vsevolod Vlasov Web Inspector: Use String.prototype.startsWith instead of String.prototype.indexOf when possible Modified: trunk/Source/WebCore/bindings/v8/DOMDataStore.h (141547 => 141548) --- trunk/Source/WebCore/bindings/v8/DOMDataStore.h 2013-02-01 08:19:35 UTC (rev 141547) +++ trunk/Source/WebCore/bindings/v8/DOMDataStore.h 2013-02-01 08:27:10 UTC (rev 141548) @@ -164,13 +164,6 @@ object->setWrapper(wrapper); wrapper.MakeWeak(object, weakCallback); } -static void
[webkit-changes] [141518] trunk/Source/WebCore
Title: [141518] trunk/Source/WebCore Revision 141518 Author hara...@chromium.org Date 2013-01-31 17:57:36 -0800 (Thu, 31 Jan 2013) Log Message Unreviewed, rolling out r141502. http://trac.webkit.org/changeset/141502 https://bugs.webkit.org/show_bug.cgi?id=108441 Hit assert in SVGElementInstance * bindings/scripts/CodeGeneratorV8.pm: (GetInternalFields): * dom/EventTarget.idl: * svg/SVGElementInstance.idl: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm trunk/Source/WebCore/dom/EventTarget.idl trunk/Source/WebCore/svg/SVGElementInstance.idl Diff Modified: trunk/Source/WebCore/ChangeLog (141517 => 141518) --- trunk/Source/WebCore/ChangeLog 2013-02-01 01:48:20 UTC (rev 141517) +++ trunk/Source/WebCore/ChangeLog 2013-02-01 01:57:36 UTC (rev 141518) @@ -1,3 +1,16 @@ +2013-01-31 Kentaro Hara + +Unreviewed, rolling out r141502. +http://trac.webkit.org/changeset/141502 +https://bugs.webkit.org/show_bug.cgi?id=108441 + +Hit assert in SVGElementInstance + +* bindings/scripts/CodeGeneratorV8.pm: +(GetInternalFields): +* dom/EventTarget.idl: +* svg/SVGElementInstance.idl: + 2013-01-31 Ojan Vafai Assert that computePreferredLogicalWidths never calls setNeedsLayout Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (141517 => 141518) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-01 01:48:20 UTC (rev 141517) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-01 01:57:36 UTC (rev 141518) @@ -616,11 +616,18 @@ my $interface = shift; my @customInternalFields = (); +# We can't ask whether a parent type has a given extendedAttribute, +# so special-case AbstractWorker and WorkerContext to include all sub-types. # Event listeners on DOM nodes are explicitly supported in the GC controller. -if (!$codeGenerator->InheritsInterface($interface, "Node") && -$codeGenerator->InheritsExtendedAttribute($interface, "EventTarget")) { +# FIXME: Simplify this when all EventTargets are subtypes of EventTarget. +if (!$codeGenerator->InheritsInterface($interface, "Node") +&& ($interface->extendedAttributes->{"EventTarget"} +|| $interface->extendedAttributes->{"IsWorkerContext"} +|| $codeGenerator->InheritsInterface($interface, "AbstractWorker") +|| $codeGenerator->InheritsInterface($interface, "EventTarget"))) { push(@customInternalFields, "eventListenerCacheIndex"); } + return @customInternalFields; } Modified: trunk/Source/WebCore/dom/EventTarget.idl (141517 => 141518) --- trunk/Source/WebCore/dom/EventTarget.idl 2013-02-01 01:48:20 UTC (rev 141517) +++ trunk/Source/WebCore/dom/EventTarget.idl 2013-02-01 01:57:36 UTC (rev 141518) @@ -25,8 +25,7 @@ OmitConstructor, CustomToJSObject, JSCustomToNativeObject, -V8NoWrapperCache, -EventTarget +V8NoWrapperCache ] interface EventTarget { [ObjCLegacyUnnamedParameters] void addEventListener(in DOMString type, in EventListener listener, Modified: trunk/Source/WebCore/svg/SVGElementInstance.idl (141517 => 141518) --- trunk/Source/WebCore/svg/SVGElementInstance.idl 2013-02-01 01:48:20 UTC (rev 141517) +++ trunk/Source/WebCore/svg/SVGElementInstance.idl 2013-02-01 01:57:36 UTC (rev 141518) @@ -28,8 +28,7 @@ Conditional=SVG, JSCustomMarkFunction, JSGenerateToNativeObject, -JSGenerateToJSObject, -EventTarget +JSGenerateToJSObject ] interface SVGElementInstance #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C : Object, EventTarget ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [141511] trunk/Source/WebCore
Title: [141511] trunk/Source/WebCore Revision 141511 Author hara...@chromium.org Date 2013-01-31 17:21:56 -0800 (Thu, 31 Jan 2013) Log Message [V8] Pass an Isolate to GetTemplate() in CodeGeneratorV8.pm https://bugs.webkit.org/show_bug.cgi?id=108445 Reviewed by Adam Barth. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateDomainSafeFunctionGetter): (GenerateDomainSafeFunctionSetter): (GenerateNormalAttrGetter): (GenerateNamedConstructorCallback): (GenerateImplementation): * bindings/scripts/test/V8/V8Float64Array.cpp: (WebCore::ConfigureV8Float64ArrayTemplate): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter): (WebCore::TestActiveDOMObjectV8Internal::TestActiveDOMObjectDomainSafeFunctionSetter): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore::V8TestNamedConstructorConstructor::GetTemplate): * bindings/scripts/test/V8/V8TestNode.cpp: (WebCore::ConfigureV8TestNodeTemplate): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm trunk/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNode.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (141510 => 141511) --- trunk/Source/WebCore/ChangeLog 2013-02-01 01:16:02 UTC (rev 141510) +++ trunk/Source/WebCore/ChangeLog 2013-02-01 01:21:56 UTC (rev 141511) @@ -1,5 +1,30 @@ 2013-01-31 Kentaro Hara +[V8] Pass an Isolate to GetTemplate() in CodeGeneratorV8.pm +https://bugs.webkit.org/show_bug.cgi?id=108445 + +Reviewed by Adam Barth. + +No tests. No change in behavior. + +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateDomainSafeFunctionGetter): +(GenerateDomainSafeFunctionSetter): +(GenerateNormalAttrGetter): +(GenerateNamedConstructorCallback): +(GenerateImplementation): +* bindings/scripts/test/V8/V8Float64Array.cpp: +(WebCore::ConfigureV8Float64ArrayTemplate): +* bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: +(WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter): +(WebCore::TestActiveDOMObjectV8Internal::TestActiveDOMObjectDomainSafeFunctionSetter): +* bindings/scripts/test/V8/V8TestNamedConstructor.cpp: +(WebCore::V8TestNamedConstructorConstructor::GetTemplate): +* bindings/scripts/test/V8/V8TestNode.cpp: +(WebCore::ConfigureV8TestNodeTemplate): + +2013-01-31 Kentaro Hara + [V8] Clean up Dictionary::get() by removing redundant FindInstanceInPrototypeChain() https://bugs.webkit.org/show_bug.cgi?id=108443 Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (141510 => 141511) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-01 01:16:02 UTC (rev 141510) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-01 01:21:56 UTC (rev 141511) @@ -785,7 +785,7 @@ static v8::Handle ${funcName}AttrGetter(v8::Local name, const v8::AccessorInfo& info) { static v8::Persistent privateTemplate = v8::Persistent::New($newTemplateString); -v8::Handle holder = info.This()->FindInstanceInPrototypeChain(${v8InterfaceName}::GetTemplate()); +v8::Handle holder = info.This()->FindInstanceInPrototypeChain(${v8InterfaceName}::GetTemplate(info.GetIsolate())); if (holder.IsEmpty()) { // can only reach here by 'object.__proto__.func', and it should passed // domain security check already @@ -815,7 +815,7 @@ push(@implContentDecls, < static void ${interfaceName}DomainSafeFunctionSetter(v8::Local name, v8::Local value, const v8::AccessorInfo& info) { -v8::Handle holder = info.This()->FindInstanceInPrototypeChain(${v8InterfaceName}::GetTemplate()); +v8::Handle holder = info.This()->FindInstanceInPrototypeChain(${v8InterfaceName}::GetTemplate(info.GetIsolate())); if (holder.IsEmpty()) return; ${interfaceName}* imp = ${v8InterfaceName}::toNative(holder); @@ -909,7 +909,7 @@ } else { # perform lookup first push(@implContentDecls, <-v8::Handle holder = info.This()->FindInstanceInPrototypeChain(${v8InterfaceName}::GetTemplate()); +v8::Handle holder = info.This()->FindInstanceInPrototypeChain(${v8InterfaceName}::GetTemplate(info.GetIsolate())); if (holder.IsEmpty()) return v8Undefined(); END @@ -2198,7 +2198,7 @@ v8::Local instance = result->InstanceTemplate(); instance->SetInternalFieldCount(${v8InterfaceName}::internalFieldCount); result->SetClassName(v8::String::NewSymbol("${interfaceName}")); -result->Inherit(${v8InterfaceName}::GetTemplate()); +result->Inherit(${v8InterfaceName}::GetTemplate(isolate)); cachedTemplate =
[webkit-changes] [141509] trunk/Source/WebCore
Title: [141509] trunk/Source/WebCore Revision 141509 Author hara...@chromium.org Date 2013-01-31 17:12:22 -0800 (Thu, 31 Jan 2013) Log Message [V8] Clean up Dictionary::get() by removing redundant FindInstanceInPrototypeChain() https://bugs.webkit.org/show_bug.cgi?id=108443 Reviewed by Adam Barth. In Dictionary::get(), wrapper->FindInstanceInPrototypeChain(V8XXX::GetTemplate()) is unnecessary for DOM wrappers other than DOMWindow. For wrappers other than DOMWindow, we can simply use V8XXX::HasInstance(wrapper). Tests: fast/events/constructors/* * bindings/v8/Dictionary.cpp: (WebCore::Dictionary::get): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/v8/Dictionary.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (141508 => 141509) --- trunk/Source/WebCore/ChangeLog 2013-02-01 01:10:11 UTC (rev 141508) +++ trunk/Source/WebCore/ChangeLog 2013-02-01 01:12:22 UTC (rev 141509) @@ -1,3 +1,19 @@ +2013-01-31 Kentaro Hara + +[V8] Clean up Dictionary::get() by removing redundant FindInstanceInPrototypeChain() +https://bugs.webkit.org/show_bug.cgi?id=108443 + +Reviewed by Adam Barth. + +In Dictionary::get(), wrapper->FindInstanceInPrototypeChain(V8XXX::GetTemplate()) +is unnecessary for DOM wrappers other than DOMWindow. For wrappers other than +DOMWindow, we can simply use V8XXX::HasInstance(wrapper). + +Tests: fast/events/constructors/* + +* bindings/v8/Dictionary.cpp: +(WebCore::Dictionary::get): + 2013-01-31 Julien Chaffraix [CSS Grid Layout] Support implicit rows and columns Modified: trunk/Source/WebCore/bindings/v8/Dictionary.cpp (141508 => 141509) --- trunk/Source/WebCore/bindings/v8/Dictionary.cpp 2013-02-01 01:10:11 UTC (rev 141508) +++ trunk/Source/WebCore/bindings/v8/Dictionary.cpp 2013-02-01 01:12:22 UTC (rev 141509) @@ -254,14 +254,15 @@ if (!getKey(key, v8Value)) return false; -DOMWindow* source = 0; +// We need to handle a DOMWindow specially, because a DOMWindow wrapper +// exists on a prototype chain of v8Value. +value = 0; if (v8Value->IsObject()) { v8::Handle wrapper = v8::Handle::Cast(v8Value); v8::Handle window = wrapper->FindInstanceInPrototypeChain(V8DOMWindow::GetTemplate(m_isolate)); if (!window.IsEmpty()) -source = V8DOMWindow::toNative(window); +value = V8DOMWindow::toNative(window); } -value = source; return true; } @@ -271,14 +272,9 @@ if (!getKey(key, v8Value)) return false; -Storage* source = 0; -if (v8Value->IsObject()) { -v8::Handle wrapper = v8::Handle::Cast(v8Value); -v8::Handle storage = wrapper->FindInstanceInPrototypeChain(V8Storage::GetTemplate(m_isolate)); -if (!storage.IsEmpty()) -source = V8Storage::toNative(storage); -} -value = source; +value = 0; +if (V8Storage::HasInstance(v8Value)) +value = V8Storage::toNative(v8::Handle::Cast(v8Value)); return true; } @@ -334,14 +330,9 @@ if (!getKey(key, v8Value)) return false; -Uint8Array* source = 0; -if (v8Value->IsObject()) { -v8::Handle wrapper = v8::Handle::Cast(v8Value); -v8::Handle array = wrapper->FindInstanceInPrototypeChain(V8Uint8Array::GetTemplate(m_isolate)); -if (!array.IsEmpty()) -source = V8Uint8Array::toNative(array); -} -value = source; +value = 0; +if (V8Uint8Array::HasInstance(v8Value)) +value = V8Uint8Array::toNative(v8::Handle::Cast(v8Value)); return true; } @@ -352,14 +343,9 @@ if (!getKey(key, v8Value)) return false; -MediaKeyError* source = 0; -if (v8Value->IsObject()) { -v8::Handle wrapper = v8::Handle::Cast(v8Value); -v8::Handle error = wrapper->FindInstanceInPrototypeChain(V8MediaKeyError::GetTemplate(m_isolate)); -if (!error.IsEmpty()) -source = V8MediaKeyError::toNative(error); -} -value = source; +value = 0; +if (V8MediaKeyError::HasInstance(v8Value)) +value = V8MediaKeyError::toNative(v8::Handle::Cast(v8Value)); return true; } #endif @@ -393,14 +379,9 @@ if (!getKey(key, v8Value)) return false; -SpeechRecognitionError* source = 0; -if (v8Value->IsObject()) { -v8::Handle wrapper = v8::Handle::Cast(v8Value); -v8::Handle speechRecognitionError = wrapper->FindInstanceInPrototypeChain(V8SpeechRecognitionError::GetTemplate(m_isolate)); -if (!speechRecognitionError.IsEmpty()) -source = V8SpeechRecognitionError::toNative(speechRecognitionError); -} -value = source; +value = 0; +if (V8SpeechRecognitionError::HasInstance(v8Value)) +value = V8SpeechRecognitionError::toNative(v8::Handle::Cast(v8Value)); return true; } @@ -410,14 +391,9 @@ if (!getKey(key, v8Value)) return false; -SpeechRecogn
[webkit-changes] [141502] trunk/Source/WebCore
Title: [141502] trunk/Source/WebCore Revision 141502 Author hara...@chromium.org Date 2013-01-31 16:25:43 -0800 (Thu, 31 Jan 2013) Log Message [V8] Simplify CodeGeneratorV8.pm by using InheritsExtendedAttribute("EventTarget") https://bugs.webkit.org/show_bug.cgi?id=108441 Reviewed by Adam Barth. A complicated condition in GetInternalFields() can be simplified by using InheritsExtendedAttribute("EventTarget"). No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GetInternalFields): * dom/EventTarget.idl: Added [EventTarget] which should have been added. * svg/SVGElementInstance.idl: Ditto. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm trunk/Source/WebCore/dom/EventTarget.idl trunk/Source/WebCore/svg/SVGElementInstance.idl Diff Modified: trunk/Source/WebCore/ChangeLog (141501 => 141502) --- trunk/Source/WebCore/ChangeLog 2013-01-31 23:59:29 UTC (rev 141501) +++ trunk/Source/WebCore/ChangeLog 2013-02-01 00:25:43 UTC (rev 141502) @@ -1,3 +1,20 @@ +2013-01-31 Kentaro Hara + +[V8] Simplify CodeGeneratorV8.pm by using InheritsExtendedAttribute("EventTarget") +https://bugs.webkit.org/show_bug.cgi?id=108441 + +Reviewed by Adam Barth. + +A complicated condition in GetInternalFields() can be simplified +by using InheritsExtendedAttribute("EventTarget"). + +No tests. No change in behavior. + +* bindings/scripts/CodeGeneratorV8.pm: +(GetInternalFields): +* dom/EventTarget.idl: Added [EventTarget] which should have been added. +* svg/SVGElementInstance.idl: Ditto. + 2013-01-31 Youenn Fablet Quadratic and bezier curves with coincident endpoints rendered incorrectly Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (141501 => 141502) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-01-31 23:59:29 UTC (rev 141501) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2013-02-01 00:25:43 UTC (rev 141502) @@ -616,18 +616,11 @@ my $interface = shift; my @customInternalFields = (); -# We can't ask whether a parent type has a given extendedAttribute, -# so special-case AbstractWorker and WorkerContext to include all sub-types. # Event listeners on DOM nodes are explicitly supported in the GC controller. -# FIXME: Simplify this when all EventTargets are subtypes of EventTarget. -if (!$codeGenerator->InheritsInterface($interface, "Node") -&& ($interface->extendedAttributes->{"EventTarget"} -|| $interface->extendedAttributes->{"IsWorkerContext"} -|| $codeGenerator->InheritsInterface($interface, "AbstractWorker") -|| $codeGenerator->InheritsInterface($interface, "EventTarget"))) { +if (!$codeGenerator->InheritsInterface($interface, "Node") && +$codeGenerator->InheritsExtendedAttribute($interface, "EventTarget")) { push(@customInternalFields, "eventListenerCacheIndex"); } - return @customInternalFields; } Modified: trunk/Source/WebCore/dom/EventTarget.idl (141501 => 141502) --- trunk/Source/WebCore/dom/EventTarget.idl 2013-01-31 23:59:29 UTC (rev 141501) +++ trunk/Source/WebCore/dom/EventTarget.idl 2013-02-01 00:25:43 UTC (rev 141502) @@ -25,7 +25,8 @@ OmitConstructor, CustomToJSObject, JSCustomToNativeObject, -V8NoWrapperCache +V8NoWrapperCache, +EventTarget ] interface EventTarget { [ObjCLegacyUnnamedParameters] void addEventListener(in DOMString type, in EventListener listener, Modified: trunk/Source/WebCore/svg/SVGElementInstance.idl (141501 => 141502) --- trunk/Source/WebCore/svg/SVGElementInstance.idl 2013-01-31 23:59:29 UTC (rev 141501) +++ trunk/Source/WebCore/svg/SVGElementInstance.idl 2013-02-01 00:25:43 UTC (rev 141502) @@ -28,7 +28,8 @@ Conditional=SVG, JSCustomMarkFunction, JSGenerateToNativeObject, -JSGenerateToJSObject +JSGenerateToJSObject, +EventTarget ] interface SVGElementInstance #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C : Object, EventTarget ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [141394] trunk/Source
Title: [141394] trunk/Source Revision 141394 Author hara...@chromium.org Date 2013-01-31 03:10:44 -0800 (Thu, 31 Jan 2013) Log Message Rename WheelEvent::Granularity to WheelEvent::DeltaMode https://bugs.webkit.org/show_bug.cgi?id=108434 Reviewed by Ryosuke Niwa. Per the spec, WheelEvent::Granularity should be renamed to WheelEvent::DeltaMode. Spec: http://www.w3.org/TR/DOM-Level-3-Events/#events-WheelEvent https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm#constructor-wheelevent No tests. No change in behavior. Source/WebCore: * dom/WheelEvent.cpp: (WebCore::WheelEvent::WheelEvent): (WebCore::WheelEvent::initWheelEvent): (WebCore::deltaMode): (WebCore::WheelEventDispatchMediator::WheelEventDispatchMediator): * dom/WheelEvent.h: (WebCore::WheelEvent::create): (WebCore::WheelEvent::deltaMode): (WheelEvent): * page/EventHandler.cpp: (WebCore::wheelGranularityToScrollGranularity): (WebCore::EventHandler::defaultWheelEventHandler): Source/WebKit/chromium: * src/WebInputEventConversion.cpp: (WebKit::PlatformWheelEventBuilder::PlatformWheelEventBuilder): (WebKit::WebMouseWheelEventBuilder::WebMouseWheelEventBuilder): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/dom/WheelEvent.cpp trunk/Source/WebCore/dom/WheelEvent.h trunk/Source/WebCore/page/EventHandler.cpp trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/src/WebInputEventConversion.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (141393 => 141394) --- trunk/Source/WebCore/ChangeLog 2013-01-31 10:52:41 UTC (rev 141393) +++ trunk/Source/WebCore/ChangeLog 2013-01-31 11:10:44 UTC (rev 141394) @@ -1,3 +1,30 @@ +2013-01-31 Kentaro Hara + +Rename WheelEvent::Granularity to WheelEvent::DeltaMode +https://bugs.webkit.org/show_bug.cgi?id=108434 + +Reviewed by Ryosuke Niwa. + +Per the spec, WheelEvent::Granularity should be renamed to WheelEvent::DeltaMode. + +Spec: http://www.w3.org/TR/DOM-Level-3-Events/#events-WheelEvent +https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm#constructor-wheelevent + +No tests. No change in behavior. + +* dom/WheelEvent.cpp: +(WebCore::WheelEvent::WheelEvent): +(WebCore::WheelEvent::initWheelEvent): +(WebCore::deltaMode): +(WebCore::WheelEventDispatchMediator::WheelEventDispatchMediator): +* dom/WheelEvent.h: +(WebCore::WheelEvent::create): +(WebCore::WheelEvent::deltaMode): +(WheelEvent): +* page/EventHandler.cpp: +(WebCore::wheelGranularityToScrollGranularity): +(WebCore::EventHandler::defaultWheelEventHandler): + 2013-01-30 Yury Semikhatsky Web Inspector: test that nodes from the same detached DOM tree will get into one group in heap snapshot Modified: trunk/Source/WebCore/dom/WheelEvent.cpp (141393 => 141394) --- trunk/Source/WebCore/dom/WheelEvent.cpp 2013-01-31 10:52:41 UTC (rev 141393) +++ trunk/Source/WebCore/dom/WheelEvent.cpp 2013-01-31 11:10:44 UTC (rev 141394) @@ -38,7 +38,7 @@ } WheelEvent::WheelEvent() -: m_granularity(Pixel) +: m_deltaMode(DOMDeltaPixel) , m_directionInvertedFromDevice(false) { } @@ -49,11 +49,9 @@ { } -WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta, - Granularity granularity, PassRefPtr view, - const IntPoint& screenLocation, const IntPoint& pageLocation, - bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, - bool directionInvertedFromDevice) +WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta, DeltaMode deltaMode, +PassRefPtr view, const IntPoint& screenLocation, const IntPoint& pageLocation, +bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool directionInvertedFromDevice) : MouseEvent(eventNames().mousewheelEvent, true, true, view, 0, screenLocation.x(), screenLocation.y(), pageLocation.x(), pageLocation.y(), @@ -63,7 +61,7 @@ ctrlKey, altKey, shiftKey, metaKey, 0, 0, 0, false) , m_wheelDelta(IntPoint(static_cast(wheelTicks.x() * TickMultiplier), static_cast(wheelTicks.y() * TickMultiplier))) , m_rawDelta(roundedIntPoint(rawDelta)) -, m_granularity(granularity) +, m_deltaMode(deltaMode) , m_directionInvertedFromDevice(directionInvertedFromDevice) { } @@ -87,7 +85,7 @@ m_wheelDelta = IntPoint(rawDeltaX * TickMultiplier, rawDeltaY * TickMultiplier); m_rawDelta = IntPoint(rawDeltaX, rawDeltaY); -m_granularity = Pixel; +m_deltaMode = DOMDeltaPixel; m_directionInvertedFromDevice = false; initCoordinates(IntPoint(pageX, pageY)); @@ -111,9 +109,9 @@ return false; } -inline static WheelEvent::Granularity granularity(const PlatformWheelEvent& event) +inline static WheelEvent::DeltaMode deltaMode(const PlatformWheelEvent& event) { -return e
[webkit-changes] [141390] trunk/Source/WebCore
Title: [141390] trunk/Source/WebCore Revision 141390 Author hara...@chromium.org Date 2013-01-31 00:52:58 -0800 (Thu, 31 Jan 2013) Log Message [V8] Trace not only major DOM GCs but also minor DOM GCs https://bugs.webkit.org/show_bug.cgi?id=108436 Reviewed by Adam Barth. Currently only major DOM GCs are traced. We should also trace minor DOM GCs. No tests. No change in behavior. * bindings/v8/V8GCController.cpp: (WebCore::V8GCController::minorGCPrologue): (WebCore::V8GCController::minorGCEpilogue): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/v8/V8GCController.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (141389 => 141390) --- trunk/Source/WebCore/ChangeLog 2013-01-31 08:49:47 UTC (rev 141389) +++ trunk/Source/WebCore/ChangeLog 2013-01-31 08:52:58 UTC (rev 141390) @@ -1,3 +1,19 @@ +2013-01-31 Kentaro Hara + +[V8] Trace not only major DOM GCs but also minor DOM GCs +https://bugs.webkit.org/show_bug.cgi?id=108436 + +Reviewed by Adam Barth. + +Currently only major DOM GCs are traced. +We should also trace minor DOM GCs. + +No tests. No change in behavior. + +* bindings/v8/V8GCController.cpp: +(WebCore::V8GCController::minorGCPrologue): +(WebCore::V8GCController::minorGCEpilogue): + 2013-01-31 Yury Semikhatsky Layout Test inspector-protocol/take-heap-snapshot.html crashes in the Debug mode Modified: trunk/Source/WebCore/bindings/v8/V8GCController.cpp (141389 => 141390) --- trunk/Source/WebCore/bindings/v8/V8GCController.cpp 2013-01-31 08:49:47 UTC (rev 141389) +++ trunk/Source/WebCore/bindings/v8/V8GCController.cpp 2013-01-31 08:52:58 UTC (rev 141390) @@ -332,6 +332,8 @@ void V8GCController::minorGCPrologue() { +TRACE_EVENT_BEGIN0("v8", "GC"); + if (isMainThreadOrGCThread() && m_edenNodes) { for (size_t i = 0; i < m_edenNodes->size(); i++) { ASSERT(!m_edenNodes->at(i)->wrapper().IsEmpty()); @@ -374,6 +376,7 @@ void V8GCController::minorGCEpilogue() { +TRACE_EVENT_END0("v8", "GC"); } void V8GCController::majorGCEpilogue() ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [141386] trunk/LayoutTests
Title: [141386] trunk/LayoutTests Revision 141386 Author hara...@chromium.org Date 2013-01-31 00:33:21 -0800 (Thu, 31 Jan 2013) Log Message Add composition-event-constructor.html, which I forgot to add in r141028 https://bugs.webkit.org/show_bug.cgi?id=107919 Reviewed by Adam Barth. r141028 implemented a CompositionEvent constructor, but I forgot to add a test when I landed the patch manually. This patch adds the test. * fast/events/constructors/composition-event-constructor-expected.txt: Added. * fast/events/constructors/composition-event-constructor.html: Added. * platform/efl/TestExpectations: * platform/gtk/TestExpectations: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/efl/TestExpectations trunk/LayoutTests/platform/gtk/TestExpectations Added Paths trunk/LayoutTests/fast/events/constructors/composition-event-constructor-expected.txt trunk/LayoutTests/fast/events/constructors/composition-event-constructor.html Diff Modified: trunk/LayoutTests/ChangeLog (141385 => 141386) --- trunk/LayoutTests/ChangeLog 2013-01-31 08:30:52 UTC (rev 141385) +++ trunk/LayoutTests/ChangeLog 2013-01-31 08:33:21 UTC (rev 141386) @@ -1,5 +1,20 @@ 2013-01-31 Kentaro Hara +Add composition-event-constructor.html, which I forgot to add in r141028 +https://bugs.webkit.org/show_bug.cgi?id=107919 + +Reviewed by Adam Barth. + +r141028 implemented a CompositionEvent constructor, but I forgot to add a test +when I landed the patch manually. This patch adds the test. + +* fast/events/constructors/composition-event-constructor-expected.txt: Added. +* fast/events/constructors/composition-event-constructor.html: Added. +* platform/efl/TestExpectations: +* platform/gtk/TestExpectations: + +2013-01-31 Kentaro Hara + [V8] 'new MouseEvent("click", {relatedTarget: window}).window' should return window https://bugs.webkit.org/show_bug.cgi?id=108432 Added: trunk/LayoutTests/fast/events/constructors/composition-event-constructor-expected.txt (0 => 141386) --- trunk/LayoutTests/fast/events/constructors/composition-event-constructor-expected.txt (rev 0) +++ trunk/LayoutTests/fast/events/constructors/composition-event-constructor-expected.txt 2013-01-31 08:33:21 UTC (rev 141386) @@ -0,0 +1,52 @@ +This tests the constructor for the CompositionEvent DOM class. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS new CompositionEvent('eventType').bubbles is false +PASS new CompositionEvent('eventType').cancelable is false +PASS new CompositionEvent('eventType').view is null +PASS new CompositionEvent('eventType').detail is 0 +PASS new CompositionEvent('eventType').data is "" +PASS new CompositionEvent('eventType', { bubbles: false }).bubbles is false +PASS new CompositionEvent('eventType', { bubbles: true }).bubbles is true +PASS new CompositionEvent('eventType', { cancelable: false }).cancelable is false +PASS new CompositionEvent('eventType', { cancelable: true }).cancelable is true +PASS new CompositionEvent('eventType', { view: window }).view is window +PASS new CompositionEvent('eventType', { view: this }).view is this +PASS new CompositionEvent('eventType', { view: testObject }).view is null +PASS new CompositionEvent('eventType', { view: document }).view is null +PASS new CompositionEvent('eventType', { view: undefined }).view is null +PASS new CompositionEvent('eventType', { view: null }).view is null +PASS new CompositionEvent('eventType', { view: false }).view is null +PASS new CompositionEvent('eventType', { view: true }).view is null +PASS new CompositionEvent('eventType', { view: '' }).view is null +PASS new CompositionEvent('eventType', { view: 'chocolate' }).view is null +PASS new CompositionEvent('eventType', { view: 12345 }).view is null +PASS new CompositionEvent('eventType', { view: 18446744073709551615 }).view is null +PASS new CompositionEvent('eventType', { view: NaN }).view is null +PASS new CompositionEvent('eventType', { view: {valueOf: function () { return window; } } }).view == window is false +PASS new CompositionEvent('eventType', { get view() { return 123; } }).view is null +PASS new CompositionEvent('eventType', { get view() { throw 'CompositionEvent Error'; } }) threw exception CompositionEvent Error. +PASS new CompositionEvent('eventType', { data: 'koakuma' }).data is "koakuma" +PASS new CompositionEvent('eventType', { data: '' }).data is "" +PASS new CompositionEvent('eventType', { data: undefined }).data is "undefined" +PASS new CompositionEvent('eventType', { data: null }).data is "null" +PASS new CompositionEvent('eventType', { data: false }).data is "false" +PASS new CompositionEvent('eventType', { data: true }).data is "true" +PASS new CompositionEvent('eventType', { data: 12345 }).data is "12345" +PASS new CompositionEvent('eventType', { data: 18446744073709551615 }).data is "18446744073709552000" +
[webkit-changes] [141383] trunk
Title: [141383] trunk Revision 141383 Author hara...@chromium.org Date 2013-01-31 00:12:20 -0800 (Thu, 31 Jan 2013) Log Message [V8] 'new MouseEvent("click", {relatedTarget: window}).window' should return window https://bugs.webkit.org/show_bug.cgi?id=108432 Reviewed by Adam Barth. In V8 'new MouseEvent("click", {relatedTarget: window}).window' returns null. JSC returns window, which is a correct behavior. V8 should also return window. Source/WebCore: The point is that we need to handle a DOMWindow wrapper specially before converting it to an EventTarget object. A wrapper returned by Dictionary::get("relatedTarget") is not an expected DOMWindow wrapper. To get the expected DOMWindow wrapper, we need to look up a prototype chain of the DOMWindow wrapper. In JSC, this special handling is done by JSEventTargetCustom::toEventTarget(). Test: fast/events/constructors/mouse-event-constructor.html * bindings/v8/Dictionary.cpp: (WebCore::Dictionary::get): LayoutTests: * fast/events/constructors/mouse-event-constructor-expected.txt: * fast/events/constructors/mouse-event-constructor.html: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/fast/events/constructors/mouse-event-constructor-expected.txt trunk/LayoutTests/fast/events/constructors/mouse-event-constructor.html trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/v8/Dictionary.cpp Diff Modified: trunk/LayoutTests/ChangeLog (141382 => 141383) --- trunk/LayoutTests/ChangeLog 2013-01-31 08:05:11 UTC (rev 141382) +++ trunk/LayoutTests/ChangeLog 2013-01-31 08:12:20 UTC (rev 141383) @@ -1,3 +1,17 @@ +2013-01-31 Kentaro Hara + +[V8] 'new MouseEvent("click", {relatedTarget: window}).window' should return window +https://bugs.webkit.org/show_bug.cgi?id=108432 + +Reviewed by Adam Barth. + +In V8 'new MouseEvent("click", {relatedTarget: window}).window' +returns null. JSC returns window, which is a correct behavior. +V8 should also return window. + +* fast/events/constructors/mouse-event-constructor-expected.txt: +* fast/events/constructors/mouse-event-constructor.html: + 2013-01-30 Hajime Morrita [Chromium] Unreviewed, rebaselining expectations. Modified: trunk/LayoutTests/fast/events/constructors/mouse-event-constructor-expected.txt (141382 => 141383) --- trunk/LayoutTests/fast/events/constructors/mouse-event-constructor-expected.txt 2013-01-31 08:05:11 UTC (rev 141382) +++ trunk/LayoutTests/fast/events/constructors/mouse-event-constructor-expected.txt 2013-01-31 08:12:20 UTC (rev 141383) @@ -165,6 +165,7 @@ PASS new MouseEvent('eventType', { relatedTarget: testDiv }).relatedTarget is testDiv PASS new MouseEvent('eventType', { relatedTarget: document }).relatedTarget is document PASS new MouseEvent('eventType', { relatedTarget: xhr }).relatedTarget is xhr +PASS new MouseEvent('eventType', { relatedTarget: window }).relatedTarget is window PASS new MouseEvent('eventType', { relatedTarget: testObject }).relatedTarget is null PASS new MouseEvent('eventType', { relatedTarget: undefined }).relatedTarget is null PASS new MouseEvent('eventType', { relatedTarget: null }).relatedTarget is null Modified: trunk/LayoutTests/fast/events/constructors/mouse-event-constructor.html (141382 => 141383) --- trunk/LayoutTests/fast/events/constructors/mouse-event-constructor.html 2013-01-31 08:05:11 UTC (rev 141382) +++ trunk/LayoutTests/fast/events/constructors/mouse-event-constructor.html 2013-01-31 08:12:20 UTC (rev 141383) @@ -123,6 +123,7 @@ shouldBe("new MouseEvent('eventType', { relatedTarget: testDiv }).relatedTarget", "testDiv"); shouldBe("new MouseEvent('eventType', { relatedTarget: document }).relatedTarget", "document"); shouldBe("new MouseEvent('eventType', { relatedTarget: xhr }).relatedTarget", "xhr"); +shouldBe("new MouseEvent('eventType', { relatedTarget: window }).relatedTarget", "window"); // Invalid objects. shouldBe("new MouseEvent('eventType', { relatedTarget: testObject }).relatedTarget", "null"); Modified: trunk/Source/WebCore/ChangeLog (141382 => 141383) --- trunk/Source/WebCore/ChangeLog 2013-01-31 08:05:11 UTC (rev 141382) +++ trunk/Source/WebCore/ChangeLog 2013-01-31 08:12:20 UTC (rev 141383) @@ -1,3 +1,27 @@ +2013-01-31 Kentaro Hara + +[V8] 'new MouseEvent("click", {relatedTarget: window}).window' should return window +https://bugs.webkit.org/show_bug.cgi?id=108432 + +Reviewed by Adam Barth. + +In V8 'new MouseEvent("click", {relatedTarget: window}).window' +returns null. JSC returns window, which is a correct behavior. +V8 should also return window. + +The point is that we need to handle a DOMWindow wrapper specially +before converting it to an EventTarget object. A wrapper returned by +Dictionary::get("relatedTarget") is not an expected DOMWindow wrapper. +To get the expected DOMWindow wrapper, we need to look up a prototype +
[webkit-changes] [141368] trunk/Source/WebCore
Title: [141368] trunk/Source/WebCore Revision 141368 Author hara...@chromium.org Date 2013-01-30 20:32:21 -0800 (Wed, 30 Jan 2013) Log Message [V8] Use state->isolate() when state is not 0 https://bugs.webkit.org/show_bug.cgi?id=107674 Reviewed by Adam Barth. No tests. No change in behavior. * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::start): (WebCore::ScriptProfiler::stop): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/v8/ScriptProfiler.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (141367 => 141368) --- trunk/Source/WebCore/ChangeLog 2013-01-31 04:07:38 UTC (rev 141367) +++ trunk/Source/WebCore/ChangeLog 2013-01-31 04:32:21 UTC (rev 141368) @@ -1,3 +1,16 @@ +2013-01-30 Kentaro Hara + +[V8] Use state->isolate() when state is not 0 +https://bugs.webkit.org/show_bug.cgi?id=107674 + +Reviewed by Adam Barth. + +No tests. No change in behavior. + +* bindings/v8/ScriptProfiler.cpp: +(WebCore::ScriptProfiler::start): +(WebCore::ScriptProfiler::stop): + 2013-01-30 Adam Barth The background HTML parser should be able to parse speculatively Modified: trunk/Source/WebCore/bindings/v8/ScriptProfiler.cpp (141367 => 141368) --- trunk/Source/WebCore/bindings/v8/ScriptProfiler.cpp 2013-01-31 04:07:38 UTC (rev 141367) +++ trunk/Source/WebCore/bindings/v8/ScriptProfiler.cpp 2013-01-31 04:32:21 UTC (rev 141368) @@ -59,7 +59,7 @@ profileNameIdleTimeMap->add(title, 0); v8::HandleScope hs; -v8::CpuProfiler::StartProfiling(v8String(title, v8::Isolate::GetCurrent())); +v8::CpuProfiler::StartProfiling(v8String(title, state ? state->isolate() : v8::Isolate::GetCurrent())); } void ScriptProfiler::startForPage(Page*, const String& title) @@ -78,7 +78,7 @@ { v8::HandleScope hs; const v8::CpuProfile* profile = "" ? -v8::CpuProfiler::StopProfiling(v8String(title, v8::Isolate::GetCurrent()), state->context()->GetSecurityToken()) : +v8::CpuProfiler::StopProfiling(v8String(title, state->isolate()), state->context()->GetSecurityToken()) : v8::CpuProfiler::StopProfiling(v8String(title, v8::Isolate::GetCurrent())); if (!profile) return 0; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [141315] trunk/Source/WebCore
Title: [141315] trunk/Source/WebCore Revision 141315 Author hara...@chromium.org Date 2013-01-30 14:36:24 -0800 (Wed, 30 Jan 2013) Log Message isSameAsCurrentState() should take SerializedScriptValue* instead of PassRefPtr https://bugs.webkit.org/show_bug.cgi?id=107904 Reviewed by Darin Adler. Applied Darin's comment: https://bugs.webkit.org/show_bug.cgi?id=107904#c5 No tests. No change in behavior. * bindings/js/JSPopStateEventCustom.cpp: (WebCore::JSPopStateEvent::state): * bindings/v8/custom/V8PopStateEventCustom.cpp: (WebCore::V8PopStateEvent::stateAccessorGetter): * page/History.cpp: (WebCore::History::isSameAsCurrentState): * page/History.h: (History): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/js/JSPopStateEventCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8PopStateEventCustom.cpp trunk/Source/WebCore/page/History.cpp trunk/Source/WebCore/page/History.h Diff Modified: trunk/Source/WebCore/ChangeLog (141314 => 141315) --- trunk/Source/WebCore/ChangeLog 2013-01-30 22:32:30 UTC (rev 141314) +++ trunk/Source/WebCore/ChangeLog 2013-01-30 22:36:24 UTC (rev 141315) @@ -1,3 +1,23 @@ +2013-01-30 Kentaro Hara + +isSameAsCurrentState() should take SerializedScriptValue* instead of PassRefPtr +https://bugs.webkit.org/show_bug.cgi?id=107904 + +Reviewed by Darin Adler. + +Applied Darin's comment: https://bugs.webkit.org/show_bug.cgi?id=107904#c5 + +No tests. No change in behavior. + +* bindings/js/JSPopStateEventCustom.cpp: +(WebCore::JSPopStateEvent::state): +* bindings/v8/custom/V8PopStateEventCustom.cpp: +(WebCore::V8PopStateEvent::stateAccessorGetter): +* page/History.cpp: +(WebCore::History::isSameAsCurrentState): +* page/History.h: +(History): + 2013-01-30 Douglas Stockwell Remove unnecessary setAnimating() method Modified: trunk/Source/WebCore/bindings/js/JSPopStateEventCustom.cpp (141314 => 141315) --- trunk/Source/WebCore/bindings/js/JSPopStateEventCustom.cpp 2013-01-30 22:32:30 UTC (rev 141314) +++ trunk/Source/WebCore/bindings/js/JSPopStateEventCustom.cpp 2013-01-30 22:36:24 UTC (rev 141315) @@ -66,7 +66,7 @@ // The current history state object might've changed in the meantime, so we need to take care // of using the correct one, and always share the same deserialization with history.state. -bool isSameState = history->isSameAsCurrentState(event->serializedState()); +bool isSameState = history->isSameAsCurrentState(event->serializedState().get()); JSValue result; if (isSameState) { Modified: trunk/Source/WebCore/bindings/v8/custom/V8PopStateEventCustom.cpp (141314 => 141315) --- trunk/Source/WebCore/bindings/v8/custom/V8PopStateEventCustom.cpp 2013-01-30 22:32:30 UTC (rev 141314) +++ trunk/Source/WebCore/bindings/v8/custom/V8PopStateEventCustom.cpp 2013-01-30 22:36:24 UTC (rev 141315) @@ -67,7 +67,7 @@ // The current history state object might've changed in the meantime, so we need to take care // of using the correct one, and always share the same deserialization with history.state. -bool isSameState = history->isSameAsCurrentState(event->serializedState()); +bool isSameState = history->isSameAsCurrentState(event->serializedState().get()); if (isSameState) { v8::Handle v8History = toV8(history, info.Holder(), info.GetIsolate()).As(); Modified: trunk/Source/WebCore/page/History.cpp (141314 => 141315) --- trunk/Source/WebCore/page/History.cpp 2013-01-30 22:32:30 UTC (rev 141314) +++ trunk/Source/WebCore/page/History.cpp 2013-01-30 22:36:24 UTC (rev 141315) @@ -77,9 +77,9 @@ return m_lastStateObjectRequested != stateInternal(); } -bool History::isSameAsCurrentState(PassRefPtr state) const +bool History::isSameAsCurrentState(SerializedScriptValue* state) const { -return state == stateInternal(); +return state == stateInternal().get(); } void History::back() Modified: trunk/Source/WebCore/page/History.h (141314 => 141315) --- trunk/Source/WebCore/page/History.h 2013-01-30 22:32:30 UTC (rev 141314) +++ trunk/Source/WebCore/page/History.h 2013-01-30 22:36:24 UTC (rev 141315) @@ -55,7 +55,7 @@ void go(ScriptExecutionContext*, int distance); bool stateChanged() const; -bool isSameAsCurrentState(PassRefPtr) const; +bool isSameAsCurrentState(SerializedScriptValue*) const; enum StateObjectType { StateObjectPush, ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [141028] trunk
Title: [141028] trunk Revision 141028 Author hara...@chromium.org Date 2013-01-28 17:01:37 -0800 (Mon, 28 Jan 2013) Log Message Implement CompositionEvent constructor https://bugs.webkit.org/show_bug.cgi?id=107919 Reviewed by Sam Weinig. This patch implements a CompositionEvent constructor under a DOM4_EVENTS_CONSTRUCTOR flag. Spec: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm Source/WebCore: Test: fast/events/constructors/composition-event-constructor.html * dom/CompositionEvent.cpp: (WebCore::CompositionEventInit::CompositionEventInit): (WebCore): (WebCore::CompositionEvent::CompositionEvent): * dom/CompositionEvent.h: (CompositionEventInit): (WebCore): (CompositionEvent): (WebCore::CompositionEvent::create): (WebCore::CompositionEvent::data): * dom/CompositionEvent.idl: LayoutTests: * fast/dom/constructed-objects-prototypes-expected.txt: * fast/events/constructors/composition-event-constructor-expected.txt: Added. * fast/events/constructors/composition-event-constructor.html: Added. * platform/efl/TestExpectations: * platform/gtk/TestExpectations: * platform/qt/TestExpectations: * platform/win/TestExpectations: * platform/wincairo/TestExpectations: * fast/dom/constructed-objects-prototypes-expected.txt: * platform/efl/TestExpectations: * platform/gtk/TestExpectations: * platform/qt/TestExpectations: * platform/win/TestExpectations: * platform/wincairo/TestExpectations: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/fast/dom/constructed-objects-prototypes-expected.txt trunk/LayoutTests/platform/efl/TestExpectations trunk/LayoutTests/platform/gtk/TestExpectations trunk/LayoutTests/platform/qt/TestExpectations trunk/LayoutTests/platform/win/TestExpectations trunk/LayoutTests/platform/wincairo/TestExpectations trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/dom/CompositionEvent.cpp trunk/Source/WebCore/dom/CompositionEvent.h trunk/Source/WebCore/dom/CompositionEvent.idl Diff Modified: trunk/LayoutTests/ChangeLog (141027 => 141028) --- trunk/LayoutTests/ChangeLog 2013-01-29 01:01:03 UTC (rev 141027) +++ trunk/LayoutTests/ChangeLog 2013-01-29 01:01:37 UTC (rev 141028) @@ -1,3 +1,31 @@ +2013-01-27 Kentaro Hara + +Implement CompositionEvent constructor +https://bugs.webkit.org/show_bug.cgi?id=107919 + +Reviewed by Sam Weinig. + +This patch implements a CompositionEvent constructor under +a DOM4_EVENTS_CONSTRUCTOR flag. + +Spec: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm + +* fast/dom/constructed-objects-prototypes-expected.txt: +* fast/events/constructors/composition-event-constructor-expected.txt: Added. +* fast/events/constructors/composition-event-constructor.html: Added. +* platform/efl/TestExpectations: +* platform/gtk/TestExpectations: +* platform/qt/TestExpectations: +* platform/win/TestExpectations: +* platform/wincairo/TestExpectations: + +* fast/dom/constructed-objects-prototypes-expected.txt: +* platform/efl/TestExpectations: +* platform/gtk/TestExpectations: +* platform/qt/TestExpectations: +* platform/win/TestExpectations: +* platform/wincairo/TestExpectations: + 2013-01-28 Joshua Bell [Chromium] Unreviewed gardening, removing Crash expectations from storage/indexeddb tests. Modified: trunk/LayoutTests/fast/dom/constructed-objects-prototypes-expected.txt (141027 => 141028) --- trunk/LayoutTests/fast/dom/constructed-objects-prototypes-expected.txt 2013-01-29 01:01:03 UTC (rev 141027) +++ trunk/LayoutTests/fast/dom/constructed-objects-prototypes-expected.txt 2013-01-29 01:01:37 UTC (rev 141028) @@ -11,6 +11,8 @@ PASS (new inner.Blob()).constructor.isInner is true PASS (new inner.CloseEvent()).isInner is true PASS (new inner.CloseEvent()).constructor.isInner is true +PASS (new inner.CompositionEvent()).isInner is true +PASS (new inner.CompositionEvent()).constructor.isInner is true PASS (new inner.CustomEvent()).isInner is true PASS (new inner.CustomEvent()).constructor.isInner is true PASS (new inner.DOMParser()).isInner is true Modified: trunk/LayoutTests/platform/efl/TestExpectations (141027 => 141028) --- trunk/LayoutTests/platform/efl/TestExpectations 2013-01-29 01:01:03 UTC (rev 141027) +++ trunk/LayoutTests/platform/efl/TestExpectations 2013-01-29 01:01:37 UTC (rev 141028) @@ -1230,6 +1230,7 @@ # DOM4_EVENTS_CONSTRUCTOR is not yet enabled. webkit.org/b/107428 fast/events/constructors/ui-event-constructor.html [ Skip ] webkit.org/b/107428 fast/events/constructors/mouse-event-constructor.html [ Skip ] +webkit.org/b/107428 fast/events/constructors/composition-event-constructor.html [ Skip ] # Requires support for Web notifications webkit.org/b/73544 fast/notifications [ Skip ] Modified: trunk/LayoutTests/platform/gtk/TestExpectations (141027 => 141028) --- trunk/LayoutTests/platform/gtk/TestExpectations 2013-01-29 01:01:03 UTC (r
[webkit-changes] [140938] trunk/Source/WebCore
Title: [140938] trunk/Source/WebCore Revision 140938 Author hara...@chromium.org Date 2013-01-27 20:06:27 -0800 (Sun, 27 Jan 2013) Log Message An [ActiveDOMObject] IDL attribute should be inherited https://bugs.webkit.org/show_bug.cgi?id=107877 Reviewed by Adam Barth. Now we support IDL attribute inheritance. We can remove [ActiveDOMObject] from subclasses. No tests. No change in behavior. * Modules/indexeddb/IDBOpenDBRequest.idl: * Modules/webaudio/OfflineAudioContext.idl: * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (GenerateNamedConstructorCallback): (GenerateImplementation): * workers/SharedWorker.idl: * workers/Worker.idl: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.idl trunk/Source/WebCore/Modules/webaudio/OfflineAudioContext.idl trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm trunk/Source/WebCore/workers/SharedWorker.idl trunk/Source/WebCore/workers/Worker.idl Diff Modified: trunk/Source/WebCore/ChangeLog (140937 => 140938) --- trunk/Source/WebCore/ChangeLog 2013-01-28 03:08:59 UTC (rev 140937) +++ trunk/Source/WebCore/ChangeLog 2013-01-28 04:06:27 UTC (rev 140938) @@ -1,3 +1,27 @@ +2013-01-27 Kentaro Hara + +An [ActiveDOMObject] IDL attribute should be inherited +https://bugs.webkit.org/show_bug.cgi?id=107877 + +Reviewed by Adam Barth. + +Now we support IDL attribute inheritance. We can remove +[ActiveDOMObject] from subclasses. + +No tests. No change in behavior. + +* Modules/indexeddb/IDBOpenDBRequest.idl: +* Modules/webaudio/OfflineAudioContext.idl: +* bindings/scripts/CodeGeneratorJS.pm: +(GenerateHeader): +(GenerateImplementation): +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateHeader): +(GenerateNamedConstructorCallback): +(GenerateImplementation): +* workers/SharedWorker.idl: +* workers/Worker.idl: + 2013-01-27 Sheriff Bot Unreviewed, rolling out r140602. Modified: trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.idl (140937 => 140938) --- trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.idl 2013-01-28 03:08:59 UTC (rev 140937) +++ trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.idl 2013-01-28 04:06:27 UTC (rev 140938) @@ -25,7 +25,6 @@ [ Conditional=INDEXED_DATABASE, -ActiveDOMObject, EventTarget, JSNoStaticTables, JSGenerateToJSObject Modified: trunk/Source/WebCore/Modules/webaudio/OfflineAudioContext.idl (140937 => 140938) --- trunk/Source/WebCore/Modules/webaudio/OfflineAudioContext.idl 2013-01-28 03:08:59 UTC (rev 140937) +++ trunk/Source/WebCore/Modules/webaudio/OfflineAudioContext.idl 2013-01-28 04:06:27 UTC (rev 140938) @@ -24,7 +24,6 @@ [ Conditional=WEB_AUDIO, -ActiveDOMObject, EventTarget, JSGenerateToJSObject, Constructor(in unsigned long numberOfChannels, in unsigned long numberOfFrames, in float sampleRate), Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (140937 => 140938) --- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2013-01-28 03:08:59 UTC (rev 140937) +++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2013-01-28 04:06:27 UTC (rev 140938) @@ -1039,7 +1039,7 @@ GetGenerateIsReachable($interface) || GetCustomIsReachable($interface) || $interface->extendedAttributes->{"JSCustomFinalize"} || -$interface->extendedAttributes->{"ActiveDOMObject"}) { +$codeGenerator->InheritsExtendedAttribute($interface, "ActiveDOMObject")) { if ($interfaceName ne "Node" && $codeGenerator->InheritsInterface($interface, "Node")) { $headerIncludes{"JSNode.h"} = 1; push(@headerContent, "class JS${interfaceName}Owner : public JSNodeOwner {\n"); @@ -2466,7 +2466,7 @@ } } -if ((!$hasParent && !GetCustomIsReachable($interface))|| GetGenerateIsReachable($interface) || $interface->extendedAttributes->{"ActiveDOMObject"}) { +if ((!$hasParent && !GetCustomIsReachable($interface))|| GetGenerateIsReachable($interface) || $codeGenerator->InheritsExtendedAttribute($interface, "ActiveDOMObject")) { push(@implContent, "static inline bool isObservable(JS${interfaceName}* js${interfaceName})\n"); push(@implContent, "{\n"); push(@implContent, "if (js${interfaceName}->hasCustomProperties())\n"); @@ -2488,7 +2488,7 @@ # wrappers unconditionally keep ActiveDOMObjects with pending activity alive. # FIXME: Fix this lifetime issue in the DOM, and move this hasPendingActivity # check below the isObservable check. -if ($interface->extendedAttributes->{"ActiveDOMObject"}) { +if ($codeGenerator->InheritsExtendedAttribute($interface, "Activ
[webkit-changes] [140893] trunk/Source/WebCore
Title: [140893] trunk/Source/WebCore Revision 140893 Author hara...@chromium.org Date 2013-01-25 17:42:02 -0800 (Fri, 25 Jan 2013) Log Message Remove InjectedScript::wrapSerializedObject() https://bugs.webkit.org/show_bug.cgi?id=107906 Reviewed by Abhishek Arya. InjectedScript::wrapSerializedObject() is unused. (This is one of steps to remove raw pointers of SerializedScriptValue*, which can be a security concern.) * inspector/InjectedScript.cpp: * inspector/InjectedScript.h: (InjectedScript): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/inspector/InjectedScript.cpp trunk/Source/WebCore/inspector/InjectedScript.h Diff Modified: trunk/Source/WebCore/ChangeLog (140892 => 140893) --- trunk/Source/WebCore/ChangeLog 2013-01-26 01:38:05 UTC (rev 140892) +++ trunk/Source/WebCore/ChangeLog 2013-01-26 01:42:02 UTC (rev 140893) @@ -1,5 +1,20 @@ 2013-01-25 Kentaro Hara +Remove InjectedScript::wrapSerializedObject() +https://bugs.webkit.org/show_bug.cgi?id=107906 + +Reviewed by Abhishek Arya. + +InjectedScript::wrapSerializedObject() is unused. +(This is one of steps to remove raw pointers of SerializedScriptValue*, +which can be a security concern.) + +* inspector/InjectedScript.cpp: +* inspector/InjectedScript.h: +(InjectedScript): + +2013-01-25 Kentaro Hara + Keep a RefPtr when we call serialize()/deserialize() in code generators https://bugs.webkit.org/show_bug.cgi?id=107902 Modified: trunk/Source/WebCore/inspector/InjectedScript.cpp (140892 => 140893) --- trunk/Source/WebCore/inspector/InjectedScript.cpp 2013-01-26 01:38:05 UTC (rev 140892) +++ trunk/Source/WebCore/inspector/InjectedScript.cpp 2013-01-26 01:42:02 UTC (rev 140893) @@ -222,12 +222,6 @@ return wrapObject(nodeAsScriptValue(node), groupName); } -PassRefPtr InjectedScript::wrapSerializedObject(SerializedScriptValue* serializedScriptValue, const String& groupName) const -{ -ScriptValue scriptValue = serializedScriptValue->deserializeForInspector(scriptState()); -return scriptValue.hasNoValue() ? 0 : wrapObject(scriptValue, groupName); -} - ScriptValue InjectedScript::findObjectById(const String& objectId) const { ASSERT(!hasNoValue()); Modified: trunk/Source/WebCore/inspector/InjectedScript.h (140892 => 140893) --- trunk/Source/WebCore/inspector/InjectedScript.h 2013-01-26 01:38:05 UTC (rev 140892) +++ trunk/Source/WebCore/inspector/InjectedScript.h 2013-01-26 01:42:02 UTC (rev 140893) @@ -92,7 +92,6 @@ PassRefPtr wrapObject(const ScriptValue&, const String& groupName, bool generatePreview = false) const; PassRefPtr wrapNode(Node*, const String& groupName); -PassRefPtr wrapSerializedObject(SerializedScriptValue*, const String& groupName) const; ScriptValue findObjectById(const String& objectId) const; void inspectNode(Node*); ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [140892] trunk/Source/WebCore
Title: [140892] trunk/Source/WebCore Revision 140892 Author hara...@chromium.org Date 2013-01-25 17:38:05 -0800 (Fri, 25 Jan 2013) Log Message Keep a RefPtr when we call serialize()/deserialize() in code generators https://bugs.webkit.org/show_bug.cgi?id=107902 Reviewed by Abhishek Arya. If you use a raw SerializedScriptValue* for serialize()/deserialize(), it can potentially cause a use-after-free. This is because serialize()/ deserialize() can destruct a RefPtr of the SerializedScriptValue*, depending on data that is serialized/deserialized. So we should keep a RefPtr when we call serialize()/deserialize(). (See https://bugs.webkit.org/show_bug.cgi?id=107792 for more details.) No tests. This is just a just-in-case fix. * Modules/intents/Intent.h: (WebCore::Intent::data): * Modules/intents/IntentRequest.cpp: (WebCore::IntentRequest::postResult): (WebCore::IntentRequest::postFailure): * Modules/intents/IntentRequest.h: (IntentRequest): * Modules/intents/IntentResultCallback.h: (IntentResultCallback): * bindings/scripts/CodeGeneratorJS.pm: (GetNativeTypeForCallbacks): * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (GetNativeTypeForCallbacks): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrGetter): (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedReadonlyValueAttrGetter): * dom/MessagePortChannel.h: (WebCore::MessagePortChannel::EventData::message): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/intents/Intent.h trunk/Source/WebCore/Modules/intents/IntentRequest.cpp trunk/Source/WebCore/Modules/intents/IntentRequest.h trunk/Source/WebCore/Modules/intents/IntentResultCallback.h trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp trunk/Source/WebCore/dom/MessagePortChannel.h Diff Modified: trunk/Source/WebCore/ChangeLog (140891 => 140892) --- trunk/Source/WebCore/ChangeLog 2013-01-26 01:36:40 UTC (rev 140891) +++ trunk/Source/WebCore/ChangeLog 2013-01-26 01:38:05 UTC (rev 140892) @@ -1,5 +1,41 @@ 2013-01-25 Kentaro Hara +Keep a RefPtr when we call serialize()/deserialize() in code generators +https://bugs.webkit.org/show_bug.cgi?id=107902 + +Reviewed by Abhishek Arya. + +If you use a raw SerializedScriptValue* for serialize()/deserialize(), +it can potentially cause a use-after-free. This is because serialize()/ +deserialize() can destruct a RefPtr of the SerializedScriptValue*, +depending on data that is serialized/deserialized. So we should keep a +RefPtr when we call serialize()/deserialize(). +(See https://bugs.webkit.org/show_bug.cgi?id=107792 for more details.) + +No tests. This is just a just-in-case fix. + +* Modules/intents/Intent.h: +(WebCore::Intent::data): +* Modules/intents/IntentRequest.cpp: +(WebCore::IntentRequest::postResult): +(WebCore::IntentRequest::postFailure): +* Modules/intents/IntentRequest.h: +(IntentRequest): +* Modules/intents/IntentResultCallback.h: +(IntentResultCallback): +* bindings/scripts/CodeGeneratorJS.pm: +(GetNativeTypeForCallbacks): +* bindings/scripts/CodeGeneratorV8.pm: +(GenerateNormalAttrGetter): +(GetNativeTypeForCallbacks): +* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: +(WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrGetter): +(WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedReadonlyValueAttrGetter): +* dom/MessagePortChannel.h: +(WebCore::MessagePortChannel::EventData::message): + +2013-01-25 Kentaro Hara + Keep a RefPtr when we call serialize()/deserialize() for MessageEvent https://bugs.webkit.org/show_bug.cgi?id=107900 Modified: trunk/Source/WebCore/Modules/intents/Intent.h (140891 => 140892) --- trunk/Source/WebCore/Modules/intents/Intent.h 2013-01-26 01:36:40 UTC (rev 140891) +++ trunk/Source/WebCore/Modules/intents/Intent.h 2013-01-26 01:38:05 UTC (rev 140892) @@ -36,6 +36,7 @@ #include "MessagePort.h" #include "MessagePortChannel.h" #include "ScriptState.h" +#include "SerializedScriptValue.h" #include #include #include @@ -45,8 +46,6 @@ namespace WebCore { -class SerializedScriptValue; - typedef int ExceptionCode; class Intent : public RefCounted { @@ -58,7 +57,7 @@ const String& action() const { return m_action; } const String& type() const { return m_type; } -SerializedScriptValue* data() const { return m_data.get(); } +PassRefPtr data() const { return m_data; } MessagePortChannelArray* messagePorts() const { return m_ports.get(); } const KURL& service() const { return m
[webkit-changes] [140891] trunk/Source/WebCore
Title: [140891] trunk/Source/WebCore Revision 140891 Author hara...@chromium.org Date 2013-01-25 17:36:40 -0800 (Fri, 25 Jan 2013) Log Message Keep a RefPtr when we call serialize()/deserialize() for MessageEvent https://bugs.webkit.org/show_bug.cgi?id=107900 Reviewed by Abhishek Arya. If you use a raw SerializedScriptValue* for serialize()/deserialize(), it can potentially cause a use-after-free. This is because serialize()/ deserialize() can destruct a RefPtr of the SerializedScriptValue*, depending on data that is serialized/deserialized. So we should keep a RefPtr when we call serialize()/deserialize(). (See https://bugs.webkit.org/show_bug.cgi?id=107792 for more details.) No tests. This is just a just-in-case fix. I couldn't find any bug even in an ASAN build. * bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::data): * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::dataAccessorGetter): * dom/MessageEvent.h: (WebCore::MessageEvent::dataAsSerializedScriptValue): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/bindings/js/JSMessageEventCustom.cpp trunk/Source/WebCore/bindings/v8/custom/V8MessageEventCustom.cpp trunk/Source/WebCore/dom/MessageEvent.h Diff Modified: trunk/Source/WebCore/ChangeLog (140890 => 140891) --- trunk/Source/WebCore/ChangeLog 2013-01-26 01:32:36 UTC (rev 140890) +++ trunk/Source/WebCore/ChangeLog 2013-01-26 01:36:40 UTC (rev 140891) @@ -1,5 +1,29 @@ 2013-01-25 Kentaro Hara +Keep a RefPtr when we call serialize()/deserialize() for MessageEvent +https://bugs.webkit.org/show_bug.cgi?id=107900 + +Reviewed by Abhishek Arya. + +If you use a raw SerializedScriptValue* for serialize()/deserialize(), +it can potentially cause a use-after-free. This is because serialize()/ +deserialize() can destruct a RefPtr of the SerializedScriptValue*, +depending on data that is serialized/deserialized. So we should keep a +RefPtr when we call serialize()/deserialize(). +(See https://bugs.webkit.org/show_bug.cgi?id=107792 for more details.) + +No tests. This is just a just-in-case fix. I couldn't find any bug +even in an ASAN build. + +* bindings/js/JSMessageEventCustom.cpp: +(WebCore::JSMessageEvent::data): +* bindings/v8/custom/V8MessageEventCustom.cpp: +(WebCore::V8MessageEvent::dataAccessorGetter): +* dom/MessageEvent.h: +(WebCore::MessageEvent::dataAsSerializedScriptValue): + +2013-01-25 Kentaro Hara + [V8] Keep a RefPtr when we call serialize()/deserialize() (part 1) https://bugs.webkit.org/show_bug.cgi?id=107891 Modified: trunk/Source/WebCore/bindings/js/JSMessageEventCustom.cpp (140890 => 140891) --- trunk/Source/WebCore/bindings/js/JSMessageEventCustom.cpp 2013-01-26 01:32:36 UTC (rev 140890) +++ trunk/Source/WebCore/bindings/js/JSMessageEventCustom.cpp 2013-01-26 01:36:40 UTC (rev 140891) @@ -62,7 +62,7 @@ } case MessageEvent::DataTypeSerializedScriptValue: -if (SerializedScriptValue* serializedValue = event->dataAsSerializedScriptValue()) { +if (RefPtr serializedValue = event->dataAsSerializedScriptValue()) { MessagePortArray* ports = static_cast(impl())->ports(); result = serializedValue->deserialize(exec, globalObject(), ports, NonThrowing); } Modified: trunk/Source/WebCore/bindings/v8/custom/V8MessageEventCustom.cpp (140890 => 140891) --- trunk/Source/WebCore/bindings/v8/custom/V8MessageEventCustom.cpp 2013-01-26 01:32:36 UTC (rev 140890) +++ trunk/Source/WebCore/bindings/v8/custom/V8MessageEventCustom.cpp 2013-01-26 01:36:40 UTC (rev 140891) @@ -58,7 +58,7 @@ } case MessageEvent::DataTypeSerializedScriptValue: -if (SerializedScriptValue* serializedValue = event->dataAsSerializedScriptValue()) +if (RefPtr serializedValue = event->dataAsSerializedScriptValue()) result = serializedValue->deserialize(info.GetIsolate(), event->ports()); else result = v8Null(info.GetIsolate()); Modified: trunk/Source/WebCore/dom/MessageEvent.h (140890 => 140891) --- trunk/Source/WebCore/dom/MessageEvent.h 2013-01-26 01:32:36 UTC (rev 140890) +++ trunk/Source/WebCore/dom/MessageEvent.h 2013-01-26 01:36:40 UTC (rev 140891) @@ -108,7 +108,7 @@ }; DataType dataType() const { return m_dataType; } const ScriptValue& dataAsScriptValue() const { ASSERT(m_dataType == DataTypeScriptValue); return m_dataAsScriptValue; } -SerializedScriptValue* dataAsSerializedScriptValue() const { ASSERT(m_dataType == DataTypeSerializedScriptValue); return m_dataAsSerializedScriptValue.get(); } +PassRefPtr dataAsSerializedScriptValue() const { ASSERT(m_dataType == DataTypeSerializedScriptValue); return m_dataAsSerializedScriptValue; } String dataAsString() const { ASSERT(m_dataType == DataTypeString); return m_dataAsString; } Blob* dat