Bug 192809 - WKWebView default UA doesn't freeze the build number
Summary: WKWebView default UA doesn't freeze the build number
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on: 180365 182629
Blocks:
  Show dependency treegraph
 
Reported: 2018-12-18 09:24 PST by Brent Fulgham
Modified: 2018-12-20 10:27 PST (History)
9 users (show)

See Also:


Attachments
Patch (3.69 KB, patch)
2018-12-18 09:38 PST, Brent Fulgham
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2018-12-18 09:24:18 PST
We noticed that we get the following default UA from a WKWebView on iOS using a sample app in the iPhone 6 simulator:

    Mozilla/5.0 (iPhone; CPU iPhone OS 12_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16A342

The default WKWebView UA should have a frozen OS build number, as we do in Safari.

Mobile/16A342 -> Mobile/15E148.
Comment 1 Brent Fulgham 2018-12-18 09:35:26 PST
<rdar://problem/44687185>
Comment 2 Brent Fulgham 2018-12-18 09:38:59 PST
Created attachment 357572 [details]
Patch
Comment 3 Jiewen Tan 2018-12-18 11:05:41 PST
Comment on attachment 357572 [details]
Patch

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

> Source/WebKitLegacy/mac/WebView/WebView.mm:1159
>  - (void)_setBrowserUserAgentProductVersion:(NSString *)productVersion buildVersion:(NSString *)buildVersion bundleVersion:(NSString *)bundleVersion

Wonder if we should add some explanations in the header such that callers will be aware of this change?
Comment 4 Brent Fulgham 2018-12-18 18:04:54 PST
(In reply to Jiewen Tan from comment #3)
> Comment on attachment 357572 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=357572&action=review
> 
> > Source/WebKitLegacy/mac/WebView/WebView.mm:1159
> >  - (void)_setBrowserUserAgentProductVersion:(NSString *)productVersion buildVersion:(NSString *)buildVersion bundleVersion:(NSString *)bundleVersion
> 
> Wonder if we should add some explanations in the header such that callers
> will be aware of this change?

Probably not -- this is SPI, so no one should be using it.
Comment 5 WebKit Commit Bot 2018-12-20 10:27:54 PST
Comment on attachment 357572 [details]
Patch

Clearing flags on attachment: 357572

Committed r239451: <https://trac.webkit.org/changeset/239451>
Comment 6 WebKit Commit Bot 2018-12-20 10:27:56 PST
All reviewed patches have been landed.  Closing bug.