Closed
Bug 79486
Opened 24 years ago
Closed 24 years ago
[image input]input image showing up in wrong place
Categories
(Core :: Layout, defect, P2)
Core
Layout
Tracking
()
VERIFIED
FIXED
mozilla0.9.4
People
(Reporter: jud, Assigned: waterson)
References
()
Details
(Keywords: css1, testcase, topembed, Whiteboard: [Hixie-P3][netcenter] DUPME)
Attachments
(4 files)
1. visit said URL.
2. notice the "Sign me up" button in the "Not a member yet?" section.
3. notice the input form fields in the "Already a member?" section.
4. There should be a "Sign in" button just below the "Forgot your password" link.
To verify, use 4.x to see the button.
Comment 1•24 years ago
|
||
http://static.epinions.com/images/epi_images/signin.gif is the image, over to
imglib(probably a dupe)
Assignee: asa → pavlov
Component: Browser-General → ImageLib
QA Contact: doronr → tpreston
Comment 2•24 years ago
|
||
Actually, I see the sign in button, it's just in the upper left, over the
epinions logo, layout issue? w2k build 2001050804
Updated•24 years ago
|
Whiteboard: DUPME
Comment 3•24 years ago
|
||
over to layout. this is a dup of another bug... i recall something about a
login button on netscape.com showing up in the wrong place.
Assignee: pavlov → karnaze
Component: ImageLib → Layout
QA Contact: tpreston → petersen
Target Milestone: mozilla0.9.2 → ---
Comment 4•24 years ago
|
||
The problem is that the <input type="image"> frame is having "issues" with being
at the end of an inline element and after a sibling block. New, well-formed test
case coming up. This doesn't occur with <img> elements. It also doesn't occur if
the image is broken (and replaced with its alt text).
Assignee: karnaze → rods
QA Contact: petersen → bsharma
Whiteboard: DUPME → [Hixie-P3] DUPME
Comment 5•24 years ago
|
||
Comment 6•24 years ago
|
||
since I am going to be gone and it sounds like a core layout issue...reassigning
Assignee: rods → attinasi
Comment 7•24 years ago
|
||
The problem is with the view created in the nsImageControlFrame::Init method.
When I remove the creation of the view, it is all good. I'll try to figure out
what is going wrong with the view's position...
Status: NEW → ASSIGNED
Comment 8•24 years ago
|
||
We get the same problem if we use the IMG and set its opacity so that a view is
created, btw. My guess is that image frames do not update their view positions
correctly when they are reflowed.
Updated•24 years ago
|
OS: Windows 2000 → All
Priority: -- → P2
Hardware: PC → All
Summary: login button image not showing up. → input image showing up in wrong place
Target Milestone: --- → mozilla0.9.3
Comment 10•24 years ago
|
||
*** Bug 84117 has been marked as a duplicate of this bug. ***
Comment 11•24 years ago
|
||
*** Bug 82532 has been marked as a duplicate of this bug. ***
Comment 12•24 years ago
|
||
Comment 13•24 years ago
|
||
The problem occurs when the intrinsic size is retrieved AFTER the initial
reflow. By interrupting in the debugger I can get the intrinsic size to be set
before the intial reflow of the image frame and then the view is positioned
correctly. Still looking, but the nsImageFrame method GetDesiredSize seems to be
missing some of the handling of the intrinsic size...
Comment 14•24 years ago
|
||
Some more data: loading the testcase causes an incorrect frame tree.
Specifically, the last line has an inline frame in it and this inline contains
the image. If the testcase is loaded and a breakpoint is placed on the
PostPlaceLine call in nsBlockFrame::PlaceLine then the last line has only the
image (and the view is placed correctly and the page renders correctly).
I'll attach the two frame trees as a text file.
Comment 15•24 years ago
|
||
Comment 16•24 years ago
|
||
This affects http://dailynews.netscape.com/dailynews/main.tmpl
the vote button. Added netcenter keyword.
Keywords: netcenter
Comment 17•24 years ago
|
||
Here is the same problem on our own site:
http://home.netscape.com/ex/shak/news/packages/microsoft/index.html
The vote button image floats outside of table. Really noticeable when resizing
the browser window too.
Keywords: netcenter
Whiteboard: [Hixie-P3] DUPME → [netcenter] [Hixie-P3] DUPME
Comment 18•24 years ago
|
||
*** Bug 75919 has been marked as a duplicate of this bug. ***
Comment 19•24 years ago
|
||
BTW: the quick fix for the common manifestation of this (input image that is in
a form that is in a font) is easy: we just need to remove the View from the
input image: it does not really seem to be needed anyway. This could be a good
short-term fix for the branch, but the more fundamental problem of images with
views still needs to be fixed on the trunk. Also, the view should probably be
removed from the imput image anyway, it is a waste of a view as it provides no
benefits that I (or McClusky) can see.
Comment 20•24 years ago
|
||
Hmm, so will this fix go in to the trunk soon? Or is there a "real" fix in the
works? Is the cause known by now at all? Sorry to bug you about this, but a lot
of our pages are affected by this bug, so I would be very happy when this thing
is finally solved :-)
Comment 21•24 years ago
|
||
I know what is causing the problem, but I do not have a real fix. My
recommendation is to remove the view from the input image frame since it is not
needed. That will fix most occurances of the problem, even though the underlying
problem will still be there. This could go on the branch if somebody wants to
try to convince the PDT to allow it, but they only want ABSOLUTELY STOP SHIP
bugs now, so it is unlikely to get their blessing.
Alternatively, you can just change the markup to fix the problem. The problem
only occurs when you have an input image inside of a block that is inside of an
inline. This is usually the following markup on netcenter (and elsewhere):
<font>
<form>
<input type="image">
<other controls maybe>
</form>
</font>
change it to:
<form>
<font>
<input type="image">
</font>
</form>
instead and the bug goes away (blocks in inlines are not really valid, and the
problem is in fixing it up internally).
Comment 22•24 years ago
|
||
*** Bug 91781 has been marked as a duplicate of this bug. ***
Updated•24 years ago
|
Whiteboard: [netcenter] [Hixie-P3] DUPME → [Hixie-P3][netcenter] DUPME
Updated•24 years ago
|
Target Milestone: mozilla0.9.3 → mozilla0.9.4
Comment 23•24 years ago
|
||
*** Bug 87856 has been marked as a duplicate of this bug. ***
Comment 24•24 years ago
|
||
*** Bug 92310 has been marked as a duplicate of this bug. ***
waterson was going to look into one of the dups, perhaps. He suggested that it
might have something to do with not positioning a view correctly, which seems
like a likely theory.
Summary: input image showing up in wrong place → [image input]input image showing up in wrong place
Assignee | ||
Comment 26•24 years ago
|
||
Looking at this...
Assignee: attinasi → waterson
Status: ASSIGNED → NEW
Comment 27•24 years ago
|
||
... great! I look forward to seeing what you find after a lot of banging my head
against the screen on this one. CC'ing self.
Assignee | ||
Comment 28•24 years ago
|
||
Assignee | ||
Comment 29•24 years ago
|
||
Usually, when a view is created for a frame, the frame is already in the frame
hierarchy. In a situation where a block frame ends up inside an inline, we
create ``anonymous'' frames to parent the block frames and the trailing inline
frames. The bug was that these anonymous frames weren't getting the
NS_FRAME_HAS_CHILD_WITH_VIEW flag properly set. I've altered the
|MoveChildrenTo()| helper function to do that.
This problem appeared to be sporadic because of a recent optimization that I put
in for the |ContentAppended()| case. If we tripped that optimization, then we'd
end up simply appending the new input frame to the anonymous block, and the
frame state bits would be updated correctly. If we _didn't_ trip that code, then
we stumble through |ConstructInline()|, which would fail to propagate the flag.
I've also tidied up the code where we propagate the NS_FRAME_HAS_CHILD_WITH_VIEW
flag up the frame tree in nsFrame, and fixed a crasher that occurs when
GECKO_FRAMECTOR_DEBUG_FLAGS=really-noisy-content-updates. (I botched the
|ContentInserted()| case where |parentFrame == 0|.)
Status: NEW → ASSIGNED
Keywords: patch
What does reparenting a style context mean, and when is MoveChildrenTo called?
(Does it mean you change the inheritance chain? Shouldn't that correspond to
the content model?)
Comment 31•24 years ago
|
||
When I was debugging this I saw that delaying the first reflow (by breaking in
the debugger and then running again) caused the problem to go away. Was that
delay somehow triggering your optimization?
By the way: I am in total and complete awe of your speed in fixing this...
Assignee | ||
Comment 32•24 years ago
|
||
MoveChildrenTo() is a module-static function, and is only called by the {ib}
handling code. It's used in SplitToContainingBlock() and ConstructInline().
ReParentStyleContext() creates a new style context for the frame that is
parented by a different parent style context. It appears that it can be used to
change the inheritance chain; however, in this case it's not used that way,
since the anonymous elements still refer to the same content node.
I'm a bit nervous about having a frame that is parented by the anonymous block
frame ending up with its style context parented by the style context from the
inline. Mightn't we end up deriving computed values differently based on the
parent's display type? Or deriving computed values based on computed values from
our parent (which would be different due to display type)? Anyway, if you think
this is superfluous, then I'll remove it. (Since {ib} behavior is undefined, it
probably doesn't matter that much.)
Assignee | ||
Comment 33•24 years ago
|
||
marc: I noticed that I got different results depending on whether or not I let
output spew to the console. When I sent output to the console, the test case
displayed correctly; if I redirected to a file, it displayed incorrectly! As you
pointed out, two different frame models got created. I think what was happening
is this:
. In the ``correct'' case, a ContentInserted() was adding everything except
the <input>. Then a subsequent ContentAppended() was adding the <input>.
At the time the ContentAppended() arrived, the {ib} hierarchy had no trailing
inline frames, so ContentAppended() just went ahead an attached the inline
to the anonymous block and the normal logic kicked in to set the
NS_FRAME_HAS_CHILD_WITH_VIEW logic.
. In the ``incorrect'' case, a single ContentInserted() was adding both the
block and the <input> element. When this happened, we'd fall into
ConstructInline(). This would put the inline frame in the ``trailing''
anonymous inline frame, but would fail to set NS_FRAME_HAS_CHILD_WITH_VIEW
on the anonymous inline after moving the <input>'s frame there.
Since I was able to see this difference just based on whether the console was
busy or not, I suspect that setting a breakpoint in reflow similarly perturbed
the order of event processing...
Assignee | ||
Comment 34•24 years ago
|
||
This clears the layout regression tests.
Comment 35•24 years ago
|
||
I like it: [s]r=attinasi
r=dbaron, although I wonder (as we discussed) whether we really want to do
reparenting of style contexts here. Maybe it should be |#if 0| for now?
Assignee | ||
Comment 37•24 years ago
|
||
Will do. Thanks.
Assignee | ||
Comment 38•24 years ago
|
||
Fix checked in, with style context reparenting #if 0'd out and commented in big
red lights.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 39•24 years ago
|
||
*** Bug 92907 has been marked as a duplicate of this bug. ***
Comment 40•24 years ago
|
||
lets get this on the 0.9.2 branch too..
Assignee | ||
Updated•24 years ago
|
Status: REOPENED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 41•24 years ago
|
||
Changes checked in on MOZILLA_0_9_2_BRANCH.
Comment 42•24 years ago
|
||
*** Bug 94190 has been marked as a duplicate of this bug. ***
Comment 43•24 years ago
|
||
Verified on 2001-08-08-Trunk build on WinNT.
The above url and the attached url's load fine.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•