<?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>28808</bug_id>
          
          <creation_ts>2009-08-28 07:09:19 -0700</creation_ts>
          <short_desc>[Skia] Fix flaky layout test svg/dynamic-updates/SVGClipPathElement-dom-clipPathUnits-attr.html [DEBUG]</short_desc>
          <delta_ts>2009-09-01 04:01:49 -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>Platform</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>GoogleBug</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Roland Steiner">rolandsteiner</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>eric</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>143361</commentid>
    <comment_count>0</comment_count>
    <who name="Roland Steiner">rolandsteiner</who>
    <bug_when>2009-08-28 07:09:19 -0700</bug_when>
    <thetext>Note: DEBUG build

It seems the layout test fails in Skia if a render event occurs before the clipPathUnit attribute has been reset to &quot;userSpaceOnUse&quot; from the initally set &quot;objectBoundingBox&quot;. This causes the 300px coordinates in the clipping path to be interpreted as 300*100% of the bounding box size, resulting in values that are too large for Skia&apos;s fixed point data types. This causes an ASSERT during the value conversion.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>143364</commentid>
    <comment_count>1</comment_count>
      <attachid>38733</attachid>
    <who name="Roland Steiner">rolandsteiner</who>
    <bug_when>2009-08-28 07:20:02 -0700</bug_when>
    <thetext>Created attachment 38733
patch: check skia safety of path on conversion to local coordinates


The patch adds an explicit check for the validity of the path when it is transformed into local coordinates. 

This was the most suitable place I could find that didn&apos;t cause an inordinate amount of refactoring. Also, it seems pertinent and may also catch other cases that are not limited to clipping paths.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>143365</commentid>
    <comment_count>2</comment_count>
    <who name="Roland Steiner">rolandsteiner</who>
    <bug_when>2009-08-28 07:23:23 -0700</bug_when>
    <thetext>(In reply to comment #1)

additional remark to the patch: I tested it only under Windows so far, but the issue should be OS-independent.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>143610</commentid>
    <comment_count>3</comment_count>
      <attachid>38733</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-08-31 03:26:28 -0700</bug_when>
    <thetext>Comment on attachment 38733
patch: check skia safety of path on conversion to local coordinates

Looks fine.

+extern bool isPathSkiaSafe(const SkMatrix&amp; transform, const SkPath&amp; path);
should not have names for the arguments since they don&apos;t add anything.

Not sure why you&apos;re moving the inline functions around... I guess so you can export a function?

If we&apos;re going to export the function we should just add it to a header no?  Or to some utility file?

This looks OK.  Waiting for your response or new patch before landing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>143637</commentid>
    <comment_count>4</comment_count>
    <who name="Roland Steiner">rolandsteiner</who>
    <bug_when>2009-08-31 05:15:38 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; (From update of attachment 38733 [details])
&gt; [...]
&gt; Not sure why you&apos;re moving the inline functions around... I guess so you can
&gt; export a function?

Yes, I needed to move the relevant functions out of the anonymous namespace, but wanted to retain it for the generically named &apos;fastMod&apos; and &apos;square&apos; functions.

&gt; If we&apos;re going to export the function we should just add it to a header no?  Or
&gt; to some utility file?

Well, since the comment on those functions was that they should go away sooner or later I didn&apos;t want to give them additional exposure. (I don&apos;t know what would happen to this patch at that point, though.) Also, a short&apos;n&apos;simple &apos;extern&apos; was sufficient for my purposes so I left it at that.

But if you think it&apos;d still be worthwhile I could certainly add them to some header file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>143810</commentid>
    <comment_count>5</comment_count>
      <attachid>38733</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-09-01 03:01:42 -0700</bug_when>
    <thetext>Comment on attachment 38733
patch: check skia safety of path on conversion to local coordinates

The Skia safetybelt is lame, and should die, yes.  :)  this is OK for now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>143841</commentid>
    <comment_count>6</comment_count>
      <attachid>38733</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-09-01 04:01:46 -0700</bug_when>
    <thetext>Comment on attachment 38733
patch: check skia safety of path on conversion to local coordinates

Clearing flags on attachment: 38733

Committed r47925: &lt;http://trac.webkit.org/changeset/47925&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>143842</commentid>
    <comment_count>7</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-09-01 04:01:49 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>38733</attachid>
            <date>2009-08-28 07:20:02 -0700</date>
            <delta_ts>2009-09-01 04:01:46 -0700</delta_ts>
            <desc>patch: check skia safety of path on conversion to local coordinates</desc>
            <filename>skiaclip.patch</filename>
            <type>text/plain</type>
            <size>3756</size>
            <attacher name="Roland Steiner">rolandsteiner</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiA0Nzg2MS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