<?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>116348</bug_id>
          
          <creation_ts>2013-05-17 13:47:36 -0700</creation_ts>
          <short_desc>[CSS Shapes] Add support for shapes defined by an image and a threshold</short_desc>
          <delta_ts>2014-02-07 13:46:38 -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>CSS</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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>
          <dependson>116349</dependson>
    
    <dependson>116643</dependson>
    
    <dependson>119809</dependson>
    
    <dependson>119849</dependson>
    
    <dependson>121619</dependson>
    
    <dependson>122216</dependson>
    
    <dependson>122340</dependson>
    
    <dependson>122613</dependson>
    
    <dependson>123114</dependson>
    
    <dependson>123295</dependson>
    
    <dependson>123743</dependson>
    
    <dependson>123769</dependson>
    
    <dependson>123934</dependson>
          <blocked>98664</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Hans Muller">giles_joplin</reporter>
          <assigned_to name="Hans Muller">giles_joplin</assigned_to>
          <cc>zoltan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>890652</commentid>
    <comment_count>0</comment_count>
    <who name="Hans Muller">giles_joplin</who>
    <bug_when>2013-05-17 13:47:36 -0700</bug_when>
    <thetext>This is the master bug for adding support for specifying exclusion shapes with an image and a threshold.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>899564</commentid>
    <comment_count>1</comment_count>
    <who name="Hans Muller">giles_joplin</who>
    <bug_when>2013-06-12 09:02:44 -0700</bug_when>
    <thetext>Additional TODO items per - https://bugs.webkit.org/show_bug.cgi?id=116643

- Add additional shape-inside tests: all alpha pixels below threshold, mutliple discontiguous boundaries, multiple discontiguous boundaries that are smaller than the minimum interval size.

- Complete shape-outside support.

- Implement the CSS shape-image-threshold property (currently the threshold is always 0)

- The internal representation of RasterShape could be created and processed more efficiently.

- The Shape::shapeMargin() and Shape::shapePadding() &gt;= 0 invariants should be ASSERTED by the createShape() methods, not by the const methods that use these values.

- Add support for GIFs. Per the Shapes spec, only frame0 of a GIF should be used to define a shape.

- Complete the implementation of RasterShape::firstIncludedIntervalLogicalTop(). Currently the first layout position isn&apos;t computed, it&apos;s assumed that layout can begin at the top of the shape.

- Complete the implementation for shape-margin.

- The implementation of RasterShapeIntervals::getIntervals() could be improved:
If lineRegion.isRect() then a simple check would suffice to determine if all/none of the lineRegion defines the return value.
We could avoid copying Vector&lt;IntRect&gt;s if Region::rects() had a return value reference parameter.
Processing lineRects could be done efficiently, by just compting the return value intervals directly.
If it&apos;s necessary to reuse a Region variable, a clear() method might reduce the cost a little.

- The implementation of Shape::createShape(const StyleImage* ...) needs to be completed:
The image shape should be clipped to the logicalBoxSize parameter.
The shape&apos;s logical coordinates should reflect the writingMode parameter.

- The image extraction support, notably the ImageExctractor class and the packImageData() function, should be hoisted out of the GraphicsContext3D class.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>917220</commentid>
    <comment_count>2</comment_count>
    <who name="Hans Muller">giles_joplin</who>
    <bug_when>2013-08-14 11:55:57 -0700</bug_when>
    <thetext>Images must currently be same-origin, see https://bugs.webkit.org/show_bug.cgi?id=117610

CORS-enabled fetch should be supported, see http://dev.w3.org/csswg/css-shapes/#shapes-from-image.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>935225</commentid>
    <comment_count>3</comment_count>
    <who name="Hans Muller">giles_joplin</who>
    <bug_when>2013-10-01 15:18:16 -0700</bug_when>
    <thetext> RasterShapeIntervals::computeShapeMarginIntervals() finds the extreme left and right limits of the margin-extended intervals on each row. This is sufficient for computing the shape-outside boundary for a left/right float and is substantially more efficient than needlessly computing the margin intervals for every interval on every row. When the code is extended to support Level 2 of the Shapes, specification we&apos;ll need to add support for computing the comprehensive shape margin boundary.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>978020</commentid>
    <comment_count>4</comment_count>
    <who name="Zoltan Horvath">zoltan</who>
    <bug_when>2014-02-07 13:46:38 -0800</bug_when>
    <thetext>The main functionality is landed. Closing bug.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>