Closed
Bug 599882
Opened 15 years ago
Closed 13 years ago
Baseline of an inline block with relatively positioned block child is affected by the relative positioning
Categories
(Core :: Layout: Block and Inline, defect, P3)
Core
Layout: Block and Inline
Tracking
()
RESOLVED
FIXED
mozilla19
People
(Reporter: asamsamsa, Assigned: bzbarsky)
References
Details
Attachments
(2 files, 1 obsolete file)
511 bytes,
text/html
|
Details | |
7.13 KB,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b6) Gecko/20100101 Firefox/4.0b6
Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b6)
<html>
<head>
<style type="text/css">
.positionned {
display:block;
position: relative;
left:100px;
top:150px;
}
.nowidth {
display:inline-block;
width:0;
}
</style>
</head>
<body>
<span>Hello world !</span><p class="nowidth"><span class="positionned">Positionned text</span></p><span>hello world !</span>
</body>
</html>
Reproducible: Always
Steps to Reproduce:
1.Use the code provided above
2.Modify the bottom value as you like
Actual Results:
All the box are vertically positioned.
Expected Results:
Only the positioned text box should be vertically positioned.
![]() |
Assignee | |
Comment 1•15 years ago
|
||
David, it looks like the baseline calculation for the inline block is using the positioned text. It's not clear to me whether this is the right behavior per spec, but Webkit and Presto don't seem to do that.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: box block displayed and relative positioned in a inline block displayed box bug → Baseline of an inline block with relatively positioned block child is affected by the relative positioning
![]() |
Assignee | |
Comment 2•15 years ago
|
||
Yeah, that's a bug.
To fix this, nsLayoutUtils::GetFirstLinePosition and nsLayoutUtils::GetLastLineBaseline need to undo the effects of relative positioning.
OS: Windows 7 → All
Priority: -- → P3
Hardware: x86 → All
![]() |
Assignee | |
Comment 6•13 years ago
|
||
Attachment #671021 -
Flags: review?(dbaron)
![]() |
Assignee | |
Updated•13 years ago
|
Assignee: nobody → bzbarsky
Whiteboard: [need review]
Why did you add the boolean parameter for the list bullet stuff? Shouldn't the same change apply there as well?
![]() |
Assignee | |
Comment 8•13 years ago
|
||
Well, that question is why you're reviewing this, and not dholbert. ;)
I don't know. Should it? If it should, I'll nix the boolean, obviously.
![]() |
Assignee | |
Comment 9•13 years ago
|
||
But note that every single other UA agrees with us right now, before this change, on the bullet position...
Attachment #672424 -
Flags: review?(dbaron)
![]() |
Assignee | |
Updated•13 years ago
|
Attachment #671021 -
Attachment is obsolete: true
Attachment #671021 -
Flags: review?(dbaron)
Comment on attachment 672424 [details] [diff] [review]
With the bullet position also changed.
I still think it's the right thing based on the definition of relative positioning and keeping a consistent model for what relative positioning means; if it causes compat problems we can switch to the first patch.
Attachment #672424 -
Flags: review?(dbaron) → review+
![]() |
Assignee | |
Comment 11•13 years ago
|
||
Flags: in-testsuite+
Whiteboard: [need review]
Target Milestone: --- → mozilla19
Comment 12•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•