Closed Bug 311557 Opened 19 years ago Closed 18 years ago

[FIX]No reflow after setting -moz-box-align property (in onload handler)

Categories

(Core :: XUL, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: jens.b, Assigned: bzbarsky)

References

Details

(Keywords: testcase)

Attachments

(2 files)

When a new style rule including the -moz-box-align property is applied to a box
via an onload handler, its children do not reflow. They do reflow when the
align= attribute is added to and removed from the box, though.
Attached file test case
Test case with two boxes, setting a class name on the left box in an onload
handler. The rule gets applied (background color is lightgray), but the box
alignment doesn't have any effect. The right box has the class name from the
start, and displays correctly.
Keywords: testcase
Version: 1.8 Branch → Trunk
Note: I stumbled upon this while creating the patch for bug 133527. As the CSS
rule didn't work, I additionally set the align=center attribute in the JS. Once
this bug gets fixed, the workaround (and the comment referencing this bug) can
be removed from alert.js and the CSS files.
Status: UNCONFIRMED → NEW
Component: Layout: Block and Inline → XP Toolkit/Widgets: XUL
Ever confirmed: true
OS: Windows 2000 → All
Priority: -- → P3
QA Contact: layout.block-and-inline → xptoolkit.xul
Hardware: PC → All
Summary: No reflow after setting -moz-box-align property (in onload handler) → [FIX]No reflow after setting -moz-box-align property (in onload handler)
Target Milestone: --- → mozilla1.9alpha
Attached patch FixSplinter Review
Note that all this stuff can die once we do XUL attribute mapping, I think...
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #218601 - Flags: superreview?(roc)
Attachment #218601 - Flags: review?(roc)
Attachment #218601 - Flags: superreview?(roc)
Attachment #218601 - Flags: superreview+
Attachment #218601 - Flags: review?(roc)
Attachment #218601 - Flags: review+
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Setting -moz-box-orient at runtime used to have no effect either, but now works in current trunk builds, probably thanks to this patch.
Comment on attachment 218601 [details] [diff] [review]
Fix

Can we land this on the 1.8.1 branch? It would be great if branch and trunk code would be synced here, because otherwise, my patch for bug 133527 would have to include a workaround that is no longer needed on trunk.
Attachment #218601 - Flags: approval-branch-1.8.1?(bryner)
Comment on attachment 218601 [details] [diff] [review]
Fix

Wait, don't you need to return something from this??
I'm not completely happy with putting this on branch; I don't have a good feel for either regression risk or interaction with other parts of branch code here.  Also, I have no time to either sort the above out or to maintain this on branch.  If someone wants to put this on branch, they'll have to do it without my participation, basically.

And yes, a "return NS_OK" is needed there; see rev 1.302 of nsBoxFrame.cpp.
Attachment #218601 - Flags: approval-branch-1.8.1?(bryner) → approval1.8.1?
Comment on attachment 218601 [details] [diff] [review]
Fix

Given comment 8 minusing for the 1.8 branch
Attachment #218601 - Flags: approval1.8.1? → approval1.8.1-
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.xul → xptoolkit.widgets
Blocks: 652536
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: