Closed
Bug 200089
Opened 22 years ago
Closed 13 years ago
bad computed style width for table centered with 'margin: auto'
Categories
(Core :: DOM: CSS Object Model, defect)
Core
DOM: CSS Object Model
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: glazou, Unassigned)
References
Details
(Keywords: topembed+, Whiteboard: edt_b3)
1. launch mozilla
2. open http://daniel.glazman.free.fr/tmp/table_computed_width_problem.html
Expected result: the computed width of each table should be 300px
Actual result: the computed width of the centered table is not 300px
I selected "Style System" for the Component but it could also be "Layout"
or "Layout Tables"
This bug is a MAJOR bug from an embedding point of view since it breaks table
resizing when the table is centered. AFAIC, this bug should be nsbeta1+ and
topembed+. It should also be EDITORBASE+.
Reporter | ||
Comment 1•22 years ago
|
||
Sorry for spam, bad component.
Assignee: varga → dbaron
Component: SQL: Native Database Support → Style System
QA Contact: malachi → ian
Updated•22 years ago
|
Component: Style System → SQL: Native Database Support
Comment 2•22 years ago
|
||
uhh... sorry for spam. i'm not sure why it accepted that collision.
Component: SQL: Native Database Support → Style System
Obviously the returned size is the size of the outer table frame. While what you
would like to get is the inner table frame size.
table_outer_width= margin_left + inner_table + margin_right
I thought Boris did fix it along with bug 98159.
Comment 4•22 years ago
|
||
See bug 98159 comment 5. I explicitly did not switch to using the inner table
frame because I was under the impression that the computed dimensions of the
outer frame were the ones we wanted.... Apparently that is not the case.
Problem is, we do still want the computed offsets of the outer frame, eg... So
we can't just switch to computing style on the inner frame. <sigh>.
Over to DOM style; there is no style system bug here, and no layout bug... The
"correct" fix would be to evaluate every single CSS property, decide whether the
inner or outer frame should be used to compute it, and write something similar
to attachment 64047 [details] [diff] [review], I guess...
Component: Style System → DOM Style
Summary: bad computed width for table centered with 'margin: auto' → bad computed style width for table centered with 'margin: auto'
Updated•22 years ago
|
Updated•22 years ago
|
Whiteboard: edt_b3
Comment 7•21 years ago
|
||
This bug would be fixed by making computed style mean computed style too.
Comment 8•21 years ago
|
||
Ian, please file a bug on computed style to that effect and add dependencies?
Reporter | ||
Comment 9•20 years ago
|
||
This major bug is now more than a year old. It's a blocker for Nvu
since Nvu relies on JS side on computed styles for a lot of operations.
In particular, it messes up table manipulation with the mouse and "layer"
positioning.
Proposing a blocker flag for this bug.
Flags: blocking1.8a2?
Reporter | ||
Comment 10•20 years ago
|
||
Comment 11•20 years ago
|
||
I doubt that fixing this bug would help what you are doing, given that the
correct answer for the computed value of 'margin-left' on an element with
'margin-left:auto' is in fact 'auto' per CSS2.1.
Updated•20 years ago
|
Flags: blocking1.8a2? → blocking1.8a2-
Comment 12•20 years ago
|
||
See comment 4. The solution is described there. It'll probably double the size
of our computed style code, though.
Comment 13•20 years ago
|
||
Er, scratch that. Ian is right -- per the CSS2.1 definition of "computed", you
can't get useful info out of this API anymore, really.
Updated•15 years ago
|
Assignee: general → nobody
QA Contact: ian → general
QA Contact: general → style-system
Comment 14•13 years ago
|
||
This worksforme. We must have switched to the inner table at some point....
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite?
Resolution: --- → WORKSFORME
Comment 15•13 years ago
|
||
Pushed a test: http://hg.mozilla.org/projects/cedar/rev/a7546cc8c2ee
Flags: in-testsuite? → in-testsuite+
Comment 16•13 years ago
|
||
Test pushed to m-c: http://hg.mozilla.org/mozilla-central/rev/a7546cc8c2ee
You need to log in
before you can comment on or make changes to this bug.
Description
•