Changeset 206888 in webkit


Ignore:
Timestamp:
Oct 6, 2016 4:11:01 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Inspector exception in parseTextForRule() when pasting into CSS rule selector
https://bugs.webkit.org/show_bug.cgi?id=162792

Patch by Devin Rousso <Devin Rousso> on 2016-10-06
Reviewed by Matt Baker.

  • UserInterface/Views/CSSStyleDeclarationSection.js:

(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste.parseTextForRule):
Changed regular expression for matching CSS rules to allow newlines in pasted text.

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r206729 r206888  
     12016-10-06  Devin Rousso  <dcrousso+webkit@gmail.com>
     2
     3        Inspector exception in `parseTextForRule()` when pasting into CSS rule selector
     4        https://bugs.webkit.org/show_bug.cgi?id=162792
     5
     6        Reviewed by Matt Baker.
     7
     8        * UserInterface/Views/CSSStyleDeclarationSection.js:
     9        (WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste.parseTextForRule):
     10        Changed regular expression for matching CSS rules to allow newlines in pasted text.
     11
    1122016-10-02  Devin Rousso  <dcrousso+webkit@gmail.com>
    213
  • trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js

    r205754 r206888  
    424424            let containsBraces = /[\{\}]/;
    425425            if (!containsBraces.test(text))
    426                 return null;
    427 
    428             let match = text.match(/([^{]+){(.*)}/);
     426                return [];
     427
     428            let match = text.match(/([^{]+){([\s\S]*)}/);
    429429            if (!match)
    430                 return null;
     430                return [];
    431431
    432432            // If the match "body" contains braces, parse that body as if it were a rule.
Note: See TracChangeset for help on using the changeset viewer.