<?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>11979</bug_id>
          
          <creation_ts>2006-12-26 07:48:16 -0800</creation_ts>
          <short_desc>SVG text does not respect font-size scaling in bbox calculation</short_desc>
          <delta_ts>2007-01-08 16:41:10 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>SVG</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>11984</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>SVGHitList</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>39674</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2006-12-26 07:48:16 -0800</bug_when>
    <thetext>SVG text does not respect font-size scaling in bbox calculation

See attached testcase.  After fixing bug 11973 our behavior is slightly better than before, but GREEN is still not entirely green.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39675</commentid>
    <comment_count>1</comment_count>
      <attachid>12028</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2006-12-26 07:48:51 -0800</bug_when>
    <thetext>Created attachment 12028
test demonstrating the incorrect behavior</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39681</commentid>
    <comment_count>2</comment_count>
      <attachid>12032</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2006-12-26 08:40:03 -0800</bug_when>
    <thetext>Created attachment 12032
Another test showing how bad our current behavior is</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39693</commentid>
    <comment_count>3</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2006-12-26 11:17:04 -0800</bug_when>
    <thetext>Ok, so this is going to be harder to fix than I originally thought.

This should be split into two bugs.  One to cover the text gradient painting issue, and another to cover text having broken bounding box code.

The problem with gradients is not related to how text calculates bounding boxes, but rather due to the SVG text painting system.  SVG Text makes manual calls into SVGPaintServer::setup() and SVGPaintServer::teardown() instead of calling paint().  SVGPaintServerGradientCG isn&apos;t exactly designed for this code path.  The whole SVG text/paintserver interaction looks to be kinda a hack (certainly I am not w/o blame here :), and likely needs to be redesigned.  One example would be passing some sort of &quot;painting text&quot; bool to setup/teardown instead of setting a bool on the paintserver.  Another would be fixing the whole fill/stroke at once problem which we&apos;ve talked about for so long.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39696</commentid>
    <comment_count>4</comment_count>
      <attachid>12032</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2006-12-26 11:23:54 -0800</bug_when>
    <thetext>Comment on attachment 12032
Another test showing how bad our current behavior is

obsoleting this test as it does not apply to this bug.  I&apos;ve filed http://bugs.webkit.org/show_bug.cgi?id=11984 to track fixing this test case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36595</commentid>
    <comment_count>5</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2007-01-07 01:54:51 -0800</bug_when>
    <thetext>Wildfox has done some investigation here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36184</commentid>
    <comment_count>6</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2007-01-08 16:41:10 -0800</bug_when>
    <thetext>Fixed by bug 11984.

*** This bug has been marked as a duplicate of 11984 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>12028</attachid>
            <date>2006-12-26 07:48:51 -0800</date>
            <delta_ts>2006-12-26 07:48:51 -0800</delta_ts>
            <desc>test demonstrating the incorrect behavior</desc>
            <filename>font-size-text-bbox.svg</filename>
            <type>image/svg+xml</type>
            <size>372</size>
            <attacher name="Eric Seidel (no email)">eric</attacher>
            
              <data encoding="base64">PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRw
Oi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDxkZWZzPgogICAgICAgIDxsaW5lYXJHcmFk
aWVudCBpZD0nbXlncmFkaWVudCcgeDE9JzAnIHgyPSc0Jz4KICAgICAgICAgICAgPHN0b3Agc3Rv
cC1jb2xvcj0nZ3JlZW4nIG9mZnNldD0nMCcgLz4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xv
cj0ncmVkJyBvZmZzZXQ9JzEnIC8+CiAgICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVm
cz4KICAgIDx0ZXh0IGZvbnQtc2l6ZT0nNjgnIGZpbGw9InVybCgjbXlncmFkaWVudCkiICB4PSIy
MCIgeT0iNzAiPkdSRUVOPC90ZXh0Pgo8L3N2Zz4K
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="0"
              isprivate="0"
          >
            <attachid>12032</attachid>
            <date>2006-12-26 08:40:03 -0800</date>
            <delta_ts>2006-12-26 11:23:54 -0800</delta_ts>
            <desc>Another test showing how bad our current behavior is</desc>
            <filename>textbounce.svg</filename>
            <type>image/svg+xml</type>
            <size>1434</size>
            <attacher name="Eric Seidel (no email)">eric</attacher>
            
              <data encoding="base64">PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/P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