<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>5318</bug_id>
          
          <creation_ts>2005-10-09 22:55:39 -0700</creation_ts>
          <short_desc>forced line break should not be allowed after a list marker</short_desc>
          <delta_ts>2005-10-24 10:47:44 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Layout and Rendering</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Antti Koivisto">koivisto</reporter>
          <assigned_to name="Dave Hyatt">hyatt</assigned_to>
          <cc>ian</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>21680</commentid>
    <comment_count>0</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2005-10-09 22:55:39 -0700</bug_when>
    <thetext>It does not make much sense to break line after a list marker, the behaviour does not match other 
browsers either.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21681</commentid>
    <comment_count>1</comment_count>
      <attachid>4284</attachid>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2005-10-09 22:56:20 -0700</bug_when>
    <thetext>Created attachment 4284
test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21682</commentid>
    <comment_count>2</comment_count>
      <attachid>4285</attachid>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2005-10-09 23:02:05 -0700</bug_when>
    <thetext>Created attachment 4285
patch

this fixes the problem for list markers only, however there might be a need for
more generic fix based on this comment in the code:

	    // FIXME: This does not match WinIE, Opera, and Mozilla.  They
treat replaced elements
	    // like characters in a word, and require spaces between the
replaced elements in order
	    // to break.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21690</commentid>
    <comment_count>3</comment_count>
      <attachid>4285</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2005-10-09 23:36:22 -0700</bug_when>
    <thetext>Comment on attachment 4285
patch

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21696</commentid>
    <comment_count>4</comment_count>
      <attachid>4285</attachid>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2005-10-10 02:24:42 -0700</bug_when>
    <thetext>Comment on attachment 4285
patch

I&apos;m minusing this, since I think the code needs better commenting, and because
as you discovered, this problem is not unique to list markers.

I&apos;d rather see this fixed for replaced elements and list markers together than
to just have some special-case code introduced for list markers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21697</commentid>
    <comment_count>5</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2005-10-10 02:27:02 -0700</bug_when>
    <thetext>I think this may need a consult from Hixie actually.  When considering ordered lists, there is an actual 
space generated between the &quot;1.&quot; and the rest of the text, so it seems logical to me that this would 
provide a breaking opportunity.  However, as you pointed out, it looks ugly.

Hixie, what do you think?
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21698</commentid>
    <comment_count>6</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2005-10-10 02:27:46 -0700</bug_when>
    <thetext>If we do decide that &quot;1. &quot; should not break despite having a space, then it probably is ok to special-case 
list markers. :)
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21699</commentid>
    <comment_count>7</comment_count>
      <attachid>4285</attachid>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2005-10-10 02:29:29 -0700</bug_when>
    <thetext>Comment on attachment 4285
patch

Bah, let&apos;s just land it and if it turns out to be wrong we can fix it later. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21719</commentid>
    <comment_count>8</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2005-10-10 09:46:25 -0700</bug_when>
    <thetext>I don&apos;t think it matters whether the list marker has space in it or not. It is
treated as a replaced element so the space there is not a factor at all. Anyway,
the patch only changes behaviour for forced line breaks, if the algorithm finds
a normal break point then that is handled as before. </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21746</commentid>
    <comment_count>9</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2005-10-10 15:13:34 -0700</bug_when>
    <thetext>If it&apos;s list-style-position: inside then it&apos;s just an inline element on the line
and it should obey &apos;white-space&apos; (the space is in the ::marker, and the property
inherits from the display:list-item element).

If it&apos;s list-style-position: outside then it should not wrap, it should be on
the first line box, before the start of that line box, and thus should not be
affected by wrapping or anything (and it&apos;s an inline-block, so white-space would
only affect within the ::marker box anyway).

HTH.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21755</commentid>
    <comment_count>10</comment_count>
      <attachid>4285</attachid>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2005-10-10 16:27:37 -0700</bug_when>
    <thetext>Comment on attachment 4285
patch

Ok, so sounds like only outside list markers should ignore white-space rules,
from what you&apos;re saying, so that&apos;s how we should refine this.

Minusing for a new patch that checks listStylePosition</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21861</commentid>
    <comment_count>11</comment_count>
      <attachid>4317</attachid>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2005-10-11 20:53:44 -0700</bug_when>
    <thetext>Created attachment 4317
updated test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21862</commentid>
    <comment_count>12</comment_count>
      <attachid>4318</attachid>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2005-10-11 21:05:58 -0700</bug_when>
    <thetext>Created attachment 4318
updated patch

Allow breaks after marker for list-style-position:inside. This should give the
right behaviour. Markers are pretty much a hack, real (CSS3) markers would
require some work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22149</commentid>
    <comment_count>13</comment_count>
      <attachid>4318</attachid>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2005-10-16 23:47:46 -0700</bug_when>
    <thetext>Comment on attachment 4318
updated patch

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22820</commentid>
    <comment_count>14</comment_count>
    <who name="Beth Dakin">bdakin</who>
    <bug_when>2005-10-24 10:47:44 -0700</bug_when>
    <thetext>I committed the fix for this bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="0"
              isprivate="0"
          >
            <attachid>4284</attachid>
            <date>2005-10-09 22:56:20 -0700</date>
            <delta_ts>2005-10-11 20:53:44 -0700</delta_ts>
            <desc>test case</desc>
            <filename>list-marker-linebreak.html</filename>
            <type>text/html</type>
            <size>256</size>
            <attacher name="Antti Koivisto">koivisto</attacher>
            
              <data encoding="base64">PGh0bWw+Cjxib2R5Pgo8b2w+CjxsaT5hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh
YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh
YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh
YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh
YWFhYWEKPC9vbD4KPC9ib2R5Pgo8L2h0bWw+Cg==
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>4285</attachid>
            <date>2005-10-09 23:02:05 -0700</date>
            <delta_ts>2005-10-11 21:05:58 -0700</delta_ts>
            <desc>patch</desc>
            <filename>list-marker-linebreak.patch</filename>
            <type>text/plain</type>
            <size>1280</size>
            <attacher name="Antti Koivisto">koivisto</attacher>
            
              <data encoding="base64">SW5kZXg6IGJpZGkuY3BwCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9jdnMvcm9vdC9XZWJDb3JlL2to
dG1sL3JlbmRlcmluZy9iaWRpLmNwcCx2CnJldHJpZXZpbmcgcmV2aXNpb24gMS4xNDcKZGlmZiAt
cCAtdSAtcjEuMTQ3IGJpZGkuY3BwCi0tLSBiaWRpLmNwcAk5IE9jdCAyMDA1IDAxOjQ2OjE0IC0w
MDAwCTEuMTQ3CisrKyBiaWRpLmNwcAkxMCBPY3QgMjAwNSAwNjowMzowMSAtMDAwMApAQCAtMjM5
OSw3ICsyMzk5LDcgQEAgQmlkaUl0ZXJhdG9yIFJlbmRlckJsb2NrOjpmaW5kTmV4dExpbmVCcgog
ICAgICAgICBsYXN0ID0gbzsKICAgICAgICAgbyA9IG5leHQ7CiAKLSAgICAgICAgaWYgKCFsYXN0
LT5pc0Zsb2F0aW5nT3JQb3NpdGlvbmVkKCkgJiYgbGFzdC0+aXNSZXBsYWNlZCgpICYmIGxhc3Qt
PnN0eWxlKCktPndoaXRlU3BhY2UoKSA9PSBOT1JNQUwpIHsKKyAgICAgICAgaWYgKCFsYXN0LT5p
c0Zsb2F0aW5nT3JQb3NpdGlvbmVkKCkgJiYgbGFzdC0+aXNSZXBsYWNlZCgpICYmIGxhc3QtPnN0
eWxlKCktPndoaXRlU3BhY2UoKSA9PSBOT1JNQUwgJiYgIWxhc3QtPmlzTGlzdE1hcmtlcigpKSB7
CiAgICAgICAgICAgICAvLyBHbyBhaGVhZCBhbmQgYWRkIGluIHRtcFcuCiAgICAgICAgICAgICB3
ICs9IHRtcFc7CiAgICAgICAgICAgICB0bXBXID0gMDsKQEAgLTI0MzYsOCArMjQzNiw4IEBAIEJp
ZGlJdGVyYXRvciBSZW5kZXJCbG9jazo6ZmluZE5leHRMaW5lQnIKICAgICAgICAgICAgICAgICBs
QnJlYWsucG9zID0gbGFzdC0+aXNUZXh0KCkgPyBsYXN0LT5sZW5ndGgoKSA6IDA7CiAgICAgICAg
ICAgICB9CiAgICAgICAgIH0gZWxzZSBpZiggbEJyZWFrLm9iaiApIHsKLSAgICAgICAgICAgIGlm
KCBsYXN0ICE9IG8gKSB7Ci0gICAgICAgICAgICAgICAgLy8gYmV0dGVyIHRvIGJyZWFrIGJldHdl
ZW4gb2JqZWN0IGJvdW5kYXJpZXMgdGhhbiBpbiB0aGUgbWlkZGxlIG9mIGEgd29yZAorICAgICAg
ICAgICAgaWYoIGxhc3QgIT0gbyAmJiAhbGFzdC0+aXNMaXN0TWFya2VyKCkgKSB7CisgICAgICAg
ICAgICAgICAgLy8gYmV0dGVyIHRvIGJyZWFrIGJldHdlZW4gb2JqZWN0IGJvdW5kYXJpZXMgdGhh
biBpbiB0aGUgbWlkZGxlIG9mIGEgd29yZCAoZXhjZXB0IGZvciBsaXN0IG1hcmtlcnMpCiAgICAg
ICAgICAgICAgICAgbEJyZWFrLm9iaiA9IG87CiAgICAgICAgICAgICAgICAgbEJyZWFrLnBvcyA9
IDA7CiAgICAgICAgICAgICB9IGVsc2Ugewo=
</data>
<flag name="review"
          id="719"
          type_id="1"
          status="-"
          setter="hyatt"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>4317</attachid>
            <date>2005-10-11 20:53:44 -0700</date>
            <delta_ts>2005-10-11 20:53:44 -0700</delta_ts>
            <desc>updated test case</desc>
            <filename>list-marker-linebreak.html</filename>
            <type>text/html</type>
            <size>517</size>
            <attacher name="Antti Koivisto">koivisto</attacher>
            
              <data encoding="base64">PGh0bWw+Cjxib2R5Pgo8b2w+CjxsaT5hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh
YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh
YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh
YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh
YWFhYWEKPC9vbD4KPG9sPgo8bGkgc3R5bGU9Imxpc3Qtc3R5bGUtcG9zaXRpb246aW5zaWRlIj5h
YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh
YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh
YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh
YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWEKPC9vbD4KPC9ib2R5Pgo8L2h0
bWw+Cg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>4318</attachid>
            <date>2005-10-11 21:05:58 -0700</date>
            <delta_ts>2005-10-16 23:47:46 -0700</delta_ts>
            <desc>updated patch</desc>
            <filename>list-marker-linebreak.patch</filename>
            <type>text/plain</type>
            <size>1343</size>
            <attacher name="Antti Koivisto">koivisto</attacher>
            
              <data encoding="base64">SW5kZXg6IGJpZGkuY3BwCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9jdnMvcm9vdC9XZWJDb3JlL2to
dG1sL3JlbmRlcmluZy9iaWRpLmNwcCx2CnJldHJpZX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iApIHsKLSAgICAgICAg
ICAgIGlmKCBsYXN0ICE9IG8gKSB7Ci0gICAgICAgICAgICAgICAgLy8gYmV0dGVyIHRvIGJyZWFr
IGJldHdlZW4gb2JqZWN0IGJvdW5kYXJpZXMgdGhhbiBpbiB0aGUgbWlkZGxlIG9mIGEgd29yZAor
ICAgICAgICAgICAgaWYoIGxhc3QgIT0gbyAmJiAhbGFzdC0+aXNMaXN0TWFya2VyKCkgKSB7Cisg
ICAgICAgICAgICAgICAgLy8gYmV0dGVyIHRvIGJyZWFrIGJldHdlZW4gb2JqZWN0IGJvdW5kYXJp
ZXMgdGhhbiBpbiB0aGUgbWlkZGxlIG9mIGEgd29yZCAoZXhjZXB0IGZvciBsaXN0IG1hcmtlcnMp
CiAgICAgICAgICAgICAgICAgbEJyZWFrLm9iaiA9IG87CiAgICAgICAgICAgICAgICAgbEJyZWFr
LnBvcyA9IDA7CiAgICAgICAgICAgICB9IGVsc2Ugewo=
</data>
<flag name="review"
          id="734"
          type_id="1"
          status="+"
          setter="hyatt"
    />
          </attachment>
      

    </bug>

</bugzilla>