RESOLVED FIXED132188
<textarea> with float:left disappears when editing text
https://bugs.webkit.org/show_bug.cgi?id=132188
Summary <textarea> with float:left disappears when editing text
Björn Barnekow
Reported 2014-04-25 04:17:48 PDT
Created attachment 230163 [details] textarea test setup: textarea with float:left or float:right, some text, enough to scroll action: delete some text bug: <textarea> disappears completely, reappears undoing the text change
Attachments
textarea test (1012 bytes, text/html)
2014-04-25 04:17 PDT, Björn Barnekow
no flags
screen recording on STP 171 (1.74 MB, video/quicktime)
2023-05-31 20:10 PDT, Karl Dubost
no flags
(non-textarea) test reduction (388 bytes, text/html)
2023-06-03 10:39 PDT, alan
no flags
Patch (5.92 KB, patch)
2023-06-04 20:37 PDT, alan
no flags
Patch (5.93 KB, patch)
2023-06-06 15:20 PDT, alan
no flags
Michael Catanzaro
Comment 1 2017-02-27 10:30:58 PST
Nice.... I can reproduce only if I delete *all* of the text (Ctrl+A then Delete).
Ahmad Saleem
Comment 2 2023-05-31 14:57:33 PDT
Is it platform specific because I am not able to reproduce this bug in Safari 16.5 & STP171. I think it might got fixed along the way and we can mark this as "RESOLVED CONFIGURATION CHANGED". Thanks!
Michael Catanzaro
Comment 3 2023-05-31 15:37:05 PDT
I can't reproduce anymore. Probably fixed at some point in the past several years.
Karl Dubost
Comment 4 2023-05-31 20:10:11 PDT
Created attachment 466559 [details] screen recording on STP 171 It is vanishing on Safari Technical Preview 171
Radar WebKit Bug Importer
Comment 5 2023-05-31 20:10:59 PDT
Michael Catanzaro
Comment 6 2023-06-01 07:14:54 PDT
Reopening
Ahmad Saleem
Comment 7 2023-06-01 09:44:44 PDT
OK, I did try it with Ctrl+A on whole text rather than paragraph. @Karl - thanks a lot for video.
Ahmad Saleem
Comment 8 2023-06-01 09:56:53 PDT
Similar bug in Chrome: crbug.com/833602 Based on comment 04, it happens with non-textarea as well: https://bugs.chromium.org/p/chromium/issues/detail?id=833602#c4 Tested with the above test case (from Chrome bug) as well and it is reproducible in Safari.
Ahmad Saleem
Comment 9 2023-06-01 10:08:16 PDT
CCing Alan - since Google / Blink fix was in Layout / Rendering area. We might have different bug but just wanted to get input from layout & rendering side.
alan
Comment 10 2023-06-01 10:31:56 PDT
yeah, this looks like a repaint bug so that blink change may indeed be relevant. will take a look into it in a bit.
alan
Comment 11 2023-06-03 10:39:51 PDT
Created attachment 466577 [details] (non-textarea) test reduction This bug is not specific to textarea. Floats going from self-painting to non-self-painting have this bug when they are also considered layout boundaries.
alan
Comment 12 2023-06-03 10:49:29 PDT
when a self-paining float becomes non-self painting, its containing block starts taking care of it painting. Containing block consults the floating object's shouldPaint() to check if it is supposed to initiate the paint of the float box (this is at paint time) shouldPaint() relies on an up-to-date value of m_paintsFloat. m_paintsFloat gets updated at _layout_ time (see RenderBlockFlow::addIntrudingFloats). However when the layout's entry point is the float (and then the float becomes non-self-painting) its containing block never gets the chance to update the m_paintsFloat bit since layout flow never reaches said containing block.
alan
Comment 13 2023-06-04 20:37:05 PDT
Simon Fraser (smfr)
Comment 14 2023-06-06 12:57:08 PDT
Comment on attachment 466589 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=466589&action=review > COMMIT_MESSAGE:16 > +4. However self-paining float boxes always paint themselves (this is not specific to floats, all renderers behave like this). "self-paining" > Source/WebCore/rendering/RenderBox.cpp:5722 > +void RenderBox::updateFloatBoxAfterSelfPaintingLayerChange() "update float box" makes it sound like this is changing the float box itself. Maybe "updateFloatPainter..."?
alan
Comment 15 2023-06-06 15:20:53 PDT
EWS
Comment 16 2023-06-07 09:26:13 PDT
Committed 264943@main (df850bbc342e): <https://commits.webkit.org/264943@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 466608 [details].
Note You need to log in before you can comment on or make changes to this bug.