Changeset 188935 in webkit


Ignore:
Timestamp:
Aug 25, 2015 3:44:45 PM (9 years ago)
Author:
Alan Bujtas
Message:

Using the filter functional notation for background images results in wrong background-size rendering
https://bugs.webkit.org/show_bug.cgi?id=148221
rdar://problem/22379518

Reviewed by Daniel Bates.

Do not ignore the size argument, when the filter image is being drawn onto the context.
When the size is ignored, we end up painting the image with its native size while the filter
is applied on the size of the generated image.

Source/WebCore:

Test: fast/filter-image/background-filter-image.html

  • css/CSSFilterImageValue.cpp:

(WebCore::CSSFilterImageValue::image):

LayoutTests:

  • fast/filter-image/background-filter-image-expected.html: Added.
  • fast/filter-image/background-filter-image.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r188930 r188935  
     12015-08-25  Zalan Bujtas  <zalan@apple.com>
     2
     3        Using the filter functional notation for background images results in wrong background-size rendering
     4        https://bugs.webkit.org/show_bug.cgi?id=148221
     5        rdar://problem/22379518
     6
     7        Reviewed by Daniel Bates.
     8
     9        Do not ignore the size argument, when the filter image is being drawn onto the context.
     10        When the size is ignored, we end up painting the image with its native size while the filter
     11        is applied on the size of the generated image.
     12
     13        * fast/filter-image/background-filter-image-expected.html: Added.
     14        * fast/filter-image/background-filter-image.html: Added.
     15
    1162015-08-25  Nan Wang  <n_wang@apple.com>
    217
  • trunk/Source/WebCore/ChangeLog

    r188931 r188935  
     12015-08-25  Zalan Bujtas  <zalan@apple.com>
     2
     3        Using the filter functional notation for background images results in wrong background-size rendering
     4        https://bugs.webkit.org/show_bug.cgi?id=148221
     5        rdar://problem/22379518
     6
     7        Reviewed by Daniel Bates.
     8
     9        Do not ignore the size argument, when the filter image is being drawn onto the context.
     10        When the size is ignored, we end up painting the image with its native size while the filter
     11        is applied on the size of the generated image.
     12
     13        Test: fast/filter-image/background-filter-image.html
     14
     15        * css/CSSFilterImageValue.cpp:
     16        (WebCore::CSSFilterImageValue::image):
     17
    1182015-08-25  Carlos Garcia Campos  <cgarcia@igalia.com>
    219
  • trunk/Source/WebCore/css/CSSFilterImageValue.cpp

    r188647 r188935  
    124124    if (!texture)
    125125        return Image::nullImage();
    126     texture->context()->drawImage(image, ColorSpaceDeviceRGB, IntPoint());
     126    FloatRect imageRect = FloatRect(FloatPoint(), size);
     127    texture->context()->drawImage(image, ColorSpaceDeviceRGB, imageRect);
    127128
    128129    RefPtr<FilterEffectRenderer> filterRenderer = FilterEffectRenderer::create();
    129130    filterRenderer->setSourceImage(WTF::move(texture));
    130     filterRenderer->setSourceImageRect(FloatRect(FloatPoint(), size));
    131     filterRenderer->setFilterRegion(FloatRect(FloatPoint(), size));
     131    filterRenderer->setSourceImageRect(imageRect);
     132    filterRenderer->setFilterRegion(imageRect);
    132133    if (!filterRenderer->build(renderer, m_filterOperations, FilterFunction))
    133134        return Image::nullImage();
Note: See TracChangeset for help on using the changeset viewer.