<?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>47596</bug_id>
          
          <creation_ts>2010-10-13 09:27:30 -0700</creation_ts>
          <short_desc>Ruby isn&apos;t displayed correctly after switching from display:none to display:inline</short_desc>
          <delta_ts>2024-03-10 23:28:43 -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>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc>http://kids.gakken.co.jp/kagaku/110ban/text/1480.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexey Proskuryakov">ap</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>hyatt</cc>
    
    <cc>koivisto</cc>
    
    <cc>ntim</cc>
    
    <cc>rolandsteiner</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>293450</commentid>
    <comment_count>0</comment_count>
      <attachid>70615</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-10-13 09:27:30 -0700</bug_when>
    <thetext>Created attachment 70615
test case

See attached test case, or try switching Furigana on at &lt;http://kids.gakken.co.jp/kagaku/110ban/text/1480.html&gt;.

I&apos;m not sure whether this is really expected to work. The default style for rt is block, but the site sets it to inline when toggling ruby on. But then, CSS3 Ruby Module has a whole lot of custom display styles for ruby, see &lt;http://www.w3.org/TR/css3-ruby/#display&gt;. So, perhaps both block and inline need some custom translation when applied to this element.

I haven&apos;t checked whether this works in IE8.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>293451</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-10-13 09:27:56 -0700</bug_when>
    <thetext>&lt;rdar://problem/8452319&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>293680</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-10-13 13:41:52 -0700</bug_when>
    <thetext>I checked now, and this works in IE.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>293911</commentid>
    <comment_count>3</comment_count>
    <who name="Roland Steiner">rolandsteiner</who>
    <bug_when>2010-10-13 19:39:40 -0700</bug_when>
    <thetext>It could be argued that the current behavior is correct as the ruby text is displayed inline, rather than as ruby text, just as specified by the JS.

Toggling works if the code is changed to toggle between &apos;none&apos; and empty string (i.e., not overwriting the browser default.

It doesn&apos;t work correctly if toggling between &apos;none&apos; and &apos;ruby-text&apos; - this is due to the fact that so far we avoided implementing the ruby-specific display types, because of questions of the state and direction of the ruby spec(s). IIRC the current code explicitly &quot;aborts&quot; ruby rendering if the user tampers with the display type.

If compatibility with IE is a goal, then one short term solution might be to just entirely ignore the display type on &lt;rt&gt; unless it&apos;s &apos;none&apos;, but I&apos;m not sure that&apos;s a good idea. OTOH, even if we fully implement the ruby display-types, the example would still not work as intended, because it&apos;d then need to specify &apos;ruby-text&apos; rather than &apos;inline&apos; (the latter would continue to be displayed as-is).

Any inputs or other suggestions?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>293965</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-10-13 22:32:43 -0700</bug_when>
    <thetext>From the very little data that I have (this single site), it appears that IE compatibility can be a reasonable goal, yes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>294272</commentid>
    <comment_count>5</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2010-10-14 12:22:12 -0700</bug_when>
    <thetext>Ignoring the display type is probably ok actually.  I imagine that&apos;s what IE is doing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>294573</commentid>
    <comment_count>6</comment_count>
    <who name="Roland Steiner">rolandsteiner</who>
    <bug_when>2010-10-14 21:52:16 -0700</bug_when>
    <thetext>Ignoring the display type does, however, imply that you could never (e.g., in user style sheets, or using JS) change &lt;rt&gt; to be displayed inline rather than as ruby text, on any site or device.

Are you positive that sacrificing this functionality is a good exchange for the sake of IE compatibility?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>294600</commentid>
    <comment_count>7</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-10-14 23:36:39 -0700</bug_when>
    <thetext>Would it make sense to decide whether to display &lt;rt&gt; inline based on whether &lt;rp&gt; was forced to be anything but display:none?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>295916</commentid>
    <comment_count>8</comment_count>
    <who name="Roland Steiner">rolandsteiner</who>
    <bug_when>2010-10-18 19:18:17 -0700</bug_when>
    <thetext>I&apos;m not sure about this suggestion - on one hand it could certainly serve as a heuristic.

On the other hand, not all ruby uses &lt;rp&gt;, and it would be a pretty opaque condition to describe to new developers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>307132</commentid>
    <comment_count>9</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-11-09 20:00:04 -0800</bug_when>
    <thetext>See also: bug 44515.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2020018</commentid>
    <comment_count>10</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2024-03-10 23:28:43 -0700</bug_when>
    <thetext>I think this might be fixed with the recent ruby rewrite.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>70615</attachid>
            <date>2010-10-13 09:27:30 -0700</date>
            <delta_ts>2010-10-13 09:27:30 -0700</delta_ts>
            <desc>test case</desc>
            <filename>ruby.html</filename>
            <type>text/html</type>
            <size>708</size>
            <attacher name="Alexey Proskuryakov">ap</attacher>
            
              <data encoding="base64">PG1ldGEgY2hhcnNldD0idXRmLTgiPgo8aDQgY2xhc3M9InRpdGxlIj7jg4njg6njgqTjgqLjgqTj
grnjgpI8cnVieT7msLQ8cnA+77yIPC9ycD48cnQ+44G/44GaPC9ydD48cnA+77yJPC9ycD48L3J1
Ynk+44GrPHJ1Ynk+5YWlPHJwPu+8iDwvcnA+PHJ0PuOBhDwvcnQ+PHJwPu+8iTwvcnA+PC9ydWJ5
PuOCjOOCi+OBqOOBqeOBhuOBl+OBpuOBkeOCgOOCiuOBjOOBp+OCi+OBrjwvaDQ+CjxidXR0b24g
b25jbGljaz0idG9nZ2xlKCkiPlRvZ2dsZSBSdWJ5PC9idXR0b24+CjxzY3JpcHQ+CnZhciBlbmFi
bGVkID0gdHJ1ZTsKZnVuY3Rpb24gdG9nZ2xlKCkKewogICAgZW5hYmxlZCA9ICFlbmFibGVkOwoK
ICAgIHZhciB0YWdzUnAgPSBkb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSgncnAnKTsKICAg
IHZhciB0YWdzUnQgPSBkb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSgncnQnKTsKCiAgICBm
b3IodmFyIHRhZ1JwIGluIHRhZ3NScCkKICAgICAgICBpZih0YWdzUnBbdGFnUnBdLnN0eWxlKSB0
YWdzUnBbdGFnUnBdLnN0eWxlLmRpc3BsYXkgPSBlbmFibGVkID8gJ2lubGluZScgOiAnbm9uZSc7
CiAgICAKICAgIGZvcih2YXIgdGFnUnQgaW4gdGFnc1J0KQogICAgICAgIGlmKHRhZ3NSdFt0YWdS
dF0uc3R5bGUpIHRhZ3NSdFt0YWdSdF0uc3R5bGUuZGlzcGxheSA9IGVuYWJsZWQgPyAnaW5saW5l
JyA6ICdub25lJzsKCn0KPC9zY3JpcHQ+
</data>

          </attachment>
      

    </bug>

</bugzilla>