Closed
Bug 91054
Opened 23 years ago
Closed 23 years ago
padding/margin percents don't inherit computed value
Categories
(Core :: CSS Parsing and Computation, defect, P1)
Core
CSS Parsing and Computation
Tracking
()
VERIFIED
FIXED
mozilla0.9.5
People
(Reporter: fantasai.bugs, Assigned: dbaron)
References
Details
(Keywords: regression, Whiteboard: [ruletree])
Attachments
(9 files)
2.00 KB,
text/html
|
Details | |
1.17 KB,
text/html
|
Details | |
1.56 KB,
patch
|
Details | Diff | Splinter Review | |
1.11 KB,
text/html
|
Details | |
1.47 KB,
text/html
|
Details | |
994 bytes,
text/html
|
Details | |
53.20 KB,
patch
|
Details | Diff | Splinter Review | |
53.32 KB,
patch
|
Details | Diff | Splinter Review | |
1.02 KB,
text/html
|
Details |
Overview: Padding and margin inherit don't inherit the computed value when shorthand notation is used. Steps to Reproduce: Open up testcase in Mozilla. Each test has two sets of <div>s -- one with inherited % values, and another with specified values that should correspond to the value inherited in the first test. Expected Results: Each pair of tests should render the same. Actual Results The two tests in "Margin A" and "Padding A" don't render the same; the percentage is inherited instead of the computed value. Tested on nightly build id=2001070708 on Windows 98 Additional Information: May be related to bug 45631
Comment 2•23 years ago
|
||
I'm going to attach a simpler testcase. The bug is not related to the shorthand notation, it is a regression which is probably related to hyatt's rule tree landing from bug 78695. If this is the case, I hope we don't have a design problem that causes the specified values to be inherited, instead of the computed values. I don't have builds from 05/30 and 06/01 to make sure that the regression comes from the rule tree landing. I tried with a [06/07 moz0.9.1] build - it works - and with a [06/08 trunk] build - it doesn't work.
Severity: normal → major
Status: NEW → ASSIGNED
Keywords: regression
OS: Windows 98 → All
Priority: -- → P2
Hardware: PC → All
Whiteboard: [ruletree]
Comment 3•23 years ago
|
||
> The bug is not related to the shorthand notation,
Yeah, you're right. The bug seems to occur only when all margins are specified
as 'inherit'.
Assignee | ||
Comment 5•23 years ago
|
||
Assignee | ||
Comment 6•23 years ago
|
||
Hyatt says sr=hyatt (we worked on this together).
Comment 7•23 years ago
|
||
Yup, sr=hyatt
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Priority: P2 → P1
Target Milestone: --- → mozilla0.9.3
Assignee | ||
Comment 9•23 years ago
|
||
Hmmm. I suspect this actually isn't going to fix the problem for 'line-height'. (I'm assuming 'font-size' is working since we'd have noticed otherwise.)
Comment 10•23 years ago
|
||
I'm testing similar cases too. So far so good, I did not find anything that breaks but your help (and Ian's too) would be appreciated. I'd like to lobby PDT to get that fix in, if several of us certify that it won't break anything else. I think it's a fairly basic feature that got broken here (although it's not in any testcase apparently). Ian, David: what do you think? Is it worth the effort to try to get that in for 6.1?
Comment 11•23 years ago
|
||
David: font-size works indeed. I'll attach a testcase.
Comment 12•23 years ago
|
||
Reporter | ||
Comment 13•23 years ago
|
||
Pierre: Do you want all percentage inheritance testcases here? (Which means the summary should be changed.)
Assignee | ||
Comment 14•23 years ago
|
||
I think the real fix here (is 'line-height' broken? fantasai said it was on IRC, I think.) is to change the way |Check*Properties| count inherit values in the exact cases where we store inherit values literally on the struct.
Reporter | ||
Comment 15•23 years ago
|
||
Reporter | ||
Comment 16•23 years ago
|
||
Assignee | ||
Updated•23 years ago
|
Target Milestone: mozilla0.9.3 → mozilla0.9.4
Reporter | ||
Comment 17•23 years ago
|
||
width, max-width, min-width, height, max-height, min-height, left, right, top, and bottom all inherit properly. I couldn't test vertical-align due to bug 93865.
Assignee | ||
Comment 18•23 years ago
|
||
The problem with my previous proposal is that how we store the properties on the struct depends on the parent from which it's inheriting, and therefore it can't be cached in the rule tree even if we determine that, in a certain case, we use the eCSSUnit_Inherit value throughout. So I think if we hit a case where we might have to use an eCSSUnit_Inherit we need to both: * make sure we don't cache on the rule node * make sure not to simply defer to the parent's struct (inherit the whole thing) I think I have a solution for this, along with some changes to make the checking functions less tedious.
Assignee | ||
Comment 19•23 years ago
|
||
Assignee | ||
Comment 20•23 years ago
|
||
There are a bunch of comments in that patch that are out of date (since I had to change things a bit as I went...).
Comment 21•23 years ago
|
||
This seems like a good idea to me.
Comment 22•23 years ago
|
||
Yeah, i like this. I would carefully double-check everything. :) r/sr=hyatt
Assignee | ||
Comment 23•23 years ago
|
||
Comment 24•23 years ago
|
||
sr=waterson
Assignee | ||
Updated•23 years ago
|
Target Milestone: mozilla0.9.4 → mozilla0.9.5
Assignee | ||
Comment 25•23 years ago
|
||
Fix checked in 2001-09-04 20:13 PDT.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 26•23 years ago
|
||
The tests for background-position and line-height fail. The line-height one is weird, because it inherits percentages properly when 'inherit' is explicity specified, but inherits the proportion when it's not. 2001102309, Win2K
Comment 27•23 years ago
|
||
Comment 28•23 years ago
|
||
reopening with a new milestone
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: mozilla0.9.5 → mozilla0.9.6
Assignee | ||
Comment 29•23 years ago
|
||
The line-height bug is bug 97726 and is almost definitely a different bug from this one. Do you have a testcase for 'background-position'?
Reporter | ||
Comment 30•23 years ago
|
||
Yeah--the sixth attachment from the top ("background-position").
Assignee | ||
Updated•23 years ago
|
Target Milestone: mozilla0.9.6 → mozilla0.9.7
Assignee | ||
Updated•23 years ago
|
Target Milestone: mozilla0.9.7 → mozilla0.9.8
Assignee | ||
Comment 31•23 years ago
|
||
I split off the background-position issue into bug 117624. Marking this bug as fixed again.
Status: REOPENED → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → FIXED
Target Milestone: mozilla0.9.8 → mozilla0.9.5
Comment 32•22 years ago
|
||
the first 2 attachemnts work fine. Marking verified
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•