WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
182326
Should choose the best match during 'route' if there are multiple matches.
https://bugs.webkit.org/show_bug.cgi?id=182326
Summary
Should choose the best match during 'route' if there are multiple matches.
dewei_zhu
Reported
2018-01-31 01:13:47 PST
Should chose the best match during 'route' when there are multiple matches.
Attachments
Patch
(6.82 KB, patch)
2018-01-31 01:23 PST
,
dewei_zhu
no flags
Details
Formatted Diff
Diff
Patch
(9.45 KB, patch)
2018-01-31 14:22 PST
,
dewei_zhu
rniwa
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
dewei_zhu
Comment 1
2018-01-31 01:23:49 PST
Created
attachment 332750
[details]
Patch
Ryosuke Niwa
Comment 2
2018-01-31 11:34:40 PST
Comment on
attachment 332750
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=332750&action=review
r- due to the lack of testing.
> Websites/perf.webkit.org/public/v3/pages/page-router.js:43 > + } else if (hashUrl.startsWith(routeName) && hashUrl.charAt(routeName.length) == '/' && bestMatchingRouteName.length < routeName.length) {
What's hashUrl.charAt(routeName.length) == '/' about?
dewei_zhu
Comment 3
2018-01-31 13:33:15 PST
Comment on
attachment 332750
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=332750&action=review
>> Websites/perf.webkit.org/public/v3/pages/page-router.js:43 >> + } else if (hashUrl.startsWith(routeName) && hashUrl.charAt(routeName.length) == '/' && bestMatchingRouteName.length < routeName.length) { > > What's hashUrl.charAt(routeName.length) == '/' about?
This check exists before. I would assume we want '/apple/xxxx' matches '/apple', and do not want it matches '/applepile/...'
dewei_zhu
Comment 4
2018-01-31 14:22:31 PST
Created
attachment 332802
[details]
Patch
Ryosuke Niwa
Comment 5
2018-01-31 15:00:10 PST
Comment on
attachment 332802
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=332802&action=review
> Websites/perf.webkit.org/public/v3/pages/page-router.js:32 > + let bestMatchingRouteName = '';
Initialize this to null instead.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug