browser resize repaint issue on absolute positioned image wrapper
Reported by
m...@tobiasfrei.ch,
Nov 22
|
|||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Steps to reproduce the problem: 1. Create two child wrapper for image and text. Then position the image-wrapper absolutely next to the text-wrapper. 2. Stretch the image-wrapper on same height as text-wrapper with 'height: 100%' and 'width: auto'. 3. Place an squared image inside image-wrapper and stretch image height with 'height: 100%' and keep the squared image ratio with 'width:auto' 4. resize the browser What is the expected behavior? The parent of the image should have the same dimension as his child. What went wrong? On Browser resize, the image stretch and keep the ratio 1:1 in consideration with 'width: auto', but the parent element (image-wrapper) has wrong dimension on width-size (random width). Reproduce: https://codepen.io/anon/pen/eQeobW Did this work before? N/A Does this work in other browsers? No Safari seems to be ok while firefox is fighting with wrong wrapper dimension already on load. hard to hack with css and reported under https://bugzilla.mozilla.org/show_bug.cgi?id=1508612 Chrome version: 70.0.3538.102 Channel: stable OS Version: 10.0 Flash Version: possible to fix this repaint issue by reactivate one css rule on broken image wrapper after window resize.
,
Nov 23
,
Nov 23
Able to reproduce the issue on reported version# 70.0.3538.102, # 70.0.3538.110 and latest chrome# 72.0.3618.0 using Mac 10.12.6, Ubuntu 14.04 and Windows-10, hence providing Bisect Info Bisect Info: ================ Good build: 61.0.3135.0 Bad build: 61.0.3136.0 On running per-revision bisect facing error, hence providing below change log from chromium bisect You are probably looking for a change made after 480588 (known good), but no later than 480620 (first known bad). https://chromium.googlesource.com/chromium/src/+log/c81a6b895381f8d921cbee83bc814710856cdec2..9c7b16de2e4eb680a6caa470ba5d6115d7e14a3b Note: Unable to find the correct suspect from above change log. Hence marking this issue as Untriaged and requesting someone from Dev team help in assigning it to correct suspect. Thanks!
,
Dec 13
The way you describe the matter is really very very impressive, but after following the I still did not get https://www.routersupports.co/blog/solved-netgear-router-error-651-get-instant-solution-here/ the solution, so if you have any answer then please reply fast.
,
Jan 11
This seems lke a layout problem, rather than a DOM problem.
,
Jan 17
(5 days ago)
This behaves very differently in NG. Any idea what's going on Ian?
,
Jan 19
(3 days ago)
@atotic this looks like similar to the current set of abs-pos bugs?
,
Jan 20
(3 days ago)
Same family, but different. Here is the problem:
<div class="wrapper" style="position:relative">
<div class="image-wrapper" style="position:absolute; height:100%;" >
<img class="placeholder" style="min-height: 100%;">
wrapper Layout() calls NGOutOfFlowLayoutPart::Run()
which calls .image-wrapper is doing ComputeMinMaxSize()
which ends up calling .placeholder ComputePreferredLogicalWidths
.placeholder min-height is percent, which causes it to traverse up.
Calls .image-wrapper.AvailableLogicalHeight()
Calls ContainingBlockLogicalHeightForPositioned(.wrapper)
Calls .wrapper.ClientLogicalHeight()
Problem is that .wrapper is still getting laid out by NG, and has not copied ClientLogicalHeight() back to Legacy.
I think the fix is to copy current logical width/height back to legacy before calling NGOOF.Run(). Even better, pass them as arguments to NGOOF constructor, and have it set Width/Height.
This is one of those circular dependencies, where parents size depends on child, and
child's %ge size depends on parent.
Got a fix.
,
Jan 20
(2 days ago)
Well, I have a fix for NG when wrapper is inline-block. Everyone still fails when wrapper is inline-flex.
,
Jan 20
(2 days ago)
Got a fix for that too.
,
Yesterday
(27 hours ago)
Awesome, thanks Aleks!
,
Today
(15 hours ago)
Looks like my https://chromium-review.googlesource.com/c/chromium/src/+/1426677 is affecting the codepen test when running with LayoutNG. Without it, there's hardly any yellow in the box at all, not even after resizing the browser window. With my CL applied, the box still displays incorrectly like before when loading the page, but it turns all yellow after resizing the window - but it still doesn't retain the aspect ratio; atotic's flexbox fix is needed for that. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by rogger10...@gmail.com
, Nov 22