Closed
Bug 55086
Opened 24 years ago
Closed 23 years ago
WRMB: INPUT and TEXTAREA control's value misplaced on reflow
Categories
(Core :: Layout, defect, P3)
Core
Layout
Tracking
()
VERIFIED
FIXED
mozilla0.9.5
People
(Reporter: jwbaker, Assigned: waterson)
References
Details
(Keywords: topembed, Whiteboard: fixed-on-trunk)
Attachments
(4 files, 1 obsolete file)
1.42 KB,
text/html
|
Details | |
590 bytes,
patch
|
dbaron
:
review+
dbaron
:
superreview+
dbaron
:
approval+
|
Details | Diff | Splinter Review |
23.88 KB,
patch
|
Details | Diff | Splinter Review | |
23.94 KB,
patch
|
dbaron
:
review+
attinasi
:
superreview+
asa
:
approval+
|
Details | Diff | Splinter Review |
Linux 2000-10-03-08 M18 build. If a table reflows due to one row changing to visibility: collapse, the input's value is drawn outside of the input widget. To reproduce: 1) Load the attached test case 2) Type something in the second input box 3) Hit enter The first table row disappears and the second row moves up. Unfortunately, the value that was in the second input box stays put until you do some more typing. This isn't that serious but it messes up dynamic forms pretty badly. I'd love to see this fixed for rtm but I haven't the faintest idea how to fix it.
Reporter | ||
Comment 1•24 years ago
|
||
sorry, at this point we're only looking at critical bugs for NS6 RTM. This won't make it, unless someone outside of Netscape proposes a small, safe patch.
OS: Linux → All
Hardware: PC → All
Target Milestone: --- → Future
Comment 6•24 years ago
|
||
This happens on any incremental reflow, see bug 68056. No need to have dynamic forms; slow-loading images are enough. CSS2 is not an issue here. Nominating; this looks terrible when it happens.
Comment 7•24 years ago
|
||
updating summary to reflect what's really going on here. Bug 69294 has a testcase very similar to bug 68056...
Summary: INPUT control's value misplaced when table collapses → INPUT control's value misplaced on reflow
Comment 10•24 years ago
|
||
In Mozilla 0.9 (2001050515) Win32, this bug seems to have went away? The test cases aren't "broken" anymore. I am away from my linux boxen for a few days so I can't try it there........
Comment 11•24 years ago
|
||
This may have been partially "fixed" (ie masked) by hyatts non-painting checkin. The testcase on this bug still does not work since it _just_doesn't_reflow_ when the row is removed.... That's incorrect and prevents testing of this bug. Linux build 2001-05-07-08
Reporter | ||
Comment 12•24 years ago
|
||
But the testcase doesn't actually work at all. When the top row disappears, the bottom row is supposed to shift up and take its place.
Reporter | ||
Comment 13•24 years ago
|
||
Yeah, what Boris said. Is there a bug on reflow not happening?
Comment 14•23 years ago
|
||
*** Bug 85251 has been marked as a duplicate of this bug. ***
Comment 15•23 years ago
|
||
Please note that Bug 85251 features a much simpler test case that does not involve a dynamic form but only a textfield and image in a table. The test case comes from the http://www.google.com/help/features.html page.
Comment 16•23 years ago
|
||
*** Bug 85754 has been marked as a duplicate of this bug. ***
Comment 17•23 years ago
|
||
*** Bug 85692 has been marked as a duplicate of this bug. ***
Comment 18•23 years ago
|
||
*** Bug 89313 has been marked as a duplicate of this bug. ***
Updated•23 years ago
|
Keywords: mozilla0.9.3
Summary: INPUT control's value misplaced on reflow → INPUT and TEXTAREA control's value misplaced on reflow
Comment 19•23 years ago
|
||
*** Bug 89363 has been marked as a duplicate of this bug. ***
Comment 20•23 years ago
|
||
*** Bug 90835 has been marked as a duplicate of this bug. ***
Comment 21•23 years ago
|
||
*** Bug 81873 has been marked as a duplicate of this bug. ***
Comment 22•23 years ago
|
||
*** Bug 86099 has been marked as a duplicate of this bug. ***
Comment 24•23 years ago
|
||
*** Bug 89335 has been marked as a duplicate of this bug. ***
Comment 25•23 years ago
|
||
*** Bug 92067 has been marked as a duplicate of this bug. ***
Comment 26•23 years ago
|
||
*** Bug 92259 has been marked as a duplicate of this bug. ***
Comment 27•23 years ago
|
||
*** Bug 92273 has been marked as a duplicate of this bug. ***
Comment 28•23 years ago
|
||
*** Bug 92277 has been marked as a duplicate of this bug. ***
Comment 29•23 years ago
|
||
I don't think the original description (with test case) is a bug. After step 3, there should be 2 rows in the table and the text should be in the 2nd row. The 1st row should be collapsed but still there. The only way to make the 1st row visible again is to remove all of the text in the 2nd row and hit enter. This bug is old and it looks like collapsing rows may have regressed. I'm not seeing the 1st row actually collapse. But that is another bug. Why are so many other bugs being marked as a dup of this one? This bug involves collapsing rows on a table.
Assignee: buster → karnaze
Comment 30•23 years ago
|
||
The original desciption says that: 1) The first row collapses 2) The input element moves as a result. 3) The _text_ that was in the input element does not move with the input element. The row-collapsing is just a way to make the location of the input element change.... It is not central to the bug. The same bug can be reproduced by making input elements move in other ways. For example, reflows when an image with no size specified in the HTML is loaded. The common symptom in all these is that the text that was in the textbox ends up sort of floating somewhere outside it.
Comment 31•23 years ago
|
||
Either that or the blinking cursor that is supposed to be in a selected textbox is flashing somewhere outside of the box. Hate to make a comment for this small addition, but someone might find it useful....
Comment 32•23 years ago
|
||
this looks identical to bug 75080
Comment 33•23 years ago
|
||
*** Bug 75080 has been marked as a duplicate of this bug. ***
Updated•23 years ago
|
Blocks: advocacybugs
Comment 34•23 years ago
|
||
*** Bug 93086 has been marked as a duplicate of this bug. ***
Comment 35•23 years ago
|
||
*** Bug 93434 has been marked as a duplicate of this bug. ***
Comment 36•23 years ago
|
||
*** Bug 93473 has been marked as a duplicate of this bug. ***
Comment 38•23 years ago
|
||
*** Bug 91189 has been marked as a duplicate of this bug. ***
Updated•23 years ago
|
Comment 39•23 years ago
|
||
*** Bug 93802 has been marked as a duplicate of this bug. ***
Comment 40•23 years ago
|
||
*** Bug 94677 has been marked as a duplicate of this bug. ***
Comment 41•23 years ago
|
||
*** Bug 94910 has been marked as a duplicate of this bug. ***
Comment 42•23 years ago
|
||
Sending out a flare: I've not made much progress on this topembed bug, but as noted above, it seems to be dependant on an input being inside a table, and coming after an image with it's size set to something other than it's native size, like this: <img src="http://bugzilla.mozilla.org/ant.jpg" height=1><br> <table border height="100"> <tr> <td> <span><center><input type="text" value="text widget value"></center></span> </td> </tr> </table> Every time I see the incorrect positioning, I see the view for the input being positioned at coordinates other than where the frame is, and this is on top of a very large reflow stack (inside table reflow). I'll try to capture a stack of this happening, but I can't make heads or tails of it, or understand how the calculations go awry...
Comment 43•23 years ago
|
||
This sounds like a core layout issue.
Comment 44•23 years ago
|
||
Doing a best-guess reassign to get coverage on this topembed bug...
Assignee: pollmann → attinasi
Status: ASSIGNED → NEW
Component: HTML Form Controls → Layout
Comment 48•23 years ago
|
||
Same as bug 92464?
Comment 49•23 years ago
|
||
*** Bug 92464 has been marked as a duplicate of this bug. ***
Comment 50•23 years ago
|
||
adding WRMB and cc'ing myself
Summary: INPUT and TEXTAREA control's value misplaced on reflow → WRMB: INPUT and TEXTAREA control's value misplaced on reflow
Comment 51•23 years ago
|
||
Here is some stuff from <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=92464">bug 92464</a>: Test cases: http://bugzilla.mozilla.org/showattachment.cgi?attach_id=43702 http://bugzilla.mozilla.org/showattachment.cgi?attach_id=46835 http://bugzilla.mozilla.org/showattachment.cgi?attach_id=47296 Real world examples: http://twig.screwdriver.net/demo/ http://cvs.gnome.org/lxr/
Assignee | ||
Comment 52•23 years ago
|
||
karnaze: I looked at this tonight and I think that at least one problem is as follows. With the test case referred to in attachment 47296 [details] (and attachment 46835 [details]), we are ending up with an incremental reflow targeted at the image frame once the image's width and height information arrives. This will not have any effect on the available width, so when we arrive at the outer table frame, it detects that |aOuterRS.availableWidth == mPriorAvailableWidth|, and does the fast path. Unfortunately, the table frame's y-coordinate will have changed, but none of the views will have been updated.
Status: NEW → ASSIGNED
Assignee | ||
Comment 53•23 years ago
|
||
Assignee | ||
Comment 54•23 years ago
|
||
The above patch forces views to be synchronized, even in the case where no table reflow is necessary. This accomodates the case where we're simply jiggling the y-coordinate of the frame. karnaze: what do you think?
Assignee | ||
Comment 55•23 years ago
|
||
This also appears to fix attachment 43207 [details] [diff] [review], presumably because we're running into a similar situation where the table's width hasn't changed but we're altering its x-coordinate.
Keywords: patch
Comment 56•23 years ago
|
||
waterson, I think a better patch would be to have the block (e.g. the body in this case) reposition views when it moves children (e.g. the table in this case). This is more efficient, more consistent with how it works in other parts of the system, and more general than just fixing the table cases. all, I tried the patch on the 1st attachment in this bug, and it did not fix it. I think this bug has become a meta bug, with all of the dups that may or may not get fixed with this or other patches.
Assignee | ||
Comment 57•23 years ago
|
||
karnaze, you were right. We're not synchronizing child views in nsBlockReflowContext::DoReflowBlock(). Patch anon.
Assignee | ||
Comment 58•23 years ago
|
||
Comment 59•23 years ago
|
||
[s]r=attinasi
r=dbaron
Updated•23 years ago
|
Attachment #47466 -
Attachment is obsolete: true
Assignee | ||
Comment 61•23 years ago
|
||
Karnaze suggested I ought look for other cases in the block code where this happens, and it turns out there are one or two. So, I went ahead and put together a more aggressive fix: 1. Change nsContainerFrame::PositionFrameView() to position child views. 2. Eliminate the ``aView'' parameter from that method, because the view can be retrieved from the frame and need not be done by the caller. 3. Eliminate the NS_FRAME_NO_MOVE_CHILD_VIEWS flag, which was read-only; i.e., never set by anyone.
Assignee | ||
Comment 62•23 years ago
|
||
Assignee | ||
Comment 63•23 years ago
|
||
So, I think what I'd like to do is check in the less aggressive fix (attachment 47736 [details] [diff] [review]) for mozilla-0.9.4, and then land the more aggressive fix when the tree opens for mozilla-0.9.5. Does that sound reasonable? dbaron/attinasi, could you take a look at attachment 47810 [details] [diff] [review]? thanks!
Does the change in semantics of NS_FRAME_NO_MOVE_VIEW hurt anything? (It now causes no movement of child views, right?)
Assignee | ||
Comment 65•23 years ago
|
||
You're probably referring to the changes in nsContainerFrame.cpp to nsContainerFrame::FinishReflowChild()? Although the patch didn't show it, this method this method doesn't heed the NS_FRAME_NO_MOVE_VIEW flag (comments notwithstanding). In fact, since I've removed the NS_FRAME_NO_MOVE_CHILD_VIEWS flag, it doesn't pay any attention to the aFlags argument at all! This may surprise some of its consumers, most notably: - nsComboboxFrame, which uses NS_FRAME_NO_MOVE_VIEW, NS_FRAME_NO_SIZE_VIEW, and NS_FRAME_NO_VISIBILITY - nsFieldsetFrame, which uses NS_FRAME_NO_MOVE_FRAME - nsBoxToBlockAdaptor, which uses NS_FRAME_NO_MOVE_FRAME So, although I haven't changed the semantics here, we probably ought to file another bug to see if we should alter FinishReflowChild() to heed aFlags.
Assignee | ||
Comment 66•23 years ago
|
||
Oh wait, I'm sorry. It passes aFlags to SyncFrameViewAfterReflow(), which does pay attention to the flags. I suppose I ought to continue to condition position of the child views pased on NS_FRAME_NO_MOVE_VIEW. Let me respin the patch.
Assignee | ||
Comment 67•23 years ago
|
||
Hmmm. I now realize I was looking at nsBox.cpp.
Comment on attachment 47736 [details] [diff] [review] be sure to sync child views after moving the frame blizzard said by email that the "safe" patch has approval
Attachment #47736 -
Flags: superreview+
Attachment #47736 -
Flags: review+
Attachment #47736 -
Flags: approval+
Assignee | ||
Comment 70•23 years ago
|
||
``Safe'' fix landed for mozilla-0.9.4. Moving to mozilla-0.9.5.
Target Milestone: mozilla0.9.4 → mozilla0.9.5
Comment 71•23 years ago
|
||
please check-in also to 0.9.2. thanks
Assignee | ||
Comment 72•23 years ago
|
||
Attachment 47736 [details] [diff] checked in on trunk and mozilla-0.9.2 branch.
My changes for bug 86947 exposed a similar problem for listboxes that was fixed (I think -- it's sometimes hard to reproduce) by making a change almost identical to attachment 47736 [details] [diff] [review] in nsContainerFrame::ReflowChild. The "more aggressive patch" would do the equivalent of that change as well.
Comment 74•23 years ago
|
||
http://twig.screwdriver.net/demo/ still has the problem, is it going to be fixed by the aggressive patch, or should a separate bug be filed for this testcase?
Assignee | ||
Comment 75•23 years ago
|
||
http://twig.screwdriver.net/demo/ appears fine in my tree, AFAICT, so I'm going to say ``yes, this will be fixed''.
Comment 76•23 years ago
|
||
patch 47813 looks great - [s]r=attinasi
Comment 77•23 years ago
|
||
Comment on attachment 47813 [details] [diff] [review] as above, but check NS_FRAME_NO_MOVE_VIEW before repositioning child views in nsContainerFrame::FinishReflowChild() sr=attinasi
Attachment #47813 -
Flags: superreview+
Comment 78•23 years ago
|
||
*** Bug 98297 has been marked as a duplicate of this bug. ***
Comment on attachment 47813 [details] [diff] [review] as above, but check NS_FRAME_NO_MOVE_VIEW before repositioning child views in nsContainerFrame::FinishReflowChild() r=dbaron
Attachment #47813 -
Flags: review+
Assignee | ||
Comment 80•23 years ago
|
||
Checked in attachment 47813 [details] [diff] [review] onto the trunk.
Whiteboard: fixed-on-trunk
Assignee | ||
Comment 81•23 years ago
|
||
*** Bug 90427 has been marked as a duplicate of this bug. ***
Comment 82•23 years ago
|
||
could we check this into 0.9.2 branch?
Comment 83•23 years ago
|
||
Comment on attachment 47813 [details] [diff] [review] as above, but check NS_FRAME_NO_MOVE_VIEW before repositioning child views in nsContainerFrame::FinishReflowChild() a=asa for checkin to the 0.9.4 branch.
Attachment #47813 -
Flags: approval+
Assignee | ||
Comment 84•23 years ago
|
||
Attachment 47813 [details] [diff] checked in on mozilla-0.9.4 branch.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 86•23 years ago
|
||
I just realized that this fix sucks. We typically call PositionFrameView() before reflowing a frame to position the view correctly. I've altered PositionFrameView() in such a way that it will walk the entire frame tree if the frame doesn't have a view. I'll file another bug to fix this.
Assignee | ||
Comment 87•23 years ago
|
||
Filed bug 99722.
Comment 88•23 years ago
|
||
I may have found a regression: http://isomorphisms.addr.com/archives/00000130.html#comments If you click in the topmost text field the caret appears too high (plus the autofill of my email address is too high) This site was working fine with a build from a few days ago. Build id 2001101021
Comment 89•23 years ago
|
||
that's bug 104225
You need to log in
before you can comment on or make changes to this bug.
Description
•