Title: [185151] trunk/Source/WebInspectorUI
- Revision
- 185151
- Author
- commit-qu...@webkit.org
- Date
- 2015-06-03 07:58:01 -0700 (Wed, 03 Jun 2015)
Log Message
Web Inspector: Uncaught exception starting a NavigationBar drag and mousing over a different NavigationBar
https://bugs.webkit.org/show_bug.cgi?id=145589
Patch by Joseph Pecoraro <pecor...@apple.com> on 2015-06-03
Reviewed by Timothy Hatcher.
* UserInterface/Views/NavigationBar.js:
(WebInspector.NavigationBar.prototype._mouseDown):
(WebInspector.NavigationBar.prototype._mouseUp):
When mouse dragging for navigation bars, only match against navigation
bar items inside this navigation bar. Also, fix horizontal detection
of navigation bar items by scanning in the middle of the navigation
bar instead of the top, which missed the items.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (185150 => 185151)
--- trunk/Source/WebInspectorUI/ChangeLog 2015-06-03 14:55:56 UTC (rev 185150)
+++ trunk/Source/WebInspectorUI/ChangeLog 2015-06-03 14:58:01 UTC (rev 185151)
@@ -1,5 +1,20 @@
2015-06-03 Joseph Pecoraro <pecor...@apple.com>
+ Web Inspector: Uncaught exception starting a NavigationBar drag and mousing over a different NavigationBar
+ https://bugs.webkit.org/show_bug.cgi?id=145589
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Views/NavigationBar.js:
+ (WebInspector.NavigationBar.prototype._mouseDown):
+ (WebInspector.NavigationBar.prototype._mouseUp):
+ When mouse dragging for navigation bars, only match against navigation
+ bar items inside this navigation bar. Also, fix horizontal detection
+ of navigation bar items by scanning in the middle of the navigation
+ bar instead of the top, which missed the items.
+
+2015-06-03 Joseph Pecoraro <pecor...@apple.com>
+
Web Inspector: Debugger Popover for Node object should have go-to-arrow to show the node in DOM tree
https://bugs.webkit.org/show_bug.cgi?id=145594
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NavigationBar.js (185150 => 185151)
--- trunk/Source/WebInspectorUI/UserInterface/Views/NavigationBar.js 2015-06-03 14:55:56 UTC (rev 185150)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NavigationBar.js 2015-06-03 14:58:01 UTC (rev 185151)
@@ -295,7 +295,7 @@
this._mouseMovedEventListener = this._mouseMoved.bind(this);
this._mouseUpEventListener = this._mouseUp.bind(this);
- // Register these listeners on the document so we can track the mouse if it leaves the resizer.
+ // Register these listeners on the document so we can track the mouse if it leaves the navigation bar.
document.addEventListener("mousemove", this._mouseMovedEventListener, false);
document.addEventListener("mouseup", this._mouseUpEventListener, false);
@@ -314,15 +314,15 @@
event.stopPropagation();
var itemElement = event.target.enclosingNodeOrSelfWithClass(WebInspector.RadioButtonNavigationItem.StyleClassName);
- if (!itemElement || !itemElement.navigationItem) {
+ if (!itemElement || !itemElement.navigationItem || !this._element.contains(itemElement)) {
// Find the element that is at the X position of the mouse, even when the mouse is no longer
// vertically in the navigation bar.
- var element = document.elementFromPoint(event.pageX, this._element.totalOffsetTop);
+ var element = document.elementFromPoint(event.pageX, this._element.totalOffsetTop + (this._element.offsetHeight / 2));
if (!element)
return;
itemElement = element.enclosingNodeOrSelfWithClass(WebInspector.RadioButtonNavigationItem.StyleClassName);
- if (!itemElement || !itemElement.navigationItem)
+ if (!itemElement || !itemElement.navigationItem || !this._element.contains(itemElement))
return;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes