Title: [108332] trunk/Source/WebCore
- Revision
- 108332
- Author
- pfeld...@chromium.org
- Date
- 2012-02-21 03:32:44 -0800 (Tue, 21 Feb 2012)
Log Message
Web Inspector: clicking empty space should not re-enter edit mode
https://bugs.webkit.org/show_bug.cgi?id=79024
Patch by Pavel Feldman <pfeld...@chomium.org> on 2012-02-21
Reviewed by Vsevolod Vlasov.
* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylePropertiesSection):
(WebInspector.StylePropertiesSection.prototype._handleEmptySpaceMouseDown):
(WebInspector.StylePropertiesSection.prototype._handleEmptySpaceClick):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (108331 => 108332)
--- trunk/Source/WebCore/ChangeLog 2012-02-21 11:30:30 UTC (rev 108331)
+++ trunk/Source/WebCore/ChangeLog 2012-02-21 11:32:44 UTC (rev 108332)
@@ -1,5 +1,17 @@
2012-02-21 Pavel Feldman <pfeld...@chomium.org>
+ Web Inspector: clicking empty space should not re-enter edit mode
+ https://bugs.webkit.org/show_bug.cgi?id=79024
+
+ Reviewed by Vsevolod Vlasov.
+
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylePropertiesSection):
+ (WebInspector.StylePropertiesSection.prototype._handleEmptySpaceMouseDown):
+ (WebInspector.StylePropertiesSection.prototype._handleEmptySpaceClick):
+
+2012-02-21 Pavel Feldman <pfeld...@chomium.org>
+
Web Inspector: evaluate on hover does not work for large files.
https://bugs.webkit.org/show_bug.cgi?id=79015
Modified: trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js (108331 => 108332)
--- trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js 2012-02-21 11:30:30 UTC (rev 108331)
+++ trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js 2012-02-21 11:32:44 UTC (rev 108332)
@@ -966,6 +966,7 @@
this.element.appendChild(closeBrace);
this._selectorElement.addEventListener("click", this._handleSelectorClick.bind(this), false);
+ this.element.addEventListener("mousedown", this._handleEmptySpaceMouseDown.bind(this), false);
this.element.addEventListener("click", this._handleEmptySpaceClick.bind(this), false);
this._parentPane = parentPane;
@@ -1195,8 +1196,18 @@
return document.createTextNode(origin);
},
+ _handleEmptySpaceMouseDown: function(event)
+ {
+ this._willCauseCancelEditing = this._parentPane._isEditingStyle;
+ },
+
_handleEmptySpaceClick: function(event)
{
+ var willCauseCancelEditing = this._willCauseCancelEditing;
+ delete this._willCauseCancelEditing;
+ if (willCauseCancelEditing)
+ return;
+
if (event.target.hasStyleClass("header") || this.element.hasStyleClass("read-only") || event.target.enclosingNodeOrSelfWithClass("media")) {
event.stopPropagation();
return;
@@ -1513,6 +1524,8 @@
// Pass an empty title, the title gets made later in onattach.
TreeElement.call(this, "", null, shorthand);
+
+ this.selectable = false;
}
WebInspector.StylePropertyTreeElement.prototype = {
@@ -1927,7 +1940,6 @@
else
this.listItemElement.removeStyleClass("implicit");
- this.selectable = !this.inherited;
if (this.inherited)
this.listItemElement.addStyleClass("inherited");
else
@@ -2233,7 +2245,7 @@
if (moveDirection === "forward" && !isEditingName || moveDirection === "backward" && isEditingName) {
do {
moveTo = (moveDirection === "forward" ? moveTo.nextSibling : moveTo.previousSibling);
- } while(moveTo && !moveTo.selectable);
+ } while(moveTo && moveTo.inherited);
if (moveTo)
moveToPropertyName = moveTo.name;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes