Bug 130643

Summary: Subpixel rendering: Transition class Image (and its dependencies) from int to float to enable subpixel positioned/sized images.
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, bunhere, cdumez, cmarcelo, commit-queue, dino, d-r, esprehn+autocc, fmalita, glenn, gyuyoung.kim, japhet, kondapallykalyan, luiz, macpherson, menard, noam, pdr, rniwa, roger_fong, schenney, sergio, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 130659    
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from webkit-ews-15 for mac-mountainlion-wk2
none
Archive of layout-test-results from webkit-ews-02 for mac-mountainlion
none
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Archive of layout-test-results from webkit-ews-14 for mac-mountainlion-wk2
none
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Description zalan 2014-03-22 12:46:25 PDT
This is in preparation to support subpixel (background)images.
Comment 1 zalan 2014-03-22 13:09:57 PDT
Created attachment 227565 [details]
Patch
Comment 2 Build Bot 2014-03-22 14:23:47 PDT
Comment on attachment 227565 [details]
Patch

Attachment 227565 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/4898611695452160

New failing tests:
svg/filters/feImage-position.svg
svg/W3C-SVG-1.1/filters-displace-01-f.svg
svg/filters/feImage-subregions.svg
svg/custom/feDisplacementMap-01.svg
svg/filters/feImage-target-id-change.svg
svg/W3C-SVG-1.1-SE/filters-image-05-f.svg
svg/filters/feImage-target-inline-style-change.svg
svg/filters/feImage-multiple-targets-id-change.svg
svg/filters/feImage-target-attribute-change-with-use-indirection.svg
svg/filters/feImage-target-changes-id.svg
svg/filters/feImage-reference-svg-primitive.svg
svg/filters/feImage-remove-target.svg
fast/repaint/obscured-background-no-repaint.html
svg/filters/feImage-subregions-preseveAspectRatio-none.svg
svg/filters/feImage-target-add-to-document.svg
svg/W3C-SVG-1.1/filters-composite-02-b.svg
svg/filters/feImage-late-indirect-update.svg
svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse.svg
svg/W3C-SVG-1.1-SE/filters-image-03-f.svg
svg/filters/feImage-preserveAspectratio.svg
svg/filters/feImage-change-target-id.svg
svg/filters/feImage-target-attribute-change.svg
svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse.svg
svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox.svg
svg/filters/feImage-preserveAspectRatio-all.svg
svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox.svg
svg/filters/feImage-reference-invalidation.svg
svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox.svg
svg/filters/feImage-target-attribute-change-with-use-indirection-2.svg
svg/W3C-SVG-1.1/filters-image-01-b.svg
Comment 3 Build Bot 2014-03-22 14:23:57 PDT
Created attachment 227572 [details]
Archive of layout-test-results from webkit-ews-15 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-15  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 4 Build Bot 2014-03-22 15:02:14 PDT
Comment on attachment 227565 [details]
Patch

Attachment 227565 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/4854492986081280

New failing tests:
svg/filters/feImage-position.svg
svg/W3C-SVG-1.1/filters-displace-01-f.svg
svg/filters/feImage-subregions.svg
svg/custom/feDisplacementMap-01.svg
svg/filters/feImage-target-id-change.svg
svg/W3C-SVG-1.1-SE/filters-image-05-f.svg
svg/filters/feImage-target-inline-style-change.svg
svg/filters/feImage-multiple-targets-id-change.svg
svg/filters/feImage-target-attribute-change-with-use-indirection.svg
svg/filters/feImage-target-changes-id.svg
svg/filters/feImage-reference-svg-primitive.svg
svg/filters/feImage-remove-target.svg
svg/filters/feImage-subregions-preseveAspectRatio-none.svg
svg/filters/feImage-target-add-to-document.svg
svg/W3C-SVG-1.1/filters-composite-02-b.svg
svg/filters/feImage-late-indirect-update.svg
svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse.svg
svg/W3C-SVG-1.1-SE/filters-image-03-f.svg
svg/filters/feImage-preserveAspectratio.svg
svg/filters/feImage-target-property-change.svg
svg/filters/feImage-change-target-id.svg
svg/filters/feImage-target-attribute-change.svg
svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse.svg
svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox.svg
svg/filters/feImage-preserveAspectRatio-all.svg
svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox.svg
svg/filters/feImage-reference-invalidation.svg
svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox.svg
svg/filters/feImage-target-attribute-change-with-use-indirection-2.svg
svg/W3C-SVG-1.1/filters-image-01-b.svg
Comment 5 Build Bot 2014-03-22 15:02:30 PDT
Created attachment 227575 [details]
Archive of layout-test-results from webkit-ews-02 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-02  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 6 zalan 2014-03-22 15:43:16 PDT
all output format diffs:
[feImage image-size="400x400"]
vs.
[feImage image-size="400.00x400.00"]
Comment 7 Build Bot 2014-03-22 15:52:06 PDT
Comment on attachment 227565 [details]
Patch

Attachment 227565 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/6684080334700544

New failing tests:
svg/filters/feImage-position.svg
svg/W3C-SVG-1.1/filters-displace-01-f.svg
svg/filters/feImage-subregions.svg
svg/custom/feDisplacementMap-01.svg
svg/filters/feImage-target-id-change.svg
svg/W3C-SVG-1.1-SE/filters-image-05-f.svg
svg/filters/feImage-target-inline-style-change.svg
svg/filters/feImage-multiple-targets-id-change.svg
svg/filters/feImage-target-attribute-change-with-use-indirection.svg
svg/filters/feImage-target-changes-id.svg
svg/filters/feImage-reference-svg-primitive.svg
svg/filters/feImage-remove-target.svg
svg/filters/feImage-subregions-preseveAspectRatio-none.svg
svg/filters/feImage-target-add-to-document.svg
svg/W3C-SVG-1.1/filters-composite-02-b.svg
svg/filters/feImage-late-indirect-update.svg
svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse.svg
svg/W3C-SVG-1.1-SE/filters-image-03-f.svg
svg/filters/feImage-preserveAspectratio.svg
svg/filters/feImage-target-property-change.svg
svg/filters/feImage-change-target-id.svg
svg/filters/feImage-target-attribute-change.svg
svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse.svg
svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox.svg
svg/filters/feImage-preserveAspectRatio-all.svg
svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox.svg
svg/filters/feImage-reference-invalidation.svg
svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox.svg
svg/filters/feImage-target-attribute-change-with-use-indirection-2.svg
svg/W3C-SVG-1.1/filters-image-01-b.svg
Comment 8 Build Bot 2014-03-22 15:52:17 PDT
Created attachment 227577 [details]
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-01  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 9 zalan 2014-03-22 16:58:53 PDT
Created attachment 227580 [details]
Patch
Comment 10 zalan 2014-03-22 17:22:12 PDT
Created attachment 227585 [details]
Patch
Comment 11 zalan 2014-03-22 17:35:54 PDT
Created attachment 227586 [details]
Patch
Comment 12 zalan 2014-03-22 18:26:13 PDT
Created attachment 227590 [details]
Patch
Comment 13 zalan 2014-03-22 18:35:08 PDT
Created attachment 227592 [details]
Patch
Comment 14 Build Bot 2014-03-22 21:41:32 PDT
Comment on attachment 227592 [details]
Patch

Attachment 227592 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/5089898532962304

New failing tests:
svg/W3C-SVG-1.1/filters-composite-02-b.svg
svg/W3C-SVG-1.1/filters-displace-01-f.svg
svg/filters/feImage-preserveAspectRatio-all.svg
svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse.svg
svg/W3C-SVG-1.1/filters-image-01-b.svg
svg/filters/feImage-reference-svg-primitive.svg
svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox.svg
svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse.svg
svg/filters/feImage-target-attribute-change-with-use-indirection-2.svg
svg/W3C-SVG-1.1-SE/filters-image-03-f.svg
svg/filters/feImage-preserveAspectratio.svg
svg/W3C-SVG-1.1-SE/filters-image-05-f.svg
svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox.svg
svg/filters/feImage-subregions-preseveAspectRatio-none.svg
Comment 15 Build Bot 2014-03-22 21:41:39 PDT
Created attachment 227599 [details]
Archive of layout-test-results from webkit-ews-14 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-14  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 16 Build Bot 2014-03-22 21:44:43 PDT
Comment on attachment 227592 [details]
Patch

Attachment 227592 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/5651434905272320

New failing tests:
svg/W3C-SVG-1.1/filters-composite-02-b.svg
svg/W3C-SVG-1.1/filters-displace-01-f.svg
svg/filters/feImage-preserveAspectRatio-all.svg
svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse.svg
svg/W3C-SVG-1.1/filters-image-01-b.svg
svg/filters/feImage-reference-svg-primitive.svg
svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox.svg
svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse.svg
svg/filters/feImage-target-attribute-change-with-use-indirection-2.svg
svg/W3C-SVG-1.1-SE/filters-image-03-f.svg
svg/filters/feImage-preserveAspectratio.svg
svg/W3C-SVG-1.1-SE/filters-image-05-f.svg
svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox.svg
svg/filters/feImage-subregions-preseveAspectRatio-none.svg
Comment 17 Build Bot 2014-03-22 21:44:50 PDT
Created attachment 227600 [details]
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-07  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 18 zalan 2014-03-22 21:50:17 PDT
Created attachment 227601 [details]
Patch
Comment 19 zalan 2014-03-22 22:17:59 PDT
Created attachment 227602 [details]
Patch
Comment 20 zalan 2014-03-22 22:51:49 PDT
Created attachment 227604 [details]
Patch
Comment 21 zalan 2014-03-23 00:02:35 PDT
Created attachment 227607 [details]
Patch
Comment 22 zalan 2014-03-23 00:32:15 PDT
omg finally.
Comment 23 zalan 2014-03-23 08:24:56 PDT
Created attachment 227611 [details]
Patch
Comment 24 zalan 2014-03-23 08:25:23 PDT
Comment on attachment 227611 [details]
Patch

almost.
Comment 25 zalan 2014-03-23 10:23:05 PDT
yay
Comment 26 Simon Fraser (smfr) 2014-03-24 15:08:46 PDT
Comment on attachment 227611 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=227611&action=review

> Source/WebCore/platform/graphics/IntPoint.cpp:43
> +IntPoint::IntPoint(const FloatPoint& p)
> +    : m_x(clampToInteger(p.x()))
> +    , m_y(clampToInteger(p.y()))
> +{
> +}

Shouldn't this be up next to the other constructors?

> Source/WebCore/platform/graphics/IntSize.cpp:43
> +IntSize::IntSize(const FloatSize& s)
> +    : m_width(clampToInteger(s.width()))
> +    , m_height(clampToInteger(s.height()))
> +{
> +}

Ditto.

> Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp:128
> +    : m_data(IntSize(size)) // NOTE: The input here isn't important as ImageBufferDataCG's constructor just ignores it.

I wonder if we should have a IntSize expectedIntegeralSize(const FloatSize&) which asserts if not integral?

> LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/filters-image-03-f-expected.txt:9
> +          [feImage image-size="100.00x100.00"]

Can't we just be smarter about dumping?
Comment 27 zalan 2014-03-31 20:07:10 PDT
(In reply to comment #26)
> (From update of attachment 227611 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=227611&action=review
> 
> > Source/WebCore/platform/graphics/IntPoint.cpp:43
> > +IntPoint::IntPoint(const FloatPoint& p)
> > +    : m_x(clampToInteger(p.x()))
> > +    , m_y(clampToInteger(p.y()))
> > +{
> > +}
> 
> Shouldn't this be up next to the other constructors?
> 
> > Source/WebCore/platform/graphics/IntSize.cpp:43
> > +IntSize::IntSize(const FloatSize& s)
> > +    : m_width(clampToInteger(s.width()))
> > +    , m_height(clampToInteger(s.height()))
> > +{
> > +}
> 
> Ditto.
> 
Don't want to include Float* in the .h.

> > Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp:128
> > +    : m_data(IntSize(size)) // NOTE: The input here isn't important as ImageBufferDataCG's constructor just ignores it.
> 
> I wonder if we should have a IntSize expectedIntegeralSize(const FloatSize&) which asserts if not integral?
> 
Good idea. I'll add that in an upcoming patch.

> > LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/filters-image-03-f-expected.txt:9
> > +          [feImage image-size="100.00x100.00"]
> 
> Can't we just be smarter about dumping?
Yes and I have a bug on that. I think making that change should be in a separate patch. It requires rebaselining.
Comment 28 zalan 2014-03-31 20:12:48 PDT
Created attachment 228235 [details]
Patch
Comment 29 zalan 2014-03-31 20:13:04 PDT
Comment on attachment 228235 [details]
Patch

EWS
Comment 30 WebKit Commit Bot 2014-04-01 07:18:25 PDT
Comment on attachment 228235 [details]
Patch

Clearing flags on attachment: 228235

Committed r166582: <http://trac.webkit.org/changeset/166582>
Comment 31 WebKit Commit Bot 2014-04-01 07:18:36 PDT
All reviewed patches have been landed.  Closing bug.