Closed Bug 534808 Opened 15 years ago Closed 15 years ago

Image resized by percentage height does not change width in response to indirect height change

Categories

(Core :: Layout, defect)

x86
macOS
defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla1.9.3a1
Tracking Status
status1.9.2 --- .2-fixed

People

(Reporter: jruderman, Assigned: bzbarsky)

References

Details

(Keywords: testcase, Whiteboard: verified1.9.2)

Attachments

(4 files)

Attached file testcase (dynamic) (deleted) —
Based on a piece of layout/reftests/bugs/364066-1.html (bug 364066).
Attached file reference (static) (deleted) —
The image changes width fine. What doesn't change is the table cell. The problem is that in this case a height change in fact leads to an intrinsic width change. This looks like a regression from bug 502288.
Blocks: 502288
Except of course we do clear ancestor intrinsics in this case...
Er, no. We in fact do not. Doing that should fix this bug; testing.
Er, and I take that back once again. For height we have: return NS_CombineHint(hint, NS_SubtractHint(nsChangeHint_ReflowFrame, nsChangeHint_ClearDescendantIntrinsics));
Aha! The key is that the <div> that is a _child_ of the <div> we're changing the height on has an intrinsic width that depends on the height of the ancestor. If we want to have that to be the case (and currently it is because GetPercentHeight in nsLayoutUtils calls itself on the containing block), then changes to height do in fact need to clear _descendant_ intrinsics in general. David, does that sound ok?
Yes, that sounds fine.
Is this broken on 1.9.2 as well? It seems like something we should get fixed there.
> Is this broken on 1.9.2 as well? Yes. I'll try to get together a patch for this today; then we can land it on m-c and work on getting on branch. If you think this should block, please nominate? I'm being a little torn about that at this late date...
At this point, I'd be ok with fixing it in a .1, although I don't seem to be able to nominate it for that.
Attached patch m-c fix (deleted) — Splinter Review
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #419343 - Flags: review?(dbaron)
Attached patch 1.9.2 merge (deleted) — Splinter Review
Attachment #419344 - Flags: review?(dbaron)
Comment on attachment 419343 [details] [diff] [review] m-c fix r=dbaron
Attachment #419343 - Flags: review?(dbaron) → review+
Comment on attachment 419344 [details] [diff] [review] 1.9.2 merge r=dbaron
Attachment #419344 - Flags: review?(dbaron) → review+
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
Attachment #419344 - Flags: approval1.9.2.1?
This is a layout regression caused by slight over-optimization. The fix is very low risk, and I think we should really get it in before shipping a major update to 3.6.
Comment on attachment 419344 [details] [diff] [review] 1.9.2 merge a=beltzner for 1.9.2.2, in a fantastic deal with dbaron by which way everyone wins!
Attachment #419344 - Flags: approval1.9.2.2? → approval1.9.2.2+
verified FIXED on build using the testcase provided: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2
Whiteboard: verified1.9.2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: