Changeset 93762 in webkit
- Timestamp:
- Aug 24, 2011 11:58:33 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r93759 r93762 1 2011-08-24 Kentaro Hara <haraken@google.com> 2 3 Implement an Event constructor. 4 https://bugs.webkit.org/show_bug.cgi?id=66756 5 6 Reviewed by Adam Barth. 7 8 The spec of the Event constructor is here: 9 http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-event-constructor. 10 This patch added the Event constructor to EventConstructors.h using 11 JavaScript implementation-independent macros. This patch also added the V8 12 implementation of these macros to V8EventConstructors.cpp. 13 14 * fast/events/event-constructors-expected.txt: Added. 15 * fast/events/event-constructors.html: Added. 16 * platform/gtk/Skipped: Skipped event-constructors.html, since Event constructors are not yet implemented in JSC. 17 * platform/mac/Skipped: Ditto. 18 * platform/qt/Skipped: Ditto. 19 * platform/win/Skipped: Ditto. 20 * platform/wk2/Skipped: Ditto. 21 1 22 2011-08-24 Kentaro Hara <haraken@google.com> 2 23 -
trunk/LayoutTests/platform/gtk/Skipped
r93628 r93762 492 492 fast/forms/select-script-onchange.html 493 493 fast/html/tab-order.html 494 495 # These tests require the implementation of Event constructors. 496 # https://bugs.webkit.org/show_bug.cgi?id=63878 497 fast/events/event-constructors.html 494 498 495 499 # The box isn't empty after a test run with this test. -
trunk/LayoutTests/platform/mac/Skipped
r93359 r93762 89 89 fast/events/mouseover-button.html 90 90 91 # These tests require the JSC implementation of Event constructors. 92 # https://bugs.webkit.org/show_bug.cgi?id=63878 93 fast/events/event-constructors.html 94 91 95 # Skipped until https://bugs.webkit.org/show_bug.cgi?id=33923 is resolved. 92 96 platform/mac/accessibility/change-notification-on-scroll.html -
trunk/LayoutTests/platform/qt/Skipped
r93628 r93762 202 202 # Font feature settings is not implemented. 203 203 css3/font-feature-settings-rendering.html 204 205 # These tests require the JSC implementation of Event constructors. 206 # https://bugs.webkit.org/show_bug.cgi?id=63878 207 fast/events/event-constructors.html 204 208 205 209 # =========================================================================== # -
trunk/LayoutTests/platform/win/Skipped
r93529 r93762 148 148 # No button tracked 149 149 fast/events/mouseover-button.html 150 151 # These tests require the JSC implementation of Event constructors. 152 # https://bugs.webkit.org/show_bug.cgi?id=63878 153 fast/events/event-constructors.html 150 154 151 155 # The eqqivalent of option-tab doesn not exist in Boomer <rdar://problem/5137230> -
trunk/LayoutTests/platform/wk2/Skipped
r93732 r93762 1596 1596 platform/mac/fast/text/rounding-hacks-expansion.html 1597 1597 1598 # These tests require the implementation of Event constructors. 1599 # https://bugs.webkit.org/show_bug.cgi?id=63878 1600 fast/events/event-constructors.html 1601 1598 1602 # Sometimes fails 1599 1603 # http://webkit.org/b/58990 -
trunk/Source/WebCore/ChangeLog
r93761 r93762 1 2011-08-24 Kentaro Hara <haraken@google.com> 2 3 Implement an Event constructor. 4 https://bugs.webkit.org/show_bug.cgi?id=66756 5 6 Reviewed by Adam Barth. 7 8 The spec of the Event constructor is here: 9 http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-event-constructor. 10 This patch added the Event constructor to EventConstructors.h using 11 JavaScript implementation-independent macros. This patch also added the V8 12 implementation of these macros to V8EventConstructors.cpp. 13 14 The bug 63878 has been implementing the Event constructors for JSC. 15 Our plan is to first implement all the Event constructors for V8 16 using EventConstructors.h proposed in the JSC patch, and then merge 17 the JSC patch with these V8 patches. In any case, we are going to split 18 the patches for V8 and those for JSC in order to avoid hard regression. 19 20 Test: fast/events/event-constructors.html 21 22 * WebCore.gypi: Added V8EventConstructors.cpp. 23 * WebCore.pro: Added V8EventConstructors.cpp. 24 * bindings/generic/EventConstructors.h: Added. The Event constructor. This is written using JavaScript implementation-independent macros. The V8 implementation of these macros is written in bindings/v8/custom/V8EventConstructors.cpp. 25 * bindings/v8/OptionsObject.cpp: 26 (WebCore::OptionsObject::getKeyDouble): Returns the value of a given key of type double. 27 (WebCore::OptionsObject::getKey): Returns true whenever the given key is found, even if the value is null or undefined. 28 * bindings/v8/OptionsObject.h: 29 (WebCore::OptionsObject::getKeyValue): Returns the value of the given key. We need to overload getKeyValue() for all types required to EventConfiguration members. 30 * bindings/v8/custom/V8EventConstructors.cpp: Added. Implemented macros used in EventConstructors.h. 31 (WebCore::constructV8Event): The Event constructor. 32 * dom/Event.cpp: 33 (WebCore::EventConfiguration::EventConfiguration): A constructor of EventConfiguration. 34 (WebCore::Event::Event): A constructor of the Event class. 35 * dom/Event.h: Added EventConfiguration, which manages attributes of the Event class. 36 (WebCore::Event::create): A factory method of the Event class with EventConfiguration. 37 * dom/Event.idl: Added 'CanBeConstructed' and 'V8CustomConstructor'. 38 1 39 2011-08-24 Philippe Normand <pnormand@igalia.com> 2 40 -
trunk/Source/WebCore/WebCore.gypi
r93713 r93762 1730 1730 'bindings/generic/BindingSecurityBase.cpp', 1731 1731 'bindings/generic/BindingSecurityBase.h', 1732 'bindings/generic/EventConstructors.h', 1732 1733 'bindings/generic/GenericBinding.h', 1733 1734 'bindings/generic/RuntimeEnabledFeatures.cpp', … … 2142 2143 'bindings/v8/custom/V8EntryCustom.cpp', 2143 2144 'bindings/v8/custom/V8EntrySyncCustom.cpp', 2145 'bindings/v8/custom/V8EventConstructors.cpp', 2144 2146 'bindings/v8/custom/V8EventCustom.cpp', 2145 2147 'bindings/v8/custom/V8EventSourceConstructor.cpp', -
trunk/Source/WebCore/WebCore.pro
r93713 r93762 165 165 bindings/v8/custom/V8DocumentLocationCustom.cpp \ 166 166 bindings/v8/custom/V8ElementCustom.cpp \ 167 bindings/v8/custom/V8EventConstructors.cpp \ 167 168 bindings/v8/custom/V8EventCustom.cpp \ 168 169 bindings/v8/custom/V8EventSourceConstructor.cpp \ -
trunk/Source/WebCore/bindings/v8/OptionsObject.cpp
r93759 r93762 90 90 } 91 91 92 bool OptionsObject::getKeyDouble(const String& key, double& value) const 93 { 94 v8::Local<v8::Value> v8Value; 95 if (!getKey(key, v8Value)) 96 return false; 97 98 v8::Local<v8::Number> v8Number = v8Value->ToNumber(); 99 if (v8Number.IsEmpty()) 100 return false; 101 value = v8Number->Value(); 102 return true; 103 } 104 92 105 bool OptionsObject::getKeyString(const String& key, String& value) const 93 106 { -
trunk/Source/WebCore/bindings/v8/OptionsObject.h
r93759 r93762 48 48 bool getKeyString(const String& key, String& value) const; 49 49 bool getKeyStringWithUndefinedOrNullCheck(const String& key, String& value) const; 50 bool getKeyDouble(const String& key, double& value) const; 50 51 PassRefPtr<DOMStringList> getKeyDOMStringList(const String& key) const; 51 52 PassRefPtr<IDBKeyRange> getKeyKeyRange(const String& key) const; 53 54 bool getKeyValue(const String& key, bool& value) const 55 { 56 return getKeyBool(key, value); 57 } 58 bool getKeyValue(const String& key, int32_t& value) const 59 { 60 return getKeyInt32(key, value); 61 } 62 bool getKeyValue(const String& key, double& value) const 63 { 64 return getKeyDouble(key, value); 65 } 66 bool getKeyValue(const String& key, String& value) const 67 { 68 return getKeyString(key, value); 69 } 52 70 53 71 private: -
trunk/Source/WebCore/dom/Event.cpp
r93385 r93762 32 32 namespace WebCore { 33 33 34 EventConfiguration::EventConfiguration() 35 : bubbles(false) 36 , cancelable(false) 37 , defaultPrevented(false) 38 , timeStamp(0) 39 { 40 } 41 34 42 Event::Event() 35 43 : m_canBubble(false) … … 61 69 } 62 70 71 Event::Event(const AtomicString& eventType, const EventConfiguration& eventConfiguration) 72 : m_type(eventType) 73 , m_canBubble(eventConfiguration.bubbles) 74 , m_cancelable(eventConfiguration.cancelable) 75 , m_propagationStopped(false) 76 , m_immediatePropagationStopped(false) 77 , m_defaultPrevented(eventConfiguration.defaultPrevented) 78 , m_defaultHandled(false) 79 , m_cancelBubble(false) 80 , m_eventPhase(0) 81 , m_currentTarget(0) 82 , m_createTime(static_cast<DOMTimeStamp>(eventConfiguration.timeStamp)) 83 { 84 } 85 63 86 Event::~Event() 64 87 { -
trunk/Source/WebCore/dom/Event.h
r93385 r93762 34 34 class EventTarget; 35 35 class EventDispatcher; 36 37 struct EventConfiguration { 38 EventConfiguration(); 39 40 bool bubbles; 41 bool cancelable; 42 bool defaultPrevented; 43 double timeStamp; 44 }; 36 45 37 46 class Event : public RefCounted<Event> { … … 69 78 { 70 79 return adoptRef(new Event(type, canBubble, cancelable)); 80 } 81 static PassRefPtr<Event> create(const AtomicString& type, const EventConfiguration& eventConfiguration) 82 { 83 return adoptRef(new Event(type, eventConfiguration)); 71 84 } 72 85 virtual ~Event(); … … 177 190 Event(); 178 191 Event(const AtomicString& type, bool canBubble, bool cancelable); 192 Event(const AtomicString&, const EventConfiguration&); 179 193 180 194 virtual void receivedTarget(); -
trunk/Source/WebCore/dom/Event.idl
r91617 r93762 1 1 /* 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.2 * Copyright (C) 2006, 2007, 2009, 2011 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 25 25 CustomToJS, 26 26 NoStaticTables, 27 Polymorphic 27 Polymorphic, 28 CanBeConstructed, 29 V8CustomConstructor 28 30 ] Event { 29 31
Note: See TracChangeset
for help on using the changeset viewer.