Changeset 160412 in webkit
- Timestamp:
- Dec 10, 2013 11:25:45 PM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/mac/ChangeLog
r160326 r160412 1 2013-12-10 Mark Rowe <mrowe@apple.com> 2 3 <http://webkit.org/b/125556> WebKit doesn't deal with longer bundle versions correctly 4 <rdar://problem/15634192> 5 6 Reviewed by Dan Bernstein. 7 8 * WebView/WebView.mm: 9 (createUserVisibleWebKitVersionString): Strip as many leading digits as is necessary to 10 bring the major component of the version down to 3 digits. 11 1 12 2013-12-09 Sam Weinig <sam@webkit.org> 2 13 -
trunk/Source/WebKit/mac/WebView/WebView.mm
r160261 r160412 595 595 static NSString *createUserVisibleWebKitVersionString() 596 596 { 597 // If the version is 4 digits long or longer, then the first digit represents 598 // the version of the OS. Our user agent string should not include this first digit, 599 // so strip it off and report the rest as the version. <rdar://problem/4997547> 597 // If the version is longer than 3 digits then the leading digits represent the version of the OS. Our user agent 598 // string should not include the leading digits, so strip them off and report the rest as the version. <rdar://problem/4997547> 600 599 NSString *fullVersion = [[NSBundle bundleForClass:[WebView class]] objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey]; 601 600 NSRange nonDigitRange = [fullVersion rangeOfCharacterFromSet:[[NSCharacterSet decimalDigitCharacterSet] invertedSet]]; 602 if (nonDigitRange.location == NSNotFound && [fullVersion length] >= 4)603 return [[fullVersion substringFromIndex: 1] copy];604 if (nonDigitRange.location != NSNotFound && nonDigitRange.location > = 4)605 return [[fullVersion substringFromIndex: 1] copy];601 if (nonDigitRange.location == NSNotFound && fullVersion.length > 3) 602 return [[fullVersion substringFromIndex:fullVersion.length - 3] copy]; 603 if (nonDigitRange.location != NSNotFound && nonDigitRange.location > 3) 604 return [[fullVersion substringFromIndex:nonDigitRange.location - 3] copy]; 606 605 return [fullVersion copy]; 607 606 } -
trunk/Source/WebKit2/ChangeLog
r160409 r160412 1 2013-12-10 Mark Rowe <mrowe@apple.com> 2 3 <http://webkit.org/b/125556> WebKit doesn't deal with longer bundle versions correctly 4 <rdar://problem/15634192> 5 6 Reviewed by Dan Bernstein. 7 8 * UIProcess/mac/WebPageProxyMac.mm: 9 (WebKit::userVisibleWebKitVersionString): Strip as many leading digits as is necessary to 10 bring the major component of the version down to 3 digits. 11 1 12 2013-12-10 Ryuan Choi <ryuan.choi@samsung.com> 2 13 -
trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm
r159903 r160412 93 93 static String userVisibleWebKitVersionString() 94 94 { 95 // If the version is 4 digits long or longer, then the first digit represents 96 // the version of the OS. Our user agent string should not include this first digit, 97 // so strip it off and report the rest as the version. <rdar://problem/4997547> 95 // If the version is longer than 3 digits then the leading digits represent the version of the OS. Our user agent 96 // string should not include the leading digits, so strip them off and report the rest as the version. <rdar://problem/4997547> 98 97 NSString *fullVersion = [[NSBundle bundleForClass:NSClassFromString(@"WKView")] objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey]; 99 98 NSRange nonDigitRange = [fullVersion rangeOfCharacterFromSet:[[NSCharacterSet decimalDigitCharacterSet] invertedSet]]; 100 if (nonDigitRange.location == NSNotFound && [fullVersion length] >= 4)101 return [fullVersion substringFromIndex: 1];102 if (nonDigitRange.location != NSNotFound && nonDigitRange.location > = 4)103 return [fullVersion substringFromIndex: 1];99 if (nonDigitRange.location == NSNotFound && fullVersion.length > 3) 100 return [fullVersion substringFromIndex:fullVersion.length - 3]; 101 if (nonDigitRange.location != NSNotFound && nonDigitRange.location > 3) 102 return [fullVersion substringFromIndex:nonDigitRange.location - 3]; 104 103 return fullVersion; 105 104 }
Note: See TracChangeset
for help on using the changeset viewer.