Bug 177117 - Web Inspector: Adopt named groups in complex regexes
Summary: Web Inspector: Adopt named groups in complex regexes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-09-18 18:44 PDT by Joseph Pecoraro
Modified: 2017-09-27 12:24 PDT (History)
8 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (7.29 KB, patch)
2017-09-18 18:46 PDT, Joseph Pecoraro
joepeck: review-
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews105 for mac-elcapitan-wk2 (1.81 MB, application/zip)
2017-09-18 19:33 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews102 for mac-elcapitan (1.40 MB, application/zip)
2017-09-18 19:53 PDT, Build Bot
no flags Details
[PATCH] Proposed Fix (7.30 KB, patch)
2017-09-19 10:48 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2017-09-18 18:44:07 PDT
Adopt named groups in complex regexes.

We have a few RegExps with 3+ groups:

  • URL parsing
  • Color parsing

Lets use named groups, just introduced in r221769.
Comment 1 Joseph Pecoraro 2017-09-18 18:46:48 PDT
Created attachment 321166 [details]
[PATCH] Proposed Fix
Comment 2 Build Bot 2017-09-18 19:33:43 PDT
Comment on attachment 321166 [details]
[PATCH] Proposed Fix

Attachment 321166 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/4589891

New failing tests:
inspector/model/color.html
Comment 3 Build Bot 2017-09-18 19:33:44 PDT
Created attachment 321171 [details]
Archive of layout-test-results from ews105 for mac-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-elcapitan-wk2  Platform: Mac OS X 10.11.6
Comment 4 Build Bot 2017-09-18 19:53:56 PDT
Comment on attachment 321166 [details]
[PATCH] Proposed Fix

Attachment 321166 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/4590034

New failing tests:
inspector/model/color.html
Comment 5 Build Bot 2017-09-18 19:53:58 PDT
Created attachment 321173 [details]
Archive of layout-test-results from ews102 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 6 Joseph Pecoraro 2017-09-19 10:47:36 PDT
Comment on attachment 321166 [details]
[PATCH] Proposed Fix

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

> Source/WebInspectorUI/UserInterface/Models/Color.js:65
> +            if (match.groups.hex) {
> +                let hex = match.group.hex.toUpperCase();

Oops, the second should be `groups.hex` not `group.hex`.
Comment 7 Joseph Pecoraro 2017-09-19 10:48:48 PDT
Created attachment 321212 [details]
[PATCH] Proposed Fix
Comment 8 Matt Baker 2017-09-19 11:16:54 PDT
Comment on attachment 321212 [details]
[PATCH] Proposed Fix

Nice, r=me.
Comment 9 WebKit Commit Bot 2017-09-19 11:46:38 PDT
Comment on attachment 321212 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 321212

Committed r222216: <http://trac.webkit.org/changeset/222216>
Comment 10 WebKit Commit Bot 2017-09-19 11:46:40 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Radar WebKit Bug Importer 2017-09-27 12:24:52 PDT
<rdar://problem/34693224>