Changeset 241740 in webkit


Ignore:
Timestamp:
Feb 18, 2019 2:45:55 PM (5 years ago)
Author:
Nikita Vasilyev
Message:

Web Inspector: Styles: typing ";" shouldn't focus on the next property when there's open parenthesis or comment
https://bugs.webkit.org/show_bug.cgi?id=194789

Reviewed by Matt Baker.

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype._handleValueBeforeInput):

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r241739 r241740  
     12019-02-18  Nikita Vasilyev  <nvasilyev@apple.com>
     2
     3        Web Inspector: Styles: typing ";" shouldn't focus on the next property when there's open parenthesis or comment
     4        https://bugs.webkit.org/show_bug.cgi?id=194789
     5
     6        Reviewed by Matt Baker.
     7
     8        * UserInterface/Views/SpreadsheetStyleProperty.js:
     9        (WI.SpreadsheetStyleProperty.prototype._handleValueBeforeInput):
     10
    1112019-02-18  Joseph Pecoraro  <pecoraro@apple.com>
    212
  • trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js

    r241653 r241740  
    728728            return;
    729729
    730         // Find the first and last index (if any) of a quote character to ensure that the string
    731         // doesn't contain unbalanced quotes. If so, then there's no way that the semicolon could be
    732         // part of a string within the value, so we can assume that it's the property "terminator".
    733         const quoteRegex = /["']/g;
    734         let start = -1;
    735         let end = text.length;
    736         let match = null;
    737         while (match = quoteRegex.exec(text)) {
    738             if (start < 0)
    739                 start = match.index;
    740             end = match.index + 1;
    741         }
    742 
    743         if (start !== -1 && !text.substring(start, end).hasMatchingEscapedQuotes())
     730        let unbalancedCharacters = WI.CSSCompletions.completeUnbalancedValue(text);
     731        if (unbalancedCharacters)
    744732            return;
    745733
Note: See TracChangeset for help on using the changeset viewer.