[Webkit-unassigned] [Bug 146676] Web Inspector: Tabbing in the styles sidebar doesn't highlight the next section of text

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 7 09:31:08 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=146676

Timothy Hatcher <timothy at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #256288|review?                     |review-
              Flags|                            |

--- Comment #5 from Timothy Hatcher <timothy at apple.com> ---
Comment on attachment 256288
  --> https://bugs.webkit.org/attachment.cgi?id=256288
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=256288&action=review

> Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js:400
> +        var colonIndex = text.indexOf(":");

What if this returns -1?

> Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js:403
> +        var match = /(?:[^:;\s]\s*)+/.exec(remaining);

You can do this without doing a substring. If you make the regex, then set regex.lastIndex = colonIndex, it will only search after that.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150707/b22625cd/attachment.html>


More information about the webkit-unassigned mailing list