Since iOS 12.2 WebKit is not able to reset the perspective value correctly more than once. This issue is reproducible on both iOS 12.2 Safari and WKWebView and also in OSX Mojave Safari version 12.1. It could be that this is happening in earlier versions. In order to reproduce, check this W3 School example: https://www.w3schools.com/cssref/trycss3_perspective_inuse.htm Moving the slider does not correctly modify the perspective CSS value. Tested on a MacBook Pro with OSX 10.14.4 and on an iPhone 7 Plus with iOS 12.2. It was not happening on iOS 12.0 nor in 11.4.
<rdar://problem/50068230>
Created attachment 368143 [details] Patch
Comment on attachment 368143 [details] Patch Attachment 368143 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/11985316 New failing tests: compositing/style-change/transform-style-change.html compositing/style-change/transform-origin-change.html compositing/style-change/backface-visibility-change.html compositing/style-change/perspective-change.html compositing/style-change/perspective-origin-change.html
Created attachment 368152 [details] Archive of layout-test-results from ews102 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-highsierra Platform: Mac OS X 10.13.6
Comment on attachment 368143 [details] Patch Attachment 368143 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/11985548 New failing tests: editing/pasteboard/5761530-1.html
Created attachment 368159 [details] Archive of layout-test-results from ews123 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
https://trac.webkit.org/r244612
I ran into the same issue on an iPhone 6 Plus with iOS 12.3.1. And I solved it by adding the following code to force Safari to redraw, ----------------------------------------------------- divElement.style.perspective = newPerspective + 'px'; divElement.style.overflow = 'hidden'; //ADDED divElement.offsetHeight; //ADDED divElement.style.overflow = 'auto'; //ADDED ----------------------------------------------------- I hope this will help you.
*** Bug 201656 has been marked as a duplicate of this bug. ***