Diff
Modified: trunk/LayoutTests/ChangeLog (136828 => 136829)
--- trunk/LayoutTests/ChangeLog 2012-12-06 11:13:33 UTC (rev 136828)
+++ trunk/LayoutTests/ChangeLog 2012-12-06 11:51:26 UTC (rev 136829)
@@ -1,3 +1,17 @@
+2012-12-06 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r136818.
+ http://trac.webkit.org/changeset/136818
+ https://bugs.webkit.org/show_bug.cgi?id=104249
+
+ simulatedClick does not work as per #chrmium irc. (Requested
+ by hayato on #webkit).
+
+ * fast/dom/shadow/shadow-dom-event-dispatching-expected.txt:
+ * fast/dom/shadow/shadow-dom-event-dispatching.html:
+ * fast/events/dispatch-synthetic-mouseevent-expected.txt: Removed.
+ * fast/events/dispatch-synthetic-mouseevent.html: Removed.
+
2012-12-06 Pavel Podivilov <[email protected]>
[chromium] Unreviewed, fix baselines for plugins/npp-set-window-called-during-destruction.html on win7.
Modified: trunk/LayoutTests/fast/dom/shadow/shadow-dom-event-dispatching-expected.txt (136828 => 136829)
--- trunk/LayoutTests/fast/dom/shadow/shadow-dom-event-dispatching-expected.txt 2012-12-06 11:13:33 UTC (rev 136828)
+++ trunk/LayoutTests/fast/dom/shadow/shadow-dom-event-dispatching-expected.txt 2012-12-06 11:51:26 UTC (rev 136829)
@@ -435,35 +435,6 @@
@shadow-root (target: non-used-fallback)
@A (target: A)
@top (target: A)
-
-
-Composed Shadow Tree will be:
-DIV id=sandbox
- DIV id=top
- DIV id=host
- DIV id=div1
- DIV id=div2
-
-
- mouseout
-
- mouseover
- @div2 (target: div2) (related: div1)
- @shadow-root (target: div2) (related: div1)
-
-
-Composed Shadow Tree will be:
-DIV id=sandbox
- DIV id=top
- DIV id=host
- DIV id=div1
-
-
- mouseout
-
- mouseover
- @div1 (target: div1) (related: div1)
- @shadow-root (target: div1) (related: div1)
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/fast/dom/shadow/shadow-dom-event-dispatching.html (136828 => 136829)
--- trunk/LayoutTests/fast/dom/shadow/shadow-dom-event-dispatching.html 2012-12-06 11:13:33 UTC (rev 136828)
+++ trunk/LayoutTests/fast/dom/shadow/shadow-dom-event-dispatching.html 2012-12-06 11:51:26 UTC (rev 136829)
@@ -378,58 +378,6 @@
debugDispatchedEvent('click');
}
-function testEventsFiredManually()
-{
- sandbox.innerHTML = '';
- sandbox.appendChild(
- createDOM('div', {'id': 'top'},
- createDOM('div', {'id': 'host'},
- createShadowRoot(
- createDOM('div', {'id': 'div1'}),
- createDOM('div', {'id': 'div2'})))));
-
- addEventListeners(['top', 'host', 'host/', 'host/div1', 'host/div2']);
- getNodeInShadowTreeStack('host/').id = 'shadow-root';
- showSandboxTree();
-
- var div1 = getNodeInShadowTreeStack('host/div1');
- var div2 = getNodeInShadowTreeStack('host/div2');
-
- clearEventRecords();
- var event = document.createEvent("MouseEvents");
- event.initMouseEvent("mouseover", true, false, window,
- 0, 10, 10, 10, 10, false, false, false, false, 0, div1);
- div2.dispatchEvent(event);
-
- debugDispatchedEvent('mouseout');
- debugDispatchedEvent('mouseover');
-}
-
-function testEventsFiredManuallyWithRelatedTargetSameToTarget()
-{
- sandbox.innerHTML = '';
- sandbox.appendChild(
- createDOM('div', {'id': 'top'},
- createDOM('div', {'id': 'host'},
- createShadowRoot(
- createDOM('div', {'id': 'div1'})))));
-
- addEventListeners(['top', 'host', 'host/', 'host/div1']);
- getNodeInShadowTreeStack('host/').id = 'shadow-root';
- showSandboxTree();
-
- var div1 = getNodeInShadowTreeStack('host/div1');
-
- clearEventRecords();
- var event = document.createEvent("MouseEvents");
- event.initMouseEvent("mouseover", true, false, window,
- 0, 10, 10, 10, 10, false, false, false, false, 0, div1);
- div1.dispatchEvent(event);
-
- debugDispatchedEvent('mouseout');
- debugDispatchedEvent('mouseover');
-}
-
function test()
{
if (window.testRunner)
@@ -445,8 +393,6 @@
testEventsOnMultipleShadowRoots();
testEventsOnNonDistributedNodes();
testEventsOnFallbackElements();
- testEventsFiredManually();
- testEventsFiredManuallyWithRelatedTargetSameToTarget();
}
test();
Deleted: trunk/LayoutTests/fast/events/dispatch-synthetic-mouseevent-expected.txt (136828 => 136829)
--- trunk/LayoutTests/fast/events/dispatch-synthetic-mouseevent-expected.txt 2012-12-06 11:13:33 UTC (rev 136828)
+++ trunk/LayoutTests/fast/events/dispatch-synthetic-mouseevent-expected.txt 2012-12-06 11:51:26 UTC (rev 136829)
@@ -1,10 +0,0 @@
-Tests to ensure that dblclick event is not fired.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-click event is fired.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Deleted: trunk/LayoutTests/fast/events/dispatch-synthetic-mouseevent.html (136828 => 136829)
--- trunk/LayoutTests/fast/events/dispatch-synthetic-mouseevent.html 2012-12-06 11:13:33 UTC (rev 136828)
+++ trunk/LayoutTests/fast/events/dispatch-synthetic-mouseevent.html 2012-12-06 11:51:26 UTC (rev 136829)
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src=""
-</head>
-<body>
-<p id="description"></p>
-<div id='top'>
-</div>
-<pre id="console"></pre>
-<script>
-description("Tests to ensure that dblclick event is not fired.");
-
-function clickHandler(event)
-{
- debug('click event is fired.');
-}
-
-function dblclickHandler(event)
-{
- testFailed('dblclick event should not be fired.');
-}
-
-function test()
-{
- if (window.testRunner)
- testRunner.dumpAsText();
-
- var node = document.getElementById('top');
- node.addEventListener('click', clickHandler, false);
- node.addEventListener('dblclick', dblclickHandler, false);
-
- var event = document.createEvent("MouseEvents");
- var details = 2;
- event.initMouseEvent("click", true, false, window,
- details, 10, 10, 10, 10, false, false, false, false, 0, null);
- node.dispatchEvent(event);
-}
-
-test();
-</script>
-<script src=""
-</body>
-</html>
Modified: trunk/Source/WebCore/ChangeLog (136828 => 136829)
--- trunk/Source/WebCore/ChangeLog 2012-12-06 11:13:33 UTC (rev 136828)
+++ trunk/Source/WebCore/ChangeLog 2012-12-06 11:51:26 UTC (rev 136829)
@@ -1,3 +1,23 @@
+2012-12-06 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r136818.
+ http://trac.webkit.org/changeset/136818
+ https://bugs.webkit.org/show_bug.cgi?id=104249
+
+ simulatedClick does not work as per #chrmium irc. (Requested
+ by hayato on #webkit).
+
+ * dom/EventDispatcher.cpp:
+ (WebCore::EventRelatedTargetAdjuster::adjust):
+ * dom/MouseEvent.cpp:
+ (WebCore::MouseEventDispatchMediator::create):
+ (WebCore::MouseEventDispatchMediator::MouseEventDispatchMediator):
+ (WebCore::MouseEventDispatchMediator::dispatchEvent):
+ * dom/MouseEvent.h:
+ (MouseEventDispatchMediator):
+ * dom/Node.cpp:
+ (WebCore::Node::dispatchEvent):
+
2012-12-06 Ulan Degenbaev <[email protected]>
[v8] Fix hidden property name of V8ArrayBufferView flag.
Modified: trunk/Source/WebCore/dom/EventDispatcher.cpp (136828 => 136829)
--- trunk/Source/WebCore/dom/EventDispatcher.cpp 2012-12-06 11:13:33 UTC (rev 136828)
+++ trunk/Source/WebCore/dom/EventDispatcher.cpp 2012-12-06 11:51:26 UTC (rev 136829)
@@ -62,9 +62,6 @@
void EventRelatedTargetAdjuster::adjust(Vector<EventContext>& ancestors)
{
- // Synthetic mouse events can have a relatedTarget which is identical to the target.
- bool targetIsIdenticalToToRelatedTarget = (m_node.get() == m_relatedTarget.get());
-
Vector<EventTarget*> relatedTargetStack;
TreeScope* lastTreeScope = 0;
for (AncestorChainWalker walker(m_relatedTarget.get()); walker.get(); walker.parent()) {
@@ -96,12 +93,7 @@
iter->setRelatedTarget(adjustedRelatedTarget);
}
lastTreeScope = scope;
- if (targetIsIdenticalToToRelatedTarget) {
- if (m_node->treeScope()->rootNode() == iter->node()) {
- ancestors.shrink(iter + 1 - ancestors.begin());
- break;
- }
- } else if (iter->target() == adjustedRelatedTarget) {
+ if (iter->target() == adjustedRelatedTarget) {
// Event dispatching should be stopped here.
ancestors.shrink(iter - ancestors.begin());
break;
Modified: trunk/Source/WebCore/dom/MouseEvent.cpp (136828 => 136829)
--- trunk/Source/WebCore/dom/MouseEvent.cpp 2012-12-06 11:13:33 UTC (rev 136828)
+++ trunk/Source/WebCore/dom/MouseEvent.cpp 2012-12-06 11:51:26 UTC (rev 136829)
@@ -209,13 +209,13 @@
}
}
-PassRefPtr<MouseEventDispatchMediator> MouseEventDispatchMediator::create(PassRefPtr<MouseEvent> mouseEvent, MouseEventType mouseEventType)
+PassRefPtr<MouseEventDispatchMediator> MouseEventDispatchMediator::create(PassRefPtr<MouseEvent> mouseEvent)
{
- return adoptRef(new MouseEventDispatchMediator(mouseEvent, mouseEventType));
+ return adoptRef(new MouseEventDispatchMediator(mouseEvent));
}
-MouseEventDispatchMediator::MouseEventDispatchMediator(PassRefPtr<MouseEvent> mouseEvent, MouseEventType mouseEventType)
- : EventDispatchMediator(mouseEvent), m_mouseEventType(mouseEventType)
+MouseEventDispatchMediator::MouseEventDispatchMediator(PassRefPtr<MouseEvent> mouseEvent)
+ : EventDispatchMediator(mouseEvent)
{
}
@@ -232,17 +232,14 @@
if (event()->type().isEmpty())
return true; // Shouldn't happen.
- ASSERT(isSyntheticMouseEvent() || !event()->target() || event()->target() != event()->relatedTarget());
-
EventTarget* relatedTarget = event()->relatedTarget();
dispatcher->adjustRelatedTarget(event(), relatedTarget);
dispatcher->dispatchEvent(event());
bool swallowEvent = event()->defaultHandled() || event()->defaultPrevented();
- if (isSyntheticMouseEvent() || event()->type() != eventNames().clickEvent || event()->detail() != 2)
+ if (event()->type() != eventNames().clickEvent || event()->detail() != 2)
return !swallowEvent;
-
// Special case: If it's a double click event, we also send the dblclick event. This is not part
// of the DOM specs, but is used for compatibility with the _ondblclick_="" attribute. This is treated
// as a separate event in other DOM-compliant browsers like Firefox, and so we do the same.
Modified: trunk/Source/WebCore/dom/MouseEvent.h (136828 => 136829)
--- trunk/Source/WebCore/dom/MouseEvent.h 2012-12-06 11:13:33 UTC (rev 136828)
+++ trunk/Source/WebCore/dom/MouseEvent.h 2012-12-06 11:51:26 UTC (rev 136829)
@@ -115,16 +115,13 @@
class MouseEventDispatchMediator : public EventDispatchMediator {
public:
- enum MouseEventType { SyntheticMouseEvent, NonSyntheticMouseEvent};
- static PassRefPtr<MouseEventDispatchMediator> create(PassRefPtr<MouseEvent>, MouseEventType = NonSyntheticMouseEvent);
+ static PassRefPtr<MouseEventDispatchMediator> create(PassRefPtr<MouseEvent>);
private:
- explicit MouseEventDispatchMediator(PassRefPtr<MouseEvent>, MouseEventType);
+ explicit MouseEventDispatchMediator(PassRefPtr<MouseEvent>);
MouseEvent* event() const;
virtual bool dispatchEvent(EventDispatcher*) const;
- bool isSyntheticMouseEvent() const { return m_mouseEventType == SyntheticMouseEvent; }
- MouseEventType m_mouseEventType;
};
inline MouseEvent* toMouseEvent(Event* event)
Modified: trunk/Source/WebCore/dom/Node.cpp (136828 => 136829)
--- trunk/Source/WebCore/dom/Node.cpp 2012-12-06 11:13:33 UTC (rev 136828)
+++ trunk/Source/WebCore/dom/Node.cpp 2012-12-06 11:51:26 UTC (rev 136829)
@@ -2481,8 +2481,6 @@
bool Node::dispatchEvent(PassRefPtr<Event> event)
{
- if (event->isMouseEvent())
- return EventDispatcher::dispatchEvent(this, MouseEventDispatchMediator::create(adoptRef(toMouseEvent(event.leakRef())), MouseEventDispatchMediator::SyntheticMouseEvent));
return EventDispatcher::dispatchEvent(this, EventDispatchMediator::create(event));
}