WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
207058
[iPad] Videos on nhl.com can't be scrubbed when loaded with desktop UA.
https://bugs.webkit.org/show_bug.cgi?id=207058
Summary
[iPad] Videos on nhl.com can't be scrubbed when loaded with desktop UA.
Jer Noble
Reported
2020-01-31 10:53:38 PST
[iPad] Videos on nhl.com can't be scrubbed when loaded with desktop UA.
Attachments
Patch
(7.54 KB, patch)
2020-01-31 11:46 PST
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Patch
(7.49 KB, patch)
2020-01-31 13:00 PST
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Patch
(7.56 KB, patch)
2020-01-31 13:07 PST
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Patch
(7.56 KB, patch)
2020-01-31 13:20 PST
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Patch
(7.56 KB, patch)
2020-01-31 13:23 PST
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Patch
(7.34 KB, patch)
2020-02-03 08:40 PST
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Patch for landing
(7.27 KB, patch)
2020-02-03 13:42 PST
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Jer Noble
Comment 1
2020-01-31 11:46:26 PST
Created
attachment 389387
[details]
Patch
Jer Noble
Comment 2
2020-01-31 13:00:16 PST
Created
attachment 389395
[details]
Patch
Jer Noble
Comment 3
2020-01-31 13:07:48 PST
Created
attachment 389396
[details]
Patch
Jer Noble
Comment 4
2020-01-31 13:20:16 PST
Created
attachment 389401
[details]
Patch
Jer Noble
Comment 5
2020-01-31 13:21:04 PST
<
rdar://problem/58778950
>
Jer Noble
Comment 6
2020-01-31 13:23:52 PST
Created
attachment 389402
[details]
Patch
Darin Adler
Comment 7
2020-02-01 16:07:32 PST
Comment on
attachment 389402
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=389402&action=review
> Source/WebCore/ChangeLog:1 > + [iPad] Videos on nhl.com can't be scrubbed when loaded with desktop UA.
Isn’t this missing the name and date?
> Source/WebCore/ChangeLog:12 > + Drive-by fix: There's no need to re-parse the entire URL and walk through all the cases > + every time shouldDispatchSimulatedMouseEvents() is called. Save the results of the initial > + pass so that subsequent checks are just a simple bool check.
This is best done by factoring into a function that returns a bool and a separate function that memoizes the result rather than changing every return statement.
Jer Noble
Comment 8
2020-02-03 08:27:20 PST
Comment on
attachment 389402
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=389402&action=review
>> Source/WebCore/ChangeLog:1 >> + [iPad] Videos on nhl.com can't be scrubbed when loaded with desktop UA. > > Isn’t this missing the name and date?
Huh, that's weird. It does explain why webkit-patch threw an exception every time I tried to upload this patch.
>> Source/WebCore/ChangeLog:12 >> + pass so that subsequent checks are just a simple bool check. > > This is best done by factoring into a function that returns a bool and a separate function that memoizes the result rather than changing every return statement.
Will do.
Jer Noble
Comment 9
2020-02-03 08:40:36 PST
Created
attachment 389518
[details]
Patch
Darin Adler
Comment 10
2020-02-03 12:43:24 PST
Comment on
attachment 389518
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=389518&action=review
> Source/WebCore/page/Quirks.cpp:295 > + if (m_shouldDispatchSimulatedMouseEventsQuirk) > + return m_shouldDispatchSimulatedMouseEventsQuirk.value();
I suggest merging this with the code below.
> Source/WebCore/page/Quirks.cpp:353 > + m_shouldDispatchSimulatedMouseEventsQuirk = doShouldDispatchChecks(); > + return m_shouldDispatchSimulatedMouseEventsQuirk.value();
I suggest writing it like this: if (!m_shouldDispatchSimulatedMouseEventsQuirk) m_shouldDispatchSimulatedMouseEventsQuirk = doShouldDispatchChecks(); return *m_shouldDispatchSimulatedMouseEventsQuirk; I don’t think we need the second return statement above.
Jer Noble
Comment 11
2020-02-03 13:40:12 PST
(In reply to Darin Adler from
comment #10
)
> Comment on
attachment 389518
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=389518&action=review
> > > Source/WebCore/page/Quirks.cpp:295 > > + if (m_shouldDispatchSimulatedMouseEventsQuirk) > > + return m_shouldDispatchSimulatedMouseEventsQuirk.value(); > > I suggest merging this with the code below. > > > Source/WebCore/page/Quirks.cpp:353 > > + m_shouldDispatchSimulatedMouseEventsQuirk = doShouldDispatchChecks(); > > + return m_shouldDispatchSimulatedMouseEventsQuirk.value(); > > I suggest writing it like this: > > if (!m_shouldDispatchSimulatedMouseEventsQuirk) > m_shouldDispatchSimulatedMouseEventsQuirk = doShouldDispatchChecks(); > return *m_shouldDispatchSimulatedMouseEventsQuirk; > > I don’t think we need the second return statement above.
Will do. (Didn't realize that Optional had an `operator *()`.)
Jer Noble
Comment 12
2020-02-03 13:42:00 PST
Created
attachment 389559
[details]
Patch for landing
WebKit Commit Bot
Comment 13
2020-02-03 14:15:24 PST
Comment on
attachment 389559
[details]
Patch for landing Clearing flags on attachment: 389559 Committed
r255592
: <
https://trac.webkit.org/changeset/255592
>
WebKit Commit Bot
Comment 14
2020-02-03 14:15:26 PST
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 15
2020-02-03 15:13:56 PST
(In reply to Jer Noble from
comment #11
)
> Didn't realize that Optional had an `operator *()`.
For a long time I strongly supported using has_value() and value() on optionals, but I now think that we should almost always use "!" and "*". Stylistic choice, so maybe needs to be debated.
Jer Noble
Comment 16
2020-02-03 15:39:38 PST
Committed follow-up fix in
r255609
<
https://trac.webkit.org/changeset/255609
>.
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