[webkit-changes] [186217] trunk/Source/WebInspectorUI

2015-07-01 Thread drousso
Title: [186217] trunk/Source/WebInspectorUI








Revision 186217
Author drou...@apple.com
Date 2015-07-01 21:30:53 -0700 (Wed, 01 Jul 2015)


Log Message
Web Inspector: When autocompleting, pressing tab twice shouldn't insert a tab character
https://bugs.webkit.org/show_bug.cgi?id=145885

Reviewed by Timothy Hatcher.

* UserInterface/Controllers/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController):
(WebInspector.CodeMirrorCompletionController.prototype.updateCompletions): Resolves the promise as having completions.
(WebInspector.CodeMirrorCompletionController.prototype.hideCompletions): Resolves the promise as not having completions.
(WebInspector.CodeMirrorCompletionController.prototype.completeAtCurrentPositionIfNeeded): Returns a WrappedPromise that allows
callers of this function to determine if the autocomplete had any values or was instead not shown.
(WebInspector.CodeMirrorCompletionController.prototype._resolveUpdatePromise):
* UserInterface/Main.html: Added WrappedPromise class.
* UserInterface/Models/WrappedPromise.js: Added WrappedPromise object to expose resolve and reject functions.
* UserInterface/Views/ConsolePrompt.js:
(WebInspector.ConsolePrompt.prototype._handleTabKey): Attempts to find completions for current text.  If there are none, beep.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js
trunk/Source/WebInspectorUI/UserInterface/Main.html
trunk/Source/WebInspectorUI/UserInterface/Views/ConsolePrompt.js


Added Paths

trunk/Source/WebInspectorUI/UserInterface/Models/WrappedPromise.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186216 => 186217)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-02 04:01:03 UTC (rev 186216)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-02 04:30:53 UTC (rev 186217)
@@ -1,5 +1,24 @@
 2015-07-01  Devin Rousso  drou...@apple.com
 
+Web Inspector: When autocompleting, pressing tab twice shouldn't insert a tab character
+https://bugs.webkit.org/show_bug.cgi?id=145885
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Controllers/CodeMirrorCompletionController.js:
+(WebInspector.CodeMirrorCompletionController):
+(WebInspector.CodeMirrorCompletionController.prototype.updateCompletions): Resolves the promise as having completions.
+(WebInspector.CodeMirrorCompletionController.prototype.hideCompletions): Resolves the promise as not having completions.
+(WebInspector.CodeMirrorCompletionController.prototype.completeAtCurrentPositionIfNeeded): Returns a WrappedPromise that allows
+callers of this function to determine if the autocomplete had any values or was instead not shown.
+(WebInspector.CodeMirrorCompletionController.prototype._resolveUpdatePromise):
+* UserInterface/Main.html: Added WrappedPromise class.
+* UserInterface/Models/WrappedPromise.js: Added WrappedPromise object to expose resolve and reject functions.
+* UserInterface/Views/ConsolePrompt.js:
+(WebInspector.ConsolePrompt.prototype._handleTabKey): Attempts to find completions for current text.  If there are none, beep.
+
+2015-07-01  Devin Rousso  drou...@apple.com
+
 Make the first click on a rule section create a newline for easy property addition
 https://bugs.webkit.org/show_bug.cgi?id=146490
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js (186216 => 186217)

--- trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js	2015-07-02 04:01:03 UTC (rev 186216)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js	2015-07-02 04:30:53 UTC (rev 186217)
@@ -68,6 +68,8 @@
 this._codeMirror.on(cursorActivity, this._handleCursorActivityListener);
 this._codeMirror.on(blur, this._handleHideActionListener);
 this._codeMirror.on(scroll, this._handleHideActionListener);
+
+this._updatePromise = null;
 }
 
 // Public
@@ -125,6 +127,8 @@
 }
 
 this._applyCompletionHint(completions[index]);
+
+this._resolveUpdatePromise(WebInspector.CodeMirrorCompletionController.UpdatePromise.CompletionsFound);
 }
 
 isCompletionChange(change)
@@ -158,6 +162,8 @@
 
 delete this._currentCompletion;
 delete this._ignoreNextCursorActivity;
+
+this._resolveUpdatePromise(WebInspector.CodeMirrorCompletionController.UpdatePromise.NoCompletionsFound);
 }
 
 close()
@@ -170,6 +176,17 @@
 this._codeMirror.off(scroll, this._handleHideActionListener);
 }
 
+completeAtCurrentPositionIfNeeded(force)
+{
+this._resolveUpdatePromise(WebInspector.CodeMirrorCompletionController.UpdatePromise.Canceled);
+
+var update = this._updatePromise = new WebInspector.WrappedPromise;
+
+this._completeAtCurrentPosition(force);
+

[webkit-changes] [186284] trunk/Source/WebInspectorUI

2015-07-04 Thread drousso
Title: [186284] trunk/Source/WebInspectorUI








Revision 186284
Author drou...@apple.com
Date 2015-07-04 14:48:09 -0700 (Sat, 04 Jul 2015)


Log Message
Web Inspector: Pressing enter on a newline in the styles sidebar inserts a semicolon
https://bugs.webkit.org/show_bug.cgi?id=146611

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleEnterKey): Now returns if the line is empty.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186283 => 186284)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-04 21:46:29 UTC (rev 186283)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-04 21:48:09 UTC (rev 186284)
@@ -1,5 +1,15 @@
 2015-07-04  Devin Rousso  drou...@apple.com
 
+Web Inspector: Pressing enter on a newline in the styles sidebar inserts a semicolon
+https://bugs.webkit.org/show_bug.cgi?id=146611
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleEnterKey): Now returns if the line is empty.
+
+2015-07-04  Devin Rousso  drou...@apple.com
+
 Web Inspector: Console should indicate if you have unseen messages in console due to filters
 https://bugs.webkit.org/show_bug.cgi?id=143166
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js (186283 => 186284)

--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-04 21:46:29 UTC (rev 186283)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-04 21:48:09 UTC (rev 186284)
@@ -445,6 +445,9 @@
 var trimmedLine = line.trimRight();
 var hasEndingSemicolon = trimmedLine.endsWith(;);
 
+if (!trimmedLine.trimLeft().length)
+return CodeMirror.Pass;
+
 if (hasEndingSemicolon  cursor.ch === trimmedLine.length - 1)
 ++cursor.ch;
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [186285] trunk/Source/WebInspectorUI

2015-07-04 Thread drousso
Title: [186285] trunk/Source/WebInspectorUI








Revision 186285
Author drou...@apple.com
Date 2015-07-04 14:49:54 -0700 (Sat, 04 Jul 2015)


Log Message
Web Inspector: Pressing tab on a newline in the console should insert a tab character
https://bugs.webkit.org/show_bug.cgi?id=146612

Reviewed by Timothy Hatcher.

* UserInterface/Views/ConsolePrompt.js:
(WebInspector.ConsolePrompt.prototype._handleTabKey): Tabs can now be inserted at the beginning of newlines and before the first
non-space character on any other line.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/ConsolePrompt.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186284 => 186285)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-04 21:48:09 UTC (rev 186284)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-04 21:49:54 UTC (rev 186285)
@@ -1,5 +1,16 @@
 2015-07-04  Devin Rousso  drou...@apple.com
 
+Web Inspector: Pressing tab on a newline in the console should insert a tab character
+https://bugs.webkit.org/show_bug.cgi?id=146612
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/ConsolePrompt.js:
+(WebInspector.ConsolePrompt.prototype._handleTabKey): Tabs can now be inserted at the beginning of newlines and before the first
+non-space character on any other line.
+
+2015-07-04  Devin Rousso  drou...@apple.com
+
 Web Inspector: Pressing enter on a newline in the styles sidebar inserts a semicolon
 https://bugs.webkit.org/show_bug.cgi?id=146611
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ConsolePrompt.js (186284 => 186285)

--- trunk/Source/WebInspectorUI/UserInterface/Views/ConsolePrompt.js	2015-07-04 21:48:09 UTC (rev 186284)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ConsolePrompt.js	2015-07-04 21:49:54 UTC (rev 186285)
@@ -167,6 +167,17 @@
 
 _handleTabKey: function(codeMirror)
 {
+var cursor = codeMirror.getCursor();
+var line = codeMirror.getLine(cursor.line);
+
+if (!line.trim().length)
+return CodeMirror.Pass;
+
+var firstNonSpace = line.search(/[^\s]/);
+
+if (cursor.ch = firstNonSpace)
+return CodeMirror.Pass;
+
 this._completionController.completeAtCurrentPositionIfNeeded().then(function(result) {
 if (result === WebInspector.CodeMirrorCompletionController.UpdatePromise.NoCompletionsFound)
 InspectorFrontendHost.beep();






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [186286] trunk/Source/WebInspectorUI

2015-07-04 Thread drousso
Title: [186286] trunk/Source/WebInspectorUI








Revision 186286
Author drou...@apple.com
Date 2015-07-04 14:51:32 -0700 (Sat, 04 Jul 2015)


Log Message
Web Inspector: Wrong cursor position in styles panel when deleting a line break
https://bugs.webkit.org/show_bug.cgi?id=146577

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleBeforeChange): If the change is a deletion at the beginning of a line,
remove all markers on that line to ensure that there is no blank space on the previous line after deleting.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186285 => 186286)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-04 21:49:54 UTC (rev 186285)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-04 21:51:32 UTC (rev 186286)
@@ -1,5 +1,17 @@
 2015-07-04  Devin Rousso  drou...@apple.com
 
+Web Inspector: Wrong cursor position in styles panel when deleting a line break
+https://bugs.webkit.org/show_bug.cgi?id=146577
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
+(WebInspector.CSSStyleDeclarationTextEditor):
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleBeforeChange): If the change is a deletion at the beginning of a line,
+remove all markers on that line to ensure that there is no blank space on the previous line after deleting.
+
+2015-07-04  Devin Rousso  drou...@apple.com
+
 Web Inspector: Pressing tab on a newline in the console should insert a tab character
 https://bugs.webkit.org/show_bug.cgi?id=146612
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js (186285 => 186286)

--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-04 21:49:54 UTC (rev 186285)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-04 21:51:32 UTC (rev 186286)
@@ -83,6 +83,7 @@
 // Otherwise we end up in race conditions during complete or delete-complete phases.
 this._codeMirror.on(change, this._contentChanged.bind(this));
 this._codeMirror.on(blur, this._editorBlured.bind(this));
+this._codeMirror.on(beforeChange, this._handleBeforeChange.bind(this));
 
 if (typeof this._delegate.cssStyleDeclarationTextEditorFocused === function)
 this._codeMirror.on(focus, this._editorFocused.bind(this));
@@ -438,6 +439,20 @@
 this._mouseDownCursorPosition = null;
 }
 
+_handleBeforeChange(codeMirror, change)
+{
+if (change.origin !== +delete || change.to.ch)
+return CodeMirror.Pass;
+
+var marks = codeMirror.findMarksAt(change.to);
+
+if (!marks.length)
+return CodeMirror.Pass;
+
+for (var mark of marks)
+mark.clear();
+}
+
 _handleEnterKey(codeMirror)
 {
 var cursor = codeMirror.getCursor();






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [186282] trunk/Source/WebInspectorUI

2015-07-04 Thread drousso
Title: [186282] trunk/Source/WebInspectorUI








Revision 186282
Author drou...@apple.com
Date 2015-07-04 14:44:46 -0700 (Sat, 04 Jul 2015)


Log Message
Web Inspector: Pseudo Styles Ordering and Media Queries
https://bugs.webkit.org/show_bug.cgi?id=145979

Reviewed by Timothy Hatcher.

* UserInterface/Views/RulesStyleDetailsPanel.css:
(.sidebar  .panel.details.css-style  .content.filter-in-progress .label:not(.filter-section-non-matching) + .label.filter-matching-label:not(.filter-section-non-matching)):
Fix filter label styling with pseudo selectors.
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh): Pseudo-selector rules will now order directly after the last style that
matches the pseudo-selector without the pseudo-element.  If no rules match, place the pseudo-selector rules above the first
inherited or UserAgent rule (whichever comes first).

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.css
trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186281 => 186282)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-04 21:41:27 UTC (rev 186281)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-04 21:44:46 UTC (rev 186282)
@@ -1,5 +1,20 @@
 2015-07-04  Devin Rousso  drou...@apple.com
 
+Web Inspector: Pseudo Styles Ordering and Media Queries
+https://bugs.webkit.org/show_bug.cgi?id=145979
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/RulesStyleDetailsPanel.css:
+(.sidebar  .panel.details.css-style  .content.filter-in-progress .label:not(.filter-section-non-matching) + .label.filter-matching-label:not(.filter-section-non-matching)):
+Fix filter label styling with pseudo selectors.
+* UserInterface/Views/RulesStyleDetailsPanel.js:
+(WebInspector.RulesStyleDetailsPanel.prototype.refresh): Pseudo-selector rules will now order directly after the last style that
+matches the pseudo-selector without the pseudo-element.  If no rules match, place the pseudo-selector rules above the first
+inherited or UserAgent rule (whichever comes first).
+
+2015-07-04  Devin Rousso  drou...@apple.com
+
 REGRESSION(r184000): Web Inspector: Multiline CSS in Styles Sidebar is marked as invalid
 https://bugs.webkit.org/show_bug.cgi?id=146178
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.css (186281 => 186282)

--- trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.css	2015-07-04 21:41:27 UTC (rev 186281)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.css	2015-07-04 21:44:46 UTC (rev 186282)
@@ -65,6 +65,10 @@
 border-bottom: 1px solid rgb(179, 179, 179);
 }
 
+.sidebar  .panel.details.css-style  .content.filter-in-progress .label:not(.filter-section-non-matching) + .label.filter-matching-label:not(.filter-section-non-matching) {
+padding-top: 0;
+}
+
 .sidebar  .panel.details.css-style  .content.filter-in-progress .new-rule {
 display: none;
 }


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js (186281 => 186282)

--- trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js	2015-07-04 21:41:27 UTC (rev 186281)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js	2015-07-04 21:44:46 UTC (rev 186282)
@@ -170,16 +170,20 @@
 }
 
 var pseudoElements = this.nodeStyles.pseudoElements;
+var pseudoElementSelectors = [];
+
 for (var pseudoIdentifier in pseudoElements) {
 var pseudoElement = pseudoElements[pseudoIdentifier];
 var orderedStyles = uniqueOrderedStyles(pseudoElement.orderedStyles);
+
 for (var style of orderedStyles)
-appendStyleSection.call(this, style);
-
-if (previousSection)
-previousSection.lastInGroup = true;
+pseudoElementSelectors.push({ style, selectorText: style.ownerRule.selectorText.replace(/:{1,2}[\w-]+\s*/,  ).trimRight() });
 }
 
+// Reverse the array to allow ensure that splicing the array will not mess with the order.
+if (pseudoElementSelectors.length)
+pseudoElementSelectors.reverse();
+
 var addedNewRuleButton = false;
 this._ruleMediaAndInherticanceList = [];
 
@@ -258,9 +262,33 @@
 
 this._ruleMediaAndInherticanceList.push(hasMediaOrInherited);
 
+if (pseudoElementSelectors.length  style.ownerRule) {
+for (var j = pseudoElementSelectors.length - 1; j = 0; --j) {
+var pseudoElement = pseudoElementSelectors[j];
+
+if (style.ownerRule.type === WebInspector.CSSRule.Type.UserAgent || style.inerhited
+|| (pseudoElement.lastMatchingSelector  

[webkit-changes] [186281] trunk/Source/WebInspectorUI

2015-07-04 Thread drousso
Title: [186281] trunk/Source/WebInspectorUI








Revision 186281
Author drou...@apple.com
Date 2015-07-04 14:41:27 -0700 (Sat, 04 Jul 2015)


Log Message
REGRESSION(r184000): Web Inspector: Multiline CSS in Styles Sidebar is marked as invalid
https://bugs.webkit.org/show_bug.cgi?id=146178

Reviewed by Timothy Hatcher.

First changes made by Tobias Reiss  tobi+web...@basecode.de

* Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-values-expected.css: Added.
* Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-values.css: Added.
* Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-rules-expected.css: Added.
* Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-rules.css: Added.
* Tools/PrettyPrinting/css-rule-tests/remove-newline-between-values-expected.css: Added.
* Tools/PrettyPrinting/css-rule-tests/remove-newline-between-values.css: Added.
* Tools/PrettyPrinting/index.html:
Add regression tests.
* UserInterface/Views/CodeMirrorFormatters.js:
Remove newlines before values that belong in one line and add whitespace between values.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/Tools/PrettyPrinting/index.html
trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorFormatters.js


Added Paths

trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-rules-expected.css
trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-rules.css
trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-values-expected.css
trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-values.css
trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/remove-newline-between-values-expected.css
trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/remove-newline-between-values.css




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186280 => 186281)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-04 21:31:08 UTC (rev 186280)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-04 21:41:27 UTC (rev 186281)
@@ -1,3 +1,23 @@
+2015-07-04  Devin Rousso  drou...@apple.com
+
+REGRESSION(r184000): Web Inspector: Multiline CSS in Styles Sidebar is marked as invalid
+https://bugs.webkit.org/show_bug.cgi?id=146178
+
+Reviewed by Timothy Hatcher.
+
+First changes made by Tobias Reiss  tobi+web...@basecode.de
+
+* Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-values-expected.css: Added.
+* Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-values.css: Added.
+* Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-rules-expected.css: Added.
+* Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-rules.css: Added.
+* Tools/PrettyPrinting/css-rule-tests/remove-newline-between-values-expected.css: Added.
+* Tools/PrettyPrinting/css-rule-tests/remove-newline-between-values.css: Added.
+* Tools/PrettyPrinting/index.html:
+Add regression tests.
+* UserInterface/Views/CodeMirrorFormatters.js:
+Remove newlines before values that belong in one line and add whitespace between values. 
+
 2015-07-04  Nikita Vasilyev  nvasil...@apple.com
 
 Web Inspector: The arrow that appears for Web Inspector Layout  Rendering records overlaps the category switcher


Added: trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-rules-expected.css (0 => 186281)

--- trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-rules-expected.css	(rev 0)
+++ trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-rules-expected.css	2015-07-04 21:41:27 UTC (rev 186281)
@@ -0,0 +1,3 @@
+color: red;
+margin: auto;
+background-color: rgba(0, 0, 0, 0.5);


Added: trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-rules.css (0 => 186281)

--- trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-rules.css	(rev 0)
+++ trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-rules.css	2015-07-04 21:41:27 UTC (rev 186281)
@@ -0,0 +1 @@
+color:red;margin:auto;background-color:rgba(0,0,0,0.5);
\ No newline at end of file


Added: trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-values-expected.css (0 => 186281)

--- trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-values-expected.css	(rev 0)
+++ trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-values-expected.css	2015-07-04 21:41:27 UTC (rev 186281)
@@ -0,0 +1 @@
+border: 1px solid black;


Added: trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-values.css (0 => 

[webkit-changes] [186283] trunk/Source/WebInspectorUI

2015-07-04 Thread drousso
Title: [186283] trunk/Source/WebInspectorUI








Revision 186283
Author drou...@apple.com
Date 2015-07-04 14:46:29 -0700 (Sat, 04 Jul 2015)


Log Message
Web Inspector: Console should indicate if you have unseen messages in console due to filters
https://bugs.webkit.org/show_bug.cgi?id=143166

Reviewed by Timothy Hatcher.

* UserInterface/Controllers/_javascript_LogViewController.js:
(WebInspector._javascript_LogViewController.prototype.updatePreviousMessageRepeatCount): Now returns true/false depending on if
the message count was actually updated.
* UserInterface/Views/LogContentView.css:
(.log-scope-bar  li.unread): Applies the unread-border-pulse keyframe animation.
(.log-scope-bar  li.unread.errors): The pulsing border is colored red.
(.log-scope-bar  li.unread.warnings): The pulsing border is colored yellow(ish).
(.log-scope-bar  li.unread.logs): The pulsing border is colored grey.
(@keyframes unread-border-pulse): Changes the color of the border from transparent to whatever is specificed.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView):
(WebInspector.LogContentView.prototype._determineMessageLevel):
(WebInspector.LogContentView.prototype._pulseScopeBarItemBorder): Adds the class unread to the scope bar item whose panel
the newest message belongs to, but only if that panel or the All panel is not visible.
(WebInspector.LogContentView.prototype._messageAdded):
(WebInspector.LogContentView.prototype._previousMessageRepeatCountUpdated):
(WebInspector.LogContentView.prototype._scopeBarSelectionDidChange): Clears the unread class on the selected scope bar item.
(WebInspector.LogContentView.prototype._filterMessageElements):
* UserInterface/Views/ScopeBar.js:
(WebInspector.ScopeBar.prototype.get items): Returns a list of all the items in the scope bar.
* UserInterface/Views/ScopeBarItem.js:
(WebInspector.ScopeBarItem): Added another parameter to allow for a custom class name.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Controllers/_javascript_LogViewController.js
trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.css
trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js
trunk/Source/WebInspectorUI/UserInterface/Views/ScopeBar.js
trunk/Source/WebInspectorUI/UserInterface/Views/ScopeBarItem.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186282 => 186283)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-04 21:44:46 UTC (rev 186282)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-04 21:46:29 UTC (rev 186283)
@@ -1,5 +1,35 @@
 2015-07-04  Devin Rousso  drou...@apple.com
 
+Web Inspector: Console should indicate if you have unseen messages in console due to filters
+https://bugs.webkit.org/show_bug.cgi?id=143166
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Controllers/_javascript_LogViewController.js:
+(WebInspector._javascript_LogViewController.prototype.updatePreviousMessageRepeatCount): Now returns true/false depending on if
+the message count was actually updated.
+* UserInterface/Views/LogContentView.css:
+(.log-scope-bar  li.unread): Applies the unread-border-pulse keyframe animation.
+(.log-scope-bar  li.unread.errors): The pulsing border is colored red.
+(.log-scope-bar  li.unread.warnings): The pulsing border is colored yellow(ish).
+(.log-scope-bar  li.unread.logs): The pulsing border is colored grey.
+(@keyframes unread-border-pulse): Changes the color of the border from transparent to whatever is specificed.
+* UserInterface/Views/LogContentView.js:
+(WebInspector.LogContentView):
+(WebInspector.LogContentView.prototype._determineMessageLevel):
+(WebInspector.LogContentView.prototype._pulseScopeBarItemBorder): Adds the class unread to the scope bar item whose panel
+the newest message belongs to, but only if that panel or the All panel is not visible.
+(WebInspector.LogContentView.prototype._messageAdded):
+(WebInspector.LogContentView.prototype._previousMessageRepeatCountUpdated):
+(WebInspector.LogContentView.prototype._scopeBarSelectionDidChange): Clears the unread class on the selected scope bar item.
+(WebInspector.LogContentView.prototype._filterMessageElements):
+* UserInterface/Views/ScopeBar.js:
+(WebInspector.ScopeBar.prototype.get items): Returns a list of all the items in the scope bar.
+* UserInterface/Views/ScopeBarItem.js:
+(WebInspector.ScopeBarItem): Added another parameter to allow for a custom class name.
+
+2015-07-04  Devin Rousso  drou...@apple.com
+
 Web Inspector: Pseudo Styles Ordering and Media Queries
 https://bugs.webkit.org/show_bug.cgi?id=145979
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/_javascript_LogViewController.js (186282 => 186283)

--- 

[webkit-changes] [186288] trunk/Source/WebInspectorUI

2015-07-05 Thread drousso
Title: [186288] trunk/Source/WebInspectorUI








Revision 186288
Author drou...@apple.com
Date 2015-07-05 11:23:44 -0700 (Sun, 05 Jul 2015)


Log Message
Web Inspector: CSS rule with 2 pseudo-selectors appears twice
https://bugs.webkit.org/show_bug.cgi?id=146576

Reviewed by Timothy Hatcher.

* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh):
Only adds pseudo-elements if the previous pseudo-element has a different selector.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186287 => 186288)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-05 08:15:03 UTC (rev 186287)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-05 18:23:44 UTC (rev 186288)
@@ -1,3 +1,14 @@
+2015-07-05  Devin Rousso  drou...@apple.com
+
+Web Inspector: CSS rule with 2 pseudo-selectors appears twice
+https://bugs.webkit.org/show_bug.cgi?id=146576
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/RulesStyleDetailsPanel.js:
+(WebInspector.RulesStyleDetailsPanel.prototype.refresh):
+Only adds pseudo-elements if the previous pseudo-element has a different selector.
+
 2015-07-04  Devin Rousso  drou...@apple.com
 
 Web Inspector: Wrong cursor position in styles panel when deleting a line break


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js (186287 => 186288)

--- trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js	2015-07-05 08:15:03 UTC (rev 186287)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js	2015-07-05 18:23:44 UTC (rev 186288)
@@ -170,16 +170,17 @@
 }
 
 var pseudoElements = this.nodeStyles.pseudoElements;
+var pseudoElementsStyle = [];
+
+for (var pseudoIdentifier in pseudoElements)
+pseudoElementsStyle = pseudoElementsStyle.concat(pseudoElements[pseudoIdentifier].orderedStyles);
+
+var orderedPseudoStyles = uniqueOrderedStyles(pseudoElementsStyle);
 var pseudoElementSelectors = [];
 
-for (var pseudoIdentifier in pseudoElements) {
-var pseudoElement = pseudoElements[pseudoIdentifier];
-var orderedStyles = uniqueOrderedStyles(pseudoElement.orderedStyles);
+for (var style of orderedPseudoStyles)
+pseudoElementSelectors.push({ style, selectorText: style.ownerRule.selectorText.replace(/:{1,2}[\w-]+\s*/,  ).trimRight() });
 
-for (var style of orderedStyles)
-pseudoElementSelectors.push({ style, selectorText: style.ownerRule.selectorText.replace(/:{1,2}[\w-]+\s*/,  ).trimRight() });
-}
-
 // Reverse the array to allow ensure that splicing the array will not mess with the order.
 if (pseudoElementSelectors.length)
 pseudoElementSelectors.reverse();






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [186289] trunk/Source/WebInspectorUI

2015-07-05 Thread drousso
Title: [186289] trunk/Source/WebInspectorUI








Revision 186289
Author drou...@apple.com
Date 2015-07-05 11:46:54 -0700 (Sun, 05 Jul 2015)


Log Message
Web Inspector: Deleting in the CSS sidebar causes the warning icon to appear mid-word
https://bugs.webkit.org/show_bug.cgi?id=146617

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleBeforeChange): Now removes all marks whenever the user deletes.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded): The invalid marker now calculates
it's position based off of where the semicolon is in the property text.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186288 => 186289)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-05 18:23:44 UTC (rev 186288)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-05 18:46:54 UTC (rev 186289)
@@ -1,5 +1,17 @@
 2015-07-05  Devin Rousso  drou...@apple.com
 
+Web Inspector: Deleting in the CSS sidebar causes the warning icon to appear mid-word
+https://bugs.webkit.org/show_bug.cgi?id=146617
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleBeforeChange): Now removes all marks whenever the user deletes.
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded): The invalid marker now calculates
+it's position based off of where the semicolon is in the property text.
+
+2015-07-05  Devin Rousso  drou...@apple.com
+
 Web Inspector: CSS rule with 2 pseudo-selectors appears twice
 https://bugs.webkit.org/show_bug.cgi?id=146576
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js (186288 => 186289)

--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-05 18:23:44 UTC (rev 186288)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-05 18:46:54 UTC (rev 186289)
@@ -441,7 +441,7 @@
 
 _handleBeforeChange(codeMirror, change)
 {
-if (change.origin !== +delete || change.to.ch)
+if (change.origin !== +delete)
 return CodeMirror.Pass;
 
 var marks = codeMirror.findMarksAt(change.to);
@@ -996,7 +996,8 @@
 
 if (propertyNameIsValid) {
 // The property's name is valid but its value is not (either it is not supported for this property or there is no value).
-var start = {line: from.line, ch: from.ch + property.name.length + 2};
+var semicolon = /:\s*/.exec(property.text);
+var start = {line: from.line, ch: semicolon.index + semicolon[0].length};
 var end = {line: to.line, ch: start.ch + property.value.length};
 
 this._codeMirror.markText(start, end, {className: invalid});






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [186227] trunk/Source/WebInspectorUI

2015-07-02 Thread drousso
Title: [186227] trunk/Source/WebInspectorUI








Revision 186227
Author drou...@apple.com
Date 2015-07-02 10:31:57 -0700 (Thu, 02 Jul 2015)


Log Message
Web Inspector: Show suggest popover on Tab press even if it wasn't showing before
https://bugs.webkit.org/show_bug.cgi?id=146496

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleTabKey): Pressing tab will try to autocomplete before trying
to add an ending colon/semicolon or highlight the next section of text.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186226 => 186227)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-02 16:04:01 UTC (rev 186226)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-02 17:31:57 UTC (rev 186227)
@@ -1,3 +1,14 @@
+2015-07-02  Devin Rousso  drou...@apple.com
+
+Web Inspector: Show suggest popover on Tab press even if it wasn't showing before
+https://bugs.webkit.org/show_bug.cgi?id=146496
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleTabKey): Pressing tab will try to autocomplete before trying
+to add an ending colon/semicolon or highlight the next section of text.
+
 2015-07-01  Joseph Pecoraro  pecor...@apple.com
 
 Web Inspector: Aggregate profile call information on the backend to drastically reduce profile sizes


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js (186226 => 186227)

--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-02 16:04:01 UTC (rev 186226)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-02 17:31:57 UTC (rev 186227)
@@ -556,30 +556,30 @@
 var hasEndingSemicolon = trimmedLine.endsWith(;);
 
 if (cursor.ch = line.trimRight().length - hasEndingSemicolon) {
-if (!line.includes(:)) {
-codeMirror.setCursor(cursor.line, line.length);
-codeMirror.replaceRange(: , cursor);
-return;
-}
+this._completionController.completeAtCurrentPositionIfNeeded().then(function(result) {
+if (result !== WebInspector.CodeMirrorCompletionController.UpdatePromise.NoCompletionsFound)
+return;
 
-var replacement = ;
+var replacement = ;
 
-if (!hasEndingSemicolon)
-replacement += ;;
+if (!hasEndingSemicolon)
+replacement += ;;
 
-if (lastLine)
-replacement += \n;
+if (lastLine)
+replacement += \n;
 
-if (replacement.length)
-codeMirror.replaceRange(replacement, {line: cursor.line, ch: trimmedLine.length});
+if (replacement.length)
+codeMirror.replaceRange(replacement, {line: cursor.line, ch: trimmedLine.length});
 
-if (!nextLine) {
-codeMirror.setCursor(cursor.line + 1, 0);
-return;
-}
+if (!nextLine) {
+codeMirror.setCursor(cursor.line + 1, 0);
+return;
+}
 
-var colon = nextLine.indexOf(:);
-codeMirror.setSelection({line: cursor.line + 1, ch: 0}, {line: cursor.line + 1, ch: colon  0 ? trimmedNextLine.length : colon});
+var colon = nextLine.indexOf(:);
+codeMirror.setSelection({line: cursor.line + 1, ch: 0}, {line: cursor.line + 1, ch: colon  0 ? trimmedNextLine.length : colon});
+}.bind(this));
+
 return;
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [186370] trunk/Source/WebInspectorUI

2015-07-06 Thread drousso
Title: [186370] trunk/Source/WebInspectorUI








Revision 186370
Author drou...@apple.com
Date 2015-07-06 12:55:38 -0700 (Mon, 06 Jul 2015)


Log Message
Web Inspector: Clearing the console does not remove the unread message icon
https://bugs.webkit.org/show_bug.cgi?id=146649

Reviewed by Timothy Hatcher.

* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._clearLog): Removes the unread class from all scope bar items.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186369 => 186370)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-06 19:45:26 UTC (rev 186369)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-06 19:55:38 UTC (rev 186370)
@@ -1,3 +1,13 @@
+2015-07-06  Devin Rousso  drou...@apple.com
+
+Web Inspector: Clearing the console does not remove the unread message icon
+https://bugs.webkit.org/show_bug.cgi?id=146649
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/LogContentView.js:
+(WebInspector.LogContentView.prototype._clearLog): Removes the unread class from all scope bar items.
+
 2015-07-02  Timothy Hatcher  timo...@apple.com
 
 Web Inspector: Add a dedicated Network tab that is always live


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js (186369 => 186370)

--- trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js	2015-07-06 19:45:26 UTC (rev 186369)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js	2015-07-06 19:55:38 UTC (rev 186370)
@@ -686,6 +686,9 @@
 
 _clearLog: function()
 {
+for (var item of this._scopeBar.items)
+item.element.classList.remove(unread);
+
 WebInspector.logManager.requestClearMessages();
 },
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [186212] trunk/Source/WebInspectorUI

2015-07-01 Thread drousso
Title: [186212] trunk/Source/WebInspectorUI








Revision 186212
Author drou...@apple.com
Date 2015-07-01 17:47:52 -0700 (Wed, 01 Jul 2015)


Log Message
Make the first click on a rule section create a newline for easy property addition
https://bugs.webkit.org/show_bug.cgi?id=146490

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._highlightNextNameOrValue):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleEnterKey): Inserts a semicolon if the line is missing one.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleMouseDown): If the user clicks on a property with the editor being
unfocused, the name/value containing the cursor will be highlighted.  If instead the user clicks at the end of a line, the
cursor's position is saved for mouseUp.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleMouseUp): If the mouseDown cursor position was saved and is equal
to the current cursor's position (the user did not drag), add a newline after the current line and place the cursor on that line.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleTabKey):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleTabKey.highlightNextNameOrValue): Deleted.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186211 => 186212)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-02 00:40:04 UTC (rev 186211)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-02 00:47:52 UTC (rev 186212)
@@ -1,3 +1,22 @@
+2015-07-01  Devin Rousso  drou...@apple.com
+
+Make the first click on a rule section create a newline for easy property addition
+https://bugs.webkit.org/show_bug.cgi?id=146490
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
+(WebInspector.CSSStyleDeclarationTextEditor):
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._highlightNextNameOrValue):
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleEnterKey): Inserts a semicolon if the line is missing one.
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleMouseDown): If the user clicks on a property with the editor being
+unfocused, the name/value containing the cursor will be highlighted.  If instead the user clicks at the end of a line, the
+cursor's position is saved for mouseUp.
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleMouseUp): If the mouseDown cursor position was saved and is equal
+to the current cursor's position (the user did not drag), add a newline after the current line and place the cursor on that line.
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleTabKey):
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleTabKey.highlightNextNameOrValue): Deleted.
+
 2015-06-30  Devin Rousso  drou...@apple.com
 
 Web Inspector: add  = $0 hint after selected element in main DOMTreeOutline


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js (186211 => 186212)

--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-02 00:40:04 UTC (rev 186211)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-02 00:47:52 UTC (rev 186212)
@@ -33,7 +33,11 @@
 this._element = element || document.createElement(div);
 this._element.classList.add(WebInspector.CSSStyleDeclarationTextEditor.StyleClassName);
 this._element.classList.add(WebInspector.SyntaxHighlightedStyleClassName);
+this._element.addEventListener(mousedown, this._handleMouseDown.bind(this));
+this._element.addEventListener(mouseup, this._handleMouseUp.bind(this));
 
+this._mouseDownCursorPosition = null;
+
 this._showsImplicitProperties = true;
 this._alwaysShowPropertyNames = {};
 this._filterResultPropertyNames = null;
@@ -58,6 +62,7 @@
 });
 
 this._codeMirror.addKeyMap({
+Enter: this._handleEnterKey.bind(this),
 Shift-Enter: this._insertNewlineAfterCurrentLine.bind(this),
 Shift-Tab: this._handleShiftTabKey.bind(this),
 Tab: this._handleTabKey.bind(this)
@@ -389,6 +394,68 @@
 
 // Private
 
+_highlightNextNameOrValue(codeMirror, cursor, text)
+{
+var match = text.match(/(?:[^:;\s]\s*)+/g);
+var firstMatch = text.indexOf(match[0]) + match[0].length;
+var nextHead = cursor.ch  firstMatch ? text.indexOf(match[0]) : text.indexOf(match[1]);
+var nextAnchor = cursor.ch  firstMatch ? firstMatch : text.indexOf(match[1]) + match[1].length;
+
+codeMirror.setSelection({line: 

[webkit-changes] [186463] trunk/Source/WebInspectorUI

2015-07-07 Thread drousso
Title: [186463] trunk/Source/WebInspectorUI








Revision 186463
Author drou...@apple.com
Date 2015-07-07 10:11:43 -0700 (Tue, 07 Jul 2015)


Log Message
Web Inspector: Regression: CSS autocompletion suggestion applies on pressing delete
https://bugs.webkit.org/show_bug.cgi?id=146672

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleBeforeChange): Now returns if completions are showing.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186462 => 186463)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-07 16:25:37 UTC (rev 186462)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-07 17:11:43 UTC (rev 186463)
@@ -1,3 +1,13 @@
+2015-07-07  Devin Rousso  drou...@apple.com
+
+Web Inspector: Regression: CSS autocompletion suggestion applies on pressing delete
+https://bugs.webkit.org/show_bug.cgi?id=146672
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleBeforeChange): Now returns if completions are showing.
+
 2015-07-07  Nikita Vasilyev  nvasil...@apple.com
 
 Web Inspector: Properly align checkboxes in the styles sidebar


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js (186462 => 186463)

--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-07 16:25:37 UTC (rev 186462)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-07 17:11:43 UTC (rev 186463)
@@ -441,7 +441,7 @@
 
 _handleBeforeChange(codeMirror, change)
 {
-if (change.origin !== +delete)
+if (change.origin !== +delete || this._completionController.isShowingCompletions())
 return CodeMirror.Pass;
 
 var marks = codeMirror.findMarksAt(change.to);






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [186466] trunk/Source/WebInspectorUI

2015-07-07 Thread drousso
Title: [186466] trunk/Source/WebInspectorUI








Revision 186466
Author drou...@apple.com
Date 2015-07-07 10:25:48 -0700 (Tue, 07 Jul 2015)


Log Message
Web Inspector: Option+Click not jumping to resource
https://bugs.webkit.org/show_bug.cgi?id=146498

Reviewed by Timothy Hatcher.

* UserInterface/Base/Main.js: Always show the tab which contains the represented object.
(WebInspector._domNodeWasInspected):
(WebInspector._frameWasAdded):
(WebInspector.showConsoleTab):
(WebInspector.showRepresentedObject): Removed forceShowTab parameter.
(WebInspector.showMainFrameDOMTree):
(WebInspector.showContentFlowDOMTree):
(WebInspector.showSourceCodeForFrame):
(WebInspector.showSourceCode):
(WebInspector.showSourceCodeLocation):
(WebInspector.showOriginalUnformattedSourceCodeLocation):
(WebInspector.showOriginalOrFormattedSourceCodeLocation):
(WebInspector.showOriginalOrFormattedSourceCodeTextRange):
(WebInspector.showResourceRequest):
* UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
(WebInspector.CodeMirrorTokenTrackingController.prototype._mouseButtonWasReleasedOverEditor):
* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.showMainResourceForFrame):
* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WebInspector.ComputedStyleDetailsPanel.prototype._goToContentFlowArrowWasClicked):
(WebInspector.ComputedStyleDetailsPanel):
* UserInterface/Views/ObjectTreeBaseTreeElement.js:
(WebInspector.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject):
(WebInspector.ObjectTreeBaseTreeElement):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Base/Main.js
trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorTokenTrackingController.js
trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js
trunk/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js
trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186465 => 186466)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-07 17:22:28 UTC (rev 186465)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-07 17:25:48 UTC (rev 186466)
@@ -1,5 +1,37 @@
 2015-07-07  Devin Rousso  drou...@apple.com
 
+Web Inspector: Option+Click not jumping to resource
+https://bugs.webkit.org/show_bug.cgi?id=146498
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Base/Main.js: Always show the tab which contains the represented object.
+(WebInspector._domNodeWasInspected):
+(WebInspector._frameWasAdded):
+(WebInspector.showConsoleTab):
+(WebInspector.showRepresentedObject): Removed forceShowTab parameter.
+(WebInspector.showMainFrameDOMTree):
+(WebInspector.showContentFlowDOMTree):
+(WebInspector.showSourceCodeForFrame):
+(WebInspector.showSourceCode):
+(WebInspector.showSourceCodeLocation):
+(WebInspector.showOriginalUnformattedSourceCodeLocation):
+(WebInspector.showOriginalOrFormattedSourceCodeLocation):
+(WebInspector.showOriginalOrFormattedSourceCodeTextRange):
+(WebInspector.showResourceRequest):
+* UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
+(WebInspector.CodeMirrorTokenTrackingController.prototype._mouseButtonWasReleasedOverEditor):
+* UserInterface/Protocol/InspectorFrontendAPI.js:
+(InspectorFrontendAPI.showMainResourceForFrame):
+* UserInterface/Views/ComputedStyleDetailsPanel.js:
+(WebInspector.ComputedStyleDetailsPanel.prototype._goToContentFlowArrowWasClicked):
+(WebInspector.ComputedStyleDetailsPanel):
+* UserInterface/Views/ObjectTreeBaseTreeElement.js:
+(WebInspector.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject):
+(WebInspector.ObjectTreeBaseTreeElement):
+
+2015-07-07  Devin Rousso  drou...@apple.com
+
 Web Inspector: Regression: CSS autocompletion suggestion applies on pressing delete
 https://bugs.webkit.org/show_bug.cgi?id=146672
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (186465 => 186466)

--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js	2015-07-07 17:22:28 UTC (rev 186465)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js	2015-07-07 17:25:48 UTC (rev 186466)
@@ -761,7 +761,7 @@
 if (requestedScope || !this.consoleContentView.scopeBar.selectedItems.length)
 this.consoleContentView.scopeBar.item(scope).selected = true;
 
-this.showRepresentedObject(this._consoleRepresentedObject, null, true);
+this.showRepresentedObject(this._consoleRepresentedObject);
 
 console.assert(this.isShowingConsoleTab());
 };
@@ -923,33 +923,31 @@
 return tabContentView;
 };
 
-WebInspector.showRepresentedObject = function(representedObject, cookie, forceShowTab)
+WebInspector.showRepresentedObject = function(representedObject, cookie)
 {
 

[webkit-changes] [186468] trunk/Source/WebInspectorUI

2015-07-07 Thread drousso
Title: [186468] trunk/Source/WebInspectorUI








Revision 186468
Author drou...@apple.com
Date 2015-07-07 11:28:45 -0700 (Tue, 07 Jul 2015)


Log Message
Web Inspector: Tabbing in the styles sidebar doesn't highlight the next section of text
https://bugs.webkit.org/show_bug.cgi?id=146676

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._highlightNextNameOrValue): Modified the logic to only search the
remaining text after the current cursor position.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleShiftTabKey): Now only searches for matches before the colon.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186467 => 186468)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-07 17:28:26 UTC (rev 186467)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-07 18:28:45 UTC (rev 186468)
@@ -1,5 +1,17 @@
 2015-07-07  Devin Rousso  drou...@apple.com
 
+Web Inspector: Tabbing in the styles sidebar doesn't highlight the next section of text
+https://bugs.webkit.org/show_bug.cgi?id=146676
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._highlightNextNameOrValue): Modified the logic to only search the
+remaining text after the current cursor position.
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleShiftTabKey): Now only searches for matches before the colon.
+
+2015-07-07  Devin Rousso  drou...@apple.com
+
 Web Inspector: Option+Click not jumping to resource
 https://bugs.webkit.org/show_bug.cgi?id=146498
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js (186467 => 186468)

--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-07 17:28:26 UTC (rev 186467)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-07 18:28:45 UTC (rev 186468)
@@ -397,12 +397,14 @@
 
 _highlightNextNameOrValue(codeMirror, cursor, text)
 {
-var match = text.match(/(?:[^:;\s]\s*)+/g);
-var firstMatch = text.indexOf(match[0]) + match[0].length;
-var nextHead = cursor.ch  firstMatch ? text.indexOf(match[0]) : text.indexOf(match[1]);
-var nextAnchor = cursor.ch  firstMatch ? firstMatch : text.indexOf(match[1]) + match[1].length;
+var colonIndex = text.indexOf(:);
+var substringIndex = colonIndex = 0  cursor.ch = colonIndex ? colonIndex : 0;
 
-codeMirror.setSelection({line: cursor.line, ch: nextHead}, {line: cursor.line, ch: nextAnchor});
+var regExp = /(?:[^:;\s]\s*)+/g;
+regExp.lastIndex = substringIndex;
+var match = regExp.exec(text);
+
+codeMirror.setSelection({line: cursor.line, ch: match.index}, {line: cursor.line, ch: match.index + match[0].length});
 }
 
 _handleMouseDown(event)
@@ -525,12 +527,8 @@
 return switchRule.call(this);
 }
 
-var match = line.match(/(?:[^:;\s]\s*)+/g);
-var lastMatch = line.indexOf(match.lastValue) + match.lastValue.length;
-var prevHead = cursor.ch  lastMatch ? line.indexOf(match.lastValue) : line.indexOf(match[0]);
-var prevAnchor = cursor.ch  lastMatch ? lastMatch : line.indexOf(match[0]) + match[0].length;
-
-codeMirror.setSelection({line: cursor.line, ch: prevHead}, {line: cursor.line, ch: prevAnchor});
+var match = /(?:[^:;\s]\s*)+/.exec(line);
+codeMirror.setSelection({line: cursor.line, ch: match.index}, {line: cursor.line, ch: match.index + match[0].length});
 }
 
 _handleTabKey(codeMirror)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [187714] trunk/Source/WebInspectorUI

2015-08-01 Thread drousso
Title: [187714] trunk/Source/WebInspectorUI








Revision 187714
Author drou...@apple.com
Date 2015-07-31 23:48:27 -0700 (Fri, 31 Jul 2015)


Log Message
Web Inspector: inherited CSS rules disappear from Styles sidebar while editing
https://bugs.webkit.org/show_bug.cgi?id=147441

Reviewed by Timothy Hatcher.

If the user edits a style declaration such that it would dissapear mid-edit, prevent
the rules panel from refreshing until that editor is blurred.

* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection):
(WebInspector.CSSStyleDeclarationSection.prototype.get editorActive):
(WebInspector.CSSStyleDeclarationSection.prototype.get _hasInvalidSelector):
(WebInspector.CSSStyleDeclarationSection.prototype._editorContentChanged):
(WebInspector.CSSStyleDeclarationSection.prototype._editorBlurred):
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._editorBlured):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged):
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel):
(WebInspector.RulesStyleDetailsPanel.prototype._removeSectionWithActiveEditor):
* UserInterface/Views/StyleDetailsPanel.js:
(WebInspector.StyleDetailsPanel.prototype._refreshPreservingScrollPosition):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js
trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js
trunk/Source/WebInspectorUI/UserInterface/Views/StyleDetailsPanel.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (187713 => 187714)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-01 06:47:50 UTC (rev 187713)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-01 06:48:27 UTC (rev 187714)
@@ -1,5 +1,30 @@
 2015-07-31  Devin Rousso  drou...@apple.com
 
+Web Inspector: inherited CSS rules disappear from Styles sidebar while editing
+https://bugs.webkit.org/show_bug.cgi?id=147441
+
+Reviewed by Timothy Hatcher.
+
+If the user edits a style declaration such that it would dissapear mid-edit, prevent
+the rules panel from refreshing until that editor is blurred.
+
+* UserInterface/Views/CSSStyleDeclarationSection.js:
+(WebInspector.CSSStyleDeclarationSection):
+(WebInspector.CSSStyleDeclarationSection.prototype.get editorActive):
+(WebInspector.CSSStyleDeclarationSection.prototype.get _hasInvalidSelector):
+(WebInspector.CSSStyleDeclarationSection.prototype._editorContentChanged):
+(WebInspector.CSSStyleDeclarationSection.prototype._editorBlurred):
+* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._editorBlured):
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged):
+* UserInterface/Views/RulesStyleDetailsPanel.js:
+(WebInspector.RulesStyleDetailsPanel):
+(WebInspector.RulesStyleDetailsPanel.prototype._removeSectionWithActiveEditor):
+* UserInterface/Views/StyleDetailsPanel.js:
+(WebInspector.StyleDetailsPanel.prototype._refreshPreservingScrollPosition):
+
+2015-07-31  Devin Rousso  drou...@apple.com
+
 Web Inspector: Autocomplete: Undo (Cmd+Z) doesn't work as expected
 https://bugs.webkit.org/show_bug.cgi?id=147316
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js (187713 => 187714)

--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js	2015-08-01 06:47:50 UTC (rev 187713)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js	2015-08-01 06:48:27 UTC (rev 187714)
@@ -62,7 +62,10 @@
 this._propertiesElement = document.createElement(div);
 this._propertiesElement.className = properties;
 
+this._editorActive = false;
 this._propertiesTextEditor = new WebInspector.CSSStyleDeclarationTextEditor(this, style);
+this._propertiesTextEditor.addEventListener(WebInspector.CSSStyleDeclarationTextEditor.Event.ContentChanged, this._editorContentChanged.bind(this));
+this._propertiesTextEditor.addEventListener(WebInspector.CSSStyleDeclarationTextEditor.Event.Blurred, this._editorBlurred.bind(this));
 this._propertiesElement.appendChild(this._propertiesTextEditor.element);
 
 this._element.appendChild(this._headerElement);
@@ -386,6 +389,11 @@
 return !this._style.editable;
 },
 
+get editorActive()
+{
+return this._editorActive;
+},
+
 // Private
 
 get _currentSelectorText()
@@ -585,7 +593,22 @@
 get _hasInvalidSelector()
 {
 return this._element.classList.contains(WebInspector.CSSStyleDeclarationSection.SelectorInvalidClassName);
+},
+
+_editorContentChanged: function(event)
+{
+ 

[webkit-changes] [187708] trunk/Source/WebInspectorUI

2015-07-31 Thread drousso
Title: [187708] trunk/Source/WebInspectorUI








Revision 187708
Author drou...@apple.com
Date 2015-07-31 21:15:48 -0700 (Fri, 31 Jul 2015)


Log Message
Web Inspector: Autocomplete: Undo (Cmd+Z) doesn't work as expected
https://bugs.webkit.org/show_bug.cgi?id=147316

Reviewed by Timothy Hatcher.

Instead of replacing the text for a completion, which messes up the undo history, add
a unique marker that contains the remaining text for the current completion.

* UserInterface/Controllers/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._createCompletionHintMarker):
(WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint.update):
(WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint):
(WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.update):
(WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (187707 => 187708)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-01 04:06:30 UTC (rev 187707)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-01 04:15:48 UTC (rev 187708)
@@ -1,5 +1,22 @@
 2015-07-31  Devin Rousso  drou...@apple.com
 
+Web Inspector: Autocomplete: Undo (Cmd+Z) doesn't work as expected
+https://bugs.webkit.org/show_bug.cgi?id=147316
+
+Reviewed by Timothy Hatcher.
+
+Instead of replacing the text for a completion, which messes up the undo history, add
+a unique marker that contains the remaining text for the current completion.
+
+* UserInterface/Controllers/CodeMirrorCompletionController.js:
+(WebInspector.CodeMirrorCompletionController.prototype._createCompletionHintMarker):
+(WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint.update):
+(WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint):
+(WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.update):
+(WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint):
+
+2015-07-31  Devin Rousso  drou...@apple.com
+
 Web Inspector: Scrolling jumps in console
 https://bugs.webkit.org/show_bug.cgi?id=147482
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js (187707 => 187708)

--- trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js	2015-08-01 04:06:30 UTC (rev 187707)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js	2015-08-01 04:15:48 UTC (rev 187708)
@@ -245,6 +245,15 @@
 this._notifyCompletionsHiddenIfNeededTimeout = setTimeout(notify.bind(this), WebInspector.CodeMirrorCompletionController.CompletionsHiddenDelay);
 }
 
+_createCompletionHintMarker(position, text)
+{
+var container = document.createElement(span);
+container.classList.add(WebInspector.CodeMirrorCompletionController.CompletionHintStyleClassName);
+container.textContent = text;
+
+this._completionHintMarker = this._codeMirror.setUniqueBookmark(position, {widget: container, insertLeft: true});
+}
+
 _applyCompletionHint(completionText)
 {
 console.assert(completionText);
@@ -262,14 +271,11 @@
 var from = {line: this._lineNumber, ch: this._startOffset};
 var cursor = {line: this._lineNumber, ch: this._endOffset};
 var to = {line: this._lineNumber, ch: this._startOffset + replacementText.length};
+var currentText = this._codeMirror.getRange(from, cursor);
 
-this._codeMirror.replaceRange(replacementText, from, cursor, WebInspector.CodeMirrorCompletionController.CompletionOrigin);
-this._removeLastChangeFromHistory();
-
-this._codeMirror.setCursor(cursor);
-
+this._createCompletionHintMarker(cursor, replacementText.replace(currentText, ));
 if (cursor.ch !== to.ch)
-this._completionHintMarker = this._codeMirror.markText(cursor, to, {className: WebInspector.CodeMirrorCompletionController.CompletionHintStyleClassName});
+this._codeMirror.markText(cursor, to, {className: WebInspector.CodeMirrorCompletionController.CompletionHintStyleClassName});
 }
 
 this._ignoreChange = true;
@@ -339,13 +345,9 @@
 function update()
 {
 var range = this._completionHintMarker.find();
-if (range) {
+if (range)
 this._completionHintMarker.clear();
 
-this._codeMirror.replaceRange(, range.from, range.to, WebInspector.CodeMirrorCompletionController.DeleteCompletionOrigin);
-this._removeLastChangeFromHistory();
-}
-
 

[webkit-changes] [187700] trunk/Source/WebInspectorUI

2015-07-31 Thread drousso
Title: [187700] trunk/Source/WebInspectorUI








Revision 187700
Author drou...@apple.com
Date 2015-07-31 18:32:02 -0700 (Fri, 31 Jul 2015)


Log Message
Web Inspector: Scrolling jumps in console
https://bugs.webkit.org/show_bug.cgi?id=147482

Reviewed by Joseph Pecoraro.

Removed focus call on messageElement.

* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView):
(WebInspector.LogContentView.prototype._mousedown): Deleted.
(WebInspector.LogContentView.prototype._didFocus): Deleted.
(WebInspector.LogContentView.prototype._didBlur): Deleted.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (187699 => 187700)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-01 01:22:23 UTC (rev 187699)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-01 01:32:02 UTC (rev 187700)
@@ -1,3 +1,18 @@
+2015-07-31  Devin Rousso  drou...@apple.com
+
+Web Inspector: Scrolling jumps in console
+https://bugs.webkit.org/show_bug.cgi?id=147482
+
+Reviewed by Joseph Pecoraro.
+
+Removed focus call on messageElement.
+
+* UserInterface/Views/LogContentView.js:
+(WebInspector.LogContentView):
+(WebInspector.LogContentView.prototype._mousedown): Deleted.
+(WebInspector.LogContentView.prototype._didFocus): Deleted.
+(WebInspector.LogContentView.prototype._didBlur): Deleted.
+
 2015-07-31  Joseph Pecoraro  pecor...@apple.com
 
 Web Inspector: Unskip / Unflake inspector tests after r187627


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js (187699 => 187700)

--- trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js	2015-08-01 01:22:23 UTC (rev 187699)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js	2015-08-01 01:32:02 UTC (rev 187700)
@@ -42,8 +42,6 @@
 this.messagesElement.tabIndex = 0;
 this.messagesElement.setAttribute(role, log);
 this.messagesElement.addEventListener(mousedown, this._mousedown.bind(this));
-this.messagesElement.addEventListener(focus, this._didFocus.bind(this));
-this.messagesElement.addEventListener(blur, this._didBlur.bind(this));
 this.messagesElement.addEventListener(keydown, this._keyDown.bind(this));
 this.messagesElement.addEventListener(dragstart, this._ondragstart.bind(this), true);
 this.element.appendChild(this.messagesElement);
@@ -409,9 +407,6 @@
 return;
 }
 
-if (!this._focused)
-this.messagesElement.focus();
-
 this._mouseDownWrapper = event.target.enclosingNodeOrSelfWithClass(WebInspector.LogContentView.ItemWrapperStyleClassName);
 this._mouseDownShiftKey = event.shiftKey;
 this._mouseDownCommandKey = event.metaKey;
@@ -732,16 +727,6 @@
 this._performSearch();
 },
 
-_didFocus: function(event)
-{
-this._focused = true;
-},
-
-_didBlur: function(event)
-{
-this._focused = false;
-},
-
 _keyDown: function(event)
 {
 if (this._keyboardShortcutCommandA.matchesEvent(event))






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [188184] trunk/Source/WebInspectorUI

2015-08-07 Thread drousso
Title: [188184] trunk/Source/WebInspectorUI








Revision 188184
Author drou...@apple.com
Date 2015-08-07 20:45:21 -0700 (Fri, 07 Aug 2015)


Log Message
Web Inspector: Don't include zero-width space into a copied text from the console
https://bugs.webkit.org/show_bug.cgi?id=147767

Reviewed by Timothy Hatcher.

Now removes work break characters in generated _javascript_ text when copying
to the clipboard.  Also replaced var with let in the modified functions.

* UserInterface/Views/ConsoleCommandView.js:
(WebInspector.ConsoleCommandView.prototype.toClipboardString):
(WebInspector.ConsoleCommandView):
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype.toClipboardString):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleCommandView.js
trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188183 => 188184)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-08 03:06:52 UTC (rev 188183)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-08 03:45:21 UTC (rev 188184)
@@ -1,3 +1,19 @@
+2015-08-07  Devin Rousso  drou...@apple.com
+
+Web Inspector: Don't include zero-width space into a copied text from the console
+https://bugs.webkit.org/show_bug.cgi?id=147767
+
+Reviewed by Timothy Hatcher.
+
+Now removes work break characters in generated _javascript_ text when copying
+to the clipboard.  Also replaced var with let in the modified functions.
+
+* UserInterface/Views/ConsoleCommandView.js:
+(WebInspector.ConsoleCommandView.prototype.toClipboardString):
+(WebInspector.ConsoleCommandView):
+* UserInterface/Views/ConsoleMessageView.js:
+(WebInspector.ConsoleMessageView.prototype.toClipboardString):
+
 2015-08-07  Nikita Vasilyev  nvasil...@apple.com
 
 Web Inspector: Simplify OS-specific CSS class names


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleCommandView.js (188183 => 188184)

--- trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleCommandView.js	2015-08-08 03:06:52 UTC (rev 188183)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleCommandView.js	2015-08-08 03:45:21 UTC (rev 188184)
@@ -64,6 +64,6 @@
 
 toClipboardString(isPrefixOptional)
 {
-return (isPrefixOptional ?  :  ) + this._commandText;
+return (isPrefixOptional ?  :  ) + this._commandText.removeWordBreakCharacters();
 }
 };


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js (188183 => 188184)

--- trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js	2015-08-08 03:06:52 UTC (rev 188183)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js	2015-08-08 03:45:21 UTC (rev 188184)
@@ -185,12 +185,14 @@
 
 toClipboardString(isPrefixOptional)
 {
-var clipboardString = this._messageTextElement.innerText;
+let clipboardString = this._messageTextElement.innerText.removeWordBreakCharacters();
+if (this._message.savedResultIndex)
+clipboardString = clipboardString.replace(/\s*=\s*(\$\d+)$/,  = $1);
 
 if (this._message.type === WebInspector.ConsoleMessage.MessageType.Trace)
 clipboardString = console.trace();
 
-var hasStackTrace = this._shouldShowStackTrace();
+let hasStackTrace = this._shouldShowStackTrace();
 if (hasStackTrace) {
 this._message.stackTrace.callFrames.forEach(function(frame) {
 clipboardString += \n\t + (frame.functionName || WebInspector.UIString((anonymous function)));
@@ -198,10 +200,10 @@
 clipboardString +=  ( + WebInspector.displayNameForURL(frame.url) + , line  + frame.lineNumber + );
 });
 } else {
-var repeatString = this.repeatCount  1 ? x + this.repeatCount : ;
-var urlLine = ;
+let repeatString = this.repeatCount  1 ? x + this.repeatCount : ;
+let urlLine = ;
 if (this._message.url) {
-var components = [WebInspector.displayNameForURL(this._message.url), line  + this._message.line];
+let components = [WebInspector.displayNameForURL(this._message.url), line  + this._message.line];
 if (repeatString)
 components.push(repeatString);
 urlLine =  ( + components.join(, ) + );
@@ -209,7 +211,7 @@
 urlLine =  ( + repeatString + );
 
 if (urlLine) {
-var lines = clipboardString.split(\n);
+let lines = clipboardString.split(\n);
 lines[0] += urlLine;
 clipboardString = lines.join(\n);
 }






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [188188] trunk/Source/WebInspectorUI

2015-08-07 Thread drousso
Title: [188188] trunk/Source/WebInspectorUI








Revision 188188
Author drou...@apple.com
Date 2015-08-07 22:39:26 -0700 (Fri, 07 Aug 2015)


Log Message
Web Inspector: Decrease the padding of each rule in the Rules sidebar to allow more content to show
https://bugs.webkit.org/show_bug.cgi?id=147360

Reviewed by Timothy Hatcher.

Generally tightened the padding around each section in the rules panel, as well as the
content inside each section. Also moved the new rule button to be next to the filter bar.

* UserInterface/Views/CSSStyleDeclarationSection.css:
(.style-declaration-section):
(.style-declaration-section.last-in-group):
(.style-declaration-section.last-in-group + .style-declaration-section): Deleted.
* UserInterface/Views/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor):
* UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
(.sidebar  .panel.details.css-style  .content  .pseudo-classes):
(.sidebar  .panel.details.css-style  .content + .options-container):
(.sidebar  .panel.details.css-style  .content:not(.supports-new-rule, .has-filter-bar) + .options-container):
(.sidebar  .panel.details.css-style  .content + .options-container  .new-rule):
(.sidebar  .panel.details.css-style  .content + .options-container  .filter-bar):
(.sidebar  .panel.details.css-style  .content:not(.has-filter-bar) + .options-container  .filter-bar):
(.sidebar  .panel.details.css-style  .content.has-filter-bar + .filter-bar): Deleted.
(.sidebar  .panel.details.css-style  .content:not(.has-filter-bar) + .filter-bar): Deleted.
* UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._switchPanels):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._newRuleButtonClicked):
* UserInterface/Views/RulesStyleDetailsPanel.css:
(.sidebar  .panel.details.css-style .rules .label):
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh.insertMediaOrInheritanceLabel):
(WebInspector.RulesStyleDetailsPanel.prototype.newRuleButtonClicked):
(WebInspector.RulesStyleDetailsPanel.prototype.refresh.addNewRuleButton): Deleted.
(WebInspector.RulesStyleDetailsPanel.prototype.refresh): Deleted.
(WebInspector.RulesStyleDetailsPanel.prototype._newRuleClicked): Deleted.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.css
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.css
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDetailsSidebarPanel.css
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDetailsSidebarPanel.js
trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.css
trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188187 => 188188)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-08 05:39:06 UTC (rev 188187)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-08 05:39:26 UTC (rev 188188)
@@ -1,5 +1,43 @@
 2015-08-07  Devin Rousso  drou...@apple.com
 
+Web Inspector: Decrease the padding of each rule in the Rules sidebar to allow more content to show
+https://bugs.webkit.org/show_bug.cgi?id=147360
+
+Reviewed by Timothy Hatcher.
+
+Generally tightened the padding around each section in the rules panel, as well as the
+content inside each section. Also moved the new rule button to be next to the filter bar.
+
+* UserInterface/Views/CSSStyleDeclarationSection.css:
+(.style-declaration-section):
+(.style-declaration-section.last-in-group):
+(.style-declaration-section.last-in-group + .style-declaration-section): Deleted.
+* UserInterface/Views/CSSStyleDeclarationTextEditor.css:
+(.css-style-text-editor):
+* UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
+(.sidebar  .panel.details.css-style  .content  .pseudo-classes):
+(.sidebar  .panel.details.css-style  .content + .options-container):
+(.sidebar  .panel.details.css-style  .content:not(.supports-new-rule, .has-filter-bar) + .options-container):
+(.sidebar  .panel.details.css-style  .content + .options-container  .new-rule):
+(.sidebar  .panel.details.css-style  .content + .options-container  .filter-bar):
+(.sidebar  .panel.details.css-style  .content:not(.has-filter-bar) + .options-container  .filter-bar):
+(.sidebar  .panel.details.css-style  .content.has-filter-bar + .filter-bar): Deleted.
+(.sidebar  .panel.details.css-style  .content:not(.has-filter-bar) + .filter-bar): Deleted.
+* UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
+(WebInspector.CSSStyleDetailsSidebarPanel):
+(WebInspector.CSSStyleDetailsSidebarPanel.prototype._switchPanels):
+(WebInspector.CSSStyleDetailsSidebarPanel.prototype._newRuleButtonClicked):
+ 

[webkit-changes] [188191] trunk/Source/WebInspectorUI

2015-08-08 Thread drousso
Title: [188191] trunk/Source/WebInspectorUI








Revision 188191
Author drou...@apple.com
Date 2015-08-08 18:22:06 -0700 (Sat, 08 Aug 2015)


Log Message
Web Inspector: Don't show No Filter Results when timeline is empty
https://bugs.webkit.org/show_bug.cgi?id=147662

Reviewed by Timothy Hatcher.

* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.reset):
Now hides the empty content placeholder on timeline clear.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/TimelineView.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188190 => 188191)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-08 18:40:38 UTC (rev 188190)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-09 01:22:06 UTC (rev 188191)
@@ -1,3 +1,14 @@
+2015-08-08  Devin Rousso  drou...@apple.com
+
+Web Inspector: Don't show No Filter Results when timeline is empty
+https://bugs.webkit.org/show_bug.cgi?id=147662
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/TimelineView.js:
+(WebInspector.TimelineView.prototype.reset):
+Now hides the empty content placeholder on timeline clear.
+
 2015-08-07  Devin Rousso  drou...@apple.com
 
 Web Inspector: Decrease the padding of each rule in the Rules sidebar to allow more content to show


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineView.js (188190 => 188191)

--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineView.js	2015-08-08 18:40:38 UTC (rev 188190)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineView.js	2015-08-09 01:22:06 UTC (rev 188191)
@@ -157,6 +157,7 @@
 reset()
 {
 this._contentTreeOutline.removeChildren();
+this._timelineSidebarPanel.hideEmptyContentPlaceholder();
 }
 
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [188192] trunk/Source/WebInspectorUI

2015-08-08 Thread drousso
Title: [188192] trunk/Source/WebInspectorUI








Revision 188192
Author drou...@apple.com
Date 2015-08-08 19:06:07 -0700 (Sat, 08 Aug 2015)


Log Message
Web Inspector: Timeline ruler handle tooltip shows wrong value when handles overlap
https://bugs.webkit.org/show_bug.cgi?id=147652

Reviewed by Timothy Hatcher.

* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype._updateSelection):
Now changes the title depending on whether the selection start/end is clamped.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRuler.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188191 => 188192)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-09 01:22:06 UTC (rev 188191)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-09 02:06:07 UTC (rev 188192)
@@ -1,5 +1,16 @@
 2015-08-08  Devin Rousso  drou...@apple.com
 
+Web Inspector: Timeline ruler handle tooltip shows wrong value when handles overlap
+https://bugs.webkit.org/show_bug.cgi?id=147652
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/TimelineRuler.js:
+(WebInspector.TimelineRuler.prototype._updateSelection):
+Now changes the title depending on whether the selection start/end is clamped.
+
+2015-08-08  Devin Rousso  drou...@apple.com
+
 Web Inspector: Don't show No Filter Results when timeline is empty
 https://bugs.webkit.org/show_bug.cgi?id=147662
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRuler.js (188191 => 188192)

--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRuler.js	2015-08-09 01:22:06 UTC (rev 188191)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRuler.js	2015-08-09 02:06:07 UTC (rev 188192)
@@ -587,21 +587,27 @@
 if (!this._allowsTimeRangeSelection)
 return;
 
-var newLeftPosition = Math.max(0, (this._selectionStartTime - this._startTime) / duration);
+let startTimeClamped = this._selectionStartTime  this._startTime;
+let endTimeClamped = this._selectionEndTime  this._endTime;
+
+let formattedStartTimeText = this._formatDividerLabelText(this._selectionStartTime);
+let formattedEndTimeText = this._formatDividerLabelText(this._selectionEndTime);
+
+let newLeftPosition = Math.max(0, (this._selectionStartTime - this._startTime) / duration);
 this._updatePositionOfElement(this._leftShadedAreaElement, newLeftPosition, visibleWidth, width);
 this._updatePositionOfElement(this._leftSelectionHandleElement, newLeftPosition, visibleWidth, left);
 this._updatePositionOfElement(this._selectionDragElement, newLeftPosition, visibleWidth, left);
 
-this._leftSelectionHandleElement.classList.toggle(clamped, this._selectionStartTime  this._startTime);
-this._leftSelectionHandleElement.title = this._selectionStartTime  this._startTime ? this._formatDividerLabelText(this._selectionStartTime) : ;
+this._leftSelectionHandleElement.classList.toggle(clamped, startTimeClamped);
+this._leftSelectionHandleElement.title = startTimeClamped   this._selectionEndTime  this._startTime ? formattedEndTimeText : formattedStartTimeText;
 
-var newRightPosition = 1 - Math.min((this._selectionEndTime - this._startTime) / duration, 1);
+let newRightPosition = 1 - Math.min((this._selectionEndTime - this._startTime) / duration, 1);
 this._updatePositionOfElement(this._rightShadedAreaElement, newRightPosition, visibleWidth, width);
 this._updatePositionOfElement(this._rightSelectionHandleElement, newRightPosition, visibleWidth, right);
 this._updatePositionOfElement(this._selectionDragElement, newRightPosition, visibleWidth, right);
 
-this._rightSelectionHandleElement.classList.toggle(clamped, this._selectionEndTime  this._endTime);
-this._rightSelectionHandleElement.title = this._selectionEndTime  this._endTime ? this._formatDividerLabelText(this._selectionEndTime) : ;
+this._rightSelectionHandleElement.classList.toggle(clamped, endTimeClamped);
+this._rightSelectionHandleElement.title = endTimeClamped  this._selectionStartTime  this._endTime ? formattedStartTimeText : formattedEndTimeText;
 
 if (!this._selectionDragElement.parentNode) {
 this._element.appendChild(this._selectionDragElement);






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [188372] trunk/Source/WebInspectorUI

2015-08-12 Thread drousso
Title: [188372] trunk/Source/WebInspectorUI








Revision 188372
Author drou...@apple.com
Date 2015-08-12 19:08:47 -0700 (Wed, 12 Aug 2015)


Log Message
Web Inspector: Opening the Elements tab without a selected sidebar panel causes a crash
https://bugs.webkit.org/show_bug.cgi?id=147965

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel):
If the saved setting for the selectedPanel does not exist, default to the rules panel.

(WebInspector.CSSStyleDetailsSidebarPanel.prototype._switchPanels):
Only save the new navigationItem info if the selectedPanel exists.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDetailsSidebarPanel.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188371 => 188372)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-13 01:38:43 UTC (rev 188371)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-13 02:08:47 UTC (rev 188372)
@@ -1,3 +1,17 @@
+2015-08-12  Devin Rousso  drou...@apple.com
+
+Web Inspector: Opening the Elements tab without a selected sidebar panel causes a crash
+https://bugs.webkit.org/show_bug.cgi?id=147965
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
+(WebInspector.CSSStyleDetailsSidebarPanel):
+If the saved setting for the selectedPanel does not exist, default to the rules panel.
+
+(WebInspector.CSSStyleDetailsSidebarPanel.prototype._switchPanels):
+Only save the new navigationItem info if the selectedPanel exists.
+
 2015-08-12  Matt Baker  mattba...@apple.com
 
 Web Inspector: Remove clamp and adopt Number.constrain


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDetailsSidebarPanel.js (188371 => 188372)

--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDetailsSidebarPanel.js	2015-08-13 01:38:43 UTC (rev 188371)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDetailsSidebarPanel.js	2015-08-13 02:08:47 UTC (rev 188372)
@@ -77,7 +77,10 @@
 
 this._lastSelectedSectionSetting = new WebInspector.Setting(last-selected-style-details-panel, this._rulesStyleDetailsPanel.navigationInfo.identifier);
 
-var selectedPanel = this._panelMatchingIdentifier(this._lastSelectedSectionSetting.value);
+let selectedPanel = this._panelMatchingIdentifier(this._lastSelectedSectionSetting.value);
+if (!selectedPanel)
+selectedPanel = this._rulesStyleDetailsPanel;
+
 this._switchPanels(selectedPanel);
 
 this._navigationItem = new WebInspector.ScopeRadioButtonNavigationItem(this._identifier, this._displayName, this._panelNavigationInfo, selectedPanel.navigationInfo);
@@ -241,9 +244,9 @@
 
 this.contentElement.classList.toggle(supports-new-rule, typeof this._selectedPanel.newRuleButtonClicked === function);
 this._selectedPanel.shown();
+
+this._lastSelectedSectionSetting.value = selectedPanel.navigationInfo.identifier;
 }
-
-this._lastSelectedSectionSetting.value = selectedPanel.navigationInfo.identifier;
 }
 
 _forcedPseudoClassCheckboxChanged(pseudoClass, event)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [188572] trunk/Source/WebInspectorUI

2015-08-17 Thread drousso
Title: [188572] trunk/Source/WebInspectorUI








Revision 188572
Author drou...@apple.com
Date 2015-08-17 21:12:15 -0700 (Mon, 17 Aug 2015)


Log Message
Web Inspector: Style changes to Visual sidebar selector items
https://bugs.webkit.org/show_bug.cgi?id=148114

Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype._updateTitleElements):
(WebInspector.GeneralTreeElement.prototype._updateTitleTooltip):
Moved the code to update the item tooltip to its own function.

* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype._addMetricsMouseListeners.editorMouseover):
(WebInspector.VisualStyleDetailsPanel.prototype._addMetricsMouseListeners.editorMouseout):
(WebInspector.VisualStyleDetailsPanel.prototype._addMetricsMouseListeners):
(WebInspector.VisualStyleDetailsPanel.prototype._generateMetricSectionRows):
(WebInspector.VisualStyleDetailsPanel.prototype._populateMarginSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populatePaddingSection):
(WebInspector.VisualStyleDetailsPanel.prototype._addMetricsMouseListeners.onEditorMouseover): Deleted.
(WebInspector.VisualStyleDetailsPanel.prototype._addMetricsMouseListeners.onEditorMouseout): Deleted.
Added on-hover node/selector highlighting to margin and padding editor links.

* UserInterface/Views/VisualStyleNumberInputBox.js:
(WebInspector.VisualStyleNumberInputBox):
Replaced No Units with Number for better clarity.

* UserInterface/Views/VisualStyleSelectorTreeItem.css:
(body:not(.window-inactive, .window-docked-inactive) .item.visual-style-selector-item.selected  input[type=checkbox]:checked::before):
(.item.visual-style-selector-item.selected  input[type=checkbox]::before): Deleted.
Removes the white border when the window is inactive and when the checkbox is unchecked.

* UserInterface/Views/VisualStyleSelectorTreeItem.js:
(WebInspector.VisualStyleSelectorTreeItem.prototype._commitSelector):
Now updates the title of the item when the selector changes.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
trunk/Source/WebInspectorUI/UserInterface/Views/GeneralTreeElement.js
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleNumberInputBox.js
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.css
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188571 => 188572)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-18 04:11:09 UTC (rev 188571)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-18 04:12:15 UTC (rev 188572)
@@ -1,5 +1,42 @@
 2015-08-17  Devin Rousso  drou...@apple.com
 
+Web Inspector: Style changes to Visual sidebar selector items
+https://bugs.webkit.org/show_bug.cgi?id=148114
+
+Reviewed by Timothy Hatcher.
+
+* Localizations/en.lproj/localizedStrings.js:
+* UserInterface/Views/GeneralTreeElement.js:
+(WebInspector.GeneralTreeElement.prototype._updateTitleElements):
+(WebInspector.GeneralTreeElement.prototype._updateTitleTooltip):
+Moved the code to update the item tooltip to its own function.
+
+* UserInterface/Views/VisualStyleDetailsPanel.js:
+(WebInspector.VisualStyleDetailsPanel.prototype._addMetricsMouseListeners.editorMouseover):
+(WebInspector.VisualStyleDetailsPanel.prototype._addMetricsMouseListeners.editorMouseout):
+(WebInspector.VisualStyleDetailsPanel.prototype._addMetricsMouseListeners):
+(WebInspector.VisualStyleDetailsPanel.prototype._generateMetricSectionRows):
+(WebInspector.VisualStyleDetailsPanel.prototype._populateMarginSection):
+(WebInspector.VisualStyleDetailsPanel.prototype._populatePaddingSection):
+(WebInspector.VisualStyleDetailsPanel.prototype._addMetricsMouseListeners.onEditorMouseover): Deleted.
+(WebInspector.VisualStyleDetailsPanel.prototype._addMetricsMouseListeners.onEditorMouseout): Deleted.
+Added on-hover node/selector highlighting to margin and padding editor links.
+
+* UserInterface/Views/VisualStyleNumberInputBox.js:
+(WebInspector.VisualStyleNumberInputBox):
+Replaced No Units with Number for better clarity.
+
+* UserInterface/Views/VisualStyleSelectorTreeItem.css:
+(body:not(.window-inactive, .window-docked-inactive) .item.visual-style-selector-item.selected  input[type=checkbox]:checked::before):
+(.item.visual-style-selector-item.selected  input[type=checkbox]::before): Deleted.
+Removes the white border when the window is inactive and when the checkbox is unchecked.
+
+* UserInterface/Views/VisualStyleSelectorTreeItem.js:
+

[webkit-changes] [188573] trunk/Source/WebInspectorUI

2015-08-17 Thread drousso
Title: [188573] trunk/Source/WebInspectorUI








Revision 188573
Author drou...@apple.com
Date 2015-08-17 21:13:56 -0700 (Mon, 17 Aug 2015)


Log Message
Web Inspector: font-family list is backwards in visual sidebar
https://bugs.webkit.org/show_bug.cgi?id=148101

Reviewed by Timothy Hatcher.

* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._addCommaSeparatedKeyword):
Now appends new children if the current index is not set instead of inserting them.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188572 => 188573)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-18 04:12:15 UTC (rev 188572)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-18 04:13:56 UTC (rev 188573)
@@ -1,5 +1,16 @@
 2015-08-17  Devin Rousso  drou...@apple.com
 
+Web Inspector: font-family list is backwards in visual sidebar
+https://bugs.webkit.org/show_bug.cgi?id=148101
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
+(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._addCommaSeparatedKeyword):
+Now appends new children if the current index is not set instead of inserting them.
+
+2015-08-17  Devin Rousso  drou...@apple.com
+
 Web Inspector: Style changes to Visual sidebar selector items
 https://bugs.webkit.org/show_bug.cgi?id=148114
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js (188572 => 188573)

--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js	2015-08-18 04:12:15 UTC (rev 188572)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js	2015-08-18 04:13:56 UTC (rev 188573)
@@ -171,8 +171,11 @@
 _addCommaSeparatedKeyword(value, index)
 {
 let valueElement = this._createNewTreeElement(value);
-let indexIsSet = !isNaN(index);
-this._commaSeparatedKeywords.insertChild(valueElement, indexIsSet ? index + !this._insertNewItemsBeforeSelected : 0);
+if (!isNaN(index))
+this._commaSeparatedKeywords.insertChild(valueElement, index + !this._insertNewItemsBeforeSelected);
+else
+this._commaSeparatedKeywords.appendChild(valueElement);
+
 return valueElement;
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [188570] trunk/Source/WebInspectorUI

2015-08-17 Thread drousso
Title: [188570] trunk/Source/WebInspectorUI








Revision 188570
Author drou...@apple.com
Date 2015-08-17 21:08:47 -0700 (Mon, 17 Aug 2015)


Log Message
Web Inspector: web fonts or unknown fonts show up as Times in visual sidebar
https://bugs.webkit.org/show_bug.cgi?id=148103

Reviewed by Timothy Hatcher.

* UserInterface/Views/VisualStyleFontFamilyTreeElement.js:
(WebInspector.VisualStyleFontFamilyTreeElement.prototype.updateMainTitle):
Fonts now fall back to sans-serif and -apple-system if they do not exist.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleFontFamilyTreeElement.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188569 => 188570)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-18 02:44:14 UTC (rev 188569)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-18 04:08:47 UTC (rev 188570)
@@ -1,3 +1,14 @@
+2015-08-17  Devin Rousso  drou...@apple.com
+
+Web Inspector: web fonts or unknown fonts show up as Times in visual sidebar
+https://bugs.webkit.org/show_bug.cgi?id=148103
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/VisualStyleFontFamilyTreeElement.js:
+(WebInspector.VisualStyleFontFamilyTreeElement.prototype.updateMainTitle):
+Fonts now fall back to sans-serif and -apple-system if they do not exist.
+
 2015-08-17  Myles C. Maxfield  mmaxfi...@apple.com
 
 Implement IntegerHasher


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleFontFamilyTreeElement.js (188569 => 188570)

--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleFontFamilyTreeElement.js	2015-08-18 02:44:14 UTC (rev 188569)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleFontFamilyTreeElement.js	2015-08-18 04:08:47 UTC (rev 188570)
@@ -51,7 +51,8 @@
 
 updateMainTitle(text)
 {
-this.mainTitle = this._listItemNode.style.fontFamily = this._keywordEditor.value = text;
+this.mainTitle = this._keywordEditor.value = text;
+this._listItemNode.style.fontFamily = text + ,  + WebInspector.VisualStyleFontFamilyTreeElement.FontFamilyFallback;
 
 let hasText = text  text.length;
 this._listItemNode.classList.toggle(no-value, !hasText);
@@ -160,6 +161,8 @@
 }
 };
 
+WebInspector.VisualStyleFontFamilyTreeElement.FontFamilyFallback = -apple-system, sans-serif;
+
 WebInspector.VisualStyleFontFamilyTreeElement.Event = {
 KeywordChanged: visual-style-font-family-tree-element-keyword-changed,
 EditorKeyDown: visual-style-font-family-tree-element-editor-key-down,






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [188571] trunk/Source/WebInspectorUI

2015-08-17 Thread drousso
Title: [188571] trunk/Source/WebInspectorUI








Revision 188571
Author drou...@apple.com
Date 2015-08-17 21:11:09 -0700 (Mon, 17 Aug 2015)


Log Message
Web Inspector: delete key should work on multi-values visual sidebar grid sections
https://bugs.webkit.org/show_bug.cgi?id=148110

Reviewed by Timothy Hatcher.

* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
(WebInspector.VisualStyleCommaSeparatedKeywordEditor):
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._listElementKeyDown):
If the backspace/delete key is pressed when focus is within the list element, delete
the selected list item if it is not currently being edited (if it has an editor).

* UserInterface/Views/VisualStyleFontFamilyTreeElement.js:
(WebInspector.VisualStyleFontFamilyTreeElement.prototype.get currentlyEditing):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleFontFamilyTreeElement.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188570 => 188571)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-18 04:08:47 UTC (rev 188570)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-18 04:11:09 UTC (rev 188571)
@@ -1,5 +1,21 @@
 2015-08-17  Devin Rousso  drou...@apple.com
 
+Web Inspector: delete key should work on multi-values visual sidebar grid sections
+https://bugs.webkit.org/show_bug.cgi?id=148110
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
+(WebInspector.VisualStyleCommaSeparatedKeywordEditor):
+(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._listElementKeyDown):
+If the backspace/delete key is pressed when focus is within the list element, delete
+the selected list item if it is not currently being edited (if it has an editor).
+
+* UserInterface/Views/VisualStyleFontFamilyTreeElement.js:
+(WebInspector.VisualStyleFontFamilyTreeElement.prototype.get currentlyEditing):
+
+2015-08-17  Devin Rousso  drou...@apple.com
+
 Web Inspector: web fonts or unknown fonts show up as Times in visual sidebar
 https://bugs.webkit.org/show_bug.cgi?id=148103
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js (188570 => 188571)

--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js	2015-08-18 04:08:47 UTC (rev 188570)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js	2015-08-18 04:11:09 UTC (rev 188571)
@@ -33,6 +33,7 @@
 
 let listElement = document.createElement(ol);
 listElement.classList.add(visual-style-comma-separated-keyword-list);
+listElement.addEventListener(keydown, this._listElementKeyDown.bind(this));
 this.contentElement.appendChild(listElement);
 
 this._commaSeparatedKeywords = new WebInspector.TreeOutline(listElement);
@@ -114,6 +115,22 @@
 
 // Private
 
+_listElementKeyDown(event)
+{
+let selectedTreeElement = this._commaSeparatedKeywords.selectedTreeElement;
+if (!selectedTreeElement)
+return;
+
+if (selectedTreeElement.currentlyEditing)
+return;
+
+let keyCode = event.keyCode;
+let backspaceKeyCode = WebInspector.KeyboardShortcut.Key.Backspace.keyCode;
+let deleteKeyCode = WebInspector.KeyboardShortcut.Key.Delete.keyCode;
+if (keyCode === backspaceKeyCode || keyCode === deleteKeyCode)
+this._removeSelectedCommaSeparatedKeyword();
+}
+
 _treeElementSelected(item, selectedByUser)
 {
 this._removeEmptyCommaSeparatedKeywords();


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleFontFamilyTreeElement.js (188570 => 188571)

--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleFontFamilyTreeElement.js	2015-08-18 04:08:47 UTC (rev 188570)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleFontFamilyTreeElement.js	2015-08-18 04:11:09 UTC (rev 188571)
@@ -62,6 +62,11 @@
 this.dispatchEventToListeners(WebInspector.VisualStyleFontFamilyTreeElement.Event.KeywordChanged);
 }
 
+get currentlyEditing()
+{
+return !this.keywordEditorHidden;
+}
+
 showKeywordEditor()
 {
 if (!this.keywordEditorHidden)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [188586] trunk/Source/WebInspectorUI

2015-08-18 Thread drousso
Title: [188586] trunk/Source/WebInspectorUI








Revision 188586
Author drou...@apple.com
Date 2015-08-18 11:47:45 -0700 (Tue, 18 Aug 2015)


Log Message
Web Inspector: Better keyboard shortcut to focus on the console prompt
https://bugs.webkit.org/show_bug.cgi?id=147927

Reviewed by Brian Burg.

* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
(WebInspector._focusConsolePrompt):
Added a Control-Tilde keyboard shortcut to focus the console prompt.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Base/Main.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188585 => 188586)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-18 18:28:54 UTC (rev 188585)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-18 18:47:45 UTC (rev 188586)
@@ -1,3 +1,15 @@
+2015-08-18  Devin Rousso  drou...@apple.com
+
+Web Inspector: Better keyboard shortcut to focus on the console prompt
+https://bugs.webkit.org/show_bug.cgi?id=147927
+
+Reviewed by Brian Burg.
+
+* UserInterface/Base/Main.js:
+(WebInspector.contentLoaded):
+(WebInspector._focusConsolePrompt):
+Added a Control-Tilde keyboard shortcut to focus the console prompt.
+
 2015-08-18  Nikita Vasilyev  nvasil...@apple.com
 
 Web Inspector: Option-Enter should commit console command without erasing the prompt


Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (188585 => 188586)

--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js	2015-08-18 18:28:54 UTC (rev 188585)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js	2015-08-18 18:47:45 UTC (rev 188586)
@@ -244,7 +244,8 @@
 this._reloadPageKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, R, this._reloadPage.bind(this));
 this._reloadPageIgnoringCacheKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Shift, R, this._reloadPageIgnoringCache.bind(this));
 
-this._consoleKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.Option | WebInspector.KeyboardShortcut.Modifier.CommandOrControl, C, this._showConsoleTab.bind(this));
+this._consoleTabKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.Option | WebInspector.KeyboardShortcut.Modifier.CommandOrControl, C, this._showConsoleTab.bind(this));
+this._quickConsoleKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.Control, WebInspector.KeyboardShortcut.Key.Apostrophe, this._focusConsolePrompt.bind(this));
 
 this._inspectModeKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Shift, C, this._toggleInspectMode.bind(this));
 
@@ -1617,6 +1618,11 @@
 this.showConsoleTab();
 };
 
+WebInspector._focusConsolePrompt = function(event)
+{
+this.quickConsole.prompt.focus();
+};
+
 WebInspector._focusedContentView = function()
 {
 if (this.tabBrowser.element.isSelfOrAncestor(this.currentFocusElement)) {






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [188629] trunk/Source/WebInspectorUI

2015-08-18 Thread drousso
Title: [188629] trunk/Source/WebInspectorUI








Revision 188629
Author drou...@apple.com
Date 2015-08-18 21:54:10 -0700 (Tue, 18 Aug 2015)


Log Message
Web Inspector: Add support for positioning Visual editors on non-retina displays
https://bugs.webkit.org/show_bug.cgi?id=148160

Reviewed by Timothy Hatcher.

Cleans up the positioning, dimensions, and widths of the
Visual editors on non-retina displays.

* UserInterface/Views/VisualStyleColorPicker.css:
(.visual-style-property-container.input-color-picker  .visual-style-property-value-container  input):

* UserInterface/Views/VisualStyleDetailsPanel.css:
(.sidebar  .panel.details.css-style .visual  .details-section .details-section  .content .group  .row.visual-style-separated-row):
(@media (-webkit-min-device-pixel-ratio: 2)):

* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype._clearModifiedSection):

* UserInterface/Views/VisualStylePropertyEditorLink.css:
(.visual-style-property-editor-link):
(.visual-style-property-editor-link  .visual-style-property-editor-link-border.left):
(.visual-style-property-editor-link.link-all  .visual-style-property-editor-link-border.left):
(.visual-style-property-editor-link.link-all.linked  .visual-style-property-editor-link-border):
(.visual-style-property-editor-link  .visual-style-property-editor-link-icon):
(.visual-style-property-editor-link:not(.link-all)  .visual-style-property-editor-link-icon):
(@media (-webkit-min-device-pixel-ratio: 2)):
(.visual-style-property-editor-link.link-all.linked  .visual-style-property-editor-link-border.left):
(.visual-style-property-editor-link.link-all.linked  .visual-style-property-editor-link-icon:hover + .visual-style-property-editor-link-border.right): Deleted.
(.visual-style-property-editor-link.link-all.linked  .visual-style-property-editor-link-border.right): Deleted.
(.visual-style-property-editor-link.link-all  .visual-style-property-editor-link-icon): Deleted.

* UserInterface/Views/VisualStyleSelectorTreeItem.css:
(.item.visual-style-selector-item  input[type=checkbox]):
(.item.visual-style-selector-item  .icon):
(.item.visual-style-selector-item.selector-invalid  .titles  .title::before):
(@media (-webkit-min-device-pixel-ratio: 2)):
(.item.visual-style-selector-item  .titles):
(.item.visual-style-selector-item.selector-invalid  .icon): Deleted.

* UserInterface/Views/VisualStyleTimingEditor.css:
(.visual-style-property-container.timing-editor  .visual-style-property-value-container  .bezier-editor):
(@media (-webkit-min-device-pixel-ratio: 2)):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleColorPicker.css
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.css
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditorLink.css
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.css
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleTimingEditor.css




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188628 => 188629)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-19 04:50:38 UTC (rev 188628)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-19 04:54:10 UTC (rev 188629)
@@ -1,5 +1,52 @@
 2015-08-18  Devin Rousso  drou...@apple.com
 
+Web Inspector: Add support for positioning Visual editors on non-retina displays
+https://bugs.webkit.org/show_bug.cgi?id=148160
+
+Reviewed by Timothy Hatcher.
+
+Cleans up the positioning, dimensions, and widths of the
+Visual editors on non-retina displays.
+
+* UserInterface/Views/VisualStyleColorPicker.css:
+(.visual-style-property-container.input-color-picker  .visual-style-property-value-container  input):
+
+* UserInterface/Views/VisualStyleDetailsPanel.css:
+(.sidebar  .panel.details.css-style .visual  .details-section .details-section  .content .group  .row.visual-style-separated-row):
+(@media (-webkit-min-device-pixel-ratio: 2)):
+
+* UserInterface/Views/VisualStyleDetailsPanel.js:
+(WebInspector.VisualStyleDetailsPanel.prototype._clearModifiedSection):
+
+* UserInterface/Views/VisualStylePropertyEditorLink.css:
+(.visual-style-property-editor-link):
+(.visual-style-property-editor-link  .visual-style-property-editor-link-border.left):
+(.visual-style-property-editor-link.link-all  .visual-style-property-editor-link-border.left):
+(.visual-style-property-editor-link.link-all.linked  .visual-style-property-editor-link-border):
+(.visual-style-property-editor-link  .visual-style-property-editor-link-icon):
+(.visual-style-property-editor-link:not(.link-all)  .visual-style-property-editor-link-icon):
+(@media (-webkit-min-device-pixel-ratio: 2)):
+(.visual-style-property-editor-link.link-all.linked 

[webkit-changes] [188626] trunk/Source/WebInspectorUI

2015-08-18 Thread drousso
Title: [188626] trunk/Source/WebInspectorUI








Revision 188626
Author drou...@apple.com
Date 2015-08-18 21:35:31 -0700 (Tue, 18 Aug 2015)


Log Message
Web Inspector: Small Caps variant checkbox should be to the left of the Small Caps label
https://bugs.webkit.org/show_bug.cgi?id=148102

Reviewed by Timothy Hatcher.

* UserInterface/Views/VisualStyleKeywordCheckbox.css:
(.visual-style-property-container.keyword-checkbox.font-variant  .visual-style-property-value-container  input): Deleted.
(.visual-style-property-container.keyword-checkbox.font-variant  .visual-style-property-value-container  input::after):
(.visual-style-property-container.keyword-checkbox.font-variant  .visual-style-property-value-container  input::before): Deleted.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleKeywordCheckbox.css




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188625 => 188626)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-19 04:23:16 UTC (rev 188625)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-19 04:35:31 UTC (rev 188626)
@@ -1,5 +1,17 @@
 2015-08-18  Devin Rousso  drou...@apple.com
 
+Web Inspector: Small Caps variant checkbox should be to the left of the Small Caps label
+https://bugs.webkit.org/show_bug.cgi?id=148102
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/VisualStyleKeywordCheckbox.css:
+(.visual-style-property-container.keyword-checkbox.font-variant  .visual-style-property-value-container  input): Deleted.
+(.visual-style-property-container.keyword-checkbox.font-variant  .visual-style-property-value-container  input::after):
+(.visual-style-property-container.keyword-checkbox.font-variant  .visual-style-property-value-container  input::before): Deleted.
+
+2015-08-18  Devin Rousso  drou...@apple.com
+
 Web Inspector: Visual editor links should unlink when switching styles
 https://bugs.webkit.org/show_bug.cgi?id=148153
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleKeywordCheckbox.css (188625 => 188626)

--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleKeywordCheckbox.css	2015-08-19 04:23:16 UTC (rev 188625)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleKeywordCheckbox.css	2015-08-19 04:35:31 UTC (rev 188626)
@@ -33,14 +33,10 @@
 }
 
 /* Font Variant */
-.visual-style-property-container.keyword-checkbox.font-variant  .visual-style-property-value-container  input {
-margin-left: 47px;
-}
-
-.visual-style-property-container.keyword-checkbox.font-variant  .visual-style-property-value-container  input::before {
+.visual-style-property-container.keyword-checkbox.font-variant  .visual-style-property-value-container  input::after {
 position: absolute;
 top: 5px;
-left: 0;
+left: 15px;
 font-size: 9px;
 font-variant: small-caps;
 word-spacing: -2px;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [188630] trunk/Source/WebInspectorUI

2015-08-18 Thread drousso
Title: [188630] trunk/Source/WebInspectorUI








Revision 188630
Author drou...@apple.com
Date 2015-08-18 21:56:30 -0700 (Tue, 18 Aug 2015)


Log Message
Web Inspector: Add proper formatting for editing styles in the Visual Panel
https://bugs.webkit.org/show_bug.cgi?id=148147

Reviewed by Timothy Hatcher.

Editing styles in the Visual styles panel now preserves whitespace in the related resource file.

* UserInterface/Views/VisualStylePropertyCombiner.js:
(WebInspector.VisualStylePropertyCombiner):
(WebInspector.VisualStylePropertyCombiner.prototype.modifyPropertyText):

* UserInterface/Views/VisualStylePropertyEditor.js:
(WebInspector.VisualStylePropertyEditor):
(WebInspector.VisualStylePropertyEditor.generateFormattedTextForNewProperty):
(WebInspector.VisualStylePropertyEditor.prototype.modifyPropertyText):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyCombiner.js
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188629 => 188630)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-19 04:54:10 UTC (rev 188629)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-19 04:56:30 UTC (rev 188630)
@@ -1,5 +1,23 @@
 2015-08-18  Devin Rousso  drou...@apple.com
 
+Web Inspector: Add proper formatting for editing styles in the Visual Panel
+https://bugs.webkit.org/show_bug.cgi?id=148147
+
+Reviewed by Timothy Hatcher.
+
+Editing styles in the Visual styles panel now preserves whitespace in the related resource file.
+
+* UserInterface/Views/VisualStylePropertyCombiner.js:
+(WebInspector.VisualStylePropertyCombiner):
+(WebInspector.VisualStylePropertyCombiner.prototype.modifyPropertyText):
+
+* UserInterface/Views/VisualStylePropertyEditor.js:
+(WebInspector.VisualStylePropertyEditor):
+(WebInspector.VisualStylePropertyEditor.generateFormattedTextForNewProperty):
+(WebInspector.VisualStylePropertyEditor.prototype.modifyPropertyText):
+
+2015-08-18  Devin Rousso  drou...@apple.com
+
 Web Inspector: Add support for positioning Visual editors on non-retina displays
 https://bugs.webkit.org/show_bug.cgi?id=148160
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyCombiner.js (188629 => 188630)

--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyCombiner.js	2015-08-19 04:54:10 UTC (rev 188629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyCombiner.js	2015-08-19 04:56:30 UTC (rev 188630)
@@ -40,7 +40,7 @@
 }
 
 this._textContainsNameRegExp = new RegExp((?:(?:^|;)\\s* + this._propertyName + \\s*:));
-this._replacementRegExp = new RegExp((^|;)(?:\\s*)( + this._propertyName + )(.+?(?:;|$)));
+this._replacementRegExp = new RegExp(((?:^|;)\\s*)( + this._propertyName + )(.+?(?:;|$)));
 this._valueRegExp = /([^\s]+\(.+\)|[^\s]+)(?:;?)/g;
 }
 
@@ -80,12 +80,9 @@
 let trimmedText = text.trimRight();
 if (this._textContainsNameRegExp.test(text))
 text = text.replace(this._replacementRegExp, value !== null ? $1$2:  + value + ; : $1);
-else if (value !== null) {
-if (trimmedText.trimLeft().length  !trimmedText.endsWith(;))
-text += ;;
+else if (value !== null)
+text += WebInspector.VisualStylePropertyEditor.generateFormattedTextForNewProperty(text, this._propertyName, value);
 
-text += this._propertyName + :  + value + ;;
-}
 return text;
 }
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.js (188629 => 188630)

--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.js	2015-08-19 04:54:10 UTC (rev 188629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.js	2015-08-19 04:56:30 UTC (rev 188630)
@@ -108,7 +108,7 @@
 this._propertyInfoList.push({
 name,
 textContainsNameRegExp: new RegExp((?:(?:^|;)\\s* + name + \\s*:)),
-replacementRegExp: new RegExp((^|;)(?:\\s*)( + name + )(.+?(?:;|$)))
+replacementRegExp: new RegExp(((?:^|;)\\s*)( + name + )(.+?(?:;|$)))
 })
 }
 
@@ -118,6 +118,40 @@
 this._representedProperty = null;
 }
 
+// Static
+
+static generateFormattedTextForNewProperty(styleText, propertyName, propertyValue) {
+if (!propertyName || !propertyValue)
+return ;
+
+styleText = styleText || ;
+
+// FIXME: rdar://problem/10593948 Provide a way to change the tab width in the Web Inspector
+let linePrefixText = ;
+let lineSuffixWhitespace = \n;
+let trimmedText = styleText.trimRight();
+let textHasNewlines = trimmedText.includes(\n);
+
+if 

[webkit-changes] [188628] trunk/Source/WebInspectorUI

2015-08-18 Thread drousso
Title: [188628] trunk/Source/WebInspectorUI








Revision 188628
Author drou...@apple.com
Date 2015-08-18 21:50:38 -0700 (Tue, 18 Aug 2015)


Log Message
Web Inspector: Show the computed value in an overlay for numerical Visual Editors
https://bugs.webkit.org/show_bug.cgi?id=148161

Reviewed by Timothy Hatcher.

Adds an Unchanged option to the number-based Visual editors that shows the
computed value if it is not a number (it would therefore be a keyword).

* UserInterface/Views/VisualStyleNumberInputBox.css:
(.visual-style-property-container  .visual-style-property-value-container  .number-input-container):
(.visual-style-property-container  .visual-style-property-value-container  .number-input-container:not(.has-value)  span):

* UserInterface/Views/VisualStyleNumberInputBox.js:
(WebInspector.VisualStyleNumberInputBox):
(WebInspector.VisualStyleNumberInputBox.prototype.set value):
(WebInspector.VisualStyleNumberInputBox.prototype.get units):
(WebInspector.VisualStyleNumberInputBox.prototype.set units):
(WebInspector.VisualStyleNumberInputBox.prototype.set placeholder):
(WebInspector.VisualStyleNumberInputBox.prototype.get synthesizedValue):
(WebInspector.VisualStyleNumberInputBox.prototype.set _unitsElementTextContent):
(WebInspector.VisualStyleNumberInputBox.prototype._markUnitsContainerIfInputHasValue):
(WebInspector.VisualStyleNumberInputBox.prototype._keywordChanged):
(WebInspector.VisualStyleNumberInputBox.prototype._valueNumberInputKeyDown):
(WebInspector.VisualStyleNumberInputBox.prototype._numberInputChanged):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleNumberInputBox.css
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleNumberInputBox.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188627 => 188628)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-19 04:50:15 UTC (rev 188627)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-19 04:50:38 UTC (rev 188628)
@@ -1,5 +1,32 @@
 2015-08-18  Devin Rousso  drou...@apple.com
 
+Web Inspector: Show the computed value in an overlay for numerical Visual Editors
+https://bugs.webkit.org/show_bug.cgi?id=148161
+
+Reviewed by Timothy Hatcher.
+
+Adds an Unchanged option to the number-based Visual editors that shows the
+computed value if it is not a number (it would therefore be a keyword).
+
+* UserInterface/Views/VisualStyleNumberInputBox.css:
+(.visual-style-property-container  .visual-style-property-value-container  .number-input-container):
+(.visual-style-property-container  .visual-style-property-value-container  .number-input-container:not(.has-value)  span):
+
+* UserInterface/Views/VisualStyleNumberInputBox.js:
+(WebInspector.VisualStyleNumberInputBox):
+(WebInspector.VisualStyleNumberInputBox.prototype.set value):
+(WebInspector.VisualStyleNumberInputBox.prototype.get units):
+(WebInspector.VisualStyleNumberInputBox.prototype.set units):
+(WebInspector.VisualStyleNumberInputBox.prototype.set placeholder):
+(WebInspector.VisualStyleNumberInputBox.prototype.get synthesizedValue):
+(WebInspector.VisualStyleNumberInputBox.prototype.set _unitsElementTextContent):
+(WebInspector.VisualStyleNumberInputBox.prototype._markUnitsContainerIfInputHasValue):
+(WebInspector.VisualStyleNumberInputBox.prototype._keywordChanged):
+(WebInspector.VisualStyleNumberInputBox.prototype._valueNumberInputKeyDown):
+(WebInspector.VisualStyleNumberInputBox.prototype._numberInputChanged):
+
+2015-08-18  Devin Rousso  drou...@apple.com
+
 Web Inspector: Small Caps variant checkbox should be to the left of the Small Caps label
 https://bugs.webkit.org/show_bug.cgi?id=148102
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleNumberInputBox.css (188627 => 188628)

--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleNumberInputBox.css	2015-08-19 04:50:15 UTC (rev 188627)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleNumberInputBox.css	2015-08-19 04:50:38 UTC (rev 188628)
@@ -47,7 +47,7 @@
 line-height: 16px;
 text-align: right;
 border-radius: 4px;
-background-color: hsl(0, 100%, 100%);
+background-color: white;
 pointer-events: none;
 overflow: hidden;
 white-space: nowrap;
@@ -72,3 +72,7 @@
 .visual-style-property-container  .visual-style-property-value-container  .number-input-container  span {
 min-width: -webkit-fit-content;
 }
+
+.visual-style-property-container  .visual-style-property-value-container  .number-input-container:not(.has-value)  span {
+color: hsl(0, 0%, 60%);
+}


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleNumberInputBox.js (188627 => 188628)

--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleNumberInputBox.js	2015-08-19 04:50:15 UTC (rev 188627)
+++ 

[webkit-changes] [188676] trunk/Source/WebInspectorUI

2015-08-19 Thread drousso
Title: [188676] trunk/Source/WebInspectorUI








Revision 188676
Author drou...@apple.com
Date 2015-08-19 19:15:39 -0700 (Wed, 19 Aug 2015)


Log Message
Web Inspector: Committing a valid selector in the styles sidebar replaces the new selector with the old one
https://bugs.webkit.org/show_bug.cgi?id=148206

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype._markSelector):
No longer unnecessarily refreshes the section if the selector is valid.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188675 => 188676)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-20 01:18:45 UTC (rev 188675)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-20 02:15:39 UTC (rev 188676)
@@ -1,3 +1,14 @@
+2015-08-19  Devin Rousso  drou...@apple.com
+
+Web Inspector: Committing a valid selector in the styles sidebar replaces the new selector with the old one
+https://bugs.webkit.org/show_bug.cgi?id=148206
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/CSSStyleDeclarationSection.js:
+(WebInspector.CSSStyleDeclarationSection.prototype._markSelector):
+No longer unnecessarily refreshes the section if the selector is valid.
+
 2015-08-19  Joseph Pecoraro  pecor...@apple.com
 
 Web Inspector: Uncaught Exceptions regarding PseudoElements / TemplateContent


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js (188675 => 188676)

--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js	2015-08-20 01:18:45 UTC (rev 188675)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js	2015-08-20 02:15:39 UTC (rev 188676)
@@ -538,7 +538,6 @@
 if (valid) {
 this._iconElement.title = this._ruleDisabled ? WebInspector.UIString(Uncomment All Properties) : WebInspector.UIString(Comment All Properties);
 this._selectorElement.title = null;
-this.refresh();
 return;
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [188667] trunk/Source/WebInspectorUI

2015-08-19 Thread drousso
Title: [188667] trunk/Source/WebInspectorUI








Revision 188667
Author drou...@apple.com
Date 2015-08-19 17:27:15 -0700 (Wed, 19 Aug 2015)


Log Message
Web Inspector: long selectors in the visual editor sidebar can overflow
https://bugs.webkit.org/show_bug.cgi?id=148185

Reviewed by Timothy Hatcher.

Selectors in the Visual editor sidebar are now clipped and use ellipses.

* UserInterface/Views/VisualStyleSelectorSection.css:
(.details-section.visual-style-selector-section  .header  .current-selector):
(.details-section.visual-style-selector-section:not(.collapsed)  .content):
(.details-section.visual-style-selector-section  .content  .selectors  .selector-list  .section-divider  .titles):
(.details-section.visual-style-selector-section  .content  .selectors  .selector-list  .section-divider  .titles  .title): Deleted.

* UserInterface/Views/VisualStyleSelectorTreeItem.css:
(.item.visual-style-selector-item):
(.item.visual-style-selector-item  .titles):
(.item.visual-style-selector-item  input[type=checkbox]):
(.item.visual-style-selector-item  .icon):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorSection.css
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.css




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188666 => 188667)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-20 00:27:00 UTC (rev 188666)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-20 00:27:15 UTC (rev 188667)
@@ -1,3 +1,24 @@
+2015-08-19  Devin Rousso  drou...@apple.com
+
+Web Inspector: long selectors in the visual editor sidebar can overflow
+https://bugs.webkit.org/show_bug.cgi?id=148185
+
+Reviewed by Timothy Hatcher.
+
+Selectors in the Visual editor sidebar are now clipped and use ellipses.
+
+* UserInterface/Views/VisualStyleSelectorSection.css:
+(.details-section.visual-style-selector-section  .header  .current-selector):
+(.details-section.visual-style-selector-section:not(.collapsed)  .content):
+(.details-section.visual-style-selector-section  .content  .selectors  .selector-list  .section-divider  .titles):
+(.details-section.visual-style-selector-section  .content  .selectors  .selector-list  .section-divider  .titles  .title): Deleted.
+
+* UserInterface/Views/VisualStyleSelectorTreeItem.css:
+(.item.visual-style-selector-item):
+(.item.visual-style-selector-item  .titles):
+(.item.visual-style-selector-item  input[type=checkbox]):
+(.item.visual-style-selector-item  .icon):
+
 2015-08-19  Joseph Pecoraro  pecor...@apple.com
 
 Web Inspector: Include Legacy Inspector JSON for iOS 9


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorSection.css (188666 => 188667)

--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorSection.css	2015-08-20 00:27:00 UTC (rev 188666)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorSection.css	2015-08-20 00:27:15 UTC (rev 188667)
@@ -39,7 +39,7 @@
 }
 
 .details-section.visual-style-selector-section  .header  .current-selector {
-width: calc(100% - 85px);
+width: calc(100% - 95px);
 margin-left: 10px;
 font-weight: normal;
 white-space: nowrap;
@@ -80,6 +80,10 @@
 filter: opacity(0.7);
 }
 
+.details-section.visual-style-selector-section:not(.collapsed)  .content {
+display: block;
+}
+
 .details-section.visual-style-selector-section  .content  .selectors {
 max-height: 110px;
 overflow: auto;
@@ -111,7 +115,7 @@
 display: none;
 }
 
-.details-section.visual-style-selector-section  .content  .selectors  .selector-list  .section-divider  .titles  .title {
+.details-section.visual-style-selector-section  .content  .selectors  .selector-list  .section-divider  .titles {
 overflow: hidden;
 white-space: nowrap;
 text-overflow: ellipsis;


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.css (188666 => 188667)

--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.css	2015-08-20 00:27:00 UTC (rev 188666)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.css	2015-08-20 00:27:15 UTC (rev 188667)
@@ -25,6 +25,7 @@
 
 .item.visual-style-selector-item {
 display: flex;
+align-items: center;
 width: 100%;
 height: 25px;
 padding: 2px 0;
@@ -42,7 +43,6 @@
 }
 
 .item.visual-style-selector-item  input[type=checkbox] {
-align-self: center;
 position: relative;
 margin-left: 5px;
 }
@@ -59,7 +59,6 @@
 }
 
 .item.visual-style-selector-item  .icon {
-align-self: center;
 width: 16px;
 height: 16px;
 margin-left: 4px;
@@ -96,7 +95,7 @@
 }
 
 .item.visual-style-selector-item  .titles {
-align-self: center;
+flex: 1;
 overflow: hidden;
 white-space: nowrap;
 text-overflow: ellipsis;







[webkit-changes] [188678] trunk/Source/WebInspectorUI

2015-08-19 Thread drousso
Title: [188678] trunk/Source/WebInspectorUI








Revision 188678
Author drou...@apple.com
Date 2015-08-19 19:38:20 -0700 (Wed, 19 Aug 2015)


Log Message
Web Inspector: The first style in the Rules panel for pseudo-elements needs padding
https://bugs.webkit.org/show_bug.cgi?id=148207

Reviewed by Timothy Hatcher.

* UserInterface/Views/RulesStyleDetailsPanel.css:
(.sidebar  .panel.details.css-style .rules .label:first-child):
If the first element in the Rules panel is a label, add some top padding.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.css




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188677 => 188678)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-20 02:34:02 UTC (rev 188677)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-20 02:38:20 UTC (rev 188678)
@@ -1,5 +1,16 @@
 2015-08-19  Devin Rousso  drou...@apple.com
 
+Web Inspector: The first style in the Rules panel for pseudo-elements needs padding
+https://bugs.webkit.org/show_bug.cgi?id=148207
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/RulesStyleDetailsPanel.css:
+(.sidebar  .panel.details.css-style .rules .label:first-child):
+If the first element in the Rules panel is a label, add some top padding.
+
+2015-08-19  Devin Rousso  drou...@apple.com
+
 Web Inspector: Committing a valid selector in the styles sidebar replaces the new selector with the old one
 https://bugs.webkit.org/show_bug.cgi?id=148206
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.css (188677 => 188678)

--- trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.css	2015-08-20 02:34:02 UTC (rev 188677)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.css	2015-08-20 02:38:20 UTC (rev 188678)
@@ -29,6 +29,10 @@
 padding: 0 8px;
 }
 
+.sidebar  .panel.details.css-style .rules .label:first-child {
+padding-top: 10px;
+}
+
 .sidebar  .panel.details.css-style .rules .label .go-to-link {
 color: inherit !important;
 }






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [188682] trunk/Source/WebInspectorUI

2015-08-19 Thread drousso
Title: [188682] trunk/Source/WebInspectorUI








Revision 188682
Author drou...@apple.com
Date 2015-08-19 22:03:06 -0700 (Wed, 19 Aug 2015)


Log Message
Web Inspector: Visual styles panel does not work with pseudo-elements
https://bugs.webkit.org/show_bug.cgi?id=148187

Reviewed by Timothy Hatcher.

If the inline style does not exist, such as for pseudo-elements, default to the first matched rule.

* UserInterface/Views/VisualStyleSelectorSection.js:
(WebInspector.VisualStyleSelectorSection.prototype.update):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorSection.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188681 => 188682)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-20 04:43:24 UTC (rev 188681)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-20 05:03:06 UTC (rev 188682)
@@ -1,3 +1,15 @@
+2015-08-19  Devin Rousso  drou...@apple.com
+
+Web Inspector: Visual styles panel does not work with pseudo-elements
+https://bugs.webkit.org/show_bug.cgi?id=148187
+
+Reviewed by Timothy Hatcher.
+
+If the inline style does not exist, such as for pseudo-elements, default to the first matched rule.
+
+* UserInterface/Views/VisualStyleSelectorSection.js:
+(WebInspector.VisualStyleSelectorSection.prototype.update):
+
 2015-08-19  Joseph Pecoraro  pecor...@apple.com
 
 Web Inspector: DOMTree leaks on main resource changes


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorSection.js (188681 => 188682)

--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorSection.js	2015-08-20 04:43:24 UTC (rev 188681)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorSection.js	2015-08-20 05:03:06 UTC (rev 188682)
@@ -155,11 +155,14 @@
 }
 }
 
-if (!this._nodeStyles[WebInspector.VisualStyleSelectorSection.LastSelectedRuleSymbol])
-this._nodeStyles[WebInspector.VisualStyleSelectorSection.LastSelectedRuleSymbol] = this._nodeStyles.inlineStyle;
+if (this._nodeStyles.inlineStyle) {
+if (!this._nodeStyles[WebInspector.VisualStyleSelectorSection.LastSelectedRuleSymbol])
+this._nodeStyles[WebInspector.VisualStyleSelectorSection.LastSelectedRuleSymbol] = this._nodeStyles.inlineStyle;
 
-// Inline Style
-createSelectorItem.call(this, this._nodeStyles.inlineStyle, WebInspector.UIString(This Element));
+// Inline Style
+createSelectorItem.call(this, this._nodeStyles.inlineStyle, WebInspector.UIString(This Element));
+} else if (!this._nodeStyles[WebInspector.VisualStyleSelectorSection.LastSelectedRuleSymbol])
+this._nodeStyles[WebInspector.VisualStyleSelectorSection.LastSelectedRuleSymbol] = this._nodeStyles.matchedRules[0].style;
 
 // Matched Rules
 for (let rule of uniqueOrderedRules(this._nodeStyles.matchedRules)) {






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [188725] trunk/Source/WebInspectorUI

2015-08-20 Thread drousso
Title: [188725] trunk/Source/WebInspectorUI








Revision 188725
Author drou...@apple.com
Date 2015-08-20 18:31:51 -0700 (Thu, 20 Aug 2015)


Log Message
Web Inspector: visual style number inputs don't style the units correctly
https://bugs.webkit.org/show_bug.cgi?id=148222

Reviewed by Timothy Hatcher.

* UserInterface/Views/VisualStyleNumberInputBox.js:
(WebInspector.VisualStyleNumberInputBox.prototype.set value):
Added extra checks to see if the number input has a value when setting the value on the editor.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleNumberInputBox.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188724 => 188725)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-21 01:04:51 UTC (rev 188724)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-21 01:31:51 UTC (rev 188725)
@@ -1,3 +1,14 @@
+2015-08-20  Devin Rousso  drou...@apple.com
+
+Web Inspector: visual style number inputs don't style the units correctly
+https://bugs.webkit.org/show_bug.cgi?id=148222
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/VisualStyleNumberInputBox.js:
+(WebInspector.VisualStyleNumberInputBox.prototype.set value):
+Added extra checks to see if the number input has a value when setting the value on the editor.
+
 2015-08-20  Matt Baker  mattba...@apple.com
 
 Web Inspector: Filtered frames should be styled differently in the Rendering Frames overview graph


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleNumberInputBox.js (188724 => 188725)

--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleNumberInputBox.js	2015-08-21 01:04:51 UTC (rev 188724)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleNumberInputBox.js	2015-08-21 01:31:51 UTC (rev 188725)
@@ -120,18 +120,20 @@
 
 this.specialPropertyPlaceholderElement.hidden = true;
 
+if (!value) {
+this._valueNumberInputElement.value = null;
+this._markUnitsContainerIfInputHasValue();
+return;
+}
+
 if (!isNaN(value)) {
 this._numberInputIsEditable = true;
 this.contentElement.classList.add(number-input-editable);
 this._valueNumberInputElement.value = Math.round(value * 100) / 100;
+this._markUnitsContainerIfInputHasValue();
 return;
 }
 
-if (!value) {
-this._valueNumberInputElement.value = null;
-return;
-}
-
 if (this.valueIsSupportedKeyword(value)) {
 this._numberInputIsEditable = false;
 this.contentElement.classList.remove(number-input-editable);






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [188732] trunk/Source/WebInspectorUI

2015-08-20 Thread drousso
Title: [188732] trunk/Source/WebInspectorUI








Revision 188732
Author drou...@apple.com
Date 2015-08-20 18:40:56 -0700 (Thu, 20 Aug 2015)


Log Message
Web Inspector: Labels in the computed panel are shifted when a filter is applieds
https://bugs.webkit.org/show_bug.cgi?id=148250

Reviewed by Timothy Hatcher.

Added to the selectors for filtering to ensure they only apply to the rules panel.

* UserInterface/Views/RulesStyleDetailsPanel.css:
(.sidebar  .panel.details.css-style  .content.filter-in-progress  .rules .label):
(.sidebar  .panel.details.css-style  .content.filter-in-progress  .rules .label:not(.filter-section-non-matching) ~ .label):
(.sidebar  .panel.details.css-style  .content.filter-in-progress  .rules .label.filter-matching-label):
(.sidebar  .panel.details.css-style  .content.filter-in-progress  .rules .label:not(.filter-section-non-matching) + .label.filter-matching-label:not(.filter-section-non-matching)):
(.sidebar  .panel.details.css-style  .content.filter-in-progress  .rules .new-rule):
(.sidebar  .panel.details.css-style  .content.filter-in-progress  .rules .style-declaration-section:not(.filter-section-non-matching) ~ .label:not(.filter-section-non-matching)):
(@media (-webkit-min-device-pixel-ratio: 2)):
(.sidebar  .panel.details.css-style  .content.filter-in-progress .label): Deleted.
(.sidebar  .panel.details.css-style  .content.filter-in-progress .label:not(.filter-section-non-matching) ~ .label): Deleted.
(.sidebar  .panel.details.css-style  .content.filter-in-progress .label.filter-matching-label): Deleted.
(.sidebar  .panel.details.css-style  .content.filter-in-progress .label:not(.filter-section-non-matching) + .label.filter-matching-label:not(.filter-section-non-matching)): Deleted.
(.sidebar  .panel.details.css-style  .content.filter-in-progress .new-rule): Deleted.
(.sidebar  .panel.details.css-style  .content.filter-in-progress .style-declaration-section:not(.filter-section-non-matching) ~ .label:not(.filter-section-non-matching)): Deleted.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.css




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188731 => 188732)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-21 01:38:56 UTC (rev 188731)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-21 01:40:56 UTC (rev 188732)
@@ -1,5 +1,29 @@
 2015-08-20  Devin Rousso  drou...@apple.com
 
+Web Inspector: Labels in the computed panel are shifted when a filter is applieds
+https://bugs.webkit.org/show_bug.cgi?id=148250
+
+Reviewed by Timothy Hatcher.
+
+Added to the selectors for filtering to ensure they only apply to the rules panel.
+
+* UserInterface/Views/RulesStyleDetailsPanel.css:
+(.sidebar  .panel.details.css-style  .content.filter-in-progress  .rules .label):
+(.sidebar  .panel.details.css-style  .content.filter-in-progress  .rules .label:not(.filter-section-non-matching) ~ .label):
+(.sidebar  .panel.details.css-style  .content.filter-in-progress  .rules .label.filter-matching-label):
+(.sidebar  .panel.details.css-style  .content.filter-in-progress  .rules .label:not(.filter-section-non-matching) + .label.filter-matching-label:not(.filter-section-non-matching)):
+(.sidebar  .panel.details.css-style  .content.filter-in-progress  .rules .new-rule):
+(.sidebar  .panel.details.css-style  .content.filter-in-progress  .rules .style-declaration-section:not(.filter-section-non-matching) ~ .label:not(.filter-section-non-matching)):
+(@media (-webkit-min-device-pixel-ratio: 2)):
+(.sidebar  .panel.details.css-style  .content.filter-in-progress .label): Deleted.
+(.sidebar  .panel.details.css-style  .content.filter-in-progress .label:not(.filter-section-non-matching) ~ .label): Deleted.
+(.sidebar  .panel.details.css-style  .content.filter-in-progress .label.filter-matching-label): Deleted.
+(.sidebar  .panel.details.css-style  .content.filter-in-progress .label:not(.filter-section-non-matching) + .label.filter-matching-label:not(.filter-section-non-matching)): Deleted.
+(.sidebar  .panel.details.css-style  .content.filter-in-progress .new-rule): Deleted.
+(.sidebar  .panel.details.css-style  .content.filter-in-progress .style-declaration-section:not(.filter-section-non-matching) ~ .label:not(.filter-section-non-matching)): Deleted.
+
+2015-08-20  Devin Rousso  drou...@apple.com
+
 Web Inspector: Fix attempted to assign to readonly property in Visual editor links
 https://bugs.webkit.org/show_bug.cgi?id=148264
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.css (188731 => 188732)

--- trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.css	2015-08-21 01:38:56 UTC (rev 188731)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.css	2015-08-21 01:40:56 UTC (rev 

[webkit-changes] [188728] trunk/Source/WebInspectorUI

2015-08-20 Thread drousso
Title: [188728] trunk/Source/WebInspectorUI








Revision 188728
Author drou...@apple.com
Date 2015-08-20 18:35:32 -0700 (Thu, 20 Aug 2015)


Log Message
Web Inspector: Font size between computed and set value is off in visual styles popups
https://bugs.webkit.org/show_bug.cgi?id=148226

Reviewed by Timothy Hatcher.

* UserInterface/Views/VisualStylePropertyEditor.css:
(.visual-style-property-container  .visual-style-property-value-container  .visual-style-special-property-placeholder):
Increased font-size to match the font-size of the overlaid select element.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.css




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188727 => 188728)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-21 01:33:58 UTC (rev 188727)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-21 01:35:32 UTC (rev 188728)
@@ -1,3 +1,14 @@
+2015-08-20  Devin Rousso  drou...@apple.com
+
+Web Inspector: Font size between computed and set value is off in visual styles popups
+https://bugs.webkit.org/show_bug.cgi?id=148226
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/VisualStylePropertyEditor.css:
+(.visual-style-property-container  .visual-style-property-value-container  .visual-style-special-property-placeholder):
+Increased font-size to match the font-size of the overlaid select element.
+
 2015-08-20  Matt Baker  mattba...@apple.com
 
 Web Inspector: Filtered frames shouldn't be selectable in the Rendering Frames overview graph


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.css (188727 => 188728)

--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.css	2015-08-21 01:33:58 UTC (rev 188727)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.css	2015-08-21 01:35:32 UTC (rev 188728)
@@ -82,6 +82,7 @@
 border-radius: 4px;
 background-color: white;
 color: hsl(0, 0%, 50%);
+font-size: 11px;
 pointer-events: none;
 overflow: hidden;
 white-space: nowrap;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [188733] trunk/Source/WebInspectorUI

2015-08-20 Thread drousso
Title: [188733] trunk/Source/WebInspectorUI








Revision 188733
Author drou...@apple.com
Date 2015-08-20 18:42:21 -0700 (Thu, 20 Aug 2015)


Log Message
Web Inspector: Add flex alignment section to Visual sidebar
https://bugs.webkit.org/show_bug.cgi?id=148243

Reviewed by Timothy Hatcher.

Uses select keyword pickers to contain the list of possible values.  Also supports
the upcoming Grid layout keywords in the advanced keyword list.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel):
(WebInspector.VisualStyleDetailsPanel.prototype._populateFlexboxSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateAlignmentSection):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188732 => 188733)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-21 01:40:56 UTC (rev 188732)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-21 01:42:21 UTC (rev 188733)
@@ -1,5 +1,21 @@
 2015-08-20  Devin Rousso  drou...@apple.com
 
+Web Inspector: Add flex alignment section to Visual sidebar
+https://bugs.webkit.org/show_bug.cgi?id=148243
+
+Reviewed by Timothy Hatcher.
+
+Uses select keyword pickers to contain the list of possible values.  Also supports
+the upcoming Grid layout keywords in the advanced keyword list.
+
+* Localizations/en.lproj/localizedStrings.js:
+* UserInterface/Views/VisualStyleDetailsPanel.js:
+(WebInspector.VisualStyleDetailsPanel):
+(WebInspector.VisualStyleDetailsPanel.prototype._populateFlexboxSection):
+(WebInspector.VisualStyleDetailsPanel.prototype._populateAlignmentSection):
+
+2015-08-20  Devin Rousso  drou...@apple.com
+
 Web Inspector: Labels in the computed panel are shifted when a filter is applieds
 https://bugs.webkit.org/show_bug.cgi?id=148250
 


Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (188732 => 188733)

--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2015-08-21 01:40:56 UTC (rev 188732)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2015-08-21 01:42:21 UTC (rev 188733)
@@ -52,6 +52,7 @@
 localizedStrings[Add new breakpoint action after this action] = Add new breakpoint action after this action;
 localizedStrings[Additions] = Additions;
 localizedStrings[Align] = Align;
+localizedStrings[Alignment] = Alignment;
 localizedStrings[All] = All;
 localizedStrings[All Changes] = All Changes;
 localizedStrings[All Exceptions] = All Exceptions;
@@ -507,6 +508,7 @@
 localizedStrings[Selected Items] = Selected Items;
 localizedStrings[Selected Symbol] = Selected Symbol;
 localizedStrings[Selected Value] = Selected Value;
+localizedStrings[Self] = Self;
 localizedStrings[Self Time] = Self Time;
 localizedStrings[Semantic Issue] = Semantic Issue;
 localizedStrings[Session] = Session;


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js (188732 => 188733)

--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js	2015-08-21 01:40:56 UTC (rev 188732)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js	2015-08-21 01:42:21 UTC (rev 188733)
@@ -70,8 +70,9 @@
 this._generateSection(margin, WebInspector.UIString(Margin));
 this._generateSection(padding, WebInspector.UIString(Padding));
 this._generateSection(flexbox, WebInspector.UIString(Flexbox));
+this._generateSection(alignment, WebInspector.UIString(Alignment));
 
-this._sections.layout = new WebInspector.DetailsSection(layout, WebInspector.UIString(Layout), [this._groups.display.section, this._groups.position.section, this._groups.float.section, this._groups.dimensions.section, this._groups.margin.section, this._groups.padding.section, this._groups.flexbox.section]);
+this._sections.layout = new WebInspector.DetailsSection(layout, WebInspector.UIString(Layout), [this._groups.display.section, this._groups.position.section, this._groups.float.section, this._groups.dimensions.section, this._groups.margin.section, this._groups.padding.section, this._groups.flexbox.section, this._groups.alignment.section]);
 this._element.appendChild(this._sections.layout.element);
 
 // Text Section
@@ -558,8 +559,8 @@
 
 let flexSizeRow = new WebInspector.DetailsSectionRow;
 
-properties.flexGrow = new WebInspector.VisualStyleNumberInputBox(flex-grow, WebInspector.UIString(Grow), this._keywords.defaults, null);
-properties.flexShrink = new WebInspector.VisualStyleNumberInputBox(flex-shrink, WebInspector.UIString(Shrink), this._keywords.defaults, null);
+properties.flexGrow = new 

[webkit-changes] [188721] trunk/Tools

2015-08-20 Thread drousso
Title: [188721] trunk/Tools








Revision 188721
Author drou...@apple.com
Date 2015-08-20 17:26:46 -0700 (Thu, 20 Aug 2015)


Log Message
Unreviewed, changed Devin Rousso's email.

Patch by Devin Rousso dcrousso+web...@gmail.com on 2015-08-20

* Scripts/webkitpy/common/config/contributors.json:

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/common/config/contributors.json




Diff

Modified: trunk/Tools/ChangeLog (188720 => 188721)

--- trunk/Tools/ChangeLog	2015-08-21 00:26:41 UTC (rev 188720)
+++ trunk/Tools/ChangeLog	2015-08-21 00:26:46 UTC (rev 188721)
@@ -1,3 +1,9 @@
+2015-08-20  Devin Rousso  dcrousso+web...@gmail.com
+
+Unreviewed, changed Devin Rousso's email.
+
+* Scripts/webkitpy/common/config/contributors.json:
+
 2015-08-20  Anders Carlsson  ander...@apple.com
 
 Use WKPageConfigurationRef in WebKitTestRunner


Modified: trunk/Tools/Scripts/webkitpy/common/config/contributors.json (188720 => 188721)

--- trunk/Tools/Scripts/webkitpy/common/config/contributors.json	2015-08-21 00:26:41 UTC (rev 188720)
+++ trunk/Tools/Scripts/webkitpy/common/config/contributors.json	2015-08-21 00:26:46 UTC (rev 188721)
@@ -720,7 +720,7 @@
   },
   Devin Rousso : {
  emails : [
-drou...@apple.com
+dcrousso+web...@gmail.com
  ],
  nicks : [
     drousso






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [188730] trunk/Source/WebInspectorUI

2015-08-20 Thread drousso
Title: [188730] trunk/Source/WebInspectorUI








Revision 188730
Author drou...@apple.com
Date 2015-08-20 18:37:40 -0700 (Thu, 20 Aug 2015)


Log Message
Web Inspector: Visual editor adds extra spaces to styles with no properties
https://bugs.webkit.org/show_bug.cgi?id=148242

Reviewed by Timothy Hatcher.

* UserInterface/Models/CSSStyleDeclaration.js:
(WebInspector.CSSStyleDeclaration.prototype.set text):
Now trims the text and, if the resulting string has no length or the style is inline,
replaces the text to be set with the trimmed text.

* UserInterface/Views/VisualStylePropertyCombiner.js:
(WebInspector.VisualStylePropertyCombiner.prototype.modifyPropertyText):
Removed unnecessary trim.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyCombiner.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188729 => 188730)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-21 01:36:18 UTC (rev 188729)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-21 01:37:40 UTC (rev 188730)
@@ -1,5 +1,21 @@
 2015-08-20  Devin Rousso  drou...@apple.com
 
+Web Inspector: Visual editor adds extra spaces to styles with no properties
+https://bugs.webkit.org/show_bug.cgi?id=148242
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Models/CSSStyleDeclaration.js:
+(WebInspector.CSSStyleDeclaration.prototype.set text):
+Now trims the text and, if the resulting string has no length or the style is inline,
+replaces the text to be set with the trimmed text.
+
+* UserInterface/Views/VisualStylePropertyCombiner.js:
+(WebInspector.VisualStylePropertyCombiner.prototype.modifyPropertyText):
+Removed unnecessary trim.
+
+2015-08-20  Devin Rousso  drou...@apple.com
+
 Web Inspector: Font size between computed and set value is off in visual styles popups
 https://bugs.webkit.org/show_bug.cgi?id=148226
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js (188729 => 188730)

--- trunk/Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js	2015-08-21 01:36:18 UTC (rev 188729)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js	2015-08-21 01:37:40 UTC (rev 188730)
@@ -186,7 +186,14 @@
 if (this._text === text)
 return;
 
-var modified = text !== this._initialText;
+let trimmedText = text.trim();
+if (this._text === trimmedText)
+return;
+
+if (!trimmedText.length || this._type === WebInspector.CSSStyleDeclaration.Type.Inline)
+text = trimmedText;
+
+let modified = text !== this._initialText;
 if (modified !== this._hasModifiedInitialText) {
 this._hasModifiedInitialText = modified;
 this.dispatchEventToListeners(WebInspector.CSSStyleDeclaration.Event.InitialTextModified);


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyCombiner.js (188729 => 188730)

--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyCombiner.js	2015-08-21 01:36:18 UTC (rev 188729)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyCombiner.js	2015-08-21 01:37:40 UTC (rev 188730)
@@ -77,7 +77,6 @@
 
 modifyPropertyText(text, value)
 {
-let trimmedText = text.trimRight();
 if (this._textContainsNameRegExp.test(text))
 text = text.replace(this._replacementRegExp, value !== null ? $1$2:  + value + ; : $1);
 else if (value !== null)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [188731] trunk/Source/WebInspectorUI

2015-08-20 Thread drousso
Title: [188731] trunk/Source/WebInspectorUI








Revision 188731
Author drou...@apple.com
Date 2015-08-20 18:38:56 -0700 (Thu, 20 Aug 2015)


Log Message
Web Inspector: Fix attempted to assign to readonly property in Visual editor links
https://bugs.webkit.org/show_bug.cgi?id=148264

Reviewed by Timothy Hatcher.

* UserInterface/Views/VisualStylePropertyEditorLink.js:
(WebInspector.VisualStylePropertyEditorLink.prototype.set linked):
No longer attempts to set the hidden attribute of the link icons before they exist.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditorLink.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188730 => 188731)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-21 01:37:40 UTC (rev 188730)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-21 01:38:56 UTC (rev 188731)
@@ -1,5 +1,16 @@
 2015-08-20  Devin Rousso  drou...@apple.com
 
+Web Inspector: Fix attempted to assign to readonly property in Visual editor links
+https://bugs.webkit.org/show_bug.cgi?id=148264
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/VisualStylePropertyEditorLink.js:
+(WebInspector.VisualStylePropertyEditorLink.prototype.set linked):
+No longer attempts to set the hidden attribute of the link icons before they exist.
+
+2015-08-20  Devin Rousso  drou...@apple.com
+
 Web Inspector: Visual editor adds extra spaces to styles with no properties
 https://bugs.webkit.org/show_bug.cgi?id=148242
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditorLink.js (188730 => 188731)

--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditorLink.js	2015-08-21 01:37:40 UTC (rev 188730)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditorLink.js	2015-08-21 01:38:56 UTC (rev 188731)
@@ -82,8 +82,13 @@
 {
 this._linked = flag;
 this._element.classList.toggle(linked, this._linked);
-this._linkedIcon.hidden = !this._linked;
-this._unlinkedIcon.hidden = this._linked;
+
+if (this._linkedIcon)
+this._linkedIcon.hidden = !this._linked;
+
+if (this._unlinkedIcon)
+this._unlinkedIcon.hidden = this._linked;
+
 this._iconElement.title = this._linked ? WebInspector.UIString(Click to remove link) : WebInspector.UIString(Click to link property values);
 
 for (let linkToHide of this._linksToHideWhenLinked)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [188616] trunk/Source/WebInspectorUI

2015-08-18 Thread drousso
Title: [188616] trunk/Source/WebInspectorUI








Revision 188616
Author drou...@apple.com
Date 2015-08-18 18:18:49 -0700 (Tue, 18 Aug 2015)


Log Message
Web Inspector: round sub-pixel values we get from computed style in visual sidebar
https://bugs.webkit.org/show_bug.cgi?id=148105

Reviewed by Timothy Hatcher.

* UserInterface/Views/VisualStyleNumberInputBox.js:
(WebInspector.VisualStyleNumberInputBox.prototype.set value):
(WebInspector.VisualStyleNumberInputBox.prototype.set placeholder):
Now rounds the value and placeholder to the nearest 100th.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleNumberInputBox.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188615 => 188616)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-19 01:04:56 UTC (rev 188615)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-19 01:18:49 UTC (rev 188616)
@@ -1,3 +1,15 @@
+2015-08-18  Devin Rousso  drou...@apple.com
+
+Web Inspector: round sub-pixel values we get from computed style in visual sidebar
+https://bugs.webkit.org/show_bug.cgi?id=148105
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/VisualStyleNumberInputBox.js:
+(WebInspector.VisualStyleNumberInputBox.prototype.set value):
+(WebInspector.VisualStyleNumberInputBox.prototype.set placeholder):
+Now rounds the value and placeholder to the nearest 100th.
+
 2015-08-18  Joseph Pecoraro  pecor...@apple.com
 
 Web Inspector: transparent color swatches have lopsided checkered background on non-retina


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleNumberInputBox.js (188615 => 188616)

--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleNumberInputBox.js	2015-08-19 01:04:56 UTC (rev 188615)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleNumberInputBox.js	2015-08-19 01:18:49 UTC (rev 188616)
@@ -105,7 +105,7 @@
 if (!isNaN(value)) {
 this._numberInputIsEditable = true;
 this.contentElement.classList.add(number-input-editable);
-this._valueNumberInputElement.value = value;
+this._valueNumberInputElement.value = Math.round(value * 100) / 100;
 return;
 }
 
@@ -160,7 +160,7 @@
 if (text === this.placeholder)
 return;
 
-let _onlyNumericalText_ = !isNaN(text)  text;
+let _onlyNumericalText_ = text  !isNaN(text)  (Math.round(text * 100) / 100);
 this._valueNumberInputElement.setAttribute(placeholder, onlyNumericalText || 0);
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [188617] trunk/Source/WebInspectorUI

2015-08-18 Thread drousso
Title: [188617] trunk/Source/WebInspectorUI








Revision 188617
Author drou...@apple.com
Date 2015-08-18 18:22:10 -0700 (Tue, 18 Aug 2015)


Log Message
Web Inspector: Consider showing style summary on collapsed visual sidebar sections
https://bugs.webkit.org/show_bug.cgi?id=148104

Reviewed by Timothy Hatcher.

The blue indicator dot on a section now means that that section has at least one set value.
If a section has been modified, it will display a trash can that will clear those modifications.

* UserInterface/Views/VisualStyleDetailsPanel.css:
(.sidebar  .panel.details.css-style .visual  .details-section .details-section.has-set-property  .header  span::after):
(.sidebar  .panel.details.css-style .visual  .details-section .details-section.modified  .header  span::after): Deleted.

* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype._updateProperties):
(WebInspector.VisualStyleDetailsPanel.prototype._sectionModified):
(WebInspector.VisualStyleDetailsPanel.prototype._groupHasSetProperty):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.css
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188616 => 188617)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-19 01:18:49 UTC (rev 188616)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-19 01:22:10 UTC (rev 188617)
@@ -1,5 +1,24 @@
 2015-08-18  Devin Rousso  drou...@apple.com
 
+Web Inspector: Consider showing style summary on collapsed visual sidebar sections
+https://bugs.webkit.org/show_bug.cgi?id=148104
+
+Reviewed by Timothy Hatcher.
+
+The blue indicator dot on a section now means that that section has at least one set value.
+If a section has been modified, it will display a trash can that will clear those modifications.
+
+* UserInterface/Views/VisualStyleDetailsPanel.css:
+(.sidebar  .panel.details.css-style .visual  .details-section .details-section.has-set-property  .header  span::after):
+(.sidebar  .panel.details.css-style .visual  .details-section .details-section.modified  .header  span::after): Deleted.
+
+* UserInterface/Views/VisualStyleDetailsPanel.js:
+(WebInspector.VisualStyleDetailsPanel.prototype._updateProperties):
+(WebInspector.VisualStyleDetailsPanel.prototype._sectionModified):
+(WebInspector.VisualStyleDetailsPanel.prototype._groupHasSetProperty):
+
+2015-08-18  Devin Rousso  drou...@apple.com
+
 Web Inspector: round sub-pixel values we get from computed style in visual sidebar
 https://bugs.webkit.org/show_bug.cgi?id=148105
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.css (188616 => 188617)

--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.css	2015-08-19 01:18:49 UTC (rev 188616)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.css	2015-08-19 01:22:10 UTC (rev 188617)
@@ -46,7 +46,7 @@
 display: flex;
 }
 
-.sidebar  .panel.details.css-style .visual  .details-section .details-section.modified  .header  span::after {
+.sidebar  .panel.details.css-style .visual  .details-section .details-section.has-set-property  .header  span::after {
 width: 7px;
 height: 7px;
 margin: 4px 6px;


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js (188616 => 188617)

--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js	2015-08-19 01:18:49 UTC (rev 188616)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js	2015-08-19 01:22:10 UTC (rev 188617)
@@ -187,23 +187,21 @@
 
 let initialPropertyText = {};
 let initialPropertyTextMissing = !initialTextList.has(group);
-let _onePropertyHasValue_ = false;
 for (let key in group.properties) {
 let propertyEditor = group.properties[key];
 propertyEditor.update(!propertyEditor.style || forceStyleUpdate ? this._currentStyle : null);
 
 let value = propertyEditor.synthesizedValue;
-if (value  !propertyEditor.propertyMissing) {
-_onePropertyHasValue_ = true;
-if (initialPropertyTextMissing)
-initialPropertyText[key] = value;
-}
+if (value  !propertyEditor.propertyMissing  initialPropertyTextMissing)
+initialPropertyText[key] = value;
 }
 
 if (initialPropertyTextMissing)
 initialTextList.set(group, initialPropertyText);
 
-group.section.collapsed = !onePropertyHasValue  !group.section.expandedByUser;
+let groupHasSetProperty = this._groupHasSetProperty(group);
+group.section.collapsed = !groupHasSetProperty  !group.section.expandedByUser;
+

[webkit-changes] [188621] trunk/Source/WebInspectorUI

2015-08-18 Thread drousso
Title: [188621] trunk/Source/WebInspectorUI








Revision 188621
Author drou...@apple.com
Date 2015-08-18 18:41:58 -0700 (Tue, 18 Aug 2015)


Log Message
Web Inspector: Visual editor links should unlink when switching styles
https://bugs.webkit.org/show_bug.cgi?id=148153

Reviewed by Timothy Hatcher.

Visual editor links are now deactivated when switching rules/nodes.

* UserInterface/Images/VisualStylePropertyUnlinked.svg:
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype._updateProperties):
(WebInspector.VisualStyleDetailsPanel.prototype._generateMetricSectionRows):

* UserInterface/Views/VisualStylePropertyEditorLink.js:
(WebInspector.VisualStylePropertyEditorLink.prototype.set linked):
(WebInspector.VisualStylePropertyEditorLink.prototype._iconClicked):
(WebInspector.VisualStylePropertyEditorLink):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Images/VisualStylePropertyUnlinked.svg
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditorLink.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188620 => 188621)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-19 01:37:50 UTC (rev 188620)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-19 01:41:58 UTC (rev 188621)
@@ -1,5 +1,24 @@
 2015-08-18  Devin Rousso  drou...@apple.com
 
+Web Inspector: Visual editor links should unlink when switching styles
+https://bugs.webkit.org/show_bug.cgi?id=148153
+
+Reviewed by Timothy Hatcher.
+
+Visual editor links are now deactivated when switching rules/nodes.
+
+* UserInterface/Images/VisualStylePropertyUnlinked.svg:
+* UserInterface/Views/VisualStyleDetailsPanel.js:
+(WebInspector.VisualStyleDetailsPanel.prototype._updateProperties):
+(WebInspector.VisualStyleDetailsPanel.prototype._generateMetricSectionRows):
+
+* UserInterface/Views/VisualStylePropertyEditorLink.js:
+(WebInspector.VisualStylePropertyEditorLink.prototype.set linked):
+(WebInspector.VisualStylePropertyEditorLink.prototype._iconClicked):
+(WebInspector.VisualStylePropertyEditorLink):
+
+2015-08-18  Devin Rousso  drou...@apple.com
+
 Web Inspector: Consider showing style summary on collapsed visual sidebar sections
 https://bugs.webkit.org/show_bug.cgi?id=148104
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Images/VisualStylePropertyUnlinked.svg (188620 => 188621)

--- trunk/Source/WebInspectorUI/UserInterface/Images/VisualStylePropertyUnlinked.svg	2015-08-19 01:37:50 UTC (rev 188620)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/VisualStylePropertyUnlinked.svg	2015-08-19 01:41:58 UTC (rev 188621)
@@ -1,6 +1,6 @@
 ?xml version=1.0 encoding=utf-8?
 !-- Copyright © 2015 Apple Inc. All rights reserved. --
 svg version=1.1 xmlns=http://www.w3.org/2000/svg viewBox=0 0 16 16
-path class=filled d=M 10 4 C 16 4 16 12 10 12 stroke=none /
-path class=filled d=M 6 4 C 0 4 0 12 6 12 stroke=none /
+path class=filled d=M 6.5 4 C 0 4 0 12 6.5 12 stroke=none /
+path class=filled d=M 9.5 4 C 16 4 16 12 9.5 12 stroke=none /
 /svg


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js (188620 => 188621)

--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js	2015-08-19 01:37:50 UTC (rev 188620)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js	2015-08-19 01:41:58 UTC (rev 188621)
@@ -181,6 +181,11 @@
 if (!group.section)
 return;
 
+if (group.links) {
+for (let key in group.links)
+group.links[key].linked = false;
+}
+
 let initialTextList = this._initialTextList;
 if (!initialTextList)
 this._currentStyle[WebInspector.VisualStyleDetailsPanel.InitialPropertySectionTextListSymbol] = initialTextList = new WeakMap;
@@ -363,6 +368,7 @@
 _generateMetricSectionRows(group, prefix, allowNegatives, highlightOnHover)
 {
 let properties = group.properties;
+let links = group.links = {};
 
 let hasPrefix = prefix  prefix.length;
 let propertyNamePrefix = hasPrefix ? prefix + - : ;
@@ -376,33 +382,33 @@
 
 properties[top] = new WebInspector.VisualStyleNumberInputBox(propertyNamePrefix + top, WebInspector.UIString(Top), this._keywords.boxModel, this._units.defaults, allowNegatives);
 properties[bottom] = new WebInspector.VisualStyleNumberInputBox(propertyNamePrefix + bottom, WebInspector.UIString(Bottom), this._keywords.boxModel, this._units.defaults, allowNegatives, true);
-let verticalLink = new WebInspector.VisualStylePropertyEditorLink([properties[top], properties[bottom]], link-vertical);
+links[vertical] = new WebInspector.VisualStylePropertyEditorLink([properties[top], 

[webkit-changes] [187598] trunk/Source/WebInspectorUI

2015-07-30 Thread drousso
Title: [187598] trunk/Source/WebInspectorUI








Revision 187598
Author drou...@apple.com
Date 2015-07-30 12:24:06 -0700 (Thu, 30 Jul 2015)


Log Message
Web Inspector: Add special case for deleting the next character when editing rules in the CSS Sidebar
https://bugs.webkit.org/show_bug.cgi?id=147442

Reviewed by Timothy Hatcher.

If the cursor is on the first position of the first line in a CSS Rule and that line
has no content, delete the line instead of doing nothing.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleBeforeChange):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (187597 => 187598)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-30 19:13:49 UTC (rev 187597)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-30 19:24:06 UTC (rev 187598)
@@ -1,3 +1,16 @@
+2015-07-30  Devin Rousso  drou...@apple.com
+
+Web Inspector: Add special case for deleting the next character when editing rules in the CSS Sidebar
+https://bugs.webkit.org/show_bug.cgi?id=147442
+
+Reviewed by Timothy Hatcher.
+
+If the cursor is on the first position of the first line in a CSS Rule and that line
+has no content, delete the line instead of doing nothing.
+
+* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleBeforeChange):
+
 2015-07-29  Nikita Vasilyev  nvasil...@apple.com
 
 Web Inspector: Improve styles of debugger popovers


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js (187597 => 187598)

--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-30 19:13:49 UTC (rev 187597)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-30 19:24:06 UTC (rev 187598)
@@ -474,11 +474,22 @@
 
 _handleBeforeChange(codeMirror, change)
 {
-if (change.origin !== +delete || (!change.to.line  !change.to.ch) || this._completionController.isShowingCompletions())
+if (change.origin !== +delete || this._completionController.isShowingCompletions())
 return CodeMirror.Pass;
 
+if (!change.to.line  !change.to.ch) {
+if (codeMirror.lineCount() === 1)
+return CodeMirror.Pass;
+
+var line = codeMirror.getLine(change.to.line);
+if (line  line.trim().length)
+return CodeMirror.Pass;
+
+codeMirror.execCommand(deleteLine);
+return;
+}
+
 var marks = codeMirror.findMarksAt(change.to);
-
 if (!marks.length)
 return CodeMirror.Pass;
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [187625] trunk/Source/WebInspectorUI

2015-07-30 Thread drousso
Title: [187625] trunk/Source/WebInspectorUI








Revision 187625
Author drou...@apple.com
Date 2015-07-30 16:56:51 -0700 (Thu, 30 Jul 2015)


Log Message
Web Inspector: Support smart-pasting in the Rules sidebar panel
https://bugs.webkit.org/show_bug.cgi?id=147362

Reviewed by Timothy Hatcher.

When pasting over the selector, if the pasted text matches CSS rule
formatting, replace the selected rule with the selector and text in
the pasted data.

* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.changeRule.changeCompleted):
(WebInspector.DOMNodeStyles.prototype.changeRule.styleChanged):
(WebInspector.DOMNodeStyles.prototype.changeRule.changeText):
(WebInspector.DOMNodeStyles.prototype.changeRule.ruleSelectorChanged):
(WebInspector.DOMNodeStyles.prototype.changeRule):
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste.parseTextForRule):
(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste):
(WebInspector.CSSStyleDeclarationSection):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (187624 => 187625)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-30 23:51:29 UTC (rev 187624)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-30 23:56:51 UTC (rev 187625)
@@ -1,3 +1,25 @@
+2015-07-30  Devin Rousso  drou...@apple.com
+
+Web Inspector: Support smart-pasting in the Rules sidebar panel
+https://bugs.webkit.org/show_bug.cgi?id=147362
+
+Reviewed by Timothy Hatcher.
+
+When pasting over the selector, if the pasted text matches CSS rule
+formatting, replace the selected rule with the selector and text in
+the pasted data.
+
+* UserInterface/Models/DOMNodeStyles.js:
+(WebInspector.DOMNodeStyles.prototype.changeRule.changeCompleted):
+(WebInspector.DOMNodeStyles.prototype.changeRule.styleChanged):
+(WebInspector.DOMNodeStyles.prototype.changeRule.changeText):
+(WebInspector.DOMNodeStyles.prototype.changeRule.ruleSelectorChanged):
+(WebInspector.DOMNodeStyles.prototype.changeRule):
+* UserInterface/Views/CSSStyleDeclarationSection.js:
+(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste.parseTextForRule):
+(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste):
+(WebInspector.CSSStyleDeclarationSection):
+
 2015-07-30  Matt Baker  mattba...@apple.com
 
 Web Inspector: Fix typo in frame duration filtering console.assert message


Modified: trunk/Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js (187624 => 187625)

--- trunk/Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js	2015-07-30 23:51:29 UTC (rev 187624)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js	2015-07-30 23:56:51 UTC (rev 187625)
@@ -322,6 +322,52 @@
 this._markAsNeedsRefresh();
 }
 
+changeRule(rule, selector, text)
+{
+if (!rule)
+return;
+
+selector = selector || ;
+
+function changeCompleted()
+{
+DOMAgent.markUndoableState();
+this.refresh();
+}
+
+function styleChanged(error, stylePayload)
+{
+if (error)
+return;
+
+changeCompleted.call(this);
+}
+
+function changeText(styleId)
+{
+// COMPATIBILITY (iOS 6): CSSAgent.setStyleText was not available in iOS 6.
+if (!text || !text.length || !CSSAgent.setStyleText) {
+changeCompleted.call(this);
+return;
+}
+
+CSSAgent.setStyleText(styleId, text, styleChanged.bind(this));
+}
+
+function ruleSelectorChanged(error, rulePayload)
+{
+if (error)
+return;
+
+changeText.call(this, rulePayload.style.styleId);
+}
+
+this._needsRefresh = true;
+this._ignoreNextContentDidChangeForStyleSheet = rule.ownerStyleSheet;
+
+CSSAgent.setRuleSelector(rule.id, selector, ruleSelectorChanged.bind(this));
+}
+
 changeRuleSelector(rule, selector)
 {
 selector = selector || ;


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js (187624 => 187625)

--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js	2015-07-30 23:51:29 UTC (rev 187624)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js	2015-07-30 23:56:51 UTC (rev 187625)
@@ -52,6 +52,7 @@
 this._selectorElement.addEventListener(mouseout, this._handleMouseOut.bind(this));
 this._selectorElement.addEventListener(keydown, this._handleKeyDown.bind(this));
 

[webkit-changes] [187500] trunk/Source/WebInspectorUI

2015-07-28 Thread drousso
Title: [187500] trunk/Source/WebInspectorUI








Revision 187500
Author drou...@apple.com
Date 2015-07-28 12:23:10 -0700 (Tue, 28 Jul 2015)


Log Message
Web Inspector: Invalid selectors can be applied to the stylesheet
https://bugs.webkit.org/show_bug.cgi?id=147230

Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:

* UserInterface/Models/CSSRule.js:
(WebInspector.CSSRule.prototype.set selectorText):
Fires an event with data stating if the newly applied selector was valid or not.
(WebInspector.CSSRule.prototype._selectorRejected):
(WebInspector.CSSRule.prototype._selectorResolved):
(WebInspector.CSSRule):

* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.changeRuleSelector.ruleSelectorChanged):
(WebInspector.DOMNodeStyles.prototype.changeRuleSelector):
Now returns a promise that will reject if CSSAgent.setRuleSelector has an
error, such as if the selector is invalid, and resolve otherwise.

* UserInterface/Views/CSSStyleDeclarationSection.css:
(.style-declaration-section:not(.invalid-selector)  .header  .icon.toggle-able:hover):
(.style-declaration-section:not(.invalid-selector).rule-disabled  .header  .icon):
(.style-declaration-section.invalid-selector  .header  .icon):
(.style-declaration-section.invalid-selector  .header  .selector  *):
(.style-declaration-section  .header  .icon.toggle-able:hover): Deleted.
(.style-declaration-section.rule-disabled  .header  .icon): Deleted.

* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection):
(WebInspector.CSSStyleDeclarationSection.prototype._toggleRuleOnOff):
Only allow rule toggling if the selector is valid.
(WebInspector.CSSStyleDeclarationSection.prototype._markSelector):
If the new selector is valid, refresh the section. Otherwise, apply a class
to the section element that marks the selector as being invalid.
(WebInspector.CSSStyleDeclarationSection.prototype.get _hasInvalidSelector):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
trunk/Source/WebInspectorUI/UserInterface/Models/CSSRule.js
trunk/Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.css
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (187499 => 187500)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-28 19:16:19 UTC (rev 187499)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-28 19:23:10 UTC (rev 187500)
@@ -1,3 +1,42 @@
+2015-07-28  Devin Rousso  drou...@apple.com
+
+Web Inspector: Invalid selectors can be applied to the stylesheet
+https://bugs.webkit.org/show_bug.cgi?id=147230
+
+Reviewed by Timothy Hatcher.
+
+* Localizations/en.lproj/localizedStrings.js:
+
+* UserInterface/Models/CSSRule.js:
+(WebInspector.CSSRule.prototype.set selectorText):
+Fires an event with data stating if the newly applied selector was valid or not.
+(WebInspector.CSSRule.prototype._selectorRejected):
+(WebInspector.CSSRule.prototype._selectorResolved):
+(WebInspector.CSSRule):
+
+* UserInterface/Models/DOMNodeStyles.js:
+(WebInspector.DOMNodeStyles.prototype.changeRuleSelector.ruleSelectorChanged):
+(WebInspector.DOMNodeStyles.prototype.changeRuleSelector):
+Now returns a promise that will reject if CSSAgent.setRuleSelector has an
+error, such as if the selector is invalid, and resolve otherwise.
+
+* UserInterface/Views/CSSStyleDeclarationSection.css:
+(.style-declaration-section:not(.invalid-selector)  .header  .icon.toggle-able:hover):
+(.style-declaration-section:not(.invalid-selector).rule-disabled  .header  .icon):
+(.style-declaration-section.invalid-selector  .header  .icon):
+(.style-declaration-section.invalid-selector  .header  .selector  *):
+(.style-declaration-section  .header  .icon.toggle-able:hover): Deleted.
+(.style-declaration-section.rule-disabled  .header  .icon): Deleted.
+
+* UserInterface/Views/CSSStyleDeclarationSection.js:
+(WebInspector.CSSStyleDeclarationSection):
+(WebInspector.CSSStyleDeclarationSection.prototype._toggleRuleOnOff):
+Only allow rule toggling if the selector is valid.
+(WebInspector.CSSStyleDeclarationSection.prototype._markSelector):
+If the new selector is valid, refresh the section. Otherwise, apply a class
+to the section element that marks the selector as being invalid.
+(WebInspector.CSSStyleDeclarationSection.prototype.get _hasInvalidSelector):
+
 2015-07-28  Joseph Pecoraro  pecor...@apple.com
 
 Web Inspector: Show Pseudo Elements in DOM Tree


Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (187499 => 187500)

--- 

[webkit-changes] [188260] trunk/Source/WebInspectorUI

2015-08-11 Thread drousso
Title: [188260] trunk/Source/WebInspectorUI








Revision 188260
Author drou...@apple.com
Date 2015-08-11 10:18:53 -0700 (Tue, 11 Aug 2015)


Log Message
Web Inspector: Hovering over an element in the Elements tab should highlight the whole line
https://bugs.webkit.org/show_bug.cgi?id=147855

Reviewed by Brian Burg.

* UserInterface/Views/DOMTreeOutline.css:
(.dom-tree-outline li.hovered:not(.selected) .selection):
Removed the horizontal positioning and border radius.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.css




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188259 => 188260)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-11 17:15:51 UTC (rev 188259)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-11 17:18:53 UTC (rev 188260)
@@ -1,3 +1,14 @@
+2015-08-11  Devin Rousso  drou...@apple.com
+
+Web Inspector: Hovering over an element in the Elements tab should highlight the whole line
+https://bugs.webkit.org/show_bug.cgi?id=147855
+
+Reviewed by Brian Burg.
+
+* UserInterface/Views/DOMTreeOutline.css:
+(.dom-tree-outline li.hovered:not(.selected) .selection):
+Removed the horizontal positioning and border radius.
+
 2015-08-10  Devin Rousso  drou...@apple.com
 
 Web Inspector: Add numerical input and slider based Visual editors for CSS properties


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.css (188259 => 188260)

--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.css	2015-08-11 17:15:51 UTC (rev 188259)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.css	2015-08-11 17:18:53 UTC (rev 188260)
@@ -41,11 +41,7 @@
 
 .dom-tree-outline li.hovered:not(.selected) .selection {
 display: block;
-left: 3px;
-right: 3px;
-
 background-color: hsla(209, 100%, 49%, 0.1);
-border-radius: 5px;
 }
 
 .dom-tree-outline li .selection {






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [188029] trunk/Source/WebInspectorUI

2015-08-06 Thread drousso
Title: [188029] trunk/Source/WebInspectorUI








Revision 188029
Author drou...@apple.com
Date 2015-08-05 23:24:09 -0700 (Wed, 05 Aug 2015)


Log Message
Web Inspector: Move the Metrics style sidebar panel into Computed
https://bugs.webkit.org/show_bug.cgi?id=147715

Reviewed by Timothy Hatcher.

Deleted the Metrics sidebar panel and moved its contents into the Computed sidebar panel.
In addition, not hovering over the Metrics section will display the colors of each box.

* UserInterface/Main.html:
* UserInterface/Views/BoxModelDetailsSectionRow.css:
(.details-section .row.box-model :matches(.position, .margin, .border, .padding, .content)):
(.details-section .row.box-model .position):
(.details-section .row.box-model .margin):
(.details-section .row.box-model .border):
(.details-section .row.box-model .padding):
(.details-section .row.box-model :matches(.content span, .top, .right, .bottom, .left)):
(.details-section .row.box-model :matches(.right, .left)):
(.details-section .row.box-model .content): Deleted.
(.details-section .row.box-model .content span): Deleted.
(.details-section .row.box-model .left): Deleted.
(.details-section .row.box-model .right): Deleted.
(.details-section .row.box-model .top): Deleted.
(.details-section .row.box-model .bottom): Deleted.

* UserInterface/Views/BoxModelDetailsSectionRow.js:
(WebInspector.BoxModelDetailsSectionRow.prototype._highlightDOMNode):
If no metric box is hovered, apply a class to the entire section.

* UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel):
Removed the usage of MetricsStyleDetailsPanel.

* UserInterface/Views/ComputedStyleDetailsPanel.css:
(.details-section.style-box-model:not(.collapsed)  :matches(.header, .content)):
Give the metrics section in the Computed panel a white background.

* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WebInspector.ComputedStyleDetailsPanel):
(WebInspector.ComputedStyleDetailsPanel.prototype.refresh):
Don't refresh the content unless the change is significant (without this, you cannot edit
metrics values using the arrow keys).

* UserInterface/Views/MetricsStyleDetailsPanel.js: Removed.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Main.html
trunk/Source/WebInspectorUI/UserInterface/Views/BoxModelDetailsSectionRow.css
trunk/Source/WebInspectorUI/UserInterface/Views/BoxModelDetailsSectionRow.js
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDetailsSidebarPanel.js
trunk/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.css
trunk/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js


Removed Paths

trunk/Source/WebInspectorUI/UserInterface/Views/MetricsStyleDetailsPanel.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188028 => 188029)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-06 06:17:59 UTC (rev 188028)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-06 06:24:09 UTC (rev 188029)
@@ -1,5 +1,51 @@
 2015-08-05  Devin Rousso  drou...@apple.com
 
+Web Inspector: Move the Metrics style sidebar panel into Computed
+https://bugs.webkit.org/show_bug.cgi?id=147715
+
+Reviewed by Timothy Hatcher.
+
+Deleted the Metrics sidebar panel and moved its contents into the Computed sidebar panel.
+In addition, not hovering over the Metrics section will display the colors of each box.
+
+* UserInterface/Main.html:
+* UserInterface/Views/BoxModelDetailsSectionRow.css:
+(.details-section .row.box-model :matches(.position, .margin, .border, .padding, .content)):
+(.details-section .row.box-model .position):
+(.details-section .row.box-model .margin):
+(.details-section .row.box-model .border):
+(.details-section .row.box-model .padding):
+(.details-section .row.box-model :matches(.content span, .top, .right, .bottom, .left)):
+(.details-section .row.box-model :matches(.right, .left)):
+(.details-section .row.box-model .content): Deleted.
+(.details-section .row.box-model .content span): Deleted.
+(.details-section .row.box-model .left): Deleted.
+(.details-section .row.box-model .right): Deleted.
+(.details-section .row.box-model .top): Deleted.
+(.details-section .row.box-model .bottom): Deleted.
+
+* UserInterface/Views/BoxModelDetailsSectionRow.js:
+(WebInspector.BoxModelDetailsSectionRow.prototype._highlightDOMNode):
+If no metric box is hovered, apply a class to the entire section.
+
+* UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
+(WebInspector.CSSStyleDetailsSidebarPanel):
+Removed the usage of MetricsStyleDetailsPanel.
+
+* UserInterface/Views/ComputedStyleDetailsPanel.css:
+(.details-section.style-box-model:not(.collapsed)  :matches(.header, .content)):
+Give the metrics section in the Computed panel a white background.
+
+ 

[webkit-changes] [187899] trunk/Source/WebInspectorUI

2015-08-04 Thread drousso
Title: [187899] trunk/Source/WebInspectorUI








Revision 187899
Author drou...@apple.com
Date 2015-08-04 15:45:37 -0700 (Tue, 04 Aug 2015)


Log Message
Web Inspector: buttons in new tab screen lack hover styles
https://bugs.webkit.org/show_bug.cgi?id=145355

Reviewed by Timothy Hatcher.

Added hover brightness filter to new tab buttons.

* UserInterface/Views/NewTabContentView.css:
(.new-tab.tab.content-view  .tab-item:not(.disabled):hover  .box):
(.new-tab.tab.content-view  .tab-item:not(.disabled):active  .box):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/NewTabContentView.css




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (187898 => 187899)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-04 22:45:04 UTC (rev 187898)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-04 22:45:37 UTC (rev 187899)
@@ -1,5 +1,18 @@
 2015-08-04  Devin Rousso  drou...@apple.com
 
+Web Inspector: buttons in new tab screen lack hover styles
+https://bugs.webkit.org/show_bug.cgi?id=145355
+
+Reviewed by Timothy Hatcher.
+
+Added hover brightness filter to new tab buttons.
+
+* UserInterface/Views/NewTabContentView.css:
+(.new-tab.tab.content-view  .tab-item:not(.disabled):hover  .box):
+(.new-tab.tab.content-view  .tab-item:not(.disabled):active  .box):
+
+2015-08-04  Devin Rousso  drou...@apple.com
+
 Web Inspector: Merge the styles sidebar navigation bar into a selectable item in the elements sidebar
 https://bugs.webkit.org/show_bug.cgi?id=146878
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NewTabContentView.css (187898 => 187899)

--- trunk/Source/WebInspectorUI/UserInterface/Views/NewTabContentView.css	2015-08-04 22:45:04 UTC (rev 187898)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NewTabContentView.css	2015-08-04 22:45:37 UTC (rev 187899)
@@ -66,10 +66,14 @@
 display: block;
 }
 
-.new-tab.tab.content-view  .tab-item:not(.disabled):active  .box {
+.new-tab.tab.content-view  .tab-item:not(.disabled):hover  .box {
 -webkit-filter: brightness(90%);
 }
 
+.new-tab.tab.content-view  .tab-item:not(.disabled):active  .box {
+-webkit-filter: brightness(75%);
+}
+
 .new-tab.tab.content-view  .tab-item  .box  img {
 width: 64px;
 height: 64px;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [187895] trunk/Source/WebInspectorUI

2015-08-04 Thread drousso
Title: [187895] trunk/Source/WebInspectorUI








Revision 187895
Author drou...@apple.com
Date 2015-08-04 15:32:08 -0700 (Tue, 04 Aug 2015)


Log Message
Web Inspector: Merge the styles sidebar navigation bar into a selectable item in the elements sidebar
https://bugs.webkit.org/show_bug.cgi?id=146878

Reviewed by Timothy Hatcher.

Replaced the default navigationItem of the CSSStyleDetailsSidebarPanel with a
ScopeRadioButtonNavigationItem that will open a select element containing the labels
of each style sidebar when reselected.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WebInspector.ComputedStyleDetailsPanel):
* UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
(.sidebar  .panel.details.css-style  .content):
* UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._panelMatchingIdentifier):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._handleSelectedItemChanged):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.visibilityDidChange):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._navigationItemSelected): Deleted.
* UserInterface/Views/DOMDetailsSidebarPanel.js:
(WebInspector.DOMDetailsSidebarPanel):
* UserInterface/Views/DetailsSidebarPanel.js:
(WebInspector.DetailsSidebarPanel):
* UserInterface/Views/MetricsStyleDetailsPanel.js:
(WebInspector.MetricsStyleDetailsPanel):
* UserInterface/Views/NavigationBar.js:
(WebInspector.NavigationBar.prototype._mouseDown):
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel):
* UserInterface/Views/ScopeRadioButtonNavigationItem.css: Added.
* UserInterface/Views/ScopeRadioButtonNavigationItem.js: Added.
* UserInterface/Views/SidebarPanel.js:
(WebInspector.SidebarPanel):
* UserInterface/Views/StyleDetailsPanel.js:
(WebInspector.StyleDetailsPanel):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
trunk/Source/WebInspectorUI/UserInterface/Main.html
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDetailsSidebarPanel.css
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDetailsSidebarPanel.js
trunk/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js
trunk/Source/WebInspectorUI/UserInterface/Views/DOMDetailsSidebarPanel.js
trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSidebarPanel.js
trunk/Source/WebInspectorUI/UserInterface/Views/MetricsStyleDetailsPanel.js
trunk/Source/WebInspectorUI/UserInterface/Views/NavigationBar.js
trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js
trunk/Source/WebInspectorUI/UserInterface/Views/SidebarPanel.js
trunk/Source/WebInspectorUI/UserInterface/Views/StyleDetailsPanel.js


Added Paths

trunk/Source/WebInspectorUI/UserInterface/Views/ScopeRadioButtonNavigationItem.css
trunk/Source/WebInspectorUI/UserInterface/Views/ScopeRadioButtonNavigationItem.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (187894 => 187895)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-04 22:17:07 UTC (rev 187894)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-04 22:32:08 UTC (rev 187895)
@@ -1,3 +1,44 @@
+2015-08-04  Devin Rousso  drou...@apple.com
+
+Web Inspector: Merge the styles sidebar navigation bar into a selectable item in the elements sidebar
+https://bugs.webkit.org/show_bug.cgi?id=146878
+
+Reviewed by Timothy Hatcher.
+
+Replaced the default navigationItem of the CSSStyleDetailsSidebarPanel with a
+ScopeRadioButtonNavigationItem that will open a select element containing the labels
+of each style sidebar when reselected.
+
+* Localizations/en.lproj/localizedStrings.js:
+* UserInterface/Main.html:
+* UserInterface/Views/ComputedStyleDetailsPanel.js:
+(WebInspector.ComputedStyleDetailsPanel):
+* UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
+(.sidebar  .panel.details.css-style  .content):
+* UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
+(WebInspector.CSSStyleDetailsSidebarPanel):
+(WebInspector.CSSStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty):
+(WebInspector.CSSStyleDetailsSidebarPanel.prototype._panelMatchingIdentifier):
+(WebInspector.CSSStyleDetailsSidebarPanel.prototype._handleSelectedItemChanged):
+(WebInspector.CSSStyleDetailsSidebarPanel.prototype.visibilityDidChange):
+(WebInspector.CSSStyleDetailsSidebarPanel.prototype._navigationItemSelected): Deleted.
+* UserInterface/Views/DOMDetailsSidebarPanel.js:
+(WebInspector.DOMDetailsSidebarPanel):
+* UserInterface/Views/DetailsSidebarPanel.js:
+(WebInspector.DetailsSidebarPanel):
+* 

[webkit-changes] [187902] trunk/Source/WebInspectorUI

2015-08-04 Thread drousso
Title: [187902] trunk/Source/WebInspectorUI








Revision 187902
Author drou...@apple.com
Date 2015-08-04 15:48:42 -0700 (Tue, 04 Aug 2015)


Log Message
Web Inspector: Existing text after completions do not have their completion style removed once hint is applied
https://bugs.webkit.org/show_bug.cgi?id=147536

Reviewed by Timothy Hatcher.

No longer applies a class to the text after the completion hint.

* UserInterface/Controllers/CodeMirrorCompletionController.css:
(.CodeMirror .CodeMirror-lines .completion-hint):
* UserInterface/Controllers/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint.update):
(WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint):
(WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.clearMarker):
(WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.update):
(WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.css
trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (187901 => 187902)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-04 22:47:43 UTC (rev 187901)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-04 22:48:42 UTC (rev 187902)
@@ -1,3 +1,21 @@
+2015-08-04  Devin Rousso  drou...@apple.com
+
+Web Inspector: Existing text after completions do not have their completion style removed once hint is applied
+https://bugs.webkit.org/show_bug.cgi?id=147536
+
+Reviewed by Timothy Hatcher.
+
+No longer applies a class to the text after the completion hint.
+
+* UserInterface/Controllers/CodeMirrorCompletionController.css:
+(.CodeMirror .CodeMirror-lines .completion-hint):
+* UserInterface/Controllers/CodeMirrorCompletionController.js:
+(WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint.update):
+(WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint):
+(WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.clearMarker):
+(WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.update):
+(WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint):
+
 2015-08-04  Matt Baker  mattba...@apple.com
 
 Web Inspector: Don't show 'Reveal In Debugger Tab' menu item if already in Debugger tab


Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.css (187901 => 187902)

--- trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.css	2015-08-04 22:47:43 UTC (rev 187901)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.css	2015-08-04 22:48:42 UTC (rev 187902)
@@ -24,5 +24,6 @@
  */
 
 .CodeMirror .CodeMirror-lines .completion-hint {
+text-decoration: none !important;
 opacity: 0.4;
 }


Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js (187901 => 187902)

--- trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js	2015-08-04 22:47:43 UTC (rev 187901)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js	2015-08-04 22:48:42 UTC (rev 187902)
@@ -270,12 +270,9 @@
 
 var from = {line: this._lineNumber, ch: this._startOffset};
 var cursor = {line: this._lineNumber, ch: this._endOffset};
-var to = {line: this._lineNumber, ch: this._startOffset + replacementText.length};
 var currentText = this._codeMirror.getRange(from, cursor);
 
 this._createCompletionHintMarker(cursor, replacementText.replace(currentText, ));
-if (cursor.ch !== to.ch)
-this._codeMirror.markText(cursor, to, {className: WebInspector.CodeMirrorCompletionController.CompletionHintStyleClassName});
 }
 
 this._ignoreChange = true;
@@ -342,14 +339,22 @@
 
 this._notifyCompletionsHiddenSoon();
 
-function update()
+function clearMarker(marker)
 {
-var range = this._completionHintMarker.find();
+if (!marker)
+return;
+
+var range = marker.find();
 if (range)
-this._completionHintMarker.clear();
+marker.clear();
 
-this._completionHintMarker = null;
+return null;
+}
 
+function update()
+{
+this._completionHintMarker = clearMarker(this._completionHintMarker);
+
 if (dontRestorePrefix)
 return;
 






___
webkit-changes mailing list

[webkit-changes] [188028] trunk/Source/WebInspectorUI

2015-08-06 Thread drousso
Title: [188028] trunk/Source/WebInspectorUI








Revision 188028
Author drou...@apple.com
Date 2015-08-05 23:17:59 -0700 (Wed, 05 Aug 2015)


Log Message
Web Inspector: Bezier curve visual editor
https://bugs.webkit.org/show_bug.cgi?id=134501

Reviewed by Timothy Hatcher.

Added a visual Cubic Bezier curve editor that is usable in both
the CSS sidebar and the resources panel.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/DOMUtilities.js:
(createSVGElement):
* UserInterface/Controllers/CodeMirrorBezierEditingController.js:
(WebInspector.CodeMirrorBezierEditingController):
(WebInspector.CodeMirrorBezierEditingController.prototype.get initialValue):
(WebInspector.CodeMirrorBezierEditingController.prototype.get cssClassName):
(WebInspector.CodeMirrorBezierEditingController.prototype.popoverWillPresent):
(WebInspector.CodeMirrorBezierEditingController.prototype.popoverDidPresent):
(WebInspector.CodeMirrorBezierEditingController.prototype._bezierEditorBezierChanged):
* UserInterface/Images/CubicBezier.svg: Added.
* UserInterface/Main.html:
* UserInterface/Models/Geometry.js:
(WebInspector.Point.prototype.distance):
(WebInspector.Point):
(WebInspector.CubicBezier):
(WebInspector.CubicBezier.fromPoints):
(WebInspector.CubicBezier.fromString):
(WebInspector.CubicBezier.prototype.get inPoint):
(WebInspector.CubicBezier.prototype.get outPoint):
(WebInspector.CubicBezier.prototype.copy):
(WebInspector.CubicBezier.prototype.toString):
(WebInspector.CubicBezier.prototype.solve):
(WebInspector.CubicBezier.prototype._sampleCurveX):
(WebInspector.CubicBezier.prototype._sampleCurveY):
(WebInspector.CubicBezier.prototype._sampleCurveDerivativeX):
(WebInspector.CubicBezier.prototype._solveCurveX):
* UserInterface/Models/TextMarker.js:
* UserInterface/Models/UnitBezier.js: Removed.
* UserInterface/Views/BezierEditor.css: Added.
(.bezier-editor):
(.bezier-editor  .bezier-preview):
(.bezier-editor  .bezier-preview  div):
(.bezier-editor  .bezier-preview-timing):
(.bezier-editor  .bezier-preview-timing.animate):
(.bezier-editor  .bezier-container):
(@keyframes bezierPreview):
(.bezier-editor  .bezier-container):
(.bezier-editor  .bezier-container .linear-curve):
(.bezier-editor  .bezier-container .bezier-curve):
(.bezier-editor  .bezier-container .control-line):
(.bezier-editor  .bezier-container .control-handle):
* UserInterface/Views/BezierEditor.js: Added.
(WebInspector.BezierEditor.createControl):
(WebInspector.BezierEditor):
(WebInspector.BezierEditor.prototype.get element):
(WebInspector.BezierEditor.prototype.set bezier):
(WebInspector.BezierEditor.prototype.get bezier):
(WebInspector.BezierEditor.prototype.handleEvent):
(WebInspector.BezierEditor.prototype._handleMousedown):
(WebInspector.BezierEditor.prototype._handleMousemove):
(WebInspector.BezierEditor.prototype._handleMouseup):
(WebInspector.BezierEditor.prototype._updateControlPointsForMouseEvent):
(WebInspector.BezierEditor.prototype._updateValue.round):
(WebInspector.BezierEditor.prototype._updateValue):
(WebInspector.BezierEditor.prototype._updateBezier):
(WebInspector.BezierEditor.prototype._updateControl):
(WebInspector.BezierEditor.prototype._triggerPreviewAnimation):
(WebInspector.BezierEditor.prototype._resetPreviewAnimation):
* UserInterface/Views/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor  .CodeMirror .CodeMirror-lines .cubic-bezier-marker):
(.css-style-text-editor  .CodeMirror .CodeMirror-lines .cubic-bezier-marker:hover):
(.css-style-text-editor  .CodeMirror .CodeMirror-lines .cubic-bezier-marker:active):
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype.didDismissPopover):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createBezierEditors.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createBezierEditors):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._commentProperty.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._commentProperty):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._uncommentRange.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._uncommentRange):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._cubicBezierMarkerClicked.updateCodeMirror.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._cubicBezierMarkerClicked.updateCodeMirror):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._cubicBezierMarkerClicked):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent):
* 

[webkit-changes] [188138] trunk/Source/WebInspectorUI

2015-08-07 Thread drousso
Title: [188138] trunk/Source/WebInspectorUI








Revision 188138
Author drou...@apple.com
Date 2015-08-07 10:58:45 -0700 (Fri, 07 Aug 2015)


Log Message
Web Inspector: Option+Up/Down arrow keys should increment/decrement numbers in HTML and SVG attributes
https://bugs.webkit.org/show_bug.cgi?id=147317

Reviewed by Timothy Hatcher.

If the value under the cursor in an HTML element attribute is a number, pressing alt and
up/down will increment/decrement the number value and apply that change to the element.

* UserInterface/Views/BoxModelDetailsSectionRow.js:
(WebInspector.BoxModelDetailsSectionRow.prototype._alteredFloatNumber):
(WebInspector.BoxModelDetailsSectionRow.prototype._handleKeyDown):
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._startEditingAttribute):
(WebInspector.DOMTreeElement.prototype._attributeEditingCommitted):
(WebInspector.DOMTreeElement.prototype._attributeNumberEditingCommitted):
* UserInterface/Views/EditingSupport.js:
(WebInspector.EditingConfig.prototype.setNumberCommitHandler):
(WebInspector.startEditing.defaultFinishHandler):
(WebInspector.startEditing.handleEditingResult):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/BoxModelDetailsSectionRow.js
trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js
trunk/Source/WebInspectorUI/UserInterface/Views/EditingSupport.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188137 => 188138)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-07 17:47:28 UTC (rev 188137)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-07 17:58:45 UTC (rev 188138)
@@ -1,3 +1,25 @@
+2015-08-07  Devin Rousso  drou...@apple.com
+
+Web Inspector: Option+Up/Down arrow keys should increment/decrement numbers in HTML and SVG attributes
+https://bugs.webkit.org/show_bug.cgi?id=147317
+
+Reviewed by Timothy Hatcher.
+
+If the value under the cursor in an HTML element attribute is a number, pressing alt and
+up/down will increment/decrement the number value and apply that change to the element.
+
+* UserInterface/Views/BoxModelDetailsSectionRow.js:
+(WebInspector.BoxModelDetailsSectionRow.prototype._alteredFloatNumber):
+(WebInspector.BoxModelDetailsSectionRow.prototype._handleKeyDown):
+* UserInterface/Views/DOMTreeElement.js:
+(WebInspector.DOMTreeElement.prototype._startEditingAttribute):
+(WebInspector.DOMTreeElement.prototype._attributeEditingCommitted):
+(WebInspector.DOMTreeElement.prototype._attributeNumberEditingCommitted):
+* UserInterface/Views/EditingSupport.js:
+(WebInspector.EditingConfig.prototype.setNumberCommitHandler):
+(WebInspector.startEditing.defaultFinishHandler):
+(WebInspector.startEditing.handleEditingResult):
+
 2015-08-05  Devin Rousso  drou...@apple.com
 
 Web Inspector: Move the Metrics style sidebar panel into Computed


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/BoxModelDetailsSectionRow.js (188137 => 188138)

--- trunk/Source/WebInspectorUI/UserInterface/Views/BoxModelDetailsSectionRow.js	2015-08-07 17:47:28 UTC (rev 188137)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/BoxModelDetailsSectionRow.js	2015-08-07 17:58:45 UTC (rev 188138)
@@ -292,7 +292,7 @@
 // Make the new number and constrain it to a precision of 6, this matches numbers the engine returns.
 // Use the Number constructor to forget the fixed precision, so 1.10 will print as 1.1.
 var result = Number((number + changeAmount).toFixed(6));
-if (!String(result).match(WebInspector.BoxModelDetailsSectionRow.CSSNumberRegex))
+if (!String(result).match(WebInspector.EditingSupport.NumberRegex))
 return null;
 
 return result;
@@ -314,10 +314,10 @@
 return;
 
 var originalValue = element.textContent;
-var wordRange = selectionRange.startContainer.rangeOfWord(selectionRange.startOffset, WebInspector.BoxModelDetailsSectionRow.StyleValueDelimiters, element);
+var wordRange = selectionRange.startContainer.rangeOfWord(selectionRange.startOffset, WebInspector.EditingSupport.StyleValueDelimiters, element);
 var wordString = wordRange.toString();
 
-var matches = /(.*?)(-?(?:\d+(?:\.\d+)?|\.\d+))(.*)/.exec(wordString);
+var matches = WebInspector.EditingSupport.NumberRegex.exec(wordString);
 var replacementString;
 if (matches  matches.length) {
 var prefix = matches[1];
@@ -439,6 +439,3 @@
 this._applyUserInput(element, userInput, previousContent, context, true);
 }
 };
-
-WebInspector.BoxModelDetailsSectionRow.StyleValueDelimiters =  \xA0\t\n\':;,/();
-WebInspector.BoxModelDetailsSectionRow.CSSNumberRegex = /^(-?(?:\d+(?:\.\d+)?|\.\d+))$/;


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js (188137 => 188138)

--- 

[webkit-changes] [188427] trunk/Source/WebInspectorUI

2015-08-13 Thread drousso
Title: [188427] trunk/Source/WebInspectorUI








Revision 188427
Author drou...@apple.com
Date 2015-08-13 18:51:06 -0700 (Thu, 13 Aug 2015)


Log Message
REGRESSION (r184000): Web Inspector: Stripped whitespace after editing CSS in Styles sidebar
https://bugs.webkit.org/show_bug.cgi?id=145679

Reviewed by Timothy Hatcher.

The formatter will now calculate the number of beginning spaces before the first line in a rule
and duplicate them in front of every other line.  If there is no new line at the beginning or are
no spaces, assume 4 spaces and a new line for each property.
Also cleaned up the code for _resetContent a bit.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent.update.set get this):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent.update.get this):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188426 => 188427)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-14 01:29:48 UTC (rev 188426)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-14 01:51:06 UTC (rev 188427)
@@ -1,3 +1,22 @@
+2015-08-13  Devin Rousso  drou...@apple.com
+
+REGRESSION (r184000): Web Inspector: Stripped whitespace after editing CSS in Styles sidebar
+https://bugs.webkit.org/show_bug.cgi?id=145679
+
+Reviewed by Timothy Hatcher.
+
+The formatter will now calculate the number of beginning spaces before the first line in a rule
+and duplicate them in front of every other line.  If there is no new line at the beginning or are
+no spaces, assume 4 spaces and a new line for each property.
+Also cleaned up the code for _resetContent a bit.
+
+* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
+(WebInspector.CSSStyleDeclarationTextEditor):
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent.update.set get this):
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent.update.get this):
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent.update):
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent):
+
 2015-08-13  Matt Baker  mattba...@apple.com
 
 Web Inspector: Skip rendering frame records without children


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js (188426 => 188427)

--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-08-14 01:29:48 UTC (rev 188426)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-08-14 01:51:06 UTC (rev 188427)
@@ -43,8 +43,8 @@
 this._filterResultPropertyNames = null;
 this._sortProperties = false;
 
-this._prefixWhitespace = ;
-this._suffixWhitespace = ;
+this._prefixWhitespace = \n;
+this._suffixWhitespace = \n;
 this._linePrefixWhitespace = ;
 
 this._delegate = delegate || null;
@@ -54,7 +54,7 @@
 lineWrapping: true,
 mode: css-rule,
 electricChars: false,
-indentWithTabs: true,
+indentWithTabs: false,
 indentUnit: 4,
 smartIndent: false,
 matchBrackets: true,
@@ -1606,13 +1606,13 @@
 {
 if (this._commitChangesTimeout) {
 clearTimeout(this._commitChangesTimeout);
-delete this._commitChangesTimeout;
+this._commitChangesTimeout = null;
 }
 
 this._removeEditingLineClasses();
 
 // Only allow editing if we have a style, it is editable and we have text range in the stylesheet.
-var readOnly = !this._style || !this._style.editable || !this._style.styleSheetTextRange;
+const readOnly = !this._style || !this._style.editable || !this._style.styleSheetTextRange;
 this._codeMirror.setOption(readOnly, readOnly);
 
 if (readOnly) {
@@ -1627,28 +1627,24 @@
 this._ignoreCodeMirrorContentDidChangeEvent = true;
 
 this._clearTextMarkers(false, true);
-
 this._codeMirror.setValue();
 this._codeMirror.clearHistory();
 this._codeMirror.markClean();
 
-delete this._ignoreCodeMirrorContentDidChangeEvent;
-
+this._ignoreCodeMirrorContentDidChangeEvent = false;
 return;
 }
 
 function update()
 {
 // Remember the cursor position/selection.
-var selectionAnchor = this._codeMirror.getCursor(anchor);
-var selectionHead = this._codeMirror.getCursor(head);
-var 

[webkit-changes] [188429] trunk/Source/WebInspectorUI

2015-08-13 Thread drousso
Title: [188429] trunk/Source/WebInspectorUI








Revision 188429
Author drou...@apple.com
Date 2015-08-13 19:20:02 -0700 (Thu, 13 Aug 2015)


Log Message
Web Inspector: Flash DOM node attribute on change
https://bugs.webkit.org/show_bug.cgi?id=147973

Reviewed by Timothy Hatcher.

Whenever an attribute on a DOM node changes, flash the attribute value.
If that value doesn't exist, flash the attribute name instead.

* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement):
(WebInspector.DOMTreeElement.prototype.nodeChanged):
(WebInspector.DOMTreeElement.prototype._buildAttributeDOM):
If the node has been marked with a general change, mark the attribute element for animation.
(WebInspector.DOMTreeElement.prototype._markNodeChanged.animationEnd):
(WebInspector.DOMTreeElement.prototype._markNodeChanged):
Adds a class to the given element that applies a simple background flash animation.
(WebInspector.DOMTreeElement.prototype._fireDidChange):
Add the animation class once all building of the represented DOM object for that node is done.

* UserInterface/Views/DOMTreeOutline.css:
(@keyframes node-state-changed):
Applies a semi-transparent background that fades to default.
(.node-state-changed):

* UserInterface/Views/DOMTreeUpdater.js:
(WebInspector.DOMTreeUpdater.prototype._attributesUpdated):
Now passes along the name of the modified attribute.
(WebInspector.DOMTreeUpdater.prototype._updateModifiedNodes):
If the modified node object has an attribute member, mark the node as being generally changed.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js
trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.css
trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeUpdater.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188428 => 188429)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-14 02:14:09 UTC (rev 188428)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-14 02:20:02 UTC (rev 188429)
@@ -1,5 +1,37 @@
 2015-08-13  Devin Rousso  drou...@apple.com
 
+Web Inspector: Flash DOM node attribute on change
+https://bugs.webkit.org/show_bug.cgi?id=147973
+
+Reviewed by Timothy Hatcher.
+
+Whenever an attribute on a DOM node changes, flash the attribute value.
+If that value doesn't exist, flash the attribute name instead.
+
+* UserInterface/Views/DOMTreeElement.js:
+(WebInspector.DOMTreeElement):
+(WebInspector.DOMTreeElement.prototype.nodeChanged):
+(WebInspector.DOMTreeElement.prototype._buildAttributeDOM):
+If the node has been marked with a general change, mark the attribute element for animation.
+(WebInspector.DOMTreeElement.prototype._markNodeChanged.animationEnd):
+(WebInspector.DOMTreeElement.prototype._markNodeChanged):
+Adds a class to the given element that applies a simple background flash animation.
+(WebInspector.DOMTreeElement.prototype._fireDidChange):
+Add the animation class once all building of the represented DOM object for that node is done.
+
+* UserInterface/Views/DOMTreeOutline.css:
+(@keyframes node-state-changed):
+Applies a semi-transparent background that fades to default.
+(.node-state-changed):
+
+* UserInterface/Views/DOMTreeUpdater.js:
+(WebInspector.DOMTreeUpdater.prototype._attributesUpdated):
+Now passes along the name of the modified attribute.
+(WebInspector.DOMTreeUpdater.prototype._updateModifiedNodes):
+If the modified node object has an attribute member, mark the node as being generally changed.
+
+2015-08-13  Devin Rousso  drou...@apple.com
+
 REGRESSION (r184000): Web Inspector: Stripped whitespace after editing CSS in Styles sidebar
 https://bugs.webkit.org/show_bug.cgi?id=145679
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js (188428 => 188429)

--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js	2015-08-14 02:14:09 UTC (rev 188428)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js	2015-08-14 02:20:02 UTC (rev 188429)
@@ -41,6 +41,7 @@
 this._canAddAttributes = true;
 this._searchQuery = null;
 this._expandedChildrenLimit = WebInspector.DOMTreeElement.InitialChildrenLimit;
+this._nodeStateChanges = [];
 }
 
 isCloseTag()
@@ -192,6 +193,14 @@
 return count;
 }
 
+nodeStateChanged(change)
+{
+if (!change)
+return;
+
+this._nodeStateChanges.push(change);
+}
+
 showChildNode(node)
 {
 console.assert(!this._elementCloseTag);
@@ -1070,41 +1079,43 @@
 
 _buildAttributeDOM(parentElement, name, value, node)
 {
-var hasText = (value.length  0);
-var attrSpanElement = parentElement.createChild(span, html-attribute);
-var attrNameElement = 

[webkit-changes] [188227] trunk/Source/WebCore

2015-08-10 Thread drousso
Title: [188227] trunk/Source/WebCore








Revision 188227
Author drou...@apple.com
Date 2015-08-10 13:51:32 -0700 (Mon, 10 Aug 2015)


Log Message
Web Inspector: [iOS] Allow inspector to retrieve a list of system fonts
https://bugs.webkit.org/show_bug.cgi?id=147033

Reviewed by Joseph Pecoraro.

Implement systemFontFamilies for iOS.

* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::FontCache::systemFontFamilies):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (188226 => 188227)

--- trunk/Source/WebCore/ChangeLog	2015-08-10 20:49:47 UTC (rev 188226)
+++ trunk/Source/WebCore/ChangeLog	2015-08-10 20:51:32 UTC (rev 188227)
@@ -1,5 +1,17 @@
 2015-08-10  Devin Rousso  drou...@apple.com
 
+Web Inspector: [iOS] Allow inspector to retrieve a list of system fonts
+https://bugs.webkit.org/show_bug.cgi?id=147033
+
+Reviewed by Joseph Pecoraro.
+
+Implement systemFontFamilies for iOS.
+
+* platform/graphics/ios/FontCacheIOS.mm:
+(WebCore::FontCache::systemFontFamilies):
+
+2015-08-10  Devin Rousso  drou...@apple.com
+
 Web Inspector: Invalid selectors can be applied to the stylesheet
 https://bugs.webkit.org/show_bug.cgi?id=147230
 


Modified: trunk/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm (188226 => 188227)

--- trunk/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm	2015-08-10 20:49:47 UTC (rev 188226)
+++ trunk/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm	2015-08-10 20:51:32 UTC (rev 188227)
@@ -33,6 +33,7 @@
 #import CoreTextSPI.h
 #import FontCascade.h
 #import RenderThemeIOS.h
+#import wtf/HashSet.h
 #import wtf/NeverDestroyed.h
 #import wtf/RetainPtr.h
 #import wtf/text/CString.h
@@ -472,8 +473,25 @@
 
 VectorString FontCache::systemFontFamilies()
 {
-// FIXME: https://webkit.org/b/147033 Web Inspector: [iOS] Allow inspector to retrieve a list of system fonts
+// FIXME: rdar://problem/21890188
 VectorString fontFamilies;
+auto emptyFontDescriptor = adoptCF(CTFontDescriptorCreateWithAttributes((CFDictionaryRef) @{ }));
+auto matchedDescriptors = adoptCF(CTFontDescriptorCreateMatchingFontDescriptors(emptyFontDescriptor.get(), nullptr));
+if (!matchedDescriptors)
+return fontFamilies;
+
+CFIndex numMatches = CFArrayGetCount(matchedDescriptors.get());
+if (!numMatches)
+return fontFamilies;
+
+HashSetString visited;
+for (CFIndex i = 0; i  numMatches; ++i) {
+auto fontDescriptor = static_castCTFontDescriptorRef(CFArrayGetValueAtIndex(matchedDescriptors.get(), i));
+if (auto familyName = adoptCF(static_castCFStringRef(CTFontDescriptorCopyAttribute(fontDescriptor, kCTFontFamilyNameAttribute
+visited.add(familyName.get());
+}
+
+copyToVector(visited, fontFamilies);
 return fontFamilies;
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [188229] trunk/Source/WebInspectorUI

2015-08-10 Thread drousso
Title: [188229] trunk/Source/WebInspectorUI








Revision 188229
Author drou...@apple.com
Date 2015-08-10 13:56:18 -0700 (Mon, 10 Aug 2015)


Log Message
Web Inspector: Add different types of non-numerical Visual editors for CSS properties
https://bugs.webkit.org/show_bug.cgi?id=147711

Added editors for keyword based CSS properties for use in the Visual style
details panel in the CSS sidebar.  Also added images for keyword values that
are simple enough to be conveyed in an image.

Reviewed by Brian Burg.

* UserInterface/Images/ClearBoth.svg: Added.
* UserInterface/Images/ClearLeft.svg: Added.
* UserInterface/Images/ClearRight.svg: Added.
* UserInterface/Images/FloatLeft.svg: Added.
* UserInterface/Images/FloatRight.svg: Added.
* UserInterface/Images/FontStyleItalic.svg: Added.
* UserInterface/Images/FontStyleNormal.svg: Added.
* UserInterface/Images/FontVariantSmallCaps.svg: Added.
* UserInterface/Images/TextAlignCenter.svg: Added.
* UserInterface/Images/TextAlignJustify.svg: Added.
* UserInterface/Images/TextAlignLeft.svg: Added.
* UserInterface/Images/TextAlignRight.svg: Added.
* UserInterface/Images/TextDecorationLineThrough.svg: Added.
* UserInterface/Images/TextDecorationOverline.svg: Added.
* UserInterface/Images/TextDecorationUnderline.svg: Added.
* UserInterface/Images/TextTransformCapitalize.svg: Added.
* UserInterface/Images/TextTransformLowercase.svg: Added.
* UserInterface/Images/TextTransformUppercase.svg: Added.
* UserInterface/Images/VisualStyleNone.svg: Added.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches):
Changed color swatch title.

* UserInterface/Views/Slider.js:
(WebInspector.Slider):
(WebInspector.Slider.prototype.set value):
(WebInspector.Slider.prototype.set knobX):
(WebInspector.Slider.prototype.get maxX):
If the given value is below 0, reset it to 0.
(WebInspector.Slider.prototype._handleMousedown):
(WebInspector.Slider.prototype._handleMousemove):
(WebInspector.Slider.prototype.get _maxX): Deleted.

* UserInterface/Views/VisualStyleColorPicker.css: Added.
(.visual-style-property-container.input-color-picker  .visual-style-property-value-container):
(.visual-style-property-container.input-color-picker  .visual-style-property-value-container  .visual-style-special-property-placeholder):
(.visual-style-property-container.input-color-picker  .visual-style-property-value-container  .color-swatch):
(.visual-style-property-container.input-color-picker  .visual-style-property-value-container  .color-swatch:hover):
(.visual-style-property-container.input-color-picker  .visual-style-property-value-container  .color-swatch:active):
(.visual-style-property-container.input-color-picker  .visual-style-property-value-container  .color-swatch  span):
(.visual-style-property-container.input-color-picker  .visual-style-property-value-container  input):
(.visual-style-property-container.input-color-picker.multiple  .visual-style-property-value-container  .visual-style-multiple-property-placeholder):

* UserInterface/Views/VisualStyleColorPicker.js: Added.
(WebInspector.VisualStyleColorPicker):
(WebInspector.VisualStyleColorPicker.prototype.get value):
(WebInspector.VisualStyleColorPicker.prototype.set value):
(WebInspector.VisualStyleColorPicker.prototype.get placeholder):
(WebInspector.VisualStyleColorPicker.prototype.set placeholder):
(WebInspector.VisualStyleColorPicker.prototype.get synthesizedValue):
(WebInspector.VisualStyleColorPicker.prototype.get hasCompletions):
(WebInspector.VisualStyleColorPicker.prototype.set completions):
(WebInspector.VisualStyleColorPicker.prototype._updateColorSwatch):
(WebInspector.VisualStyleColorPicker.prototype._colorSwatchClicked):
(WebInspector.VisualStyleColorPicker.prototype._colorPickerColorDidChange):
(WebInspector.VisualStyleColorPicker.prototype._completionClicked):
(WebInspector.VisualStyleColorPicker.prototype._textInputKeyDown):
(WebInspector.VisualStyleColorPicker.prototype._textInputKeyUp):
(WebInspector.VisualStyleColorPicker.prototype._showCompletionsIfAble):
(WebInspector.VisualStyleColorPicker.prototype._hideCompletions):
(WebInspector.VisualStyleColorPicker.prototype._toggleTabbingOfSelectableElements):

* UserInterface/Views/VisualStyleKeywordCheckbox.css: Added.
(.visual-style-property-container.keyword-checkbox  .visual-style-property-value-container):
(.visual-style-property-container.keyword-checkbox  .visual-style-property-value-container  input):
(.visual-style-property-container.keyword-checkbox  .visual-style-property-value-container  div):

* UserInterface/Views/VisualStyleKeywordCheckbox.js: Added.
(WebInspector.VisualStyleKeywordCheckbox):
(WebInspector.VisualStyleKeywordCheckbox.prototype.get value):
(WebInspector.VisualStyleKeywordCheckbox.prototype.set value):
(WebInspector.VisualStyleKeywordCheckbox.prototype.get synthesizedValue):

[webkit-changes] [188222] trunk/Source/WebCore

2015-08-10 Thread drousso
Title: [188222] trunk/Source/WebCore








Revision 188222
Author drou...@apple.com
Date 2015-08-10 13:33:38 -0700 (Mon, 10 Aug 2015)


Log Message
Web Inspector: Invalid selectors can be applied to the stylesheet
https://bugs.webkit.org/show_bug.cgi?id=147230

Reviewed by Timothy Hatcher.

* inspector/InspectorStyleSheet.cpp:
(WebCore::isValidSelectorListString):
(WebCore::InspectorStyleSheet::setRuleSelector):
Now checks to see that the supplied selector is valid before trying to commit it to the rule.
(WebCore::InspectorStyleSheet::addRule):
(WebCore::checkStyleRuleSelector): Deleted.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (188221 => 188222)

--- trunk/Source/WebCore/ChangeLog	2015-08-10 20:33:26 UTC (rev 188221)
+++ trunk/Source/WebCore/ChangeLog	2015-08-10 20:33:38 UTC (rev 188222)
@@ -1,3 +1,17 @@
+2015-08-10  Devin Rousso  drou...@apple.com
+
+Web Inspector: Invalid selectors can be applied to the stylesheet
+https://bugs.webkit.org/show_bug.cgi?id=147230
+
+Reviewed by Timothy Hatcher.
+
+* inspector/InspectorStyleSheet.cpp:
+(WebCore::isValidSelectorListString):
+(WebCore::InspectorStyleSheet::setRuleSelector):
+Now checks to see that the supplied selector is valid before trying to commit it to the rule.
+(WebCore::InspectorStyleSheet::addRule):
+(WebCore::checkStyleRuleSelector): Deleted.
+
 2015-08-10  James Craig  jcr...@apple.com
 
 AX: Address follow-up comments in bug 145684


Modified: trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp (188221 => 188222)

--- trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp	2015-08-10 20:33:26 UTC (rev 188221)
+++ trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp	2015-08-10 20:33:38 UTC (rev 188222)
@@ -637,15 +637,30 @@
 return rule-selectorText();
 }
 
+static bool isValidSelectorListString(const String selector, Document* document)
+{
+CSSSelectorList selectorList;
+createCSSParser(document)-parseSelector(selector, selectorList);
+return selectorList.isValid();
+}
+
 bool InspectorStyleSheet::setRuleSelector(const InspectorCSSId id, const String selector, ExceptionCode ec)
 {
 if (!checkPageStyleSheet(ec))
 return false;
+
+// If the selector is invalid, do not proceed any further.
+if (!isValidSelectorListString(selector, m_pageStyleSheet-ownerDocument())) {
+ec = SYNTAX_ERR;
+return false;
+}
+
 CSSStyleRule* rule = ruleForId(id);
 if (!rule) {
 ec = NOT_FOUND_ERR;
 return false;
 }
+
 CSSStyleSheet* styleSheet = rule-parentStyleSheet();
 if (!styleSheet || !ensureParsedDataReady()) {
 ec = NOT_FOUND_ERR;
@@ -671,18 +686,11 @@
 return true;
 }
 
-static bool checkStyleRuleSelector(Document* document, const String selector)
-{
-CSSSelectorList selectorList;
-createCSSParser(document)-parseSelector(selector, selectorList);
-return selectorList.isValid();
-}
-
 CSSStyleRule* InspectorStyleSheet::addRule(const String selector, ExceptionCode ec)
 {
 if (!checkPageStyleSheet(ec))
 return nullptr;
-if (!checkStyleRuleSelector(m_pageStyleSheet-ownerDocument(), selector)) {
+if (!isValidSelectorListString(selector, m_pageStyleSheet-ownerDocument())) {
 ec = SYNTAX_ERR;
 return nullptr;
 }






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [188238] trunk/Source/WebInspectorUI

2015-08-10 Thread drousso
Title: [188238] trunk/Source/WebInspectorUI








Revision 188238
Author drou...@apple.com
Date 2015-08-10 16:56:51 -0700 (Mon, 10 Aug 2015)


Log Message
Web Inspector: Add numerical input and slider based Visual editors for CSS properties
https://bugs.webkit.org/show_bug.cgi?id=147712

Reviewed by Brian Burg.

Added editors for CSS properties with numerical values for use in the Visual style
details panel in the CSS sidebar, in the form of a combined select and input or an
input range.  Also added optional visual linkages to sync values between multiple
editors of this type.

* UserInterface/Images/VisualStylePropertyLinked.svg: Added.
* UserInterface/Images/VisualStylePropertyUnlinked.svg: Added.

* UserInterface/Views/VisualStyleNumberInputBox.css: Added.
(.visual-style-property-container  .visual-style-property-value-container.focused  .focus-ring):
(.visual-style-property-container  .visual-style-property-value-container  .number-input-keyword-select):
(.visual-style-property-container  .visual-style-property-value-container  .number-input-container):
(.visual-style-property-container  .visual-style-property-value-container:not(.number-input-editable)  .number-input-container):
(.visual-style-property-container  .visual-style-property-value-container  .number-input-container  .number-input-value):
(.visual-style-property-container  .visual-style-property-value-container  .number-input-container  span):

* UserInterface/Views/VisualStyleNumberInputBox.js: Added.
(WebInspector.VisualStyleNumberInputBox):
(WebInspector.VisualStyleNumberInputBox.prototype.get value):
(WebInspector.VisualStyleNumberInputBox.prototype.set value):
(WebInspector.VisualStyleNumberInputBox.prototype.get units):
(WebInspector.VisualStyleNumberInputBox.prototype.set units):
(WebInspector.VisualStyleNumberInputBox.prototype.get placeholder):
(WebInspector.VisualStyleNumberInputBox.prototype.set placeholder):
(WebInspector.VisualStyleNumberInputBox.prototype.get synthesizedValue):
(WebInspector.VisualStyleNumberInputBox.prototype.get numberInputEditable):
(WebInspector.VisualStyleNumberInputBox.prototype.updateValueFromText):
(WebInspector.VisualStyleNumberInputBox.prototype.parseValue):
(WebInspector.VisualStyleNumberInputBox.prototype._keywordChanged):
(WebInspector.VisualStyleNumberInputBox.prototype._valueNumberInputKeyDown.shiftValue):
(WebInspector.VisualStyleNumberInputBox.prototype._valueNumberInputKeyDown):
(WebInspector.VisualStyleNumberInputBox.prototype._numberInputChanged):
(WebInspector.VisualStyleNumberInputBox.prototype._keywordSelectMouseDown):
(WebInspector.VisualStyleNumberInputBox.prototype._createValueOptions):
(WebInspector.VisualStyleNumberInputBox.prototype._createUnitOptions):
(WebInspector.VisualStyleNumberInputBox.prototype._addAdvancedUnits):
(WebInspector.VisualStyleNumberInputBox.prototype._removeAdvancedUnits):
(WebInspector.VisualStyleNumberInputBox.prototype._focusContentElement):
(WebInspector.VisualStyleNumberInputBox.prototype._blurContentElement):
(WebInspector.VisualStyleNumberInputBox.prototype._toggleTabbingOfSelectableElements):

* UserInterface/Views/VisualStylePropertyEditorLink.css: Added.
(.visual-style-property-editor-link):
(.visual-style-property-editor-link.disabled):
(.visual-style-property-editor-link.link-all):
(.visual-style-property-editor-link.link-all.linked):
(.visual-style-property-editor-link  .visual-style-property-editor-link-border):
(.visual-style-property-editor-link.link-all.linked  .visual-style-property-editor-link-icon:hover + .visual-style-property-editor-link-border.right):
(.visual-style-property-editor-link.link-all.linked  .visual-style-property-editor-link-border.left):
(.visual-style-property-editor-link.link-all.linked  .visual-style-property-editor-link-border.right):
(.visual-style-property-editor-link.linked  .visual-style-property-editor-link-border):
(.visual-style-property-editor-link  .visual-style-property-editor-link-border.left):
(.visual-style-property-editor-link  .visual-style-property-editor-link-border.right):
(.visual-style-property-editor-link:not(.link-all)  .visual-style-property-editor-link-border):
(.visual-style-property-editor-link:not(.link-all).linked  .visual-style-property-editor-link-border):
(.visual-style-property-editor-link  .visual-style-property-editor-link-icon):
(.visual-style-property-editor-link  .visual-style-property-editor-link-icon  .unlinked-icon):
(.visual-style-property-editor-link  .visual-style-property-editor-link-icon  .unlinked-icon svg .filled):
(.visual-style-property-editor-link  .visual-style-property-editor-link-icon  .unlinked-icon svg .stroked):
(.visual-style-property-editor-link:not(.link-all)  .visual-style-property-editor-link-icon):
(.visual-style-property-editor-link.link-all  .visual-style-property-editor-link-icon):

* UserInterface/Views/VisualStylePropertyEditorLink.js: Added.
(WebInspector.VisualStylePropertyEditorLink):
(WebInspector.VisualStylePropertyEditorLink.prototype.get 

[webkit-changes] [188226] trunk/Source/WebInspectorUI

2015-08-10 Thread drousso
Title: [188226] trunk/Source/WebInspectorUI








Revision 188226
Author drou...@apple.com
Date 2015-08-10 13:49:47 -0700 (Mon, 10 Aug 2015)


Log Message
Web Inspector: Add VisualStyleSelectorSection
https://bugs.webkit.org/show_bug.cgi?id=147572

Reviewed by Brian Burg.

Adds a section to the new Visual style sidebar panel that contains the list of
styles for the currently selected node.

* UserInterface/Models/CSSRule.js:
(WebInspector.CSSRule.prototype.get mediaText):
Returns a string containing the list of media queries.

* UserInterface/Models/CSSStyleDeclaration.js:
(WebInspector.CSSStyleDeclaration):
(WebInspector.CSSStyleDeclaration.prototype.set text):
(WebInspector.CSSStyleDeclaration.prototype.get modified):
(WebInspector.CSSStyleDeclaration.prototype.resetText):
(WebInspector.CSSStyleDeclaration.prototype.generateCSSRuleString):
Generates a formatted string of the style text.

* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype._handleContextMenuEvent):
(WebInspector.CSSStyleDeclarationSection.prototype._generateCSSRuleString): Deleted.

* UserInterface/Views/VisualStyleSelectorSection.css: Added.
(.details-section.visual-style-selector-section  .header):
(.details-section.visual-style-selector-section:not(.collapsed)  .header):
(@media (-webkit-min-device-pixel-ratio: 2)):
(.details-section.visual-style-selector-section  .header  .current-selector):
(.visual-style-selector-section.details-section:not(.collapsed)  .header  .current-selector):
(.details-section.visual-style-selector-section  .header  .current-selector  .icon):
(.details-section.visual-style-selector-section  .header  .current-selector  span):
(.details-section.visual-style-selector-section  .header  .controls):
(.details-section.visual-style-selector-section.collapsed  .header  .controls):
(.details-section.visual-style-selector-section  .header  .controls  .visual-style-selector-section-add-rule):
(.details-section.visual-style-selector-section  .content  .selectors):
(.details-section.visual-style-selector-section  .content  .selectors  .selector-list):
(.details-section.visual-style-selector-section  .content  .selectors  .selector-list  .visual-style-selector-item:nth-child(odd)):
(.details-section.visual-style-selector-section  .content  .selectors  .selector-list  .section-divider):
(.details-section.visual-style-selector-section  .content  .selectors  .selector-list  .section-divider  .icon):
(.details-section.visual-style-selector-section  .content  .selectors  .selector-list  .section-divider  :matches(.disclosure-button, .icon)):
(.details-section.visual-style-selector-section  .content  .selectors  .selector-list  .section-divider  .titles  .title):
(.details-section.visual-style-selector-section  .content  .selectors  .selector-list  .section-divider ~ .visual-style-selector-item:nth-child(even)):
(.details-section.visual-style-selector-section  .content  .selectors  .selector-list  .section-divider ~ .visual-style-selector-item:nth-child(odd)):

* UserInterface/Views/VisualStyleSelectorSection.js: Added.
(WebInspector.VisualStyleSelectorSection):
(WebInspector.VisualStyleSelectorSection.prototype.update.createSelectorItem):
(WebInspector.VisualStyleSelectorSection.prototype.update.uniqueOrderedRules):
(WebInspector.VisualStyleSelectorSection.prototype.update.insertAllMatchingPseudoRules):
(WebInspector.VisualStyleSelectorSection.prototype.update):
(WebInspector.VisualStyleSelectorSection.prototype.currentStyle):
(WebInspector.VisualStyleSelectorSection.prototype._selectorChanged):
(WebInspector.VisualStyleSelectorSection.prototype._styleTextReset):
(WebInspector.VisualStyleSelectorSection.prototype._addNewRule):
(WebInspector.VisualStyleSelectorSection.prototype._treeElementCheckboxToggled):
(WebInspector.VisualStyleSelectorSection.prototype._handleMouseOver):
(WebInspector.VisualStyleSelectorSection.prototype._handleMouseOut):

* UserInterface/Views/VisualStyleSelectorTreeItem.css:
(.item.visual-style-selector-item):
(.item.visual-style-selector-item.selected):
(.item.visual-style-selector-item  .disclosure-button):
(.item.visual-style-selector-item  input[type=checkbox]):
(.item.visual-style-selector-item  .icon):
(.item.visual-style-selector-item.modified  .icon):
(.item.visual-style-selector-item.selector-invalid  .icon):
(.item.visual-style-selector-item.selector-invalid  .titles  .title):
(.item.visual-style-selector-item.selector-invalid  .titles  .title::before):
(.item.visual-style-selector-item  .titles):
(.item.visual-style-selector-item:not(.dom-element-icon)  .titles  .title):
(.item.visual-style-selector-item:not(.dom-element-icon).editable  .titles  .title):
(.item.visual-style-selector-item:not(.dom-element-icon).editable  .titles  .title:focus):
(.item.visual-style-selector-item  .titles  .subtitle::before):
(.item.visual-style-selector-item  .titles  .subtitle):

* UserInterface/Views/VisualStyleSelectorTreeItem.js:

[webkit-changes] [188483] trunk/Source/WebInspectorUI

2015-08-14 Thread drousso
Title: [188483] trunk/Source/WebInspectorUI








Revision 188483
Author drou...@apple.com
Date 2015-08-14 13:05:06 -0700 (Fri, 14 Aug 2015)


Log Message
Web Inspector: Add Visual editors for CSS properties with comma separated values
https://bugs.webkit.org/show_bug.cgi?id=147578

Reviewed by Timothy Hatcher.

Displays comma separated CSS property values as a tree outline list.

* UserInterface/Images/Minus.svg: Added.
* UserInterface/Views/TreeOutline.js:
(WebInspector.TreeOutline.prototype.get selectedTreeElementIndex):
(WebInspector.TreeOutline):

* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css: Added.
(.visual-style-property-container.comma-separated-keyword-editor):
(.visual-style-property-container.comma-separated-keyword-editor  .visual-style-property-value-container):
(.visual-style-property-container.comma-separated-keyword-editor  .visual-style-property-value-container  .visual-style-comma-separated-keyword-list):
(.visual-style-property-container.comma-separated-keyword-editor  .visual-style-property-value-container  .visual-style-comma-separated-keyword-list  .visual-style-comma-separated-keyword-item):
(.visual-style-property-container.comma-separated-keyword-editor  .visual-style-property-value-container  .visual-style-comma-separated-keyword-list  .visual-style-comma-separated-keyword-item:nth-child(odd)):
(.visual-style-property-container.comma-separated-keyword-editor  .visual-style-property-value-container  .visual-style-comma-separated-keyword-list  .visual-style-comma-separated-keyword-item.selected):
(.visual-style-property-container.comma-separated-keyword-editor  .visual-style-property-value-container  .visual-style-comma-separated-keyword-list  .visual-style-comma-separated-keyword-item  :matches(button, img)):
(.visual-style-property-container.comma-separated-keyword-editor  .visual-style-property-value-container  .visual-style-comma-separated-keyword-list  .visual-style-comma-separated-keyword-item  .titles):
(.visual-style-property-container.comma-separated-keyword-editor  .visual-style-property-value-container  .visual-style-comma-separated-keyword-list  .visual-style-comma-separated-keyword-item.visual-style-font-family-list-item.selected:not(.editor-hidden)  .titles  *):
(.visual-style-property-container.comma-separated-keyword-editor  .visual-style-property-value-container  .visual-style-comma-separated-keyword-list  .visual-style-comma-separated-keyword-item.visual-style-font-family-list-item  .visual-style-comma-separated-keyword-item-editor):
(.visual-style-property-container.comma-separated-keyword-editor  .visual-style-property-value-container  .visual-style-comma-separated-keyword-list  .visual-style-comma-separated-keyword-item.visual-style-font-family-list-item.editor-hidden  .visual-style-comma-separated-keyword-item-editor):
(.visual-style-property-container.comma-separated-keyword-editor  .visual-style-property-value-container  .visual-style-comma-separated-keyword-list  .visual-style-comma-separated-keyword-item  .titles  .subtitle):
(.visual-style-property-container.comma-separated-keyword-editor  .visual-style-property-value-container  .visual-style-comma-separated-keyword-list  .visual-style-comma-separated-keyword-item:not(.no-value)  .titles  .subtitle):
(.visual-style-property-container.comma-separated-keyword-editor  .visual-style-property-value-container  .visual-style-comma-separated-keyword-controls):
(.visual-style-property-container.comma-separated-keyword-editor  .visual-style-property-value-container  .visual-style-comma-separated-keyword-controls  div):
(.visual-style-property-container.comma-separated-keyword-editor  .visual-style-property-value-container  .visual-style-comma-separated-keyword-controls  .visual-style-remove-comma-separated-keyword):

* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js: Added.
(WebInspector.VisualStyleCommaSeparatedKeywordEditor):
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.set selectedTreeElementValue):
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.get value):
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.set value):
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.get synthesizedValue):
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._treeElementSelected):
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._treeItemIsEmpty):
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._addEmptyCommaSeparatedKeyword):
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._removeSelectedCommaSeparatedKeyword):
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._removeEmptyCommaSeparatedKeywords):
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._addCommaSeparatedKeyword):
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._removeCommaSeparatedKeyword):
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._createNewTreeElement):

* 

[webkit-changes] [188484] trunk/Source/WebInspectorUI

2015-08-14 Thread drousso
Title: [188484] trunk/Source/WebInspectorUI








Revision 188484
Author drou...@apple.com
Date 2015-08-14 13:07:15 -0700 (Fri, 14 Aug 2015)


Log Message
Web Inspector: Add visual editors for CSS properties
https://bugs.webkit.org/show_bug.cgi?id=147576

Added parent class for property editors in the Visual style
details panel in the CSS sidebar.

Reviewed by Timothy Hatcher.

* UserInterface/Views/VisualStylePropertyCombiner.js: Added.
(WebInspector.VisualStylePropertyCombiner):
(WebInspector.VisualStylePropertyCombiner.prototype.get style):
(WebInspector.VisualStylePropertyCombiner.prototype.get synthesizedValue):
(WebInspector.VisualStylePropertyCombiner.prototype.modifyPropertyText):
(WebInspector.VisualStylePropertyCombiner.prototype.update):
(WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText.updateCompatibleEditor):
(WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText):
(WebInspector.VisualStylePropertyCombiner.prototype.propertyMissing):
(WebInspector.VisualStylePropertyCombiner.prototype.resetEditorValues):
(WebInspector.VisualStylePropertyCombiner.prototype._markEditors):
(WebInspector.VisualStylePropertyCombiner.prototype._handlePropertyEditorValueChanged):

* UserInterface/Views/VisualStylePropertyEditor.css: Added.
(.visual-style-property-container):
(.visual-style-property-container  .visual-style-property-title):
(.visual-style-property-container  .visual-style-property-title  .property-reference-info):
(.visual-style-property-container.disabled  .visual-style-property-title  :not(.property-reference-info)):
(.visual-style-property-container  .visual-style-property-value-container):
(.visual-style-property-container.disabled  .visual-style-property-value-container):
(.visual-style-property-container  .visual-style-property-value-container select):
(.visual-style-property-container  .visual-style-property-value-container input):
(.visual-style-property-container.disabled  .visual-style-property-value-container input):
(.visual-style-property-container.layout-reversed  .visual-style-property-title):
(.visual-style-property-container  .visual-style-property-value-container  .visual-style-special-property-placeholder):
(.visual-style-property-info-popover):
(.visual-style-property-info-popover  h3):

* UserInterface/Views/VisualStylePropertyEditor.js: Added.
(WebInspector.VisualStylePropertyEditor.canonicalizeValues):
(WebInspector.VisualStylePropertyEditor):
(WebInspector.VisualStylePropertyEditor.prototype.get element):
(WebInspector.VisualStylePropertyEditor.prototype.get style):
(WebInspector.VisualStylePropertyEditor.prototype.get value):
(WebInspector.VisualStylePropertyEditor.prototype.set value):
(WebInspector.VisualStylePropertyEditor.prototype.get units):
(WebInspector.VisualStylePropertyEditor.prototype.set units):
(WebInspector.VisualStylePropertyEditor.prototype.get placeholder):
(WebInspector.VisualStylePropertyEditor.prototype.set placeholder):
(WebInspector.VisualStylePropertyEditor.prototype.get synthesizedValue):
(WebInspector.VisualStylePropertyEditor.prototype.set suppressStyleTextUpdate):
(WebInspector.VisualStylePropertyEditor.prototype.set masterProperty):
(WebInspector.VisualStylePropertyEditor.prototype.get masterProperty):
(WebInspector.VisualStylePropertyEditor.prototype.set optionalProperty):
(WebInspector.VisualStylePropertyEditor.prototype.get optionalProperty):
(WebInspector.VisualStylePropertyEditor.prototype.set colorProperty):
(WebInspector.VisualStylePropertyEditor.prototype.get colorProperty):
(WebInspector.VisualStylePropertyEditor.prototype.get propertyReferenceName):
(WebInspector.VisualStylePropertyEditor.prototype.set propertyReferenceName):
(WebInspector.VisualStylePropertyEditor.prototype.set disabled):
(WebInspector.VisualStylePropertyEditor.prototype.get disabled):
(WebInspector.VisualStylePropertyEditor.prototype.update):
(WebInspector.VisualStylePropertyEditor.prototype.updateEditorValues):
(WebInspector.VisualStylePropertyEditor.prototype.resetEditorValues):
(WebInspector.VisualStylePropertyEditor.prototype.modifyPropertyText):
(WebInspector.VisualStylePropertyEditor.prototype.getValuesFromText):
(WebInspector.VisualStylePropertyEditor.prototype.propertyMissing):
(WebInspector.VisualStylePropertyEditor.prototype.valueIsCompatible):
(WebInspector.VisualStylePropertyEditor.prototype.valueIsSupportedKeyword):
(WebInspector.VisualStylePropertyEditor.prototype.valueIsSupportedUnit):
(WebInspector.VisualStylePropertyEditor.prototype.get contentElement):
(WebInspector.VisualStylePropertyEditor.prototype.get specialPropertyPlaceholderElement):
(WebInspector.VisualStylePropertyEditor.prototype.parseValue):
(WebInspector.VisualStylePropertyEditor.prototype._valueIsSupportedAdvancedKeyword):
(WebInspector.VisualStylePropertyEditor.prototype._valueIsSupportedAdvancedUnit):
(WebInspector.VisualStylePropertyEditor.prototype._canonicalizedKeywordForKey):

[webkit-changes] [188480] trunk/Source/WebInspectorUI

2015-08-14 Thread drousso
Title: [188480] trunk/Source/WebInspectorUI








Revision 188480
Author drou...@apple.com
Date 2015-08-14 11:43:46 -0700 (Fri, 14 Aug 2015)


Log Message
Web Inspector: Add autocomplete controller for Visual property editors
https://bugs.webkit.org/show_bug.cgi?id=147579

Reviewed by Timothy Hatcher.

* UserInterface/Controllers/VisualStyleCompletionsController.js: Added.
(WebInspector.VisualStyleCompletionsController):
Takes in a CSSCompletions and displays a list of suggestions based on a given prefix in a popover.
(WebInspector.VisualStyleCompletionsController.prototype.get visible):
(WebInspector.VisualStyleCompletionsController.prototype.get hasCompletions):
(WebInspector.VisualStyleCompletionsController.prototype.get currentCompletion):
(WebInspector.VisualStyleCompletionsController.prototype.set completions):
(WebInspector.VisualStyleCompletionsController.prototype.completionSuggestionsViewCustomizeCompletionElement):
(WebInspector.VisualStyleCompletionsController.prototype.previous):
(WebInspector.VisualStyleCompletionsController.prototype.next):
(WebInspector.VisualStyleCompletionsController.prototype.update):
(WebInspector.VisualStyleCompletionsController.prototype.show):
(WebInspector.VisualStyleCompletionsController.prototype.hide):

* UserInterface/Models/CSSKeywordCompletions.js:
(WebInspector.CSSKeywordCompletions.forProperty):
Make sure that the cssNameCompletions exist before trying to add them.

* UserInterface/Views/CompletionSuggestionsView.js:
(WebInspector.CompletionSuggestionsView.prototype.update):
Allow the delegate to modify the newly created completion suggestion item.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js
trunk/Source/WebInspectorUI/UserInterface/Views/CompletionSuggestionsView.js


Added Paths

trunk/Source/WebInspectorUI/UserInterface/Controllers/VisualStyleCompletionsController.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188479 => 188480)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-14 18:31:38 UTC (rev 188479)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-14 18:43:46 UTC (rev 188480)
@@ -1,5 +1,34 @@
 2015-08-14  Devin Rousso  drou...@apple.com
 
+Web Inspector: Add autocomplete controller for Visual property editors
+https://bugs.webkit.org/show_bug.cgi?id=147579
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Controllers/VisualStyleCompletionsController.js: Added.
+(WebInspector.VisualStyleCompletionsController):
+Takes in a CSSCompletions and displays a list of suggestions based on a given prefix in a popover.
+(WebInspector.VisualStyleCompletionsController.prototype.get visible):
+(WebInspector.VisualStyleCompletionsController.prototype.get hasCompletions):
+(WebInspector.VisualStyleCompletionsController.prototype.get currentCompletion):
+(WebInspector.VisualStyleCompletionsController.prototype.set completions):
+(WebInspector.VisualStyleCompletionsController.prototype.completionSuggestionsViewCustomizeCompletionElement):
+(WebInspector.VisualStyleCompletionsController.prototype.previous):
+(WebInspector.VisualStyleCompletionsController.prototype.next):
+(WebInspector.VisualStyleCompletionsController.prototype.update):
+(WebInspector.VisualStyleCompletionsController.prototype.show):
+(WebInspector.VisualStyleCompletionsController.prototype.hide):
+
+* UserInterface/Models/CSSKeywordCompletions.js:
+(WebInspector.CSSKeywordCompletions.forProperty):
+Make sure that the cssNameCompletions exist before trying to add them.
+
+* UserInterface/Views/CompletionSuggestionsView.js:
+(WebInspector.CompletionSuggestionsView.prototype.update):
+Allow the delegate to modify the newly created completion suggestion item.
+
+2015-08-14  Devin Rousso  drou...@apple.com
+
 Web Inspector: Add a visual editor for timing functions
 https://bugs.webkit.org/show_bug.cgi?id=148022
 


Added: trunk/Source/WebInspectorUI/UserInterface/Controllers/VisualStyleCompletionsController.js (0 => 188480)

--- trunk/Source/WebInspectorUI/UserInterface/Controllers/VisualStyleCompletionsController.js	(rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/VisualStyleCompletionsController.js	2015-08-14 18:43:46 UTC (rev 188480)
@@ -0,0 +1,132 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation 

[webkit-changes] [188479] trunk/Source/WebInspectorUI

2015-08-14 Thread drousso
Title: [188479] trunk/Source/WebInspectorUI








Revision 188479
Author drou...@apple.com
Date 2015-08-14 11:31:38 -0700 (Fri, 14 Aug 2015)


Log Message
Web Inspector: Add a visual editor for timing functions
https://bugs.webkit.org/show_bug.cgi?id=148022

Reviewed by Timothy Hatcher.

Uses the existing bezier editor and the Visual keyword picker to make an editor for timing functions.

* UserInterface/Views/VisualStyleTimingEditor.css: Added.
(.visual-style-property-container.timing-editor  .visual-style-property-value-container):
(.visual-style-property-container.timing-editor  .visual-style-property-value-container  .keyword-picker-select):
(.visual-style-property-container.timing-editor  .visual-style-property-value-container  .bezier-editor):
(.visual-style-property-container.timing-editor  .visual-style-property-value-container  .bezier-editor:hover):
(.visual-style-property-container.timing-editor  .visual-style-property-value-container  .bezier-editor:active):

* UserInterface/Views/VisualStyleTimingEditor.js: Added.
(WebInspector.VisualStyleTimingEditor):
(WebInspector.VisualStyleTimingEditor.prototype.parseValue):
(WebInspector.VisualStyleTimingEditor.prototype.get bezierValue):
(WebInspector.VisualStyleTimingEditor.prototype.set bezierValue):
(WebInspector.VisualStyleTimingEditor.prototype._getValue):
(WebInspector.VisualStyleTimingEditor.prototype._setValue):
(WebInspector.VisualStyleTimingEditor.prototype._generateSynthesizedValue):
(WebInspector.VisualStyleTimingEditor.prototype._bezierMarkerClicked):
(WebInspector.VisualStyleTimingEditor.prototype._handleKeywordChanged):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog


Added Paths

trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleTimingEditor.css
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleTimingEditor.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188478 => 188479)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-14 18:06:51 UTC (rev 188478)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-14 18:31:38 UTC (rev 188479)
@@ -1,3 +1,30 @@
+2015-08-14  Devin Rousso  drou...@apple.com
+
+Web Inspector: Add a visual editor for timing functions
+https://bugs.webkit.org/show_bug.cgi?id=148022
+
+Reviewed by Timothy Hatcher.
+
+Uses the existing bezier editor and the Visual keyword picker to make an editor for timing functions.
+
+* UserInterface/Views/VisualStyleTimingEditor.css: Added.
+(.visual-style-property-container.timing-editor  .visual-style-property-value-container):
+(.visual-style-property-container.timing-editor  .visual-style-property-value-container  .keyword-picker-select):
+(.visual-style-property-container.timing-editor  .visual-style-property-value-container  .bezier-editor):
+(.visual-style-property-container.timing-editor  .visual-style-property-value-container  .bezier-editor:hover):
+(.visual-style-property-container.timing-editor  .visual-style-property-value-container  .bezier-editor:active):
+
+* UserInterface/Views/VisualStyleTimingEditor.js: Added.
+(WebInspector.VisualStyleTimingEditor):
+(WebInspector.VisualStyleTimingEditor.prototype.parseValue):
+(WebInspector.VisualStyleTimingEditor.prototype.get bezierValue):
+(WebInspector.VisualStyleTimingEditor.prototype.set bezierValue):
+(WebInspector.VisualStyleTimingEditor.prototype._getValue):
+(WebInspector.VisualStyleTimingEditor.prototype._setValue):
+(WebInspector.VisualStyleTimingEditor.prototype._generateSynthesizedValue):
+(WebInspector.VisualStyleTimingEditor.prototype._bezierMarkerClicked):
+(WebInspector.VisualStyleTimingEditor.prototype._handleKeywordChanged):
+
 2015-08-13  Nikita Vasilyev  nvasil...@apple.com
 
 Web Inspector: Can't resize split console when window is too narrow


Added: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleTimingEditor.css (0 => 188479)

--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleTimingEditor.css	(rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleTimingEditor.css	2015-08-14 18:31:38 UTC (rev 188479)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * 

[webkit-changes] [188490] trunk/Source/WebInspectorUI

2015-08-14 Thread drousso
Title: [188490] trunk/Source/WebInspectorUI








Revision 188490
Author drou...@apple.com
Date 2015-08-14 15:04:56 -0700 (Fri, 14 Aug 2015)


Log Message
Web Inspector: Style changes to Visual sidebar editors
https://bugs.webkit.org/show_bug.cgi?id=148021

Reviewed by Brian Burg.

Various style fixes and feature enhancements in some of the Visual style property editors.

* UserInterface/Views/VisualStyleColorPicker.css:
(.visual-style-property-container.input-color-picker  .visual-style-property-value-container  .color-swatch):
(.visual-style-property-container.input-color-picker  .visual-style-property-value-container  input):
(.visual-style-property-container.input-color-picker.multiple  .visual-style-property-value-container  .visual-style-multiple-property-placeholder):

* UserInterface/Views/VisualStyleKeywordCheckbox.css:
(.visual-style-property-container.keyword-checkbox.font-variant  .visual-style-property-value-container  input):
(.visual-style-property-container.keyword-checkbox.font-variant  .visual-style-property-value-container  input::before):
(.visual-style-property-container.keyword-checkbox  .visual-style-property-value-container  input): Deleted.
(.visual-style-property-container.keyword-checkbox  .visual-style-property-value-container  div): Deleted.
Replaced the SVG image before the checkbox with a :before pseudo-element with content.

* UserInterface/Views/VisualStyleKeywordCheckbox.js:
(WebInspector.VisualStyleKeywordCheckbox):
Removed the SVG image before the checkbox.

* UserInterface/Views/VisualStyleKeywordPicker.js:
(WebInspector.VisualStyleKeywordPicker.prototype.get value):
(WebInspector.VisualStyleKeywordPicker.prototype.set value):
(WebInspector.VisualStyleKeywordPicker.prototype.set placeholder):
(WebInspector.VisualStyleKeywordPicker.prototype.get synthesizedValue):
(WebInspector.VisualStyleKeywordPicker.prototype._getValue):
(WebInspector.VisualStyleKeywordPicker.prototype._setValue):
(WebInspector.VisualStyleKeywordPicker.prototype._generateSynthesizedValue):
(WebInspector.VisualStyleKeywordPicker.prototype._handleKeywordChanged):
Due to a current bug (https://webkit.org/b/147064), you cannot extend ES6 getters/setters.  In order to work
around this, a member function was added that performs the same action as the getter/setter, but can be extended.

* UserInterface/Views/VisualStylePropertyEditorLink.css:
(.visual-style-property-editor-link.linked  .visual-style-property-editor-link-border):
(.visual-style-property-editor-link  .visual-style-property-editor-link-icon  .unlinked-icon):

* UserInterface/Views/VisualStyleRelativeNumberSlider.js:
(WebInspector.VisualStyleRelativeNumberSlider):
(WebInspector.VisualStyleRelativeNumberSlider.prototype._resetSlider):
(WebInspector.VisualStyleRelativeNumberSlider.prototype._sliderChanged):

* UserInterface/Views/VisualStyleSelectorTreeItem.css:
(.item.visual-style-selector-item  input[type=checkbox]):
(.item.visual-style-selector-item.selected  input[type=checkbox]::before):
(.item.visual-style-selector-item.modified  .icon):
(.item.visual-style-selector-item:not(.dom-element-icon).editable  .titles  .title:focus):

* UserInterface/Views/VisualStyleSelectorTreeItem.js:
(WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent):
(WebInspector.VisualStyleSelectorTreeItem.prototype._handleMainTitleMouseDown):
Added another context menu item to show the source location for the selected rule.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleColorPicker.css
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleKeywordCheckbox.css
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleKeywordCheckbox.js
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleKeywordPicker.js
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditorLink.css
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleRelativeNumberSlider.js
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.css
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188489 => 188490)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-14 22:01:34 UTC (rev 188489)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-14 22:04:56 UTC (rev 188490)
@@ -1,5 +1,62 @@
 2015-08-14  Devin Rousso  drou...@apple.com
 
+Web Inspector: Style changes to Visual sidebar editors
+https://bugs.webkit.org/show_bug.cgi?id=148021
+
+Reviewed by Brian Burg.
+
+Various style fixes and feature enhancements in some of the Visual style property editors.
+
+* UserInterface/Views/VisualStyleColorPicker.css:
+(.visual-style-property-container.input-color-picker  .visual-style-property-value-container  .color-swatch):
+(.visual-style-property-container.input-color-picker  .visual-style-property-value-container  input):
+

[webkit-changes] [188496] trunk/Source/WebInspectorUI

2015-08-14 Thread drousso
Title: [188496] trunk/Source/WebInspectorUI








Revision 188496
Author drou...@apple.com
Date 2015-08-14 15:19:57 -0700 (Fri, 14 Aug 2015)


Log Message
Web Inspector: Highlight DOM node attribute changes in parallel, not sequentially
https://bugs.webkit.org/show_bug.cgi?id=148019

Reviewed by Brian Burg.

* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._markNodeChanged):
(WebInspector.DOMTreeElement.prototype._nodeChangedAnimationEnd):
Now removes the animated element from the updated list once the animation ends.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188495 => 188496)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-14 22:19:16 UTC (rev 188495)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-14 22:19:57 UTC (rev 188496)
@@ -1,3 +1,15 @@
+2015-08-14  Devin Rousso  drou...@apple.com
+
+Web Inspector: Highlight DOM node attribute changes in parallel, not sequentially
+https://bugs.webkit.org/show_bug.cgi?id=148019
+
+Reviewed by Brian Burg.
+
+* UserInterface/Views/DOMTreeElement.js:
+(WebInspector.DOMTreeElement.prototype._markNodeChanged):
+(WebInspector.DOMTreeElement.prototype._nodeChangedAnimationEnd):
+Now removes the animated element from the updated list once the animation ends.
+
 2015-08-14  Matt Baker  mattba...@apple.com
 
 Web Inspector: Long delay when row selection changes in timeline data grids


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js (188495 => 188496)

--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js	2015-08-14 22:19:16 UTC (rev 188495)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js	2015-08-14 22:19:57 UTC (rev 188496)
@@ -41,7 +41,9 @@
 this._canAddAttributes = true;
 this._searchQuery = null;
 this._expandedChildrenLimit = WebInspector.DOMTreeElement.InitialChildrenLimit;
+
 this._nodeStateChanges = [];
+this._boundNodeChangedAnimationEnd = this._nodeChangedAnimationEnd.bind(this);
 }
 
 isCloseTag()
@@ -1462,22 +1464,27 @@
 
 _markNodeChanged()
 {
-function animationEnd() {
-this.classList.remove(node-state-changed);
-this.removeEventListener(animationEnd, animationEnd);
-}
-
 for (let change of this._nodeStateChanges) {
 let element = change.element;
 if (!element)
 continue;
 
 element.classList.remove(node-state-changed);
-element.addEventListener(animationEnd, animationEnd);
+element.addEventListener(animationend, this._boundNodeChangedAnimationEnd);
 element.classList.add(node-state-changed);
 }
+}
 
-this._nodeStateChanges = [];
+_nodeChangedAnimationEnd(event)
+{
+let element = event.target;
+element.classList.remove(node-state-changed);
+element.removeEventListener(animationend, this._boundNodeChangedAnimationEnd);
+
+for (let i = this._nodeStateChanges.length - 1; i = 0; --i) {
+if (this._nodeStateChanges[i].element === element)
+this._nodeStateChanges.splice(i, 1);
+}
 }
 
 _fireDidChange()






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [188503] trunk/Source/WebInspectorUI

2015-08-14 Thread drousso
Title: [188503] trunk/Source/WebInspectorUI








Revision 188503
Author drou...@apple.com
Date 2015-08-14 18:07:36 -0700 (Fri, 14 Aug 2015)


Log Message
Web Inspector: Add VisualStyleDetailsPanel
https://bugs.webkit.org/show_bug.cgi?id=147570

Reviewed by Timothy Hatcher.

Added VisualStyleDetailsPanel and inclusions to forthcoming classes
that will be used in this visual sidebar panel.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
Added files for all new classes used in the VisualStyleDetailsPanel.

* UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel):
* UserInterface/Views/DetailsSection.js:
(WebInspector.DetailsSection):
(WebInspector.DetailsSection.prototype.set collapsed):
(WebInspector.DetailsSection.prototype.get expandedByUser):
(WebInspector.DetailsSection.prototype._headerElementClicked):
Track whether or not the expanded state was caused by the user.

* UserInterface/Views/VisualStyleDetailsPanel.css: Added.
(.sidebar  .panel.details.css-style .visual  .details-section .details-section  .header):
(.sidebar  .panel.details.css-style .visual  .details-section .details-section  .header  .visual-style-section-clear):
(.sidebar  .panel.details.css-style .visual  .details-section .details-section:not(.modified)  .header  .visual-style-section-clear):
(.sidebar  .panel.details.css-style .visual  .details-section .details-section  .header  span):
(.sidebar  .panel.details.css-style .visual  .details-section .details-section.modified  .header  span::after):
(.sidebar  .panel.details.css-style .visual  .details-section .details-section  .content):
(.sidebar  .panel.details.css-style .visual  .details-section .details-section  .content .group  .row):
(.sidebar  .panel.details.css-style .visual  .details-section .details-section  .content .group  .row:last-child):
(.sidebar  .panel.details.css-style .visual  .details-section .details-section  .content .group  .row.visual-style-separated-row):
(.sidebar  .panel.details.css-style .visual  .details-section .details-section  .content .group  .row  .visual-style-property-container  .visual-style-property-title):
(.sidebar  .panel.details.css-style .visual  .details-section .details-section  .content .group  .row  .visual-style-property-container:not(.layout-reversed):last-child):
(.sidebar  .panel.details.css-style .visual.disabled  .details-section:not(.visual-style-selector-section)):
(.sidebar  .panel.details.css-style .visual.disabled  .details-section:not(.visual-style-selector-section) input):

* UserInterface/Views/VisualStyleDetailsPanel.js: Added.
(WebInspector.VisualStyleDetailsPanel):
(WebInspector.VisualStyleDetailsPanel.prototype.refresh):
(WebInspector.VisualStyleDetailsPanel.prototype._generateSection.replaceDashWithCapital):
(WebInspector.VisualStyleDetailsPanel.prototype._generateSection.createOptionsElement):
(WebInspector.VisualStyleDetailsPanel.prototype._generateSection):
(WebInspector.VisualStyleDetailsPanel.prototype._prepareForChange):
(WebInspector.VisualStyleDetailsPanel.prototype._updateSections):
(WebInspector.VisualStyleDetailsPanel.prototype._updateProperties):
(WebInspector.VisualStyleDetailsPanel.prototype._updateAutocompleteCompatiblePropertyEditor):
(WebInspector.VisualStyleDetailsPanel.prototype._sectionModified):
(WebInspector.VisualStyleDetailsPanel.prototype._clearModifiedSection):
(WebInspector.VisualStyleDetailsPanel.prototype.get _initialTextList):
(WebInspector.VisualStyleDetailsPanel.prototype._initialPropertyTextModified):
(WebInspector.VisualStyleDetailsPanel.prototype._populateSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateDisplaySection):
(WebInspector.VisualStyleDetailsPanel.prototype._generateMetricSectionRows):
(WebInspector.VisualStyleDetailsPanel.prototype._populatePositionSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateFloatSection):
(WebInspector.VisualStyleDetailsPanel.prototype._addMetricsMouseListeners.onEditorMouseover):
(WebInspector.VisualStyleDetailsPanel.prototype._addMetricsMouseListeners.onEditorMouseout):
(WebInspector.VisualStyleDetailsPanel.prototype._addMetricsMouseListeners):
(WebInspector.VisualStyleDetailsPanel.prototype._populateDimensionsSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateMarginSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populatePaddingSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateFlexboxSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateTextStyleSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateFontSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateTextSpacingSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateTextShadowSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateBackgroundStyleSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateBorderSection):

[webkit-changes] [188326] trunk/Source/WebInspectorUI

2015-08-11 Thread drousso
Title: [188326] trunk/Source/WebInspectorUI








Revision 188326
Author drou...@apple.com
Date 2015-08-11 22:45:49 -0700 (Tue, 11 Aug 2015)


Log Message
Web Inspector: Disabling attribute styles should not be possible
https://bugs.webkit.org/show_bug.cgi?id=147922

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection):
Increases the specificity of the if statement that adds rule disable state toggling to the icon.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188325 => 188326)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-12 05:40:27 UTC (rev 188325)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-12 05:45:49 UTC (rev 188326)
@@ -1,5 +1,16 @@
 2015-08-11  Devin Rousso  drou...@apple.com
 
+Web Inspector: Disabling attribute styles should not be possible
+https://bugs.webkit.org/show_bug.cgi?id=147922
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/CSSStyleDeclarationSection.js:
+(WebInspector.CSSStyleDeclarationSection):
+Increases the specificity of the if statement that adds rule disable state toggling to the icon.
+
+2015-08-11  Devin Rousso  drou...@apple.com
+
 Web Inspector: Update to CodeMirror 5.5 or later
 https://bugs.webkit.org/show_bug.cgi?id=147109
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js (188325 => 188326)

--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js	2015-08-12 05:40:27 UTC (rev 188325)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js	2015-08-12 05:45:49 UTC (rev 188326)
@@ -99,8 +99,7 @@
 break;
 }
 
-// Matches all situations except for User Agent styles.
-if (!(style.ownerRule  style.ownerRule.type === WebInspector.CSSRule.Type.UserAgent)) {
+if (style.editable) {
 this._iconElement.classList.add(toggle-able);
 this._iconElement.title = WebInspector.UIString(Comment All Properties);
 this._iconElement.addEventListener(click, this._toggleRuleOnOff.bind(this));






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [188337] trunk/Source

2015-08-12 Thread drousso
Title: [188337] trunk/Source








Revision 188337
Author drou...@apple.com
Date 2015-08-12 10:53:55 -0700 (Wed, 12 Aug 2015)


Log Message
Web Inspector: Implement selector highlighting for iOS
https://bugs.webkit.org/show_bug.cgi?id=147919

Reviewed by Timothy Hatcher.

Source/WebCore:

* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::getHighlight):
If the current highlight is a nodeList, generate highlights for each node in the list and
return the concatenated value of those highlights.

Source/WebKit2:

* UIProcess/WKInspectorHighlightView.mm:
(-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]):
Added offset parameter to start drawing the highlight at that index of the highlight quad list.

(-[WKInspectorHighlightView _layoutForNodeListHighlight:]):
Loops through the highlight quads and draws a new highlight for every 4 highlight quad objects.

(-[WKInspectorHighlightView update:]):
Now uses the light highlighting for both nodes and lists of nodes.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/inspector/InspectorOverlay.cpp
trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/UIProcess/WKInspectorHighlightView.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (188336 => 188337)

--- trunk/Source/WebCore/ChangeLog	2015-08-12 14:28:25 UTC (rev 188336)
+++ trunk/Source/WebCore/ChangeLog	2015-08-12 17:53:55 UTC (rev 188337)
@@ -1,3 +1,15 @@
+2015-08-12  Devin Rousso  drou...@apple.com
+
+Web Inspector: Implement selector highlighting for iOS
+https://bugs.webkit.org/show_bug.cgi?id=147919
+
+Reviewed by Timothy Hatcher.
+
+* inspector/InspectorOverlay.cpp:
+(WebCore::InspectorOverlay::getHighlight):
+If the current highlight is a nodeList, generate highlights for each node in the list and
+return the concatenated value of those highlights.
+
 2015-08-12  Youenn Fablet  youenn.fab...@crf.canon.fr
 
 Remove promise attribute specific handling from binding generator


Modified: trunk/Source/WebCore/inspector/InspectorOverlay.cpp (188336 => 188337)

--- trunk/Source/WebCore/inspector/InspectorOverlay.cpp	2015-08-12 14:28:25 UTC (rev 188336)
+++ trunk/Source/WebCore/inspector/InspectorOverlay.cpp	2015-08-12 17:53:55 UTC (rev 188337)
@@ -226,13 +226,22 @@
 
 void InspectorOverlay::getHighlight(Highlight highlight, InspectorOverlay::CoordinateSystem coordinateSystem) const
 {
-if (!m_highlightNode  !m_highlightQuad)
+if (!m_highlightNode  !m_highlightQuad  !m_highlightNodeList)
 return;
 
 highlight.type = HighlightType::Rects;
 if (m_highlightNode)
 buildNodeHighlight(*m_highlightNode, nullptr, m_nodeHighlightConfig, highlight, coordinateSystem);
-else
+else if (m_highlightNodeList) {
+highlight.setDataFromConfig(m_nodeHighlightConfig);
+for (unsigned i = 0; i  m_highlightNodeList-length(); ++i) {
+Highlight nodeHighlight;
+buildNodeHighlight(*(m_highlightNodeList-item(i)), nullptr, m_nodeHighlightConfig, nodeHighlight, coordinateSystem);
+if (nodeHighlight.type == HighlightType::Node)
+highlight.quads.appendVector(nodeHighlight.quads);
+}
+highlight.type = HighlightType::NodeList;
+} else
 buildQuadHighlight(*m_highlightQuad, m_quadHighlightConfig, highlight);
 }
 


Modified: trunk/Source/WebKit2/ChangeLog (188336 => 188337)

--- trunk/Source/WebKit2/ChangeLog	2015-08-12 14:28:25 UTC (rev 188336)
+++ trunk/Source/WebKit2/ChangeLog	2015-08-12 17:53:55 UTC (rev 188337)
@@ -1,3 +1,20 @@
+2015-08-12  Devin Rousso  drou...@apple.com
+
+Web Inspector: Implement selector highlighting for iOS
+https://bugs.webkit.org/show_bug.cgi?id=147919
+
+Reviewed by Timothy Hatcher.
+
+* UIProcess/WKInspectorHighlightView.mm:
+(-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]):
+Added offset parameter to start drawing the highlight at that index of the highlight quad list.
+
+(-[WKInspectorHighlightView _layoutForNodeListHighlight:]):
+Loops through the highlight quads and draws a new highlight for every 4 highlight quad objects.
+
+(-[WKInspectorHighlightView update:]):
+Now uses the light highlighting for both nodes and lists of nodes.
+
 2015-08-11  Carlos Garcia Campos  cgar...@igalia.com
 
 NetworkProcess: DNS prefetch happens in the Web Process


Modified: trunk/Source/WebKit2/UIProcess/WKInspectorHighlightView.mm (188336 => 188337)

--- trunk/Source/WebKit2/UIProcess/WKInspectorHighlightView.mm	2015-08-12 14:28:25 UTC (rev 188336)
+++ trunk/Source/WebKit2/UIProcess/WKInspectorHighlightView.mm	2015-08-12 17:53:55 UTC (rev 188337)
@@ -212,25 +212,23 @@
 CGPathRelease(path);
 }
 
-- (void)_layoutForNodeHighlight:(const Highlight)highlight
+- (void)_layoutForNodeHighlight:(const Highlight)highlight offset:(unsigned)offset
 {
-if (!highlight.quads.size()) {
-[self 

[webkit-changes] [187923] trunk/Source/WebInspectorUI

2015-08-04 Thread drousso
Title: [187923] trunk/Source/WebInspectorUI








Revision 187923
Author drou...@apple.com
Date 2015-08-04 17:41:31 -0700 (Tue, 04 Aug 2015)


Log Message
Web Inspector: No Filter Results overlaps other UI elements when docked Inspector is small
https://bugs.webkit.org/show_bug.cgi?id=147659

Reviewed by Timothy Hatcher.

Hide overflow of empty content label containers in navigation sidebars.

* UserInterface/Views/NavigationSidebarPanel.css:
(.sidebar  .panel.navigation  .empty-content-placeholder):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.css




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (187922 => 187923)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-05 00:39:04 UTC (rev 187922)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-05 00:41:31 UTC (rev 187923)
@@ -1,3 +1,15 @@
+2015-08-04  Devin Rousso  drou...@apple.com
+
+Web Inspector: No Filter Results overlaps other UI elements when docked Inspector is small
+https://bugs.webkit.org/show_bug.cgi?id=147659
+
+Reviewed by Timothy Hatcher.
+
+Hide overflow of empty content label containers in navigation sidebars.
+
+* UserInterface/Views/NavigationSidebarPanel.css:
+(.sidebar  .panel.navigation  .empty-content-placeholder):
+
 2015-08-04  Joseph Pecoraro  pecor...@apple.com
 
 Improve some LayoutTests/inspector flakey output for tests with InspectorTest.reloadPage


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.css (187922 => 187923)

--- trunk/Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.css	2015-08-05 00:39:04 UTC (rev 187922)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.css	2015-08-05 00:41:31 UTC (rev 187923)
@@ -63,11 +63,10 @@
 left: 0;
 right: 0;
 bottom: 28px;
-
 display: flex;
-
 justify-content: center;
 align-items: center;
+overflow: hidden;
 }
 
 .sidebar  .panel.navigation  .empty-content-placeholder  .message {






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [187960] trunk/Source/WebInspectorUI

2015-08-05 Thread drousso
Title: [187960] trunk/Source/WebInspectorUI








Revision 187960
Author drou...@apple.com
Date 2015-08-05 07:07:51 -0700 (Wed, 05 Aug 2015)


Log Message
Web Inspector: Allow users to duplicate rules in the Rules sidebar panel
https://bugs.webkit.org/show_bug.cgi?id=147361

Reviewed by Timothy Hatcher.

Adds context menu option to non-inherited rules that, when clicked, creates
a new rule with the same selector and no properties, and then focuses it.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.addRuleWithSelector.addedRule):
(WebInspector.DOMNodeStyles.prototype.addRuleWithSelector):
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype.get _currentSelectorText):
(WebInspector.CSSStyleDeclarationSection.prototype._handleContextMenuEvent):
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionFocusNextNewInspectorRule):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
trunk/Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js
trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (187959 => 187960)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-05 14:04:47 UTC (rev 187959)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-05 14:07:51 UTC (rev 187960)
@@ -1,3 +1,23 @@
+2015-08-05  Devin Rousso  drou...@apple.com
+
+Web Inspector: Allow users to duplicate rules in the Rules sidebar panel
+https://bugs.webkit.org/show_bug.cgi?id=147361
+
+Reviewed by Timothy Hatcher.
+
+Adds context menu option to non-inherited rules that, when clicked, creates
+a new rule with the same selector and no properties, and then focuses it.
+
+* Localizations/en.lproj/localizedStrings.js:
+* UserInterface/Models/DOMNodeStyles.js:
+(WebInspector.DOMNodeStyles.prototype.addRuleWithSelector.addedRule):
+(WebInspector.DOMNodeStyles.prototype.addRuleWithSelector):
+* UserInterface/Views/CSSStyleDeclarationSection.js:
+(WebInspector.CSSStyleDeclarationSection.prototype.get _currentSelectorText):
+(WebInspector.CSSStyleDeclarationSection.prototype._handleContextMenuEvent):
+* UserInterface/Views/RulesStyleDetailsPanel.js:
+(WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionFocusNextNewInspectorRule):
+
 2015-08-04  Matt Baker  mattba...@apple.com
 
 Web Inspector: Layout  Rendering timeline grid should show TimelineRecord parent/child relationships


Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (187959 => 187960)

--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2015-08-05 14:04:47 UTC (rev 187959)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2015-08-05 14:07:51 UTC (rev 187960)
@@ -166,6 +166,7 @@
 localizedStrings[Domain] = Domain;
 localizedStrings[Done] = Done;
 localizedStrings[Download Web Archive] = Download Web Archive;
+localizedStrings[Duplicate Selector] = Duplicate Selector;
 localizedStrings[Duplicate property '%s'.\nClick to delete this property.] = Duplicate property '%s'.\nClick to delete this property.;
 localizedStrings[Duration] = Duration;
 localizedStrings[Dynamically calculated for the parent element] = Dynamically calculated for the parent element;


Modified: trunk/Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js (187959 => 187960)

--- trunk/Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js	2015-08-05 14:04:47 UTC (rev 187959)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js	2015-08-05 14:07:51 UTC (rev 187960)
@@ -257,6 +257,24 @@
 CSSAgent.addRule.invoke({contextNodeId: this._node.id, selector}, addedRule.bind(this));
 }
 
+addRuleWithSelector(selector)
+{
+if (!selector)
+return;
+
+function addedRule(error, rulePayload)
+{
+if (error)
+return;
+
+DOMAgent.markUndoableState();
+
+this.refresh();
+}
+
+CSSAgent.addRule.invoke({contextNodeId: this._node.id, selector}, addedRule.bind(this));
+}
+
 get matchedRules()
 {
 return this._matchedRules;


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js (187959 => 187960)

--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js	2015-08-05 14:04:47 UTC (rev 187959)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js	2015-08-05 14:07:51 UTC (rev 187960)
@@ -398,12 +398,13 @@
 
 get _currentSelectorText()
 {
-if 

[webkit-changes] [187450] trunk/Source/WebInspectorUI

2015-07-27 Thread drousso
Title: [187450] trunk/Source/WebInspectorUI








Revision 187450
Author drou...@apple.com
Date 2015-07-27 14:20:35 -0700 (Mon, 27 Jul 2015)


Log Message
Web Inspector: support live editing of rule selectors
https://bugs.webkit.org/show_bug.cgi?id=139153

Reviewed by Timothy Hatcher.

* UserInterface/Controllers/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype.highlightSelector):
Moved from CSSStyleDeclarationSection.

* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection):
(WebInspector.CSSStyleDeclarationSection.prototype.get _currentSelectorText):
Returns the current selector text, either from the style ownerRule or the selector element text.
(WebInspector.CSSStyleDeclarationSection.prototype._highlightNodesWithSelector):
Now highlights all nodes matching the current selector instead of the ownerRule's selector.
(WebInspector.CSSStyleDeclarationSection.prototype._hideDOMNodeHighlight):
(WebInspector.CSSStyleDeclarationSection.prototype._handleMouseOver):
(WebInspector.CSSStyleDeclarationSection.prototype._handleMouseOut):
(WebInspector.CSSStyleDeclarationSection.prototype._handleKeyDown):
If the character is not a tab, highlight all nodes matching the current selector text.
(WebInspector.CSSStyleDeclarationSection.prototype._handleKeyUp):
(WebInspector.CSSStyleDeclarationSection.prototype._hideHighlightOnNodesWithSelector): Deleted.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Controllers/DOMTreeManager.js
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (187449 => 187450)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-27 21:08:41 UTC (rev 187449)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-27 21:20:35 UTC (rev 187450)
@@ -1,3 +1,28 @@
+2015-07-27  Devin Rousso  drou...@apple.com
+
+Web Inspector: support live editing of rule selectors
+https://bugs.webkit.org/show_bug.cgi?id=139153
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Controllers/DOMTreeManager.js:
+(WebInspector.DOMTreeManager.prototype.highlightSelector):
+Moved from CSSStyleDeclarationSection.
+
+* UserInterface/Views/CSSStyleDeclarationSection.js:
+(WebInspector.CSSStyleDeclarationSection):
+(WebInspector.CSSStyleDeclarationSection.prototype.get _currentSelectorText):
+Returns the current selector text, either from the style ownerRule or the selector element text.
+(WebInspector.CSSStyleDeclarationSection.prototype._highlightNodesWithSelector):
+Now highlights all nodes matching the current selector instead of the ownerRule's selector.
+(WebInspector.CSSStyleDeclarationSection.prototype._hideDOMNodeHighlight):
+(WebInspector.CSSStyleDeclarationSection.prototype._handleMouseOver):
+(WebInspector.CSSStyleDeclarationSection.prototype._handleMouseOut):
+(WebInspector.CSSStyleDeclarationSection.prototype._handleKeyDown):
+If the character is not a tab, highlight all nodes matching the current selector text.
+(WebInspector.CSSStyleDeclarationSection.prototype._handleKeyUp):
+(WebInspector.CSSStyleDeclarationSection.prototype._hideHighlightOnNodesWithSelector): Deleted.
+
 2015-07-27  Nikita Vasilyev  nvasil...@apple.com
 
 Web Inspector:  = $0 in Elements panel can cause a jerk by pushing nodes below it


Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/DOMTreeManager.js (187449 => 187450)

--- trunk/Source/WebInspectorUI/UserInterface/Controllers/DOMTreeManager.js	2015-07-27 21:08:41 UTC (rev 187449)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/DOMTreeManager.js	2015-07-27 21:20:35 UTC (rev 187450)
@@ -360,6 +360,14 @@
 DOMAgent.hideHighlight();
 }
 
+highlightSelector(selectorText, frameId, mode)
+{
+if (!DOMAgent.highlightSelector || typeof DOMAgent.highlightSelector !== function)
+return;
+
+DOMAgent.highlightSelector(this._buildHighlightConfig(mode), selectorText, frameId);
+}
+
 highlightRect(rect, usePageCoordinates)
 {
 DOMAgent.highlightRect.invoke({


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js (187449 => 187450)

--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js	2015-07-27 21:08:41 UTC (rev 187449)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js	2015-07-27 21:20:35 UTC (rev 187450)
@@ -48,9 +48,10 @@
 this._selectorElement = document.createElement(span);
 this._selectorElement.className = selector;
 this._selectorElement.setAttribute(spellcheck, false);
-this._selectorElement.addEventListener(mouseover, this._highlightNodesWithSelector.bind(this));
-this._selectorElement.addEventListener(mouseout, this._hideHighlightOnNodesWithSelector.bind(this));

[webkit-changes] [187249] trunk

2015-07-23 Thread drousso
Title: [187249] trunk








Revision 187249
Author drou...@apple.com
Date 2015-07-23 13:24:08 -0700 (Thu, 23 Jul 2015)


Log Message
Web Inspector: Add a function to CSSCompletions to get a list of supported system fonts
https://bugs.webkit.org/show_bug.cgi?id=147009

Reviewed by Joseph Pecoraro.

Source/_javascript_Core:

* inspector/protocol/CSS.json: Added getSupportedSystemFontFamilyNames function.

Source/WebCore:

Test: inspector/css/get-system-fonts.html

* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getSupportedSystemFontFamilyNames):
Gets the list of system fonts (implemented in each platform) and returns that list.
* inspector/InspectorCSSAgent.h:
* platform/graphics/FontCache.h:
* platform/graphics/freetype/FontCacheFreeType.cpp:
(WebCore::FontCache::systemFontFamilies):
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::FontCache::systemFontFamilies):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::systemFontFamilies):
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::FontCache::systemFontFamilies):

Source/WebInspectorUI:

* UserInterface/Base/Main.js:
(WebInspector.loaded):
(WebInspector.activateExtraDomains):
* UserInterface/Base/Test.js:
(WebInspector.loaded):
* UserInterface/Models/CSSCompletions.js:
(WebInspector.CSSCompletions.requestCSSCompletions.fontFamilyNamesCallback):
(WebInspector.CSSCompletions.requestCSSCompletions):
Now also grabs the list of system font family names and adds that list to the existing completion
list for both font and font-family in CSSKeywordCompletions.
(WebInspector.CSSCompletions.requestCSSNameCompletions): Deleted.

LayoutTests:

Skip the get-system-fonts test until it is implemented.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/win/TestExpectations:

Added the get-system-fonts test that returns the list of system fonts.
* inspector/css/get-system-fonts-expected.html:
* inspector/css/get-system-fonts.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/efl/TestExpectations
trunk/LayoutTests/platform/gtk/TestExpectations
trunk/LayoutTests/platform/win/TestExpectations
trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/inspector/protocol/CSS.json
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp
trunk/Source/WebCore/inspector/InspectorCSSAgent.h
trunk/Source/WebCore/platform/graphics/FontCache.h
trunk/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp
trunk/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm
trunk/Source/WebCore/platform/graphics/mac/FontCacheMac.mm
trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp
trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Base/Main.js
trunk/Source/WebInspectorUI/UserInterface/Base/Test.js
trunk/Source/WebInspectorUI/UserInterface/Models/CSSCompletions.js


Added Paths

trunk/LayoutTests/inspector/css/get-system-fonts-expected.txt
trunk/LayoutTests/inspector/css/get-system-fonts.html




Diff

Modified: trunk/LayoutTests/ChangeLog (187248 => 187249)

--- trunk/LayoutTests/ChangeLog	2015-07-23 20:18:41 UTC (rev 187248)
+++ trunk/LayoutTests/ChangeLog	2015-07-23 20:24:08 UTC (rev 187249)
@@ -1,3 +1,19 @@
+2015-07-23  Devin Rousso  drou...@apple.com
+
+Web Inspector: Add a function to CSSCompletions to get a list of supported system fonts
+https://bugs.webkit.org/show_bug.cgi?id=147009
+
+Reviewed by Joseph Pecoraro.
+
+Skip the get-system-fonts test until it is implemented.
+* platform/efl/TestExpectations:
+* platform/gtk/TestExpectations:
+* platform/win/TestExpectations:
+
+Added the get-system-fonts test that returns the list of system fonts.
+* inspector/css/get-system-fonts-expected.html:
+* inspector/css/get-system-fonts.html:
+
 2015-07-23  Brady Eidson  beid...@apple.com
 
 Crash in WebPlatformStrategies::createPingHandle - Deref a null NetworkingContext.


Added: trunk/LayoutTests/inspector/css/get-system-fonts-expected.txt (0 => 187249)

--- trunk/LayoutTests/inspector/css/get-system-fonts-expected.txt	(rev 0)
+++ trunk/LayoutTests/inspector/css/get-system-fonts-expected.txt	2015-07-23 20:24:08 UTC (rev 187249)
@@ -0,0 +1,4 @@
+Has at least 5 fonts: true
+PASS: Includes Arial
+PASS: Includes Times
+


Added: trunk/LayoutTests/inspector/css/get-system-fonts.html (0 => 187249)

--- trunk/LayoutTests/inspector/css/get-system-fonts.html	(rev 0)
+++ trunk/LayoutTests/inspector/css/get-system-fonts.html	2015-07-23 20:24:08 UTC (rev 187249)
@@ -0,0 +1,28 @@
+!DOCTYPE html
+html
+head
+script type=text/_javascript_ src=""
+script
+// Testing that we can get the fonts on the system and that the fonts contain some universal fonts (arial, times, etc).
+function test() {
+function hasFontFamily(fontFamilies, fontFamily) {
+return (fontFamilies.includes(fontFamily) ? PASS: 

[webkit-changes] [187352] trunk

2015-07-24 Thread drousso
Title: [187352] trunk








Revision 187352
Author drou...@apple.com
Date 2015-07-24 11:48:17 -0700 (Fri, 24 Jul 2015)


Log Message
Web Inspector: Editing non-inspector-stylesheet rule selectors fails after the first change
https://bugs.webkit.org/show_bug.cgi?id=147229

Reviewed by Timothy Hatcher.

Source/WebCore:

Test: inspector/css/modify-rule-selector.html

* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::setRuleSelector):
Now checks to see if the stylesheet is not mutated before making the change to the
rule's selector, and if so mark it as not mutated to allow future edits.

LayoutTests:

* inspector/css/modify-rule-selector-expected.txt: Added.
* inspector/css/modify-rule-selector.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp


Added Paths

trunk/LayoutTests/inspector/css/modify-rule-selector-expected.txt
trunk/LayoutTests/inspector/css/modify-rule-selector.html




Diff

Modified: trunk/LayoutTests/ChangeLog (187351 => 187352)

--- trunk/LayoutTests/ChangeLog	2015-07-24 18:40:58 UTC (rev 187351)
+++ trunk/LayoutTests/ChangeLog	2015-07-24 18:48:17 UTC (rev 187352)
@@ -1,3 +1,13 @@
+2015-07-24  Devin Rousso  drou...@apple.com
+
+Web Inspector: Editing non-inspector-stylesheet rule selectors fails after the first change
+https://bugs.webkit.org/show_bug.cgi?id=147229
+
+Reviewed by Timothy Hatcher.
+
+* inspector/css/modify-rule-selector-expected.txt: Added.
+* inspector/css/modify-rule-selector.html: Added.
+
 2015-07-24  Saam barati  saambara...@gmail.com
 
 [ES6] Add support for default parameters


Added: trunk/LayoutTests/inspector/css/modify-rule-selector-expected.txt (0 => 187352)

--- trunk/LayoutTests/inspector/css/modify-rule-selector-expected.txt	(rev 0)
+++ trunk/LayoutTests/inspector/css/modify-rule-selector-expected.txt	2015-07-24 18:48:17 UTC (rev 187352)
@@ -0,0 +1,9 @@
+Testing that selectors are able to be modified more than once.
+
+ 
+Selector before mutation: .foo
+Selector after mutation: span.foo
+
+Selector before mutation: span.foo
+Selector after mutation: body  .foo
+


Added: trunk/LayoutTests/inspector/css/modify-rule-selector.html (0 => 187352)

--- trunk/LayoutTests/inspector/css/modify-rule-selector.html	(rev 0)
+++ trunk/LayoutTests/inspector/css/modify-rule-selector.html	2015-07-24 18:48:17 UTC (rev 187352)
@@ -0,0 +1,81 @@
+!DOCTYPE html
+html
+head
+style
+.foo {}
+/style
+script type=text/_javascript_ src=""
+script
+function test() {
+var nodeStyles;
+var selectors = [span.foo, body  .foo];
+var index = 0;
+
+function modifyRuleSelector(selector) {
+if (!nodeStyles.matchedRules.length) {
+InspectorTest.log(ERROR: missing matched rules);
+InspectorTest.completeTest();
+return;
+}
+
+var rule = nodeStyles.matchedRules[0];
+CSSAgent.setRuleSelector(rule.id, selector, function(error, payload) {
+if (error) {
+InspectorTest.log(ERROR:  + error);
+InspectorTest.completeTest();
+return;
+}
+
+var newSelector = payload.selectorList.text;
+InspectorTest.log(\nSelector before mutation:  + rule.selectorText);
+InspectorTest.log(Selector after mutation:  + newSelector);
+InspectorTest.assert(newSelector === selector, FAIL: Selector  + newSelector +  should be updated to  + selector + .);
+
+nodeStyles.refresh();
+});
+}
+
+// Every time the nodeStyles refreshes, attempt to change the selector
+// of the first rule to the next selector in the list.
+function onStylesRefreshed()
+{
+if (index = selectors.length) {
+InspectorTest.completeTest();
+return;
+}
+
+modifyRuleSelector(selectors[index]);
+++index;
+}
+
+WebInspector.domTreeManager.requestDocument(function(documentNode) {
+if (!documentNode) {
+InspectorTest.log(ERROR: document not found.);
+InspectorTest.completeTest();
+return;
+}
+
+WebInspector.domTreeManager.querySelector(documentNode.id, .foo, function(contentNodeId) {
+if (!contentNodeId) {
+InspectorTest.log(ERROR: DOM node not found.);
+InspectorTest.completeTest();
+return;
+}
+
+var domNode = WebInspector.domTreeManager.nodeForId(contentNodeId);
+nodeStyles = WebInspector.cssStyleManager.stylesForNode(domNode);
+
+nodeStyles.addEventListener(WebInspector.DOMNodeStyles.Event.Refreshed, onStylesRefreshed, this);
+if (!nodeStyles.needsRefresh)
+onStylesRefreshed();
+});
+});
+}
+/script
+/head
+body _onload_=runTest()
+pTesting that 

[webkit-changes] [187195] trunk/Source/WebInspectorUI

2015-07-22 Thread drousso
Title: [187195] trunk/Source/WebInspectorUI








Revision 187195
Author drou...@apple.com
Date 2015-07-22 17:44:09 -0700 (Wed, 22 Jul 2015)


Log Message
Web Inspector: REGRESSION (Safari 7): Pseudo element rules are not labelled with media queries in Styles panel
https://bugs.webkit.org/show_bug.cgi?id=147207

Reviewed by Timothy Hatcher.

* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh.insertMediaOrInheritanceLabel):
(WebInspector.RulesStyleDetailsPanel.prototype.refresh.insertAllMatchingPseudoStyles):
Now inserts pseudo-styles based on whether their selector specificity is greater than
the previous style's selector specificity.
(WebInspector.RulesStyleDetailsPanel.prototype.refresh):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (187194 => 187195)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-23 00:04:02 UTC (rev 187194)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-23 00:44:09 UTC (rev 187195)
@@ -1,3 +1,17 @@
+2015-07-22  Devin Rousso  drou...@apple.com
+
+Web Inspector: REGRESSION (Safari 7): Pseudo element rules are not labelled with media queries in Styles panel
+https://bugs.webkit.org/show_bug.cgi?id=147207
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/RulesStyleDetailsPanel.js:
+(WebInspector.RulesStyleDetailsPanel.prototype.refresh.insertMediaOrInheritanceLabel):
+(WebInspector.RulesStyleDetailsPanel.prototype.refresh.insertAllMatchingPseudoStyles):
+Now inserts pseudo-styles based on whether their selector specificity is greater than
+the previous style's selector specificity.
+(WebInspector.RulesStyleDetailsPanel.prototype.refresh):
+
 2015-07-22  Nikita Vasilyev  nvasil...@apple.com
 
 Web Inspector: Change syntax highlighting color for regular expressions to make them more readable


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js (187194 => 187195)

--- trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js	2015-07-23 00:04:02 UTC (rev 187194)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js	2015-07-23 00:44:09 UTC (rev 187195)
@@ -60,6 +60,16 @@
 var previousMediaList = [];
 var previousSection = null;
 
+var pseudoElements = this.nodeStyles.pseudoElements;
+var pseudoElementsStyle = [];
+for (var pseudoIdentifier in pseudoElements)
+pseudoElementsStyle = pseudoElementsStyle.concat(pseudoElements[pseudoIdentifier].orderedStyles);
+
+var orderedPseudoStyles = uniqueOrderedStyles(pseudoElementsStyle);
+// Reverse the array to allow ensure that splicing the array will not mess with the order.
+if (orderedPseudoStyles.length)
+orderedPseudoStyles.reverse();
+
 function mediaListsEqual(a, b)
 {
 a = a || [];
@@ -169,29 +179,8 @@
 addedNewRuleButton = true;
 }
 
-var pseudoElements = this.nodeStyles.pseudoElements;
-var pseudoElementsStyle = [];
-
-for (var pseudoIdentifier in pseudoElements)
-pseudoElementsStyle = pseudoElementsStyle.concat(pseudoElements[pseudoIdentifier].orderedStyles);
-
-var orderedPseudoStyles = uniqueOrderedStyles(pseudoElementsStyle);
-var pseudoElementSelectors = [];
-
-for (var style of orderedPseudoStyles)
-pseudoElementSelectors.push({ style, selectorText: style.ownerRule.selectorText.replace(/:{1,2}[\w-]+\s*/g,  ).trimRight() });
-
-// Reverse the array to allow ensure that splicing the array will not mess with the order.
-if (pseudoElementSelectors.length)
-pseudoElementSelectors.reverse();
-
-var addedNewRuleButton = false;
-this._ruleMediaAndInherticanceList = [];
-
-var orderedStyles = uniqueOrderedStyles(this.nodeStyles.orderedStyles);
-for (var i = 0; i  orderedStyles.length; ++i) {
-var style = orderedStyles[i];
-
+function insertMediaOrInheritanceLabel(style)
+{
 var hasMediaOrInherited = [];
 
 if (style.type === WebInspector.CSSStyleDeclaration.Type.Rule  !addedNewRuleButton)
@@ -222,9 +211,7 @@
 if (previousSection)
 previousSection.lastInGroup = true;
 
-for (var j = 0; j  currentMediaList.length; ++j) {
-var media = currentMediaList[j];
-
+for (var media of currentMediaList) {
 var prefixElement = document.createElement(strong);
 prefixElement.textContent = WebInspector.UIString(Media: );
 
@@ -262,36 +249,55 @@
 }
 
 this._ruleMediaAndInherticanceList.push(hasMediaOrInherited);
+}
 
-var 

[webkit-changes] [186477] trunk/Source/WebInspectorUI

2015-07-07 Thread drousso
Title: [186477] trunk/Source/WebInspectorUI








Revision 186477
Author drou...@apple.com
Date 2015-07-07 14:21:36 -0700 (Tue, 07 Jul 2015)


Log Message
Web Inspector: Unnecessary space added after -webkit- prefixed property values
https://bugs.webkit.org/show_bug.cgi?id=146671

Reviewed by Joseph Pecoraro.

* Tools/PrettyPrinting/css-rule-tests/do-not-add-whitespace-before-prefixed-property-value-expected.css: Added.
* Tools/PrettyPrinting/css-rule-tests/do-not-add-whitespace-before-prefixed-property-value.css: Added.
* Tools/PrettyPrinting/index.html:
* UserInterface/Views/CodeMirrorFormatters.js: Now only adds a space if both the current and previous
tokens are a property, value, or atom.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/Tools/PrettyPrinting/index.html
trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorFormatters.js


Added Paths

trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/do-not-add-whitespace-before-prefixed-property-value-expected.css
trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/do-not-add-whitespace-before-prefixed-property-value.css




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186476 => 186477)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-07 21:13:31 UTC (rev 186476)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-07 21:21:36 UTC (rev 186477)
@@ -1,3 +1,16 @@
+2015-07-07  Devin Rousso  drou...@apple.com
+
+Web Inspector: Unnecessary space added after -webkit- prefixed property values
+https://bugs.webkit.org/show_bug.cgi?id=146671
+
+Reviewed by Joseph Pecoraro.
+
+* Tools/PrettyPrinting/css-rule-tests/do-not-add-whitespace-before-prefixed-property-value-expected.css: Added.
+* Tools/PrettyPrinting/css-rule-tests/do-not-add-whitespace-before-prefixed-property-value.css: Added.
+* Tools/PrettyPrinting/index.html:
+* UserInterface/Views/CodeMirrorFormatters.js: Now only adds a space if both the current and previous
+tokens are a property, value, or atom.
+
 2015-07-07  Matt Baker  mattba...@apple.com
 
 Web Inspector: Pad ruler selection area by 1px in the Rendering Frames timeline overview


Added: trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/do-not-add-whitespace-before-prefixed-property-value-expected.css (0 => 186477)

--- trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/do-not-add-whitespace-before-prefixed-property-value-expected.css	(rev 0)
+++ trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/do-not-add-whitespace-before-prefixed-property-value-expected.css	2015-07-07 21:21:36 UTC (rev 186477)
@@ -0,0 +1 @@
+width: -webkit-calc(1px - 1px);


Added: trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/do-not-add-whitespace-before-prefixed-property-value.css (0 => 186477)

--- trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/do-not-add-whitespace-before-prefixed-property-value.css	(rev 0)
+++ trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/do-not-add-whitespace-before-prefixed-property-value.css	2015-07-07 21:21:36 UTC (rev 186477)
@@ -0,0 +1 @@
+width: -webkit-calc(1px - 1px);


Modified: trunk/Source/WebInspectorUI/Tools/PrettyPrinting/index.html (186476 => 186477)

--- trunk/Source/WebInspectorUI/Tools/PrettyPrinting/index.html	2015-07-07 21:13:31 UTC (rev 186476)
+++ trunk/Source/WebInspectorUI/Tools/PrettyPrinting/index.html	2015-07-07 21:21:36 UTC (rev 186477)
@@ -50,6 +50,11 @@
 lineNumbers: true,
 });
 
+// In the frontend, keywords are added to the css mode to force the parser to recognize them as values.
+// Here, the calc keyword is added to allow the css-rule tests to perform as they would in the frontend.
+var modeSpec = CodeMirror.resolveMode(text/css);
+modeSpec.valueKeywords[calc] = true;
+
 // Initial values from URL.
 var queryParams = {};
 if (window.location.search.length  0) {
@@ -273,6 +278,7 @@
 css-rule-tests/add-whitespace-after-colon.css,
 css-rule-tests/add-whitespace-after-comma.css,
 css-rule-tests/do-not-append-semicolon.css,
+css-rule-tests/do-not-add-whitespace-before-prefixed-property-value.css,
 css-rule-tests/keep-prefixed-value.css,
 ]);
 }


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorFormatters.js (186476 => 186477)

--- trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorFormatters.js	2015-07-07 21:13:31 UTC (rev 186476)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorFormatters.js	2015-07-07 21:21:36 UTC (rev 186477)
@@ -439,7 +439,8 @@
 return true;
 
 // Add whitespace between 1px_solid_green
-if (lastToken  /\b(?:keyword|atom|number)\b/.test(token))
+var tokenRegExp = /\b(?:keyword|atom|number)\b/;
+if 

[webkit-changes] [186517] trunk/Source/WebInspectorUI

2015-07-08 Thread drousso
Title: [186517] trunk/Source/WebInspectorUI








Revision 186517
Author drou...@apple.com
Date 2015-07-08 11:36:18 -0700 (Wed, 08 Jul 2015)


Log Message
Web Inspector: Pressing delete in the styles sidebar with no text causes text to become misaligned
https://bugs.webkit.org/show_bug.cgi?id=146715

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleBeforeChange):
Now returns if the change was in the first character of the first line.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186516 => 186517)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-08 18:34:52 UTC (rev 186516)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-08 18:36:18 UTC (rev 186517)
@@ -1,3 +1,14 @@
+2015-07-08  Devin Rousso  drou...@apple.com
+
+Web Inspector: Pressing delete in the styles sidebar with no text causes text to become misaligned
+https://bugs.webkit.org/show_bug.cgi?id=146715
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleBeforeChange):
+Now returns if the change was in the first character of the first line.
+
 2015-07-07  Nikita Vasilyev  nvasil...@apple.com
 
 Web Inspector: Use hairline borders on retina screen


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js (186516 => 186517)

--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-08 18:34:52 UTC (rev 186516)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-08 18:36:18 UTC (rev 186517)
@@ -479,7 +479,7 @@
 
 _handleBeforeChange(codeMirror, change)
 {
-if (change.origin !== +delete || this._completionController.isShowingCompletions())
+if (change.origin !== +delete || (!change.to.line  !change.to.ch) || this._completionController.isShowingCompletions())
 return CodeMirror.Pass;
 
 var marks = codeMirror.findMarksAt(change.to);






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [186524] trunk/Source/WebInspectorUI

2015-07-08 Thread drousso
Title: [186524] trunk/Source/WebInspectorUI








Revision 186524
Author drou...@apple.com
Date 2015-07-08 13:40:24 -0700 (Wed, 08 Jul 2015)


Log Message
Web Inspector: Clicking style checkbox selects the property name while mouse down
https://bugs.webkit.org/show_bug.cgi?id=146728

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleMouseDown):
Now returns if the click was not at the end of the line.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186523 => 186524)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-08 20:36:09 UTC (rev 186523)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-08 20:40:24 UTC (rev 186524)
@@ -1,3 +1,14 @@
+2015-07-08  Devin Rousso  drou...@apple.com
+
+Web Inspector: Clicking style checkbox selects the property name while mouse down
+https://bugs.webkit.org/show_bug.cgi?id=146728
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleMouseDown):
+Now returns if the click was not at the end of the line.
+
 2015-07-08  Timothy Hatcher  timo...@apple.com
 
 REGRESSION (r185629): Web Inspector: Filtering doesn't display any items if folders are used to organize the web page resources


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js (186523 => 186524)

--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-08 20:36:09 UTC (rev 186523)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-08 20:40:24 UTC (rev 186524)
@@ -446,14 +446,9 @@
 var line = this._codeMirror.getLine(cursor.line);
 var trimmedLine = line.trimRight();
 
-if (!trimmedLine.trimLeft().length)
+if (!trimmedLine.trimLeft().length || cursor.ch !== trimmedLine.length)
 return;
 
-if (cursor.ch !== trimmedLine.length) {
-this._highlightNextNameOrValue(this._codeMirror, cursor, line);
-return;
-}
-
 this._mouseDownCursorPosition = cursor;
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [186695] trunk/Source/WebInspectorUI

2015-07-10 Thread drousso
Title: [186695] trunk/Source/WebInspectorUI








Revision 186695
Author drou...@apple.com
Date 2015-07-10 16:31:05 -0700 (Fri, 10 Jul 2015)


Log Message
Web Inspector: Add source links to functions logged in the console
https://bugs.webkit.org/show_bug.cgi?id=146377

Reviewed by Timothy Hatcher.

* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.prototype.findFunctionSourceCodeLocation):
Returns a promise that contains the sourceCodeLocation if the object represents a function and has an objectId.
(WebInspector.RemoteObject.prototype._isFunction):
* UserInterface/Views/ConsoleMessageView.css:
(.console-message .console-message-location):
Added specified values for font sizing and family to ensure that all location links have the same styling.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView):
Now creates a link to the source code of the entered text if the message is of the type result.
(WebInspector.ConsoleMessageView.prototype._appendLocationLink):
(WebInspector.ConsoleMessageView.prototype._createRemoteObjectIfNeeded):
(WebInspector.ConsoleMessageView.prototype._appendFormattedArguments):
(WebInspector.ConsoleMessageView.prototype._linkifyLocation):
(WebInspector.ConsoleMessageView.prototype._linkifyCallFrameLocation):
(WebInspector.ConsoleMessageView.prototype._linkifyCallFrame):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js
trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.css
trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186694 => 186695)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-10 23:09:59 UTC (rev 186694)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-10 23:31:05 UTC (rev 186695)
@@ -1,3 +1,27 @@
+2015-07-10  Devin Rousso  drou...@apple.com
+
+Web Inspector: Add source links to functions logged in the console
+https://bugs.webkit.org/show_bug.cgi?id=146377
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Protocol/RemoteObject.js:
+(WebInspector.RemoteObject.prototype.findFunctionSourceCodeLocation):
+Returns a promise that contains the sourceCodeLocation if the object represents a function and has an objectId.
+(WebInspector.RemoteObject.prototype._isFunction):
+* UserInterface/Views/ConsoleMessageView.css:
+(.console-message .console-message-location):
+Added specified values for font sizing and family to ensure that all location links have the same styling.
+* UserInterface/Views/ConsoleMessageView.js:
+(WebInspector.ConsoleMessageView):
+Now creates a link to the source code of the entered text if the message is of the type result.
+(WebInspector.ConsoleMessageView.prototype._appendLocationLink):
+(WebInspector.ConsoleMessageView.prototype._createRemoteObjectIfNeeded):
+(WebInspector.ConsoleMessageView.prototype._appendFormattedArguments):
+(WebInspector.ConsoleMessageView.prototype._linkifyLocation):
+(WebInspector.ConsoleMessageView.prototype._linkifyCallFrameLocation):
+(WebInspector.ConsoleMessageView.prototype._linkifyCallFrame):
+
 2015-07-10  Timothy Hatcher  timo...@apple.com
 
 Web Inspector: Storage tab should have a scope bar in the sidebar


Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js (186694 => 186695)

--- trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js	2015-07-10 23:09:59 UTC (rev 186694)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js	2015-07-10 23:31:05 UTC (rev 186695)
@@ -478,6 +478,36 @@
 return WebInspector.RemoteObject.createCallArgument(this);
 }
 
+findFunctionSourceCodeLocation()
+{
+var result = new WebInspector.WrappedPromise;
+
+if (!this._isFunction() || !this._objectId) {
+result.resolve(WebInspector.RemoteObject.SourceCodeLocationPromise.MissingObjectId);
+return result.promise;
+}
+
+DebuggerAgent.getFunctionDetails(this._objectId, function(error, response) {
+if (error) {
+result.reject(error);
+return;
+}
+
+var location = response.location;
+var sourceCode = WebInspector.debuggerManager.scriptForIdentifier(location.scriptId);
+
+if (!sourceCode || sourceCode.url.startsWith(__WebInspector)) {
+result.resolve(WebInspector.RemoteObject.SourceCodeLocationPromise.NoSourceFound);
+return;
+}
+
+var sourceCodeLocation = sourceCode.createSourceCodeLocation(location.lineNumber, location.columnNumber || 0);
+result.resolve(sourceCodeLocation);
+});
+
+return result.promise;
+}
+
 // Private
 
 _isSymbol()
@@ -485,6 +515,11 @@
 return 

[webkit-changes] [186708] trunk/Source/WebInspectorUI

2015-07-11 Thread drousso
Title: [186708] trunk/Source/WebInspectorUI








Revision 186708
Author drou...@apple.com
Date 2015-07-11 01:42:35 -0700 (Sat, 11 Jul 2015)


Log Message
Web Inspector: Warning icon tooltip for numbers with no units could be improved
https://bugs.webkit.org/show_bug.cgi?id=146859

Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):
If the property's value is incorrect and is comprised of only numbers, that must mean that the value needs
to have units (like px) after the number.  Added another warning icon case to support this scenario.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186707 => 186708)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-11 06:55:48 UTC (rev 186707)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-11 08:42:35 UTC (rev 186708)
@@ -1,3 +1,16 @@
+2015-07-11  Devin Rousso  drou...@apple.com
+
+Web Inspector: Warning icon tooltip for numbers with no units could be improved
+https://bugs.webkit.org/show_bug.cgi?id=146859
+
+Reviewed by Timothy Hatcher.
+
+* Localizations/en.lproj/localizedStrings.js:
+* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):
+If the property's value is incorrect and is comprised of only numbers, that must mean that the value needs
+to have units (like px) after the number.  Added another warning icon case to support this scenario.
+
 2015-07-10  Timothy Hatcher  timo...@apple.com
 
 Web Inspector: Use -apple-system instead of -webkit-system-font


Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (186707 => 186708)

--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2015-07-11 06:55:48 UTC (rev 186707)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2015-07-11 08:42:35 UTC (rev 186708)
@@ -488,6 +488,7 @@
 localizedStrings[The 'webkit' prefix is not necessary.\nClick to insert a duplicate without the prefix.] = The 'webkit' prefix is not necessary.\nClick to insert a duplicate without the prefix.;
 localizedStrings[The property '%s' is not supported.] = The property '%s' is not supported.;
 localizedStrings[The value '%s' is not supported for this property.\nClick to delete and open autocomplete.] = The value '%s' is not supported for this property.\nClick to delete and open autocomplete.;
+localizedStrings[The value '%s' needs units.\nClick to add 'px' to the value.] = The value '%s' needs units.\nClick to add 'px' to the value.;
 localizedStrings[The  %s \ntable is empty.] = The  %s \ntable is empty.;
 localizedStrings[This property needs a value.\nClick to open autocomplete.] = This property needs a value.\nClick to open autocomplete.;
 localizedStrings[Time until the load event fired, click to show the Network Requests timeline] = Time until the load event fired, click to show the Network Requests timeline;


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js (186707 => 186708)

--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-11 06:55:48 UTC (rev 186707)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-11 08:42:35 UTC (rev 186708)
@@ -1073,14 +1073,23 @@
 
 this._codeMirror.markText(start, end, {className: invalid});
 
-var valueReplacement = property.value.length ? WebInspector.UIString(The value '%s' is not supported for this property.\nClick to delete and open autocomplete.).format(property.value) : WebInspector.UIString(This property needs a value.\nClick to open autocomplete.);
+if (/^(?:\d+)$/.test(property.value)) {
+invalidMarkerInfo = {
+position: start,
+title: WebInspector.UIString(The value '%s' needs units.\nClick to add 'px' to the value.).format(property.value),
+correction: property.name + :  + property.value + px;,
+autocomplete: false
+};
+} else {
+var valueReplacement = property.value.length ? WebInspector.UIString(The value '%s' is not supported for this property.\nClick to delete and open autocomplete.).format(property.value) : WebInspector.UIString(This property needs a value.\nClick to open autocomplete.);
 
-invalidMarkerInfo = {
-position: start,
-title: valueReplacement,
-correction: property.name + : ,
-

[webkit-changes] [186717] trunk/Source/WebInspectorUI

2015-07-11 Thread drousso
Title: [186717] trunk/Source/WebInspectorUI








Revision 186717
Author drou...@apple.com
Date 2015-07-11 15:29:55 -0700 (Sat, 11 Jul 2015)


Log Message
Web Inspector: Improve runtime of pseudo-element sidebar style ordering
https://bugs.webkit.org/show_bug.cgi?id=146866

Reviewed by Timothy Hatcher.

* UserInterface/Models/CSSRule.js:
(WebInspector.CSSRule.prototype.update): Determines the most specific selector and saves it to a variable.
(WebInspector.CSSRule.prototype.get mostSpecificSelector): Returns the most specific selector.
(WebInspector.CSSRule.prototype.selectorIsGreater): Compares the most specific selector to a given selector.
(WebInspector.CSSRule.prototype._determineMostSpecificSelector):
Searches through the selector list to find and return the selector that is the most specific.
(WebInspector.CSSRule):
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Models/CSSRule.js
trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186716 => 186717)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-11 21:30:33 UTC (rev 186716)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-11 22:29:55 UTC (rev 186717)
@@ -1,5 +1,22 @@
 2015-07-11  Devin Rousso  drou...@apple.com
 
+Web Inspector: Improve runtime of pseudo-element sidebar style ordering
+https://bugs.webkit.org/show_bug.cgi?id=146866
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Models/CSSRule.js:
+(WebInspector.CSSRule.prototype.update): Determines the most specific selector and saves it to a variable.
+(WebInspector.CSSRule.prototype.get mostSpecificSelector): Returns the most specific selector.
+(WebInspector.CSSRule.prototype.selectorIsGreater): Compares the most specific selector to a given selector.
+(WebInspector.CSSRule.prototype._determineMostSpecificSelector):
+Searches through the selector list to find and return the selector that is the most specific.
+(WebInspector.CSSRule):
+* UserInterface/Views/RulesStyleDetailsPanel.js:
+(WebInspector.RulesStyleDetailsPanel.prototype.refresh):
+
+2015-07-11  Devin Rousso  drou...@apple.com
+
 Web Inspector: Warning icon tooltip for numbers with no units could be improved
 https://bugs.webkit.org/show_bug.cgi?id=146859
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Models/CSSRule.js (186716 => 186717)

--- trunk/Source/WebInspectorUI/UserInterface/Models/CSSRule.js	2015-07-11 21:30:33 UTC (rev 186716)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/CSSRule.js	2015-07-11 22:29:55 UTC (rev 186717)
@@ -80,6 +80,7 @@
 this._selectorText = selectorText;
 this._selectors = selectors;
 this._matchedSelectorIndices = matchedSelectorIndices;
+this._mostSpecificSelector = null;
 this._style = style;
 this._mediaList = mediaList;
 
@@ -182,30 +183,22 @@
 return Object.shallowEqual(this._id, rule.id);
 }
 
-selectorIsGreater(otherSelectors)
+get mostSpecificSelector()
 {
-if (!otherSelectors || !otherSelectors.length)
-return true;
+if (!this._mostSpecificSelector)
+this._mostSpecificSelector = this._determineMostSpecificSelector();
 
-var selectorIsGreater = true;
+return this._mostSpecificSelector;
+}
 
-var selectors = this.matchedSelectors;
-if (!selectors.length)
-selectors = this._selectors;
+selectorIsGreater(otherSelector)
+{
+var mostSpecificSelector = this.mostSpecificSelector;
 
-for (var selector of selectors) {
-for (var otherSelector of otherSelectors) {
-if (selector.isGreaterThan(otherSelector))
-continue;
+if (!mostSpecificSelector)
+return false;
 
-selectorIsGreater = false;
-}
-
-if (selectorIsGreater)
-return true;
-}
-
-return false;
+return mostSpecificSelector.isGreaterThan(otherSelector);
 }
 
 // Protected
@@ -214,6 +207,28 @@
 {
 return this._nodeStyles;
 }
+
+// Private
+
+_determineMostSpecificSelector()
+{
+if (!this._selectors || !this._selectors.length)
+return null;
+
+var selectors = this.matchedSelectors;
+
+if (!selectors.length)
+selectors = this._selectors;
+
+var specificSelector = selectors[0];
+
+for (var selector of selectors) {
+if (selector.isGreaterThan(specificSelector))
+specificSelector = selector;
+}
+
+return specificSelector;
+}
 };
 
 WebInspector.CSSRule.Event = {


Modified: 

[webkit-changes] [186489] trunk/Source/WebInspectorUI

2015-07-07 Thread drousso
Title: [186489] trunk/Source/WebInspectorUI








Revision 186489
Author drou...@apple.com
Date 2015-07-07 22:24:35 -0700 (Tue, 07 Jul 2015)


Log Message
Web Inspector: spacebar should pause/resume timeline recording when timelines are open
https://bugs.webkit.org/show_bug.cgi?id=143267

Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineSidebarPanel): Added two new keyboard shortcuts: space and shift-space.
(WebInspector.TimelineSidebarPanel.prototype.shown): Enables the keyboard shortcuts.
(WebInspector.TimelineSidebarPanel.prototype.hidden): Disables the keyboard shortcuts.
(WebInspector.TimelineSidebarPanel.prototype._toggleRecordingOnSpacebar):
(WebInspector.TimelineSidebarPanel.prototype._toggleNewRecordingOnSpacebar):
(WebInspector.TimelineSidebarPanel.prototype._toggleRecording): Starts/stops recording.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186488 => 186489)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-08 05:23:46 UTC (rev 186488)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-08 05:24:35 UTC (rev 186489)
@@ -1,3 +1,19 @@
+2015-07-07  Devin Rousso  drou...@apple.com
+
+Web Inspector: spacebar should pause/resume timeline recording when timelines are open
+https://bugs.webkit.org/show_bug.cgi?id=143267
+
+Reviewed by Timothy Hatcher.
+
+* Localizations/en.lproj/localizedStrings.js:
+* UserInterface/Views/TimelineTabContentView.js:
+(WebInspector.TimelineSidebarPanel): Added two new keyboard shortcuts: space and shift-space.
+(WebInspector.TimelineSidebarPanel.prototype.shown): Enables the keyboard shortcuts.
+(WebInspector.TimelineSidebarPanel.prototype.hidden): Disables the keyboard shortcuts.
+(WebInspector.TimelineSidebarPanel.prototype._toggleRecordingOnSpacebar):
+(WebInspector.TimelineSidebarPanel.prototype._toggleNewRecordingOnSpacebar):
+(WebInspector.TimelineSidebarPanel.prototype._toggleRecording): Starts/stops recording.
+
 2015-07-07  Joseph Pecoraro  pecor...@apple.com
 
 Web Inspector: Improve names for unprefixed animation events


Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (186488 => 186489)

--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2015-07-08 05:23:46 UTC (rev 186488)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2015-07-08 05:24:35 UTC (rev 186489)
@@ -95,6 +95,8 @@
 localizedStrings[Clear Timeline] = Clear Timeline;
 localizedStrings[Clear log (%s or %s)] = Clear log (%s or %s);
 localizedStrings[Click Listener] = Click Listener;
+localizedStrings[Click or press the spacebar to record.] = Click or press the spacebar to record.;
+localizedStrings[Click or press the spacebar to stop recording.] = Click or press the spacebar to stop recording.;
 localizedStrings[Click to close this tab] = Click to close this tab;
 localizedStrings[Click to open a colorpicker. Shift-click to change color format.] = Click to open a colorpicker. Shift-click to change color format.;
 localizedStrings[Clickable] = Clickable;


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js (186488 => 186489)

--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js	2015-07-08 05:23:46 UTC (rev 186488)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js	2015-07-08 05:24:35 UTC (rev 186489)
@@ -105,6 +105,7 @@
 
 this._recordGlyphElement = document.createElement(div);
 this._recordGlyphElement.className = WebInspector.TimelineSidebarPanel.RecordGlyphStyleClass;
+this._recordGlyphElement.title = WebInspector.UIString(Click or press the spacebar to record.)
 this._recordGlyphElement.addEventListener(mouseover, this._recordGlyphMousedOver.bind(this));
 this._recordGlyphElement.addEventListener(mouseout, this._recordGlyphMousedOut.bind(this));
 this._recordGlyphElement.addEventListener(click, this._recordGlyphClicked.bind(this));
@@ -155,6 +156,12 @@
 
 if (WebInspector.timelineManager.activeRecording)
 this._recordingLoaded();
+
+this._toggleRecordingShortcut = new WebInspector.KeyboardShortcut(null, WebInspector.KeyboardShortcut.Key.Space, this._toggleRecordingOnSpacebar.bind(this));
+this._toggleRecordingShortcut.implicitlyPreventsDefault = false;
+
+this._toggleNewRecordingShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.Shift, WebInspector.KeyboardShortcut.Key.Space, this._toggleNewRecordingOnSpacebar.bind(this));
+this._toggleNewRecordingShortcut.implicitlyPreventsDefault = false;
 }
 
 // 

[webkit-changes] [186490] trunk/Source/WebInspectorUI

2015-07-07 Thread drousso
Title: [186490] trunk/Source/WebInspectorUI








Revision 186490
Author drou...@apple.com
Date 2015-07-07 22:27:17 -0700 (Tue, 07 Jul 2015)


Log Message
Web Inspector: Pressing tab on a comment in the styles sidebar doesn't highlight the comment
https://bugs.webkit.org/show_bug.cgi?id=146709

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype.selectFirstProperty):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.selectLastProperty):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._textAtCursorIsComment):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._highlightNextNameOrValue):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleMouseUp):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleEnterKey):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._insertNewlineAfterCurrentLine):
Determines if the text at the given cursor position in the given line is a comment.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleShiftTabKey):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleTabKey):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186489 => 186490)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-08 05:24:35 UTC (rev 186489)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-08 05:27:17 UTC (rev 186490)
@@ -1,5 +1,24 @@
 2015-07-07  Devin Rousso  drou...@apple.com
 
+Web Inspector: Pressing tab on a comment in the styles sidebar doesn't highlight the comment
+https://bugs.webkit.org/show_bug.cgi?id=146709
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
+(WebInspector.CSSStyleDeclarationTextEditor.prototype.selectFirstProperty):
+(WebInspector.CSSStyleDeclarationTextEditor.prototype.selectLastProperty):
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._textAtCursorIsComment):
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._highlightNextNameOrValue):
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleMouseUp):
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleEnterKey):
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._insertNewlineAfterCurrentLine):
+Determines if the text at the given cursor position in the given line is a comment.
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleShiftTabKey):
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleTabKey):
+
+2015-07-07  Devin Rousso  drou...@apple.com
+
 Web Inspector: spacebar should pause/resume timeline recording when timelines are open
 https://bugs.webkit.org/show_bug.cgi?id=143267
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js (186489 => 186490)

--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-08 05:24:35 UTC (rev 186489)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-08 05:27:17 UTC (rev 186490)
@@ -358,7 +358,9 @@
 this.clearSelection();
 
 var index = line.indexOf(:);
-this._codeMirror.setSelection({line: 0, ch: 0}, {line: 0, ch: index  0 ? trimmedLine.length : index});
+var cursor = {line: 0, ch: 0};
+
+this._codeMirror.setSelection(cursor, {line: 0, ch: index  0 || this._textAtCursorIsComment(this._codeMirror, cursor) ? trimmedLine.length : index});
 }
 
 selectLastProperty()
@@ -367,8 +369,19 @@
 var lineText = this._codeMirror.getLine(line);
 var trimmedLine = lineText.trimRight();
 
-var colon = /(?::\s*)/.exec(lineText);
-this._codeMirror.setSelection({line, ch: colon ? colon.index + colon[0].length : 0}, {line, ch: trimmedLine.length - trimmedLine.endsWith(;)});
+var lastAnchor;
+var lastHead;
+
+if (this._textAtCursorIsComment(this._codeMirror, {line, ch: line.length})) {
+lastAnchor = 0;
+lastHead = line.length;
+} else {
+var colon = /(?::\s*)/.exec(lineText);
+lastAnchor = colon ? colon.index + colon[0].length : 0;
+lastHead = trimmedLine.length - trimmedLine.endsWith(;);
+}
+
+this._codeMirror.setSelection({line, ch: lastAnchor}, {line, ch: lastHead});
 }
 
 // Protected
@@ -395,16 +408,33 @@
 
 // Private
 
+_textAtCursorIsComment(codeMirror, cursor)
+{
+var token = codeMirror.getTokenTypeAt(cursor);
+return token  token.includes(comment);
+}
+
 _highlightNextNameOrValue(codeMirror, cursor, text)
 {
-var colonIndex = text.indexOf(:);
-var substringIndex = colonIndex = 0  cursor.ch = colonIndex ? colonIndex : 0;
+  

[webkit-changes] [186537] trunk/Source/WebInspectorUI

2015-07-08 Thread drousso
Title: [186537] trunk/Source/WebInspectorUI








Revision 186537
Author drou...@apple.com
Date 2015-07-08 16:46:11 -0700 (Wed, 08 Jul 2015)


Log Message
Web Inspector: Confusingly crossed out properties in .sidebar  .panel.navigation.timeline  .title-bar
https://bugs.webkit.org/show_bug.cgi?id=146727

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent.update):
The properties map used for refreshing each property now holds a list of properties for each line to ensure that
if a duplicate property exists, it also gets refreshed.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186536 => 186537)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-08 23:44:40 UTC (rev 186536)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-08 23:46:11 UTC (rev 186537)
@@ -1,5 +1,17 @@
 2015-07-08  Devin Rousso  drou...@apple.com
 
+Web Inspector: Confusingly crossed out properties in .sidebar  .panel.navigation.timeline  .title-bar
+https://bugs.webkit.org/show_bug.cgi?id=146727
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent.update):
+The properties map used for refreshing each property now holds a list of properties for each line to ensure that
+if a duplicate property exists, it also gets refreshed.
+
+2015-07-08  Devin Rousso  drou...@apple.com
+
 Web Inspector: Can't select last row in the timeline because it's covered by filter selector
 https://bugs.webkit.org/show_bug.cgi?id=146603
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js (186536 => 186537)

--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-08 23:44:40 UTC (rev 186536)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-08 23:46:11 UTC (rev 186537)
@@ -1523,7 +1523,13 @@
 // 2) `_createTextMarkerForPropertyIfNeeded` relies on CSSProperty instances.
 var cssPropertiesMap = new Map();
 this._iterateOverProperties(false, function(cssProperty) {
-cssPropertiesMap.set(cssProperty.text.replace(findWhitespace, ), cssProperty);
+cssProperty.__refreshedAfterBlur = false;
+
+var propertyTextSansWhitespace = cssProperty.text.replace(findWhitespace, );
+var existingProperties = cssPropertiesMap.get(propertyTextSansWhitespace) || [];
+existingProperties.push(cssProperty);
+
+cssPropertiesMap.set(propertyTextSansWhitespace, existingProperties);
 });
 
 // Go through the Editor line by line and create TextMarker when a
@@ -1531,10 +1537,22 @@
 this._codeMirror.eachLine(function(lineHandler) {
 var lineNumber = lineHandler.lineNo();
 var lineContentSansWhitespace = lineHandler.text.replace(findWhitespace, );
-if (cssPropertiesMap.has(lineContentSansWhitespace)) {
+var properties = cssPropertiesMap.get(lineContentSansWhitespace);
+
+if (!properties)
+return;
+
+for (var property of properties) {
+if (property.__refreshedAfterBlur)
+continue;
+
 var from = {line: lineNumber, ch: 0};
 var to = {line: lineNumber};
-this._createTextMarkerForPropertyIfNeeded(from, to, cssPropertiesMap.get(lineContentSansWhitespace));
+
+this._createTextMarkerForPropertyIfNeeded(from, to, property);
+property.__refreshedAfterBlur = true;
+
+break;
 }
 }.bind(this));
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [186576] trunk/Source/WebInspectorUI

2015-07-08 Thread drousso
Title: [186576] trunk/Source/WebInspectorUI








Revision 186576
Author drou...@apple.com
Date 2015-07-08 21:20:35 -0700 (Wed, 08 Jul 2015)


Log Message
Web Inspector: Style sidebar is showing incorrect strikethroughs
https://bugs.webkit.org/show_bug.cgi?id=146768

Reviewed by Timothy Hatcher.

* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype._markOverriddenProperties):
No longer sets the effective property as overridden if the overriding property is anonymous (not visible).

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186575 => 186576)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-09 04:19:36 UTC (rev 186575)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-09 04:20:35 UTC (rev 186576)
@@ -1,5 +1,16 @@
 2015-07-08  Devin Rousso  drou...@apple.com
 
+Web Inspector: Style sidebar is showing incorrect strikethroughs
+https://bugs.webkit.org/show_bug.cgi?id=146768
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Models/DOMNodeStyles.js:
+(WebInspector.DOMNodeStyles.prototype._markOverriddenProperties):
+No longer sets the effective property as overridden if the overriding property is anonymous (not visible).
+
+2015-07-08  Devin Rousso  drou...@apple.com
+
 Web Inspector: Color swatches show up in color names in comments
 https://bugs.webkit.org/show_bug.cgi?id=146757
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js (186575 => 186576)

--- trunk/Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js	2015-07-09 04:19:36 UTC (rev 186575)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js	2015-07-09 04:20:35 UTC (rev 186576)
@@ -928,7 +928,8 @@
 continue;
 }
 
-effectiveProperty.overridden = true;
+if (!property.anonymous)
+effectiveProperty.overridden = true;
 }
 
 property.overridden = false;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [186562] trunk/Source/WebInspectorUI

2015-07-08 Thread drousso
Title: [186562] trunk/Source/WebInspectorUI








Revision 186562
Author drou...@apple.com
Date 2015-07-08 18:17:44 -0700 (Wed, 08 Jul 2015)


Log Message
Web Inspector: Color swatches show up in color names in comments
https://bugs.webkit.org/show_bug.cgi?id=146757

Reviewed by Timothy Hatcher.

* UserInterface/Views/CodeMirrorAdditions.js: Color markers now only appear if the color is in a keyword.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorAdditions.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186561 => 186562)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-09 01:14:03 UTC (rev 186561)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-09 01:17:44 UTC (rev 186562)
@@ -1,3 +1,12 @@
+2015-07-08  Devin Rousso  drou...@apple.com
+
+Web Inspector: Color swatches show up in color names in comments
+https://bugs.webkit.org/show_bug.cgi?id=146757
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/CodeMirrorAdditions.js: Color markers now only appear if the color is in a keyword.
+
 2015-07-08  Timothy Hatcher  timo...@apple.com
 
 Web Inspector: Only record a timeline when the Timelines tab is showing


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorAdditions.js (186561 => 186562)

--- trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorAdditions.js	2015-07-09 01:14:03 UTC (rev 186561)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorAdditions.js	2015-07-09 01:17:44 UTC (rev 186562)
@@ -533,9 +533,9 @@
 continue;
 }
 
-// We're not interested in text within a CSS selector.
+// We're not interested if the color value is not inside a keyword.
 var tokenType = this.getTokenTypeAt(from);
-if (tokenType  (tokenType.indexOf(builtin) !== -1 || tokenType.indexOf(tag) !== -1)) {
+if (tokenType  !tokenType.includes(keyword)) {
 match = colorRegex.exec(lineContent);
 continue;
 }






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [186536] trunk/Source/WebInspectorUI

2015-07-08 Thread drousso
Title: [186536] trunk/Source/WebInspectorUI








Revision 186536
Author drou...@apple.com
Date 2015-07-08 16:44:40 -0700 (Wed, 08 Jul 2015)


Log Message
Web Inspector: Can't select last row in the timeline because it's covered by filter selector
https://bugs.webkit.org/show_bug.cgi?id=146603

Reviewed by Timothy Hatcher.

* UserInterface/Views/ScopeBar.js: Now adds a class to the scope bar if the default item is selected.
* UserInterface/Views/LayoutTimelineView.js:
* UserInterface/Views/NetworkTimelineView.js:
* UserInterface/Views/TimelineDataGrid.css:
(.data-grid.timeline  .navigation-bar-container): Deleted.
(.data-grid.timeline.has-non-default-filter  .navigation-bar-container): Deleted.
(.data-grid.timeline:hover  .navigation-bar-container): Deleted.
(.data-grid.timeline  .navigation-bar-container  .navigation-bar): Deleted.
(body.window-inactive .data-grid.timeline  .navigation-bar-container  .navigation-bar): Deleted.
* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid):
(WebInspector.TimelineDataGrid.createColumnScopeBar):
(WebInspector.TimelineDataGrid.prototype.updateLayout): Deleted.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
* UserInterface/Views/TimelineSidebarPanel.css:
(.sidebar  .panel.navigation.timeline  .title-bar.timeline-events):
(.sidebar  .panel.navigation.timeline  .title-bar.timeline-events  .title-bar-scope-bar):
(.sidebar  .panel.navigation.timeline  .title-bar.timeline-events  .title-bar-scope-bar  .default-item-selected  .multiple):
(.sidebar  .panel.navigation.timeline  .title-bar.timeline-events  .title-bar-scope-bar  .default-item-selected  .multiple path):
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.set contentTreeOutlineScopeBar):
Clears the title bar scope element and adds the given element as a child node.
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.get navigationSidebarTreeOutlineScopeBar):
Returns the scope bar element of the current object if it exists.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineView.js
trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineView.js
trunk/Source/WebInspectorUI/UserInterface/Views/ScopeBar.js
trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.css
trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.js
trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js
trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.css
trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js
trunk/Source/WebInspectorUI/UserInterface/Views/TimelineView.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186535 => 186536)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-08 23:43:09 UTC (rev 186535)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-08 23:44:40 UTC (rev 186536)
@@ -1,5 +1,39 @@
 2015-07-08  Devin Rousso  drou...@apple.com
 
+Web Inspector: Can't select last row in the timeline because it's covered by filter selector
+https://bugs.webkit.org/show_bug.cgi?id=146603
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/ScopeBar.js: Now adds a class to the scope bar if the default item is selected.
+* UserInterface/Views/LayoutTimelineView.js:
+* UserInterface/Views/NetworkTimelineView.js:
+* UserInterface/Views/TimelineDataGrid.css:
+(.data-grid.timeline  .navigation-bar-container): Deleted.
+(.data-grid.timeline.has-non-default-filter  .navigation-bar-container): Deleted.
+(.data-grid.timeline:hover  .navigation-bar-container): Deleted.
+(.data-grid.timeline  .navigation-bar-container  .navigation-bar): Deleted.
+(body.window-inactive .data-grid.timeline  .navigation-bar-container  .navigation-bar): Deleted.
+* UserInterface/Views/TimelineDataGrid.js:
+(WebInspector.TimelineDataGrid):
+(WebInspector.TimelineDataGrid.createColumnScopeBar):
+(WebInspector.TimelineDataGrid.prototype.updateLayout): Deleted.
+* UserInterface/Views/TimelineRecordingContentView.js:
+(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
+* UserInterface/Views/TimelineSidebarPanel.css:
+(.sidebar  .panel.navigation.timeline  .title-bar.timeline-events):
+(.sidebar  .panel.navigation.timeline  .title-bar.timeline-events  .title-bar-scope-bar):
+(.sidebar  .panel.navigation.timeline  .title-bar.timeline-events  .title-bar-scope-bar  .default-item-selected  .multiple):
+(.sidebar  .panel.navigation.timeline  .title-bar.timeline-events  .title-bar-scope-bar  .default-item-selected  .multiple path):
+* UserInterface/Views/TimelineSidebarPanel.js:
+(WebInspector.TimelineSidebarPanel.set 

[webkit-changes] [186585] trunk/Source/WebInspectorUI

2015-07-09 Thread drousso
Title: [186585] trunk/Source/WebInspectorUI








Revision 186585
Author drou...@apple.com
Date 2015-07-08 23:41:12 -0700 (Wed, 08 Jul 2015)


Log Message
Web Inspector: Copy Rule in the context menu copies hidden properties in the rule
https://bugs.webkit.org/show_bug.cgi?id=146775

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype._generateCSSRuleString):
Now only uses properties from the rule's visibleProperties list.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186584 => 186585)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-09 06:04:42 UTC (rev 186584)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-09 06:41:12 UTC (rev 186585)
@@ -1,3 +1,14 @@
+2015-07-08  Devin Rousso  drou...@apple.com
+
+Web Inspector: Copy Rule in the context menu copies hidden properties in the rule
+https://bugs.webkit.org/show_bug.cgi?id=146775
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/CSSStyleDeclarationSection.js:
+(WebInspector.CSSStyleDeclarationSection.prototype._generateCSSRuleString):
+Now only uses properties from the rule's visibleProperties list.
+
 2015-07-08  Timothy Hatcher  timo...@apple.com
 
 Web Inspector: Add page weight and time back to the toolbar dashboard


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js (186584 => 186585)

--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js	2015-07-09 06:04:42 UTC (rev 186584)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js	2015-07-09 06:41:12 UTC (rev 186585)
@@ -418,7 +418,7 @@
 
 styleText +=  {\n;
 
-for (var property of this._style.properties) {
+for (var property of this._style.visibleProperties) {
 styleText += .repeat(numMediaQueries + 1) + property.text.trim();
 
 if (!styleText.endsWith(;))






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [186609] trunk/Tools

2015-07-09 Thread drousso
Title: [186609] trunk/Tools








Revision 186609
Author drou...@apple.com
Date 2015-07-09 13:47:58 -0700 (Thu, 09 Jul 2015)


Log Message
Unreviewed.  Added myself as a committer.

* Scripts/webkitpy/common/config/contributors.json:

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/common/config/contributors.json




Diff

Modified: trunk/Tools/ChangeLog (186608 => 186609)

--- trunk/Tools/ChangeLog	2015-07-09 20:47:15 UTC (rev 186608)
+++ trunk/Tools/ChangeLog	2015-07-09 20:47:58 UTC (rev 186609)
@@ -1,3 +1,9 @@
+2015-07-09  Devin Rousso  drou...@apple.com
+
+Unreviewed.  Added myself as a committer.
+
+* Scripts/webkitpy/common/config/contributors.json:
+
 2015-07-09  Timothy Horton  timothy_hor...@apple.com
 
 Add a way to set the default URL from Minibrowser UI


Modified: trunk/Tools/Scripts/webkitpy/common/config/contributors.json (186608 => 186609)

--- trunk/Tools/Scripts/webkitpy/common/config/contributors.json	2015-07-09 20:47:15 UTC (rev 186608)
+++ trunk/Tools/Scripts/webkitpy/common/config/contributors.json	2015-07-09 20:47:58 UTC (rev 186609)
@@ -718,6 +718,14 @@
 dnomi
  ]
   },
+  Devin Rousso : {
+ emails : [
+drou...@apple.com
+ ],
+ nicks : [
+    drousso
+ ]
+  },
   Dhi Aurrahman : {
  emails : [
 diorah...@rockybars.com






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [186602] trunk/Source/WebInspectorUI

2015-07-09 Thread drousso
Title: [186602] trunk/Source/WebInspectorUI








Revision 186602
Author drou...@apple.com
Date 2015-07-09 12:25:25 -0700 (Thu, 09 Jul 2015)


Log Message
Web Inspector: Checkbox disappears when unchecking CSS background style
https://bugs.webkit.org/show_bug.cgi?id=146776

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers): Now uses _createCommentedCheckboxMarker.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createCommentedCheckboxMarker):
Scans the content of the given lineHandle for any commented text and adds an unselected checkbox to
the beginning of that lineHandle's line.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Now adds commented checkbox markers.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186601 => 186602)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-09 19:16:10 UTC (rev 186601)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-09 19:25:25 UTC (rev 186602)
@@ -1,3 +1,19 @@
+2015-07-09  Devin Rousso  drou...@apple.com
+
+Web Inspector: Checkbox disappears when unchecking CSS background style
+https://bugs.webkit.org/show_bug.cgi?id=146776
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers.update):
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers): Now uses _createCommentedCheckboxMarker.
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._createCommentedCheckboxMarker):
+Scans the content of the given lineHandle for any commented text and adds an unselected checkbox to
+the beginning of that lineHandle's line.
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent.update):
+(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Now adds commented checkbox markers.
+
 2015-07-09  Nikita Vasilyev  nvasil...@apple.com
 
 Web Inspector: Align slider knobs in the color picker


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js (186601 => 186602)

--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-09 19:16:10 UTC (rev 186601)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-07-09 19:25:25 UTC (rev 186602)
@@ -799,34 +799,10 @@
 });
 
 if (!this._codeMirror.getOption(readOnly)) {
-// Matches a comment like: /* -webkit-foo: bar; */
-var commentedPropertyRegex = /\/\*\s*[-\w]+\s*:\s*[^;]+;?\s*\*\//g;
-
 // Look for comments that look like properties and add checkboxes in front of them.
-var lineCount = this._codeMirror.lineCount();
-for (var i = 0; i  lineCount; ++i) {
-var lineContent = this._codeMirror.getLine(i);
-
-var match = commentedPropertyRegex.exec(lineContent);
-while (match) {
-var checkboxElement = document.createElement(input);
-checkboxElement.type = checkbox;
-checkboxElement.checked = false;
-checkboxElement.addEventListener(change, this._propertyCommentCheckboxChanged.bind(this));
-
-var from = {line: i, ch: match.index};
-var to = {line: i, ch: match.index + match[0].length};
-
-var checkboxMarker = this._codeMirror.setUniqueBookmark(from, checkboxElement);
-checkboxMarker.__propertyCheckbox = true;
-
-var commentTextMarker = this._codeMirror.markText(from, to);
-
-checkboxElement.__commentTextMarker = commentTextMarker;
-
-match = commentedPropertyRegex.exec(lineContent);
-}
-}
+this._codeMirror.eachLine(function(lineHandler) {
+this._createCommentedCheckboxMarker(lineHandler);
+}.bind(this));
 }
 
 // Look for colors and make swatches.
@@ -841,6 +817,41 @@
 this._codeMirror.operation(update.bind(this));
 }
 
+_createCommentedCheckboxMarker(lineHandle)
+{
+var lineNumber = lineHandle.lineNo();
+
+// Since lineNumber can be 0, it is also necessary to check if it is a number before returning.
+if (!lineNumber  isNaN(lineNumber))
+return;
+
+// 

[webkit-changes] [186645] trunk/Source/WebInspectorUI

2015-07-09 Thread drousso
Title: [186645] trunk/Source/WebInspectorUI








Revision 186645
Author drou...@apple.com
Date 2015-07-09 16:21:11 -0700 (Thu, 09 Jul 2015)


Log Message
Web Inspector: Don't clear the console when navigating to a different page
https://bugs.webkit.org/show_bug.cgi?id=142751

Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/LogManager.js:
(WebInspector.LogManager): No longer distinguishes from page refreshes and page navigations for console clearing.
(WebInspector.LogManager.prototype._delayedMessagesCleared):
(WebInspector.LogManager.prototype._mainResourceDidChange):
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._sessionStarted):
(WebInspector.LogContentView.prototype._handleContextMenuEvent): Changed context menu keep/clear log text.
(WebInspector.LogContentView.prototype._toggleClearLogOnNavigateSetting):
(WebInspector.LogContentView.prototype._toggleClearLogOnReloadSetting): Deleted.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
trunk/Source/WebInspectorUI/UserInterface/Controllers/LogManager.js
trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186644 => 186645)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-09 23:02:41 UTC (rev 186644)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-09 23:21:11 UTC (rev 186645)
@@ -1,5 +1,23 @@
 2015-07-09  Devin Rousso  drou...@apple.com
 
+Web Inspector: Don't clear the console when navigating to a different page
+https://bugs.webkit.org/show_bug.cgi?id=142751
+
+Reviewed by Timothy Hatcher.
+
+* Localizations/en.lproj/localizedStrings.js:
+* UserInterface/Controllers/LogManager.js:
+(WebInspector.LogManager): No longer distinguishes from page refreshes and page navigations for console clearing.
+(WebInspector.LogManager.prototype._delayedMessagesCleared):
+(WebInspector.LogManager.prototype._mainResourceDidChange):
+* UserInterface/Views/LogContentView.js:
+(WebInspector.LogContentView.prototype._sessionStarted):
+(WebInspector.LogContentView.prototype._handleContextMenuEvent): Changed context menu keep/clear log text.
+(WebInspector.LogContentView.prototype._toggleClearLogOnNavigateSetting):
+(WebInspector.LogContentView.prototype._toggleClearLogOnReloadSetting): Deleted.
+
+2015-07-09  Devin Rousso  drou...@apple.com
+
 Web Inspector: Pseudo-element style ordering is wrong for pseudo-styles on unique selectors
 https://bugs.webkit.org/show_bug.cgi?id=146804
 


Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (186644 => 186645)

--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2015-07-09 23:02:41 UTC (rev 186644)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2015-07-09 23:21:11 UTC (rev 186645)
@@ -91,7 +91,7 @@
 localizedStrings[Child Layers] = Child Layers;
 localizedStrings[Children] = Children;
 localizedStrings[Clear Log] = Clear Log;
-localizedStrings[Clear Log on Reload] = Clear Log on Reload;
+localizedStrings[Clear Log on Navigation] = Clear Log on Navigation;
 localizedStrings[Clear Timeline] = Clear Timeline;
 localizedStrings[Clear log (%s or %s)] = Clear log (%s or %s);
 localizedStrings[Click Listener] = Click Listener;
@@ -284,7 +284,7 @@
 localizedStrings[Invoke getter] = Invoke getter;
 localizedStrings[_javascript_  Events] = _javascript_  Events;
 localizedStrings[Jump to Definition] = Jump to Definition;
-localizedStrings[Keep Log on Reload] = Keep Log on Reload;
+localizedStrings[Keep Log on Navigation] = Keep Log on Navigation;
 localizedStrings[Key] = Key;
 localizedStrings[Label] = Label;
 localizedStrings[Latency] = Latency;


Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/LogManager.js (186644 => 186645)

--- trunk/Source/WebInspectorUI/UserInterface/Controllers/LogManager.js	2015-07-09 23:02:41 UTC (rev 186644)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/LogManager.js	2015-07-09 23:21:11 UTC (rev 186645)
@@ -31,9 +31,9 @@
 super();
 
 this._clearMessagesRequested = false;
-this._isPageReload = false;
+this._isNewPageOrReload = false;
 
-this.clearLogOnReloadSetting = new WebInspector.Setting(clear-log-on-reload, true);
+this.clearLogOnNavigateSetting = new WebInspector.Setting(clear-log-on-navigate, true);
 
 WebInspector.Frame.addEventListener(WebInspector.Frame.Event.MainResourceDidChange, this._mainResourceDidChange, this);
 }
@@ -74,14 +74,15 @@
 
 _delayedMessagesCleared()
 {
-if (this._isPageReload) {
-this._isPageReload = false;
-if (this.clearLogOnReloadSetting.value)
-

[webkit-changes] [186634] trunk/Source/WebInspectorUI

2015-07-09 Thread drousso
Title: [186634] trunk/Source/WebInspectorUI








Revision 186634
Author drou...@apple.com
Date 2015-07-09 14:54:11 -0700 (Thu, 09 Jul 2015)


Log Message
Web Inspector: Special Logs to Console that do not have an _expression_ should be styled differently, looks like code
https://bugs.webkit.org/show_bug.cgi?id=143840

Reviewed by Timothy Hatcher.

* UserInterface/Controllers/_javascript_LogViewController.js:
(WebInspector.WebInspector._javascript_LogViewController.appendImmediateExecutionWithResult):
Now applies a class to special logs initiated by the user (log element, log object, etc).
* UserInterface/Views/ConsoleCommandView.js:
(WebInspector.ConsoleCommandView): Added className parameter.
* UserInterface/Views/ConsoleMessageView.css:
(.console-user-command.selected-element-log):
(.console-user-command.special-user-log  .console-message-text):
* UserInterface/Views/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype._populateContextMenu.logElement):
(WebInspector.DOMTreeOutline.prototype._populateContextMenu):
* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView.prototype._contextMenuHandler):
* UserInterface/Views/ObjectTreeBaseTreeElement.js:
(WebInspector.ObjectTreeBaseTreeElement.prototype._logSymbolProperty):
(WebInspector.ObjectTreeBaseTreeElement.prototype._logValue):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Controllers/_javascript_LogViewController.js
trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleCommandView.js
trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.css
trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js
trunk/Source/WebInspectorUI/UserInterface/Views/ObjectPreviewView.js
trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186633 => 186634)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-09 21:03:46 UTC (rev 186633)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-09 21:54:11 UTC (rev 186634)
@@ -1,5 +1,29 @@
 2015-07-09  Devin Rousso  drou...@apple.com
 
+Web Inspector: Special Logs to Console that do not have an _expression_ should be styled differently, looks like code
+https://bugs.webkit.org/show_bug.cgi?id=143840
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Controllers/_javascript_LogViewController.js:
+(WebInspector.WebInspector._javascript_LogViewController.appendImmediateExecutionWithResult):
+Now applies a class to special logs initiated by the user (log element, log object, etc).
+* UserInterface/Views/ConsoleCommandView.js:
+(WebInspector.ConsoleCommandView): Added className parameter.
+* UserInterface/Views/ConsoleMessageView.css:
+(.console-user-command.selected-element-log):
+(.console-user-command.special-user-log  .console-message-text):
+* UserInterface/Views/DOMTreeOutline.js:
+(WebInspector.DOMTreeOutline.prototype._populateContextMenu.logElement):
+(WebInspector.DOMTreeOutline.prototype._populateContextMenu):
+* UserInterface/Views/ObjectPreviewView.js:
+(WebInspector.ObjectPreviewView.prototype._contextMenuHandler):
+* UserInterface/Views/ObjectTreeBaseTreeElement.js:
+(WebInspector.ObjectTreeBaseTreeElement.prototype._logSymbolProperty):
+(WebInspector.ObjectTreeBaseTreeElement.prototype._logValue):
+
+2015-07-09  Devin Rousso  drou...@apple.com
+
 Web Inspector: Checkbox disappears when unchecking CSS background style
 https://bugs.webkit.org/show_bug.cgi?id=146776
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/_javascript_LogViewController.js (186633 => 186634)

--- trunk/Source/WebInspectorUI/UserInterface/Controllers/_javascript_LogViewController.js	2015-07-09 21:03:46 UTC (rev 186633)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/_javascript_LogViewController.js	2015-07-09 21:54:11 UTC (rev 186634)
@@ -119,11 +119,11 @@
 consoleSession.element.scrollIntoView();
 }
 
-appendImmediateExecutionWithResult(text, result)
+appendImmediateExecutionWithResult(text, result, addSpecialUserLogClass)
 {
 console.assert(result instanceof WebInspector.RemoteObject);
 
-var commandMessageView = new WebInspector.ConsoleCommandView(text);
+var commandMessageView = new WebInspector.ConsoleCommandView(text, addSpecialUserLogClass ? special-user-log : null);
 this._appendConsoleMessageView(commandMessageView, true);
 
 function saveResultCallback(savedResultIndex)


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleCommandView.js (186633 => 186634)

--- trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleCommandView.js	2015-07-09 21:03:46 UTC (rev 186633)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleCommandView.js	2015-07-09 21:54:11 UTC (rev 186634)
@@ -29,7 +29,7 

[webkit-changes] [186635] trunk/Source/WebInspectorUI

2015-07-09 Thread drousso
Title: [186635] trunk/Source/WebInspectorUI








Revision 186635
Author drou...@apple.com
Date 2015-07-09 14:57:32 -0700 (Thu, 09 Jul 2015)


Log Message
Web Inspector: Pseudo-element style ordering is wrong for pseudo-styles on unique selectors
https://bugs.webkit.org/show_bug.cgi?id=146804

Reviewed by Timothy Hatcher.

* UserInterface/Models/CSSRule.js:
(WebInspector.CSSRule.prototype.selectorIsGreater):
Loops through the selectors in a rule to check if their specificity is greater than a given selector's specificity.
* UserInterface/Models/CSSSelector.js:
(WebInspector.CSSSelector.prototype.isGreaterThan):
Determines if the given selector's specificity is greater than this selector's specificity.
(WebInspector.CSSSelector):
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh):
If the pseudo-element selector's specificity is greater than the current selector's
specificity, create the pseudo-element's section and add it before the current style.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Models/CSSRule.js
trunk/Source/WebInspectorUI/UserInterface/Models/CSSSelector.js
trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186634 => 186635)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-09 21:54:11 UTC (rev 186634)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-09 21:57:32 UTC (rev 186635)
@@ -1,5 +1,24 @@
 2015-07-09  Devin Rousso  drou...@apple.com
 
+Web Inspector: Pseudo-element style ordering is wrong for pseudo-styles on unique selectors
+https://bugs.webkit.org/show_bug.cgi?id=146804
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Models/CSSRule.js:
+(WebInspector.CSSRule.prototype.selectorIsGreater):
+Loops through the selectors in a rule to check if their specificity is greater than a given selector's specificity.
+* UserInterface/Models/CSSSelector.js:
+(WebInspector.CSSSelector.prototype.isGreaterThan):
+Determines if the given selector's specificity is greater than this selector's specificity.
+(WebInspector.CSSSelector):
+* UserInterface/Views/RulesStyleDetailsPanel.js:
+(WebInspector.RulesStyleDetailsPanel.prototype.refresh):
+If the pseudo-element selector's specificity is greater than the current selector's
+specificity, create the pseudo-element's section and add it before the current style.
+
+2015-07-09  Devin Rousso  drou...@apple.com
+
 Web Inspector: Special Logs to Console that do not have an _expression_ should be styled differently, looks like code
 https://bugs.webkit.org/show_bug.cgi?id=143840
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Models/CSSRule.js (186634 => 186635)

--- trunk/Source/WebInspectorUI/UserInterface/Models/CSSRule.js	2015-07-09 21:54:11 UTC (rev 186634)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/CSSRule.js	2015-07-09 21:57:32 UTC (rev 186635)
@@ -182,6 +182,32 @@
 return Object.shallowEqual(this._id, rule.id);
 }
 
+selectorIsGreater(otherSelectors)
+{
+if (!otherSelectors || !otherSelectors.length)
+return true;
+
+var selectorIsGreater = true;
+
+var selectors = this.matchedSelectors;
+if (!selectors.length)
+selectors = this._selectors;
+
+for (var selector of selectors) {
+for (var otherSelector of otherSelectors) {
+if (selector.isGreaterThan(otherSelector))
+continue;
+
+selectorIsGreater = false;
+}
+
+if (selectorIsGreater)
+return true;
+}
+
+return false;
+}
+
 // Protected
 
 get nodeStyles()


Modified: trunk/Source/WebInspectorUI/UserInterface/Models/CSSSelector.js (186634 => 186635)

--- trunk/Source/WebInspectorUI/UserInterface/Models/CSSSelector.js	2015-07-09 21:54:11 UTC (rev 186634)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/CSSSelector.js	2015-07-09 21:57:32 UTC (rev 186635)
@@ -52,4 +52,19 @@
 {
 return this._dynamic;
 }
+
+isGreaterThan(selector)
+{
+if (!selector || !selector.specificity)
+return true;
+
+for (var i = 0; i  this._specificity.length; ++i) {
+if (this._specificity[i] === selector.specificity[i])
+continue;
+
+return this._specificity[i]  selector.specificity[i];
+}
+
+return false;
+}
 };


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js (186634 => 186635)

--- trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js	2015-07-09 21:54:11 UTC (rev 186634)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js	2015-07-09 21:57:32 UTC (rev 186635)
@@ -179,7 +179,7 @@
 var 

[webkit-changes] [186639] trunk

2015-07-09 Thread drousso
Title: [186639] trunk








Revision 186639
Author drou...@apple.com
Date 2015-07-09 15:07:51 -0700 (Thu, 09 Jul 2015)


Log Message
Web Inspector: Fix shape-highlight layout tests
https://bugs.webkit.org/show_bug.cgi?id=146080

Reviewed by Joseph Pecoraro.

Source/WebCore:

* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForShapeOutside): Now properly returns the shape margin.

LayoutTests:

* http/tests/inspector/dom/shapes-test.js: Updated.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/http/tests/inspector/dom/shapes-test.js
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/inspector/InspectorOverlay.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (186638 => 186639)

--- trunk/LayoutTests/ChangeLog	2015-07-09 22:02:21 UTC (rev 186638)
+++ trunk/LayoutTests/ChangeLog	2015-07-09 22:07:51 UTC (rev 186639)
@@ -1,3 +1,12 @@
+2015-07-09  Devin Rousso  drou...@apple.com
+
+Web Inspector: Fix shape-highlight layout tests
+https://bugs.webkit.org/show_bug.cgi?id=146080
+
+Reviewed by Joseph Pecoraro.
+
+* http/tests/inspector/dom/shapes-test.js: Updated.
+
 2015-07-09  Michael Saboff  msab...@apple.com
 
 REGRESSION (r180248): Repro Crash: com.apple.WebKit.WebContent at com.apple._javascript_Core: JSC::createRangeError + 20


Modified: trunk/LayoutTests/http/tests/inspector/dom/shapes-test.js (186638 => 186639)

--- trunk/LayoutTests/http/tests/inspector/dom/shapes-test.js	2015-07-09 22:02:21 UTC (rev 186638)
+++ trunk/LayoutTests/http/tests/inspector/dom/shapes-test.js	2015-07-09 22:07:51 UTC (rev 186639)
@@ -31,11 +31,11 @@
 }
 
 function receivedHighlightObject(error, payload, wasThrown) {
-console.assert(!error, When evaluating code, received unexpected error: + error);
-console.assert(!error, When evaluating code, an exception was thrown: + wasThrown);
+InspectorTest.assert(!error, When evaluating code, received unexpected error: + error);
+InspectorTest.assert(!error, When evaluating code, an exception was thrown: + wasThrown);
 
 var data = ""
-callback(data.elementInfo.shapeOutsideInfo);
+callback(data[0].elementData.shapeOutsideData);
 }
 },
 


Modified: trunk/Source/WebCore/ChangeLog (186638 => 186639)

--- trunk/Source/WebCore/ChangeLog	2015-07-09 22:02:21 UTC (rev 186638)
+++ trunk/Source/WebCore/ChangeLog	2015-07-09 22:07:51 UTC (rev 186639)
@@ -1,3 +1,13 @@
+2015-07-09  Devin Rousso  drou...@apple.com
+
+Web Inspector: Fix shape-highlight layout tests
+https://bugs.webkit.org/show_bug.cgi?id=146080
+
+Reviewed by Joseph Pecoraro.
+
+* inspector/InspectorOverlay.cpp:
+(WebCore::buildObjectForShapeOutside): Now properly returns the shape margin.
+
 2015-07-09  Eric Carlson  eric.carl...@apple.com
 
 [Mac] AirPlay to password protected AppleTV fails


Modified: trunk/Source/WebCore/inspector/InspectorOverlay.cpp (186638 => 186639)

--- trunk/Source/WebCore/inspector/InspectorOverlay.cpp	2015-07-09 22:02:21 UTC (rev 186638)
+++ trunk/Source/WebCore/inspector/InspectorOverlay.cpp	2015-07-09 22:07:51 UTC (rev 186639)
@@ -675,7 +675,7 @@
 
 paths.marginShape.apply(info, appendPathSegment);
 
-shapeObject-setMarginShape(shapePath.copyRef());
+shapeObject-setMarginShape(marginShapePath.copyRef());
 }
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [220180] trunk/Source/WebInspectorUI

2017-08-02 Thread drousso
Title: [220180] trunk/Source/WebInspectorUI








Revision 220180
Author drou...@apple.com
Date 2017-08-02 21:21:32 -0700 (Wed, 02 Aug 2017)


Log Message
Web Inspector: add TreeElement virtualization for the Recording tab
https://bugs.webkit.org/show_bug.cgi?id=174968

Reviewed by Joseph Pecoraro.

* UserInterface/Views/RecordingNavigationSidebarPanel.js:
(WI.RecordingNavigationSidebarPanel):

* UserInterface/Views/TreeOutline.js:
(WI.TreeOutline):
(WI.TreeOutline.prototype.get virtualized):
(WI.TreeOutline.prototype.registerScrollVirtualizer):
(WI.TreeOutline.prototype.updateVirtualizedElements.walk):
(WI.TreeOutline.prototype.updateVirtualizedElements):
Add spacer elements before and after the TreeOutline element that will size to ensure that
the TreeOutline node still takes up the same amount of space after some of the TreeElements
are removed. Whenever the scroll of the container view changes, recalculate the visible area
and add/remove TreeElements based on whether they would be in that. This is only possible if
every TreeElement has the same vertical height, which is given when setting up the scroll
listener on the container view.

* UserInterface/Views/TreeElement.js:
(WI.TreeElement.prototype.set hidden):
(WI.TreeElement.prototype._attach):
(WI.TreeElement.prototype.collapse):
(WI.TreeElement.prototype.expand):
(WI.TreeElement.prototype.reveal):
If the TreeOutline is being virtualized, don't add each TreeElement's node to the DOM. They
will be added at the end of the frame (via setTimeout) if they are within the visible + padding
area of the TreeOutline.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/RecordingNavigationSidebarPanel.js
trunk/Source/WebInspectorUI/UserInterface/Views/TreeElement.js
trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (220179 => 220180)

--- trunk/Source/WebInspectorUI/ChangeLog	2017-08-03 04:19:10 UTC (rev 220179)
+++ trunk/Source/WebInspectorUI/ChangeLog	2017-08-03 04:21:32 UTC (rev 220180)
@@ -1,3 +1,36 @@
+2017-08-02  Devin Rousso  
+
+Web Inspector: add TreeElement virtualization for the Recording tab
+https://bugs.webkit.org/show_bug.cgi?id=174968
+
+Reviewed by Joseph Pecoraro.
+
+* UserInterface/Views/RecordingNavigationSidebarPanel.js:
+(WI.RecordingNavigationSidebarPanel):
+
+* UserInterface/Views/TreeOutline.js:
+(WI.TreeOutline):
+(WI.TreeOutline.prototype.get virtualized):
+(WI.TreeOutline.prototype.registerScrollVirtualizer):
+(WI.TreeOutline.prototype.updateVirtualizedElements.walk):
+(WI.TreeOutline.prototype.updateVirtualizedElements):
+Add spacer elements before and after the TreeOutline element that will size to ensure that
+the TreeOutline node still takes up the same amount of space after some of the TreeElements
+are removed. Whenever the scroll of the container view changes, recalculate the visible area
+and add/remove TreeElements based on whether they would be in that. This is only possible if
+every TreeElement has the same vertical height, which is given when setting up the scroll
+listener on the container view.
+
+* UserInterface/Views/TreeElement.js:
+(WI.TreeElement.prototype.set hidden):
+(WI.TreeElement.prototype._attach):
+(WI.TreeElement.prototype.collapse):
+(WI.TreeElement.prototype.expand):
+(WI.TreeElement.prototype.reveal):
+If the TreeOutline is being virtualized, don't add each TreeElement's node to the DOM. They
+will be added at the end of the frame (via setTimeout) if they are within the visible + padding
+area of the TreeOutline.
+
 2017-08-01  Devin Rousso  
 
 Web Inspector: simplify WebInspector with WI


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/RecordingNavigationSidebarPanel.js (220179 => 220180)

--- trunk/Source/WebInspectorUI/UserInterface/Views/RecordingNavigationSidebarPanel.js	2017-08-03 04:19:10 UTC (rev 220179)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/RecordingNavigationSidebarPanel.js	2017-08-03 04:21:32 UTC (rev 220180)
@@ -30,6 +30,7 @@
 super("recording", WI.UIString("Recording"));
 
 this.contentTreeOutline.customIndent = true;
+this.contentTreeOutline.registerScrollVirtualizer(this.contentView.element, 20);
 
 this.filterBar.placeholder = WI.UIString("Filter Actions");
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TreeElement.js (220179 => 220180)

--- trunk/Source/WebInspectorUI/UserInterface/Views/TreeElement.js	2017-08-03 04:19:10 UTC (rev 220179)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TreeElement.js	2017-08-03 04:21:32 UTC (rev 220180)
@@ -165,8 +165,11 @@
 if (this._childrenListNode)
 this._childrenListNode.hidden = 

[webkit-changes] [220188] trunk

2017-08-03 Thread drousso
Title: [220188] trunk








Revision 220188
Author drou...@apple.com
Date 2017-08-02 23:18:08 -0700 (Wed, 02 Aug 2017)


Log Message
Web Inspector: add stack trace information for each RecordingAction
https://bugs.webkit.org/show_bug.cgi?id=174663

Reviewed by Joseph Pecoraro.

Source/_javascript_Core:

* inspector/ScriptCallFrame.h:
Add `operator==` so that when a ScriptCallFrame object is held in a Vector, calling `find`
with an existing value doesn't need require a functor and can use existing code.

* interpreter/StackVisitor.h:
* interpreter/StackVisitor.cpp:
(JSC::StackVisitor::Frame::isWasmFrame const): Inlined in header.

Source/WebCore:

Tests: inspector/canvas/recording-2d.html
   inspector/model/recording.html

* inspector/InspectorCanvas.h:
* inspector/InspectorCanvas.cpp:
(WebCore::InspectorCanvas::indexForData):
(WebCore::InspectorCanvas::buildAction):

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:

* UserInterface/Models/Recording.js:
(WI.Recording.prototype.swizzle):
Add Array type for swizzling array values.

* UserInterface/Models/RecordingAction.js:
(WI.RecordingAction):
(WI.RecordingAction.fromPayload):
(WI.RecordingAction.prototype.get trace):
(WI.RecordingAction.prototype.swizzle):
(WI.RecordingAction.prototype.toJSON):

* UserInterface/Views/RecordingTraceDetailsSidebarPanel.js: Added.
(WI.RecordingTraceDetailsSidebarPanel):
(WI.RecordingTraceDetailsSidebarPanel.disallowInstanceForClass):
(WI.RecordingTraceDetailsSidebarPanel.prototype.inspect):
(WI.RecordingTraceDetailsSidebarPanel.prototype.set recording):
(WI.RecordingTraceDetailsSidebarPanel.prototype.updateActionIndex):
* UserInterface/Views/RecordingTraceDetailsSidebarPanel.css: Added.
(.sidebar > .panel.details.recording-trace > .content > .call-frame):
(.sidebar > .details.recording-trace > .content > .no-trace-data):
(.sidebar > .details.recording-trace > .content > .no-trace-data > .message):

* UserInterface/Views/RecordingTabContentView.js:
(WI.RecordingTabContentView):

* UserInterface/Views/RecordingActionTreeElement.js:
(WI.RecordingActionTreeElement.prototype.populateContextMenu):

* UserInterface/Views/CallFrameView.css:
(.call-frame):
(body[dir=ltr] .call-frame .icon):
(body[dir=rtl] .call-frame .icon):
Apply the same trailing margin for CallFrameView icons as TreeElement.

LayoutTests:

* inspector/canvas/recording-2d-expected.txt:
* inspector/canvas/recording-2d.html:
* inspector/model/recording-expected.txt:
* inspector/model/recording.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/inspector/canvas/recording-2d-expected.txt
trunk/LayoutTests/inspector/canvas/recording-2d.html
trunk/LayoutTests/inspector/model/recording-expected.txt
trunk/LayoutTests/inspector/model/recording.html
trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/inspector/ScriptCallFrame.h
trunk/Source/_javascript_Core/interpreter/StackVisitor.cpp
trunk/Source/_javascript_Core/interpreter/StackVisitor.h
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/inspector/InspectorCanvas.cpp
trunk/Source/WebCore/inspector/InspectorCanvas.h
trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
trunk/Source/WebInspectorUI/UserInterface/Main.html
trunk/Source/WebInspectorUI/UserInterface/Models/Recording.js
trunk/Source/WebInspectorUI/UserInterface/Models/RecordingAction.js
trunk/Source/WebInspectorUI/UserInterface/Views/CallFrameView.css
trunk/Source/WebInspectorUI/UserInterface/Views/RecordingActionTreeElement.js
trunk/Source/WebInspectorUI/UserInterface/Views/RecordingTabContentView.js


Added Paths

trunk/Source/WebInspectorUI/UserInterface/Views/RecordingTraceDetailsSidebarPanel.css
trunk/Source/WebInspectorUI/UserInterface/Views/RecordingTraceDetailsSidebarPanel.js




Diff

Modified: trunk/LayoutTests/ChangeLog (220187 => 220188)

--- trunk/LayoutTests/ChangeLog	2017-08-03 06:16:38 UTC (rev 220187)
+++ trunk/LayoutTests/ChangeLog	2017-08-03 06:18:08 UTC (rev 220188)
@@ -1,3 +1,15 @@
+2017-08-02  Devin Rousso  
+
+Web Inspector: add stack trace information for each RecordingAction
+https://bugs.webkit.org/show_bug.cgi?id=174663
+
+Reviewed by Joseph Pecoraro.
+
+* inspector/canvas/recording-2d-expected.txt:
+* inspector/canvas/recording-2d.html:
+* inspector/model/recording-expected.txt:
+* inspector/model/recording.html:
+
 2017-08-02  Chris Dumez  
 
 NetworkResourceLoader::setDefersLoading() may cause start() to be called multiple times


Modified: trunk/LayoutTests/inspector/canvas/recording-2d-expected.txt (220187 => 220188)

--- trunk/LayoutTests/inspector/canvas/recording-2d-expected.txt	2017-08-03 06:16:38 UTC (rev 220187)
+++ trunk/LayoutTests/inspector/canvas/recording-2d-expected.txt	2017-08-03 06:18:08 UTC (rev 220188)
@@ -55,6 +55,17 @@
 4,
 5,
 0
+

[webkit-changes] [220235] trunk/Source

2017-08-03 Thread drousso
Title: [220235] trunk/Source








Revision 220235
Author drou...@apple.com
Date 2017-08-03 16:10:57 -0700 (Thu, 03 Aug 2017)


Log Message
Web Inspector: add button to open Inspector^2
https://bugs.webkit.org/show_bug.cgi?id=175108

Reviewed by Brian Burg.

Source/WebCore:

This patch just exposes a function to the inspector page. No new functionality was added.

* inspector/InspectorFrontendHost.idl:
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::inspectInspector):

Source/WebInspectorUI:

* UserInterface/Debug/Bootstrap.js:
(updateDebugUI):
(WI.runBootstrapOperations):

* UserInterface/Views/ButtonToolbarItem.js:
(WI.ButtonToolbarItem):
(WI.ButtonToolbarItem.prototype.get label): Deleted.
(WI.ButtonToolbarItem.prototype.set label): Deleted.
* UserInterface/Views/ButtonToolbarItem.css:
(.toolbar .item.button):
(.toolbar .item.button:not(.disabled):active):
(.toolbar .item.button:not(.disabled):matches(:focus, .activate.activated)):
(.toolbar .item.button:not(.disabled):active:matches(:focus, .activate.activated)):
(.toolbar .item.button > .glyph):
(.toolbar .item.button:not(.disabled):active > .glyph): Deleted.
(.toolbar .item.button:not(.disabled):matches(:focus, .activate.activated) > .glyph): Deleted.
(.toolbar .item.button:not(.disabled):active:matches(:focus, .activate.activated) > .glyph): Deleted.
(.toolbar .item.button > .label): Deleted.
* UserInterface/Views/ActivateButtonToolbarItem.js:
(WI.ActivateButtonToolbarItem):
(WI.ActivateButtonToolbarItem.prototype.get label): Deleted.
(WI.ActivateButtonToolbarItem.prototype.set label): Deleted.
* UserInterface/Base/Main.js:
(WI.contentLoaded):
Remove unused `label` parameter from Toolbar objects.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp
trunk/Source/WebCore/inspector/InspectorFrontendHost.h
trunk/Source/WebCore/inspector/InspectorFrontendHost.idl
trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Base/Main.js
trunk/Source/WebInspectorUI/UserInterface/Debug/Bootstrap.js
trunk/Source/WebInspectorUI/UserInterface/Views/ActivateButtonToolbarItem.js
trunk/Source/WebInspectorUI/UserInterface/Views/ButtonToolbarItem.css
trunk/Source/WebInspectorUI/UserInterface/Views/ButtonToolbarItem.js




Diff

Modified: trunk/Source/WebCore/ChangeLog (220234 => 220235)

--- trunk/Source/WebCore/ChangeLog	2017-08-03 23:09:06 UTC (rev 220234)
+++ trunk/Source/WebCore/ChangeLog	2017-08-03 23:10:57 UTC (rev 220235)
@@ -1,3 +1,17 @@
+2017-08-03  Devin Rousso  
+
+Web Inspector: add button to open Inspector^2
+https://bugs.webkit.org/show_bug.cgi?id=175108
+
+Reviewed by Brian Burg.
+
+This patch just exposes a function to the inspector page. No new functionality was added.
+
+* inspector/InspectorFrontendHost.idl:
+* inspector/InspectorFrontendHost.h:
+* inspector/InspectorFrontendHost.cpp:
+(WebCore::InspectorFrontendHost::inspectInspector):
+
 2017-08-03  Matt Baker  
 
 Web Inspector: Instrument WebGLProgram created/deleted


Modified: trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp (220234 => 220235)

--- trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp	2017-08-03 23:09:06 UTC (rev 220234)
+++ trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp	2017-08-03 23:10:57 UTC (rev 220235)
@@ -40,6 +40,7 @@
 #include "Event.h"
 #include "FocusController.h"
 #include "HitTestResult.h"
+#include "InspectorController.h"
 #include "InspectorFrontendClient.h"
 #include "JSMainThreadExecState.h"
 #include "MainFrame.h"
@@ -417,4 +418,10 @@
 PAL::systemBeep();
 }
 
+void InspectorFrontendHost::inspectInspector()
+{
+if (m_frontendPage)
+m_frontendPage->inspectorController().show();
+}
+
 } // namespace WebCore


Modified: trunk/Source/WebCore/inspector/InspectorFrontendHost.h (220234 => 220235)

--- trunk/Source/WebCore/inspector/InspectorFrontendHost.h	2017-08-03 23:09:06 UTC (rev 220234)
+++ trunk/Source/WebCore/inspector/InspectorFrontendHost.h	2017-08-03 23:10:57 UTC (rev 220235)
@@ -101,6 +101,7 @@
 void unbufferedLog(const String& message);
 
 void beep();
+void inspectInspector();
 
 private:
 #if ENABLE(CONTEXT_MENUS)


Modified: trunk/Source/WebCore/inspector/InspectorFrontendHost.idl (220234 => 220235)

--- trunk/Source/WebCore/inspector/InspectorFrontendHost.idl	2017-08-03 23:09:06 UTC (rev 220234)
+++ trunk/Source/WebCore/inspector/InspectorFrontendHost.idl	2017-08-03 23:10:57 UTC (rev 220235)
@@ -76,6 +76,7 @@
 boolean isUnderTest();
 
 void beep();
+void inspectInspector();
 };
 
 dictionary ContextMenuItem {


Modified: trunk/Source/WebInspectorUI/ChangeLog (220234 => 220235)

--- trunk/Source/WebInspectorUI/ChangeLog	2017-08-03 23:09:06 UTC (rev 220234)
+++ trunk/Source/WebInspectorUI/ChangeLog	2017-08-03 23:10:57 UTC (rev 220235)
@@ -1,3 +1,36 

  1   2   3   4   5   6   7   8   9   10   >