Bug 182598 - REGRESSION (STP 49): After opening a link in a new tab, the page center is off at first
Summary: REGRESSION (STP 49): After opening a link in a new tab, the page center is of...
Status: RESOLVED MOVED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified macOS 10.13
: P2 Major
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-02-08 00:52 PST by Tobi Reif
Modified: 2018-11-05 03:11 PST (History)
4 users (show)

See Also:


Attachments
screen recording (29.86 MB, video/quicktime)
2018-02-08 00:52 PST, Tobi Reif
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tobi Reif 2018-02-08 00:52:07 PST
Created attachment 333363 [details]
screen recording

After opening a link in a new tab, the page center is off at first (or perhaps the new (hidden) tab is very small at first?)

In Safari, open https://tobireif.com/demos/ . Open the Swirls demo in a new tab (eg using cmd-click). The page opens in (in a new tab in the foreground).
The swirls originate from the center.

In Safari Tech Preview, open https://tobireif.com/demos/ . Open the Swirls demo in a new tab (eg using cmd-click). The page opens in (in a new tab in the background - that's OK). Click on that tab.
The swirls at first don't originate from the center (as intended), instead they originate from a place near top left. Only after that they originate from the center (as intended).

(Also, sometimes clicking on a tab to switch to that tab doesn't work.)
Comment 1 Tobi Reif 2018-02-08 00:54:32 PST
https://bugs.webkit.org/attachment.cgi?id=333363&action=edit
"Attachment is not viewable in your browser because its MIME type (video/quicktime) is not one that your browser is able to display."

Perhaps .mov attachments should be supported?
Comment 2 Simon Fraser (smfr) 2018-02-08 11:13:05 PST
This is new in STP 49?
Comment 3 Simon Fraser (smfr) 2018-02-08 11:14:55 PST
Tobi, what math is the demo using to place the swirls? Is it just looking at innerWidth/innerHeight?
Comment 4 Radar WebKit Bug Importer 2018-02-08 11:21:31 PST
<rdar://problem/37358863>
Comment 5 Simon Fraser (smfr) 2018-02-08 11:35:52 PST
This is a regression in Safari code, not WebKit code. We'll track it internally.
Comment 6 Tobi Reif 2018-02-08 12:50:55 PST
Hi Simon!

Thanks for investigating.

> what math is the demo using to place the swirls? Is it just looking at
> innerWidth/innerHeight?

This code creates & adds the WegGL canvas element:

var renderer = PIXI.autoDetectRenderer(
  window.innerWidth, window.innerHeight
);
document.body.insertBefore(
  renderer.view, document.body.firstChild
);

This code positions each swirl:

[snipped].sprite.position.x = renderer.width / 2;
[snipped].sprite.position.y  = renderer.height / 2

So basically the answer is yes :)
Comment 7 Simon Fraser (smfr) 2018-02-08 12:52:48 PST
Cool, thanks.
Comment 8 Tobi Reif 2018-11-05 03:10:13 PST
As far as I can this this is fixed now.
Comment 9 Tobi Reif 2018-11-05 03:11:02 PST
Thanks!