Bug 297033
| Summary: | [css-anchor-position-1] Changing window focus causes relayout on anchor() tests | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | fantasai <fantasai.bugs> |
| Component: | Layout and Rendering | Assignee: | Antti Koivisto <koivisto> |
| Status: | NEW | ||
| Severity: | Normal | CC: | bfulgham, kiet.ho, simon.fraser, webkit-bug-importer, zalan |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Local Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | |||
| Bug Blocks: | 291856 | ||
fantasai
For some reason, we are triggering relayout when the window changes focus on anchor positioning tests such as https://wpt.live/css/css-anchor-position/anchor-scope-scroll.html
This is noticeable if you turn on logging. Seems like an excessive amount of work given nothing is supposed to change?
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/157715763>
alan
It looks like the anchored element's inset value goes from fixed to auto on window focus (which then triggers layout).
in RenderStyle::changeRequiresLayout
(lldb) expr a.m_sides[0]
(const std::array<WebCore::Style::InsetEdge, 4>::value_type) $5 = {
WebCore::Style::LengthWrapperBase<WebCore::Style::LengthPercentage<WebCore::CSS::Range, float>, WebCore::Constant<WebCore::CSSValueAuto> > = {
m_value = {
= (m_intValue = 1126105088, m_floatValue = 159, m_calculationValueHandle = 1126105088)
m_type = Fixed
m_hasQuirk = false
m_isFloat = true
m_isEmptyValue = false
}
}
}
(lldb) expr b.m_sides[0]
(const std::array<WebCore::Style::InsetEdge, 4>::value_type) $6 = {
WebCore::Style::LengthWrapperBase<WebCore::Style::LengthPercentage<WebCore::CSS::Range, float>, WebCore::Constant<WebCore::CSSValueAuto> > = {
m_value = {
= (m_intValue = 0, m_floatValue = 0, m_calculationValueHandle = 0)
m_type = Auto
m_hasQuirk = false
m_isFloat = true
m_isEmptyValue = false
}
}
}