WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
222537
Nested flex-direction: column + height: 100% blocks make page freezed.
https://bugs.webkit.org/show_bug.cgi?id=222537
Summary
Nested flex-direction: column + height: 100% blocks make page freezed.
forcyacha
Reported
2021-02-28 23:06:52 PST
Bug also is reproducing on iPad and iPhone with Safari 14.4 Try this small benchmark test on any page and page'll get freezed. console.time("benchmark"); var parentNode = document.body; for(var i=0; i<20; i++) { var childNode = document.createElement("div"); childNode.style.display = "flex"; childNode.style.height = "100%"; childNode.style.flexDirection = i % 3 === 0 ? "column" : ""; parentNode.appendChild(childNode); parentNode = childNode; } childNode.innerHTML = "Text"; var height = document.body.children[0].offsetHeight; console.timeEnd("benchmark");
Attachments
Add attachment
proposed patch, testcase, etc.
Smoley
Comment 1
2021-03-04 15:27:59 PST
This does not reproduce for me on iOS 14.4 on iPhone XS or iPad Air 2.
Radar WebKit Bug Importer
Comment 2
2021-03-04 15:28:13 PST
<
rdar://problem/75060709
>
forcyacha
Comment 3
2021-03-04 23:43:12 PST
(In reply to Smoley from
comment #1
)
> This does not reproduce for me on iOS 14.4 on iPhone XS or iPad Air 2.
Sry. Wrong condition in code. There is correct code: console.time("benchmark"); var parentNode = document.body; for(var i=0; i<20; i++) { var childNode = document.createElement("div"); childNode.style.display = "flex"; childNode.style.height = "100%"; childNode.style.flexDirection = "column"; parentNode.appendChild(childNode); parentNode = childNode; } childNode.innerHTML = "Text"; var height = document.body.children[0].offsetHeight; console.timeEnd("benchmark");
Sergio Villar Senin
Comment 4
2021-03-05 02:59:14 PST
I guess this might get fixed by
https://bugs.webkit.org/show_bug.cgi?id=222202
. That bug greatly improves performance of pages with nested column flexboxes with percentages sizes, precisely what this test is about.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug