Bug 196327 - @supports(background-attachment:fixed) should say false on iOS
Summary: @supports(background-attachment:fixed) should say false on iOS
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, GoodFirstBug, InRadar
Depends on:
Blocks:
 
Reported: 2019-03-27 16:51 PDT by Simon Fraser (smfr)
Modified: 2024-07-08 21:11 PDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2019-03-27 16:51:23 PDT
We don't support background-attachment:fixed on iOS, so @supports should reflect this.
Comment 1 Radar WebKit Bug Importer 2022-06-13 10:14:26 PDT
<rdar://problem/95035888>
Comment 2 Sam Sneddon [:gsnedders] 2022-06-13 10:22:53 PDT
Is this primarily just the fact that we should be gating support on FixedBackgroundsPaintRelativeToDocument?
Comment 3 Sam Sneddon [:gsnedders] 2022-06-13 10:29:51 PDT
Hmm, we also seem to set FixedElementsLayoutRelativeToFrame on !IOS_FAMILY
Comment 4 Simon Fraser (smfr) 2022-06-13 10:56:45 PDT
`FixedBackgroundsPaintRelativeToDocument` is historical artifact from iOS originally not supporting `position:fixed` at all.

`We don't support background-attachment:fixed` is not supported on iOS because we didn't want scrolling to trigger a paint on every frame (and we'd still prefer to avoid it). We also can't paint fixed backgrounds synchronously such that they accurately align with the scroll position, so even if we allow them to paint, they will jiggle.
Comment 5 Sam Sneddon [:gsnedders] 2022-06-13 15:25:16 PDT
So the conclusion having spoken to Simon offline is that yes, all that needs to be done is to gate the support (at the parser level, as we do for other conditional values) on FixedBackgroundsPaintRelativeToDocument.
Comment 6 Tim Nguyen (:ntim) 2023-08-30 18:05:06 PDT
https://searchfox.org/wubkat/rev/015533966bd738b8d2392a8ff5f6c92f63ba1085/Source/WebCore/css/CSSProperties.json#1601

Needs to change to:
```
{
   "value": "fixed",
   "settings-flag": "fixedBackgroundsPaintRelativeToDocument"
}
```
Comment 7 Tim Nguyen (:ntim) 2023-08-30 18:06:18 PDT
(In reply to Tim Nguyen (:ntim) from comment #6)
> https://searchfox.org/wubkat/rev/015533966bd738b8d2392a8ff5f6c92f63ba1085/
> Source/WebCore/css/CSSProperties.json#1601
> 
> Needs to change to:
> ```
> {
>    "value": "fixed",
>    "settings-flag": "fixedBackgroundsPaintRelativeToDocument"
> }
> ```

Actually, that settings flag needs to be flipped to work. Alternatively, we would need a custom parser function
Comment 8 zak ridouh 2024-06-26 18:46:59 PDT
Pull request: https://github.com/WebKit/WebKit/pull/30220