Changeset 249230 in webkit
- Timestamp:
- Aug 28, 2019 7:07:35 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r249224 r249230 1 2019-08-28 Tim Horton <timothy_horton@apple.com> 2 3 Reloading a web view with a fixed-width viewport and variable content width restores the previous page scale, shouldn't 4 https://bugs.webkit.org/show_bug.cgi?id=201256 5 <rdar://problem/54809509> 6 7 Reviewed by Simon Fraser. 8 9 * WebProcess/WebPage/ios/WebPageIOS.mm: 10 (WebKit::WebPage::restorePageState): 11 When restoring page state from a history item, if the saved scale was equal to the 12 initial scale at the time it was saved, ignore the saved scale and use the current 13 initial scale instead. 14 15 Normally this doesn't matter because a given page's initial scale doesn't usually change 16 between loads, but it totally can! See the test for one example of a way an API client 17 might cause this; you could also imagine something similar happening if the actual 18 page content changed. 19 1 20 2019-08-28 Megan Gardner <megan_gardner@apple.com> 2 21 -
trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
r249217 r249230 380 380 FloatSize currentMinimumLayoutSizeInScrollViewCoordinates = m_viewportConfiguration.minimumLayoutSize(); 381 381 if (historyItem.minimumLayoutSizeInScrollViewCoordinates() == currentMinimumLayoutSizeInScrollViewCoordinates) { 382 float boundedScale = std::min<float>(m_viewportConfiguration.maximumScale(), std::max<float>(m_viewportConfiguration.minimumScale(), historyItem.pageScaleFactor())); 382 float boundedScale = historyItem.scaleIsInitial() ? m_viewportConfiguration.initialScale() : historyItem.pageScaleFactor(); 383 boundedScale = std::min<float>(m_viewportConfiguration.maximumScale(), std::max<float>(m_viewportConfiguration.minimumScale(), boundedScale)); 383 384 scalePage(boundedScale, IntPoint()); 384 385 -
trunk/Tools/ChangeLog
r249227 r249230 1 2019-08-28 Tim Horton <timothy_horton@apple.com> 2 3 Reloading a web view with a fixed-width viewport and variable content width restores the previous page scale, shouldn't 4 https://bugs.webkit.org/show_bug.cgi?id=201256 5 <rdar://problem/54809509> 6 7 Reviewed by Simon Fraser. 8 9 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 10 * TestWebKitAPI/Tests/WebKit/long-email-viewport.html: Added. 11 * TestWebKitAPI/Tests/WebKitCocoa/ReloadWithDifferingInitialScale.mm: Added. 12 (TestWebKitAPI::TEST): 13 Add a test. I left many comments because I had a great deal of trouble 14 writing this test and wanted to document my findings. 15 1 16 2019-08-28 Jonathan Bedard <jbedard@apple.com> 2 17 -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r249115 r249230 127 127 2D2BEB2D22324E5F005544CA /* RequestTextInputContext.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D2BEB2C22324E5F005544CA /* RequestTextInputContext.mm */; }; 128 128 2D2D13B3229F408B005068AF /* DeviceManagementRestrictions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D2D13B2229F408B005068AF /* DeviceManagementRestrictions.mm */; }; 129 2D2FE8D82315F06E00B2E9C9 /* ReloadWithDifferingInitialScale.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D2FE8D72315F06D00B2E9C9 /* ReloadWithDifferingInitialScale.mm */; }; 130 2D2FE8DA231745C900B2E9C9 /* long-email-viewport.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 2D2FE8D9231745AB00B2E9C9 /* long-email-viewport.html */; }; 129 131 2D3CA3A8221DF4B40088E803 /* PageOverlayPlugin.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D3CA3A4221DF2390088E803 /* PageOverlayPlugin.mm */; }; 130 132 2D4CF8BD1D8360CC0001CE8D /* WKThumbnailView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D4CF8BC1D8360CC0001CE8D /* WKThumbnailView.mm */; }; … … 1322 1324 46C519E81D3563FD00DAA51A /* LocalStorageNullEntries.localstorage-shm in Copy Resources */, 1323 1325 7A6A2C721DCCFB5200C0D085 /* LocalStorageQuirkEnabled.html in Copy Resources */, 1326 2D2FE8DA231745C900B2E9C9 /* long-email-viewport.html in Copy Resources */, 1324 1327 C9E8EE7521DED94300797765 /* long-test.mp4 in Copy Resources */, 1325 1328 9361002914DC95A70061379D /* lots-of-iframes.html in Copy Resources */, … … 1569 1572 2D2BEB2C22324E5F005544CA /* RequestTextInputContext.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RequestTextInputContext.mm; sourceTree = "<group>"; }; 1570 1573 2D2D13B2229F408B005068AF /* DeviceManagementRestrictions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DeviceManagementRestrictions.mm; sourceTree = "<group>"; }; 1574 2D2FE8D72315F06D00B2E9C9 /* ReloadWithDifferingInitialScale.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ReloadWithDifferingInitialScale.mm; sourceTree = "<group>"; }; 1575 2D2FE8D9231745AB00B2E9C9 /* long-email-viewport.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "long-email-viewport.html"; sourceTree = "<group>"; }; 1571 1576 2D3CA3A4221DF2390088E803 /* PageOverlayPlugin.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PageOverlayPlugin.mm; sourceTree = "<group>"; }; 1572 1577 2D4CF8BC1D8360CC0001CE8D /* WKThumbnailView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WKThumbnailView.mm; path = WebKit/WKThumbnailView.mm; sourceTree = "<group>"; }; … … 2831 2836 5CFACF64226FD1FB0056C7D0 /* Proxy.mm */, 2832 2837 A1C4FB6C1BACCE50003742D0 /* QuickLook.mm */, 2838 2D2FE8D72315F06D00B2E9C9 /* ReloadWithDifferingInitialScale.mm */, 2833 2839 1A4F81D01BDFFDCF004E672E /* RemoteObjectRegistry.h */, 2834 2840 1A4F81C81BDFFD18004E672E /* RemoteObjectRegistry.mm */, … … 3696 3702 8349D3C31DB9724F004A9F65 /* link-with-download-attribute.html */, 3697 3703 378E647816326FDF00B6C676 /* link-with-title.html */, 3704 2D2FE8D9231745AB00B2E9C9 /* long-email-viewport.html */, 3698 3705 C9E8EE7421DED91E00797765 /* long-test.mp4 */, 3699 3706 9361002814DC957B0061379D /* lots-of-iframes.html */, … … 4645 4652 6B4E861C2220A5520022F389 /* RegistrableDomain.cpp in Sources */, 4646 4653 7CCE7F0D1A411AE600447C4C /* ReloadPageAfterCrash.cpp in Sources */, 4654 2D2FE8D82315F06E00B2E9C9 /* ReloadWithDifferingInitialScale.mm in Sources */, 4647 4655 7C83E0C31D0A653A00FEBCF3 /* RemoteObjectRegistry.mm in Sources */, 4648 4656 7CCE7EC91A411A7E00447C4C /* RenderedImageFromDOMNode.mm in Sources */,
Note: See TracChangeset
for help on using the changeset viewer.