Changeset 70658 in webkit
- Timestamp:
- Oct 27, 2010 9:56:02 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r70653 r70658 1 2010-10-26 Brian Weinstein <bweinstein@apple.com> 2 3 Reviewed by Adam Roben. 4 5 WebKit2 shouldn't try to send an empty user agent 6 https://bugs.webkit.org/show_bug.cgi?id=48397 7 8 Change the check of the custom user agent to an empty check instead of a null check. When the client application 9 sets a custom user agent and then resets it, the custom user agent is set to an empty string. If all we do 10 is check for a null string, then we will think we have a custom user agent (which is empty) and send an empty 11 user agent. 12 13 * WebProcess/WebPage/WebPage.cpp: 14 (WebKit::WebPage::userAgent): 15 1 16 2010-10-27 Adam Roben <aroben@apple.com> 2 17 -
trunk/WebKit2/WebProcess/WebPage/WebPage.cpp
r70585 r70658 665 665 String WebPage::userAgent() const 666 666 { 667 if (!m_customUserAgent.is Null())667 if (!m_customUserAgent.isEmpty()) 668 668 return m_customUserAgent; 669 669 -
trunk/WebKitTools/ChangeLog
r70655 r70658 1 2010-10-26 Brian Weinstein <bweinstein@apple.com> 2 3 Reviewed by Adam Roben. 4 5 WebKit2 shouldn't try to send an empty user agent 6 https://bugs.webkit.org/show_bug.cgi?id=48397 7 8 Add a test that when we set our custom user agent to an empty string, we don't send 9 an empty user agent. 10 11 * TestWebKitAPI/Tests/WebKit2/PreventEmptyUserAgent.cpp: Added. 12 (TestWebKitAPI::didRunJavaScript): Make sure that the result of navigator.userAgent isn't empty. 13 (TestWebKitAPI::TEST): Set our custom user agent to the empty string, and run navigator.userAgent. 14 15 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add the new file. 16 * TestWebKitAPI/win/TestWebKitAPI.vcproj: Ditto. 17 1 18 2010-10-27 Adam Roben <aroben@apple.com> 2 19 -
trunk/WebKitTools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r70352 r70658 11 11 1A02C870125D4CFD00E3F4BD /* find.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 1A02C84B125D4A5E00E3F4BD /* find.html */; }; 12 12 1A5FEFDD1270E2A3000E2921 /* EvaluateJavaScript.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5FEFDC1270E2A3000E2921 /* EvaluateJavaScript.cpp */; }; 13 333B9CE21277F23100FEFCE3 /* PreventEmptyUserAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 333B9CE11277F23100FEFCE3 /* PreventEmptyUserAgent.cpp */; }; 13 14 BC131885117114B600B69727 /* PlatformUtilitiesMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC131884117114B600B69727 /* PlatformUtilitiesMac.mm */; }; 14 15 BC131A9B1171316900B69727 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC131A9A1171316900B69727 /* main.mm */; }; … … 84 85 1A02C84E125D4A8400E3F4BD /* Find.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Find.cpp; sourceTree = "<group>"; }; 85 86 1A5FEFDC1270E2A3000E2921 /* EvaluateJavaScript.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EvaluateJavaScript.cpp; sourceTree = "<group>"; }; 87 333B9CE11277F23100FEFCE3 /* PreventEmptyUserAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PreventEmptyUserAgent.cpp; sourceTree = "<group>"; }; 86 88 8DD76FA10486AA7600D96B5E /* TestWebKitAPI */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = TestWebKitAPI; sourceTree = BUILT_PRODUCTS_DIR; }; 87 89 BC131883117114A800B69727 /* PlatformUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformUtilities.h; sourceTree = "<group>"; }; … … 231 233 BCBD3760125ABCFE00D2C29F /* FrameMIMETypePNG.cpp */, 232 234 BC909779125571AB00083756 /* PageLoadBasic.cpp */, 235 333B9CE11277F23100FEFCE3 /* PreventEmptyUserAgent.cpp */, 233 236 C02B77F1126612140026BF0F /* SpacebarScrolling.cpp */, 234 237 BC90995D12567BC100083756 /* WKString.cpp */, … … 378 381 BCB68040126FBFE100642A61 /* DocumentStartUserScriptAlertCrash.cpp in Sources */, 379 382 1A5FEFDD1270E2A3000E2921 /* EvaluateJavaScript.cpp in Sources */, 383 333B9CE21277F23100FEFCE3 /* PreventEmptyUserAgent.cpp in Sources */, 380 384 ); 381 385 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebKitTools/TestWebKitAPI/win/TestWebKitAPI.vcproj
r70267 r70658 450 450 </File> 451 451 <File 452 RelativePath="..\Tests\WebKit2\PreventEmptyUserAgent.cpp" 453 > 454 </File> 455 <File 452 456 RelativePath="..\Tests\WebKit2\simple.html" 453 457 >
Note: See TracChangeset
for help on using the changeset viewer.