<?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>12607</bug_id>
          
          <creation_ts>2007-02-04 20:51:51 -0800</creation_ts>
          <short_desc>Links with naturally italic text not repainted properly</short_desc>
          <delta_ts>2022-08-30 20:17:30 -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>418.x</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction, InRadar</keywords>
          <priority>P3</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Matt Lilek">dev+webkit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>dtrebbien</cc>
    
    <cc>mitz</cc>
    
    <cc>mmaxfield</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>webkitbugs</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>27585</commentid>
    <comment_count>0</comment_count>
    <who name="Matt Lilek">dev+webkit</who>
    <bug_when>2007-02-04 20:51:51 -0800</bug_when>
    <thetext>Links whose font is italic in it&apos;s normal state or whose only variant is italic are not repainted properly on hover.  Clicking one of these links and then going back in history results in the area that was not repainted  before being repainted properly, but still isn&apos;t repainted properly on hover.

This happens in Safari 2.0.4 (419.3/WebKit 418.9.1) and doesn&apos;t appear to be a regression.

The testcase I&apos;m attaching uses &quot;Brush Script MT&quot; which has no &quot;regular&quot; style, only italic.  The font &quot;Monotype Corsiva&quot; also displays the same misrendering and only has regular with no italic style, but doesn&apos;t seem to be a default OS X font (probably from MS Office).

To reproduce - 
1. Open the attached test case.
2. Hover over the &apos;A&apos; (note the incomplete repaint).
3. Click the link.
4. *Without moving your mouse* press backspace.
5. The &apos;A&apos; should be completely red.
6. Move the mouse to unhover (no properly repainted).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27586</commentid>
    <comment_count>1</comment_count>
      <attachid>12927</attachid>
    <who name="Matt Lilek">dev+webkit</who>
    <bug_when>2007-02-04 20:52:53 -0800</bug_when>
    <thetext>Created attachment 12927
Testcase</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27587</commentid>
    <comment_count>2</comment_count>
      <attachid>12928</attachid>
    <who name="Matt Lilek">dev+webkit</who>
    <bug_when>2007-02-04 20:53:33 -0800</bug_when>
    <thetext>Created attachment 12928
Screenshot of hover</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27588</commentid>
    <comment_count>3</comment_count>
    <who name="Matt Lilek">dev+webkit</who>
    <bug_when>2007-02-04 20:58:01 -0800</bug_when>
    <thetext>Firefox and Opera both get this wrong too, so I don&apos;t know how fixable it even is.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27567</commentid>
    <comment_count>4</comment_count>
    <who name="">mitz</who>
    <bug_when>2007-02-04 22:37:55 -0800</bug_when>
    <thetext>See also bug 6274.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71247</commentid>
    <comment_count>5</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2008-02-20 08:20:13 -0800</bug_when>
    <thetext>See also Bug 17026.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89673</commentid>
    <comment_count>6</comment_count>
    <who name="ar">webkitbugs</who>
    <bug_when>2008-08-28 13:33:59 -0700</bug_when>
    <thetext>I&apos;ve just recently run into this bug with italic Helvetica at 11px.
Safari 3.1.2 (5525.20.1) &amp; WebKit r35963.

I&apos;ve found a workaround.
By adding a small equally opposing amount of padding and margin, :hover paints correctly while *seemingly* not changing the layout.

ex (longhand, using the attached &quot;Testcase&quot;):

a {
	padding-right: 1em;
	margin-right: -1em;
	
	padding-left: 1em;
	margin-left: -1em;
}

Notes:
- The amount of padding/negative margin depends on the font and the amount to which italicization pushes outside of the character area. In my case, with italic Helvetica, I could set the amount to 0.1em/-0.1em. In the Testcase, 1em did the trick. I guess one could use any value since it&apos;s effectively getting canceled out by the equivalent negative margin. But because there may be unforeseen side effects of this workaround, I&apos;d think using the lowest value would be best.

- Ems are best (obviously) because they scale with increases in font size. Which means the workaround will continue to work if the user &quot;Makes Text Bigger&quot;.

- In my case (which is wrapped in &lt;ul&gt; and &lt;li&gt;)  I also found that defining &quot;li { list-style: none; }&quot; causes the bug to appear. When I removed, the bug went away.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89675</commentid>
    <comment_count>7</comment_count>
    <who name="ar">webkitbugs</who>
    <bug_when>2008-08-28 13:52:50 -0700</bug_when>
    <thetext>One additional note that I should have added:
- It&apos;s the &quot;padding-right/left&quot; value that fixes the painting issue. The equivalent negative margin is only used to negate whatever position change the padding value made.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89677</commentid>
    <comment_count>8</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2008-08-28 14:15:55 -0700</bug_when>
    <thetext>Firefox 3 gets this right now.  They account for glyphs overflowing bounds somehow.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89684</commentid>
    <comment_count>9</comment_count>
    <who name="">mitz</who>
    <bug_when>2008-08-28 14:38:34 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; Firefox 3 gets this right now.  They account for glyphs overflowing bounds
&gt; somehow.

To solve the italics case you just need to add overflow equal to the sine of the italics angle times the font height.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89688</commentid>
    <comment_count>10</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2008-08-28 14:46:50 -0700</bug_when>
    <thetext>I would have thought we only needed to do that for synthesized italics though.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89689</commentid>
    <comment_count>11</comment_count>
    <who name="">mitz</who>
    <bug_when>2008-08-28 14:55:52 -0700</bug_when>
    <thetext>Nope. We size the text box based on the glyphs&apos; advances, which are typically the same for italics (spaces between glyphs don&apos;t change in italics) so the top edge of a the last glyph extends beyond the right edge of the text box. Of course, there are other cases where fonts draw beyond their &quot;typographic bounds&quot; which are harder to account for.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89694</commentid>
    <comment_count>12</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2008-08-28 15:41:33 -0700</bug_when>
    <thetext>Ah I see.  Well seems easy enough to just incorporate this as overflow.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95053</commentid>
    <comment_count>13</comment_count>
      <attachid>24306</attachid>
    <who name="ar">webkitbugs</who>
    <bug_when>2008-10-12 12:11:20 -0700</bug_when>
    <thetext>Created attachment 24306
Testcase 02 (negative letter spacing)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95054</commentid>
    <comment_count>14</comment_count>
    <who name="ar">webkitbugs</who>
    <bug_when>2008-10-12 12:12:41 -0700</bug_when>
    <thetext>I found that this problem also effect normal type (ex: Helvetica, non-italic) with negative letter spacing. I&apos;ve attached a test case (&quot;Testcase 02 (negative letter spacing)	&quot;). Tested in Safari 3.1.2 (5525.20.1) &amp; WebKit-SVN-r37469.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1894967</commentid>
    <comment_count>15</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-08-30 15:43:38 -0700</bug_when>
    <thetext>I am able to reproduce this bug from both test cases in Safari Technology Preview 152 and in first test case &apos;test case&apos;, upon hover, edges of &quot;A&quot; are still not completely red and have some black color and in case of other &quot;Testcase 02&quot;, when I pressed without releasing, it changes color to &quot;red&quot; but red is not through &quot;S&quot; or &quot;W&quot; and has some edges as Blue.

Other browsers (Chrome Canary 107 and Firefox Nightly 107) works fine. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1895041</commentid>
    <comment_count>16</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-08-30 20:17:30 -0700</bug_when>
    <thetext>&lt;rdar://problem/99364769&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>12927</attachid>
            <date>2007-02-04 20:52:53 -0800</date>
            <delta_ts>2007-02-04 20:52:53 -0800</delta_ts>
            <desc>Testcase</desc>
            <filename>wings1012.html</filename>
            <type>text/html</type>
            <size>213</size>
            <attacher name="Matt Lilek">dev+webkit</attacher>
            
              <data encoding="base64">PGh0bWw+Cgo8aGVhZD4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KYSB7IGNvbG9yOiBibGFjazsg
Zm9udC1zaXplOiA0OHB4OyBmb250LWZhbWlseTogJ0JydXNoIFNjcmlwdCBNVCc7IH0KYTpob3Zl
ciB7IGNvbG9yOiByZWQ7IH0KPC9zdHlsZT4KPC9oZWFkPgoKPGJvZHk+CjxhIGhyZWY9ImRhdGE6
dGV4dC9odG1sLEdvIGJhY2suIj5BPC9hPgo8L2JvZHk+Cgo8L2h0bWw+
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>12928</attachid>
            <date>2007-02-04 20:53:33 -0800</date>
            <delta_ts>2007-02-04 20:53:33 -0800</delta_ts>
            <desc>Screenshot of hover</desc>
            <filename>Hover.png</filename>
            <type>image/png</type>
            <size>3260</size>
            <attacher name="Matt Lilek">dev+webkit</attacher>
            
              <data encoding="base64">i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Ctcm/mSezEbDhT8wTG/8BAwvhsm0s/WoA
AAAASUVORK5CYII=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>24306</attachid>
            <date>2008-10-12 12:11:20 -0700</date>
            <delta_ts>2008-10-12 12:11:20 -0700</delta_ts>
            <desc>Testcase 02 (negative letter spacing)</desc>
            <filename>Bug_12607-testcase_02.html</filename>
            <type>text/html</type>
            <size>523</size>
            <attacher name="ar">webkitbugs</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEgVHJhbnNpdGlvbmFs
Ly9FTiIKICAgImh0dHA6Ly93d3cudzMub3JnL1RSL2h0bWw0L2xvb3NlLmR0ZCI+Cgo8aHRtbCBs
YW5nPSJlbiI+CjxoZWFkPgoJPG1ldGEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50
PSJ0ZXh0L2h0bWw7IGNoYXJzZXQ9dXRmLTgiPgoJPHRpdGxlPldlYktpdCBCdWcgMTI2MDc6IFRl
c3RjYXNlIDAyPC90aXRsZT4KCgk8c3R5bGUgdHlwZT0idGV4dC9jc3MiIG1lZGlhPSJzY3JlZW4i
PgoJCWJvZHkgewoJCQlmb250LXNpemU6IDEwMHB4OwoJCQlmb250LWZhbWlseTogSGVsdmV0aWNh
OwoJCQlsZXR0ZXItc3BhY2luZzogLThweDsKCQl9CgkJCgkJYSB7CgkJCXRleHQtZGVjb3JhdGlv
bjogbm9uZQoJCX0KCTwvc3R5bGU+Cgo8L2hlYWQ+Cjxib2R5PgoKPGEgaHJlZj0iaHR0cDovL2Fw
cGxlLmNvbS8iPlM8L2E+CjxhIGhyZWY9Imh0dHA6Ly9hcHBsZS5jb20vIj5XPC9hPgoKPC9ib2R5
Pgo8L2h0bWw+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>