- Revision
- 120978
- Author
- [email protected]
- Date
- 2012-06-21 16:32:22 -0700 (Thu, 21 Jun 2012)
Log Message
Unreviewed, rolling out r120945.
http://trac.webkit.org/changeset/120945
https://bugs.webkit.org/show_bug.cgi?id=89703
editing/shadow/breaking-editing-boundaries.html started to
crash (Requested by hayato on #webkit).
Patch by Sheriff Bot <[email protected]> on 2012-06-21
Source/WebCore:
* dom/EventDispatcher.cpp:
(WebCore::EventRelatedTargetAdjuster::adjust):
(WebCore::EventDispatcher::ensureEventAncestors):
LayoutTests:
* fast/dom/shadow/shadow-dom-event-dispatching-expected.txt:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (120977 => 120978)
--- trunk/LayoutTests/ChangeLog 2012-06-21 23:32:04 UTC (rev 120977)
+++ trunk/LayoutTests/ChangeLog 2012-06-21 23:32:22 UTC (rev 120978)
@@ -1,3 +1,14 @@
+2012-06-21 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r120945.
+ http://trac.webkit.org/changeset/120945
+ https://bugs.webkit.org/show_bug.cgi?id=89703
+
+ editing/shadow/breaking-editing-boundaries.html started to
+ crash (Requested by hayato on #webkit).
+
+ * fast/dom/shadow/shadow-dom-event-dispatching-expected.txt:
+
2012-06-21 Joshua Bell <[email protected]>
IndexedDB: Fix layout tests to clear previous database structures
Modified: trunk/LayoutTests/fast/dom/shadow/shadow-dom-event-dispatching-expected.txt (120977 => 120978)
--- trunk/LayoutTests/fast/dom/shadow/shadow-dom-event-dispatching-expected.txt 2012-06-21 23:32:04 UTC (rev 120977)
+++ trunk/LayoutTests/fast/dom/shadow/shadow-dom-event-dispatching-expected.txt 2012-06-21 23:32:22 UTC (rev 120978)
@@ -37,8 +37,8 @@
mouseover
@distributed-light-child (target: distributed-light-child) (related: shadow-host)
- @content (target: distributed-light-child) (related: shadow-host)
- @shadow-root (target: distributed-light-child) (related: shadow-host)
+ @content (target: content) (related: shadow-host)
+ @shadow-root (target: content) (related: shadow-host)
@shadow-host (target: distributed-light-child) (related: shadow-host)
@top (target: distributed-light-child) (related: shadow-host)
@@ -46,8 +46,8 @@
mouseout
@distributed-light-child (target: distributed-light-child) (related: shadow-host)
- @content (target: distributed-light-child) (related: shadow-host)
- @shadow-root (target: distributed-light-child) (related: shadow-host)
+ @content (target: content) (related: shadow-host)
+ @shadow-root (target: content) (related: shadow-host)
@shadow-host (target: distributed-light-child) (related: shadow-host)
@top (target: distributed-light-child) (related: shadow-host)
@@ -58,15 +58,15 @@
Moving mouse from shadow-host/shadow-root-child to distributed-light-child
mouseout
- @shadow-root-child (target: shadow-root-child) (related: distributed-light-child)
- @shadow-root (target: shadow-root-child) (related: distributed-light-child)
+ @shadow-root-child (target: shadow-root-child) (related: content)
+ @shadow-root (target: shadow-root-child) (related: content)
@shadow-host (target: shadow-host) (related: distributed-light-child)
@top (target: shadow-host) (related: distributed-light-child)
mouseover
@distributed-light-child (target: distributed-light-child) (related: shadow-host)
- @content (target: distributed-light-child) (related: shadow-root-child)
- @shadow-root (target: distributed-light-child) (related: shadow-root-child)
+ @content (target: content) (related: shadow-root-child)
+ @shadow-root (target: content) (related: shadow-root-child)
@shadow-host (target: distributed-light-child) (related: shadow-host)
@top (target: distributed-light-child) (related: shadow-host)
@@ -74,14 +74,14 @@
mouseout
@distributed-light-child (target: distributed-light-child) (related: shadow-host)
- @content (target: distributed-light-child) (related: shadow-root-child)
- @shadow-root (target: distributed-light-child) (related: shadow-root-child)
+ @content (target: content) (related: shadow-root-child)
+ @shadow-root (target: content) (related: shadow-root-child)
@shadow-host (target: distributed-light-child) (related: shadow-host)
@top (target: distributed-light-child) (related: shadow-host)
mouseover
- @shadow-root-child (target: shadow-root-child) (related: distributed-light-child)
- @shadow-root (target: shadow-root-child) (related: distributed-light-child)
+ @shadow-root-child (target: shadow-root-child) (related: content)
+ @shadow-root (target: shadow-root-child) (related: content)
@shadow-host (target: shadow-host) (related: distributed-light-child)
@top (target: shadow-host) (related: distributed-light-child)
@@ -136,14 +136,14 @@
mouseout
@F (target: F) (related: D)
@E (target: F) (related: D)
- @I (target: F) (related: D)
- @M (target: F) (related: D)
- @O (target: F) (related: D)
- @shadow-root-L (target: F) (related: D)
- @L (target: F) (related: D)
- @shadow-root-G (target: F) (related: D)
- @G (target: F) (related: D)
- @shadow-root-B (target: F) (related: D)
+ @I (target: I) (related: H)
+ @M (target: M) (related: K)
+ @O (target: O) (related: K)
+ @shadow-root-L (target: O) (related: K)
+ @L (target: M) (related: K)
+ @shadow-root-G (target: M) (related: K)
+ @G (target: I) (related: H)
+ @shadow-root-B (target: I) (related: H)
@B (target: F) (related: D)
@A (target: F) (related: D)
@top (target: F) (related: D)
@@ -151,14 +151,14 @@
mouseover
@D (target: D) (related: F)
@C (target: D) (related: F)
- @H (target: D) (related: F)
- @K (target: D) (related: F)
- @N (target: D) (related: F)
- @shadow-root-J (target: D) (related: F)
- @J (target: D) (related: F)
- @shadow-root-G (target: D) (related: F)
- @G (target: D) (related: F)
- @shadow-root-B (target: D) (related: F)
+ @H (target: H) (related: I)
+ @K (target: K) (related: M)
+ @N (target: N) (related: M)
+ @shadow-root-J (target: N) (related: M)
+ @J (target: K) (related: M)
+ @shadow-root-G (target: K) (related: M)
+ @G (target: H) (related: I)
+ @shadow-root-B (target: H) (related: I)
@B (target: D) (related: F)
@A (target: D) (related: F)
@top (target: D) (related: F)
@@ -166,10 +166,10 @@
Moving mouse from B/G/L to D
mouseout
- @L (target: L) (related: D)
- @shadow-root-G (target: L) (related: D)
- @G (target: G) (related: D)
- @shadow-root-B (target: G) (related: D)
+ @L (target: L) (related: K)
+ @shadow-root-G (target: L) (related: K)
+ @G (target: G) (related: H)
+ @shadow-root-B (target: G) (related: H)
@B (target: B) (related: D)
@A (target: B) (related: D)
@top (target: B) (related: D)
@@ -177,14 +177,14 @@
mouseover
@D (target: D) (related: B)
@C (target: D) (related: B)
- @H (target: D) (related: G)
- @K (target: D) (related: L)
- @N (target: D) (related: L)
- @shadow-root-J (target: D) (related: L)
- @J (target: D) (related: L)
- @shadow-root-G (target: D) (related: L)
- @G (target: D) (related: G)
- @shadow-root-B (target: D) (related: G)
+ @H (target: H) (related: G)
+ @K (target: K) (related: L)
+ @N (target: N) (related: L)
+ @shadow-root-J (target: N) (related: L)
+ @J (target: K) (related: L)
+ @shadow-root-G (target: K) (related: L)
+ @G (target: H) (related: G)
+ @shadow-root-B (target: H) (related: G)
@B (target: D) (related: B)
@A (target: D) (related: B)
@top (target: D) (related: B)
@@ -208,14 +208,14 @@
mouseover
@D (target: D) (related: A)
@C (target: D) (related: A)
- @H (target: D) (related: A)
- @K (target: D) (related: A)
- @N (target: D) (related: A)
- @shadow-root-J (target: D) (related: A)
- @J (target: D) (related: A)
- @shadow-root-G (target: D) (related: A)
- @G (target: D) (related: A)
- @shadow-root-B (target: D) (related: A)
+ @H (target: H) (related: A)
+ @K (target: K) (related: A)
+ @N (target: N) (related: A)
+ @shadow-root-J (target: N) (related: A)
+ @J (target: K) (related: A)
+ @shadow-root-G (target: K) (related: A)
+ @G (target: H) (related: A)
+ @shadow-root-B (target: H) (related: A)
@B (target: D) (related: A)
@A (target: D) (related: A)
@top (target: D) (related: A)
@@ -225,14 +225,14 @@
mouseout
@D (target: D) (related: A)
@C (target: D) (related: A)
- @H (target: D) (related: A)
- @K (target: D) (related: A)
- @N (target: D) (related: A)
- @shadow-root-J (target: D) (related: A)
- @J (target: D) (related: A)
- @shadow-root-G (target: D) (related: A)
- @G (target: D) (related: A)
- @shadow-root-B (target: D) (related: A)
+ @H (target: H) (related: A)
+ @K (target: K) (related: A)
+ @N (target: N) (related: A)
+ @shadow-root-J (target: N) (related: A)
+ @J (target: K) (related: A)
+ @shadow-root-G (target: K) (related: A)
+ @G (target: H) (related: A)
+ @shadow-root-B (target: H) (related: A)
@B (target: D) (related: A)
@A (target: D) (related: A)
@top (target: D) (related: A)
@@ -317,8 +317,8 @@
@child-of-inactive-content (target: child-of-inactive-content) (related: A)
@inactive-content (target: child-of-inactive-content) (related: A)
@parent-of-inactive-content (target: child-of-inactive-content) (related: A)
- @active-content (target: child-of-inactive-content) (related: A)
- @shadow-root-B (target: child-of-inactive-content) (related: A)
+ @active-content (target: active-content) (related: A)
+ @shadow-root-B (target: active-content) (related: A)
@B (target: child-of-inactive-content) (related: A)
@top (target: child-of-inactive-content) (related: A)
@@ -336,10 +336,10 @@
mouseout
@B (target: B) (related: A)
- @C (target: B) (related: A)
- @older-shadow-root (target: B) (related: A)
- @E (target: B) (related: A)
- @younger-shadow-root (target: B) (related: A)
+ @C (target: C) (related: A)
+ @older-shadow-root (target: C) (related: A)
+ @E (target: E) (related: A)
+ @younger-shadow-root (target: E) (related: A)
@A (target: B) (related: A)
@top (target: B) (related: A)
@@ -363,16 +363,16 @@
mouseout
@B (target: B) (related: A)
- @C (target: B) (related: A)
- @older-shadow-root (target: B) (related: A)
- @E (target: B) (related: F)
- @younger-shadow-root (target: B) (related: F)
+ @C (target: C) (related: A)
+ @older-shadow-root (target: C) (related: A)
+ @E (target: E) (related: F)
+ @younger-shadow-root (target: E) (related: F)
@A (target: B) (related: A)
@top (target: B) (related: A)
mouseover
- @F (target: F) (related: B)
- @younger-shadow-root (target: F) (related: B)
+ @F (target: F) (related: E)
+ @younger-shadow-root (target: F) (related: E)
@A (target: A) (related: B)
@top (target: A) (related: B)
Modified: trunk/Source/WebCore/ChangeLog (120977 => 120978)
--- trunk/Source/WebCore/ChangeLog 2012-06-21 23:32:04 UTC (rev 120977)
+++ trunk/Source/WebCore/ChangeLog 2012-06-21 23:32:22 UTC (rev 120978)
@@ -1,3 +1,16 @@
+2012-06-21 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r120945.
+ http://trac.webkit.org/changeset/120945
+ https://bugs.webkit.org/show_bug.cgi?id=89703
+
+ editing/shadow/breaking-editing-boundaries.html started to
+ crash (Requested by hayato on #webkit).
+
+ * dom/EventDispatcher.cpp:
+ (WebCore::EventRelatedTargetAdjuster::adjust):
+ (WebCore::EventDispatcher::ensureEventAncestors):
+
2012-06-21 Philippe Normand <[email protected]>
[GStreamer] Use setGstElementClassMetadata.
Modified: trunk/Source/WebCore/dom/EventDispatcher.cpp (120977 => 120978)
--- trunk/Source/WebCore/dom/EventDispatcher.cpp 2012-06-21 23:32:04 UTC (rev 120977)
+++ trunk/Source/WebCore/dom/EventDispatcher.cpp 2012-06-21 23:32:22 UTC (rev 120978)
@@ -67,25 +67,13 @@
void EventRelatedTargetAdjuster::adjust(Vector<EventContext>& ancestors)
{
- Vector<EventTarget*> relatedTargetStack;
TreeScope* lastTreeScope = 0;
- Node* lastNode = 0;
for (ComposedShadowTreeParentWalker walker(m_relatedTarget.get()); walker.get(); walker.parentIncludingInsertionPointAndShadowRoot()) {
- Node* node = walker.get();
- if (relatedTargetStack.isEmpty())
- relatedTargetStack.append(node);
- else if (isInsertionPoint(node) && isAssignedTo(lastNode, toInsertionPoint(node)))
- relatedTargetStack.append(relatedTargetStack.last());
- TreeScope* scope = node->treeScope();
- // Skips adding a node to the map if treeScope does not change. Just for the performance optimization.
+ TreeScope* scope = walker.get()->treeScope();
+ // Skips adding a node to the map if treeScope does not change.
if (scope != lastTreeScope)
- m_relatedTargetMap.add(scope, relatedTargetStack.last());
+ m_relatedTargetMap.add(scope, walker.get());
lastTreeScope = scope;
- lastNode = node;
- if (node->isShadowRoot()) {
- ASSERT(!relatedTargetStack.isEmpty());
- relatedTargetStack.removeLast();
- }
}
lastTreeScope = 0;
@@ -93,7 +81,7 @@
for (Vector<EventContext>::iterator iter = ancestors.begin(); iter < ancestors.end(); ++iter) {
TreeScope* scope = iter->node()->treeScope();
if (scope == lastTreeScope) {
- // Re-use the previous adjustedRelatedTarget if treeScope does not change. Just for the performance optimization.
+ // Re-use the previous adjustedRelatedTarget if treeScope does not change.
iter->setRelatedTarget(adjustedRelatedTarget);
} else {
adjustedRelatedTarget = findRelatedTarget(scope);
@@ -224,10 +212,8 @@
Node* last = 0;
for (ComposedShadowTreeParentWalker walker(m_node.get()); walker.get(); walker.parentIncludingInsertionPointAndShadowRoot()) {
Node* node = walker.get();
- if (targetStack.isEmpty())
+ if ((isInsertionPoint(node) && isAssignedTo(last, toInsertionPoint(node))) || targetStack.isEmpty())
targetStack.append(eventTargetRespectingSVGTargetRules(node));
- else if (isInsertionPoint(node) && isAssignedTo(last, toInsertionPoint(node)))
- targetStack.append(targetStack.last());
m_ancestors.append(EventContext(node, eventTargetRespectingSVGTargetRules(node), targetStack.last()));
if (!inDocument)
return;
@@ -236,10 +222,8 @@
continue;
if (determineDispatchBehavior(event, toShadowRoot(node)) == StayInsideShadowDOM)
return;
- if (!isSVGElement) {
- ASSERT(!targetStack.isEmpty());
+ if (!isSVGElement && !targetStack.isEmpty())
targetStack.removeLast();
- }
}
}