white space between hidden elements causes line break in list item elements

RESOLVED FIXED in mozilla12

Status

()

defect
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: mozilla, Assigned: Ehsan)

Tracking

({regression})

unspecified
mozilla12
x86_64
Windows 7
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

Reporter

Description

8 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.4 (KHTML, like Gecko) Chrome/16.0.889.0 Safari/535.4

Steps to reproduce:

Created a list item which had 2 hidden elements as it's first children and a block level element as it's third as follows:

<li>
    <div style="display:none">Div 1</div>
    <div style="display:none">Div 2</div>
    <div>Div 3</div>
</li>


Actual results:

The list item had an extra blank line before the non-hidden div was displayed


Expected results:

The list item should have had just 1 line containing the non-hidden div
Reporter

Comment 1

8 years ago
Posted file examples
Did a bit more investigating, this happens on any element that has display:list-item, and the extra line only appears if there is white space between the two hidden elements and only if the hidden elements are the first two children of the list element. Attached are some examples.
Reporter

Comment 2

8 years ago
Comment on attachment 563246 [details]
examples

><!DOCTYPE html>
><html>
><head>
><title>Examples</title>
></head>
>
><body>
>
><p>List item with white space between first 2 hidden elements (extra line break is added)</p>
>
><ul>
><li>
>  <div style="display:none;">test</div>
>  <div style="display:none;">test</div>
>  <div>test</div>
></li>
></ul>
>
><p>List item with no white space between hidden elements (no extra line break added)</p>
>
><ul>
><li>
>  <div style="display:none;">test</div><div style="display:none;">test</div>
>  <div>test</div>
></li>
></ul>
>
><p>div with display:list-item and white space between first 2 hidden elements (extra line break is added)</p>
>
><div style="display:list-item;border:1px solid #000000;">
>	<div style="display:none;">test</div>
>	<div style="display:none;">test</div>
>	<div>test</div>
></div>
>
><p>div with display:list-item and no white space between first 2 hidden elements (no extra line break added)</p>
>
><div style="display:list-item;border:1px solid #000000;">
>	<div style="display:none;">test</div><div style="display:none;">test</div>
>	<div>test</div>
></div>
>
></body>
></html>
>
Attachment #563246 - Attachment mime type: text/plain → text/html

Comment 3

8 years ago
Confirmed in Fx7, works with Fx3.6
Component: General → Layout
Keywords: regression
QA Contact: general → layout

Comment 4

8 years ago
regression window'cached m-c horly),

http://hg.mozilla.org/mozilla-central/rev/c0dbdafa583c
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b8pre) Gecko/20101104 Firefox/4.0b8pre ID:20101104134944
Fails:
http://hg.mozilla.org/mozilla-central/rev/52a6a18eeb61
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b8pre) Gecko/20101104 Firefox/4.0b8pre ID:20101104165457
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=c0dbdafa583c&tochange=52a6a18eeb61
Triggered by:
Bug 389321 - Caret invisible or at wrong place with empty contenteditable nodes
Blocks: 389321
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee

Comment 5

8 years ago
This is bad!  I'll investigate.
Assignee: nobody → ehsan
Assignee

Comment 6

8 years ago
this is the same problem as bug 713856, but the test case is interesting, so I'll add one for it.
Assignee

Comment 7

8 years ago
Posted patch TestcaseSplinter Review
Attachment #584985 - Flags: review?(roc)
Assignee

Updated

8 years ago
Target Milestone: --- → mozilla12
https://hg.mozilla.org/mozilla-central/rev/de0a0865d0e9
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.