Changeset 154856 in webkit


Ignore:
Timestamp:
Aug 29, 2013, 5:07:33 PM (12 years ago)
Author:
timothy_horton@apple.com
Message:

SVG clipping, masking, and gradients-on-text do not respect the device scale factor
https://bugs.webkit.org/show_bug.cgi?id=120377
<rdar://problem/14777944>

Reviewed by Simon Fraser.

Tests: svg/custom/masking-clipping-hidpi.svg

calculateTransformationToOutermostCoordinateSystem should include the page's
device scale factor in its transform.

  • rendering/svg/SVGRenderingContext.cpp:

(WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem):

Add a test that ensures that when deviceScaleFactor=2, masks, clipping,
gradients, and patterns are rendered @2x.

  • svg/custom/masking-clipping-hidpi-expected.svg: Added.
  • svg/custom/masking-clipping-hidpi.svg: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r154855 r154856  
     12013-08-29  Tim Horton  <timothy_horton@apple.com>
     2
     3        SVG clipping, masking, and gradients-on-text do not respect the device scale factor
     4        https://bugs.webkit.org/show_bug.cgi?id=120377
     5        <rdar://problem/14777944>
     6
     7        Reviewed by Simon Fraser.
     8
     9        Add a test that ensures that when deviceScaleFactor=2, masks, clipping,
     10        gradients, and patterns are rendered @2x.
     11
     12        * svg/custom/masking-clipping-hidpi-expected.svg: Added.
     13        * svg/custom/masking-clipping-hidpi.svg: Added.
     14
    1152013-08-29  Chris Fleizach  <cfleizach@apple.com>
    216
  • trunk/Source/WebCore/ChangeLog

    r154855 r154856  
     12013-08-29  Tim Horton  <timothy_horton@apple.com>
     2
     3        SVG clipping, masking, and gradients-on-text do not respect the device scale factor
     4        https://bugs.webkit.org/show_bug.cgi?id=120377
     5        <rdar://problem/14777944>
     6
     7        Reviewed by Simon Fraser.
     8
     9        Tests: svg/custom/masking-clipping-hidpi.svg
     10
     11        calculateTransformationToOutermostCoordinateSystem should include the page's
     12        device scale factor in its transform.
     13
     14        * rendering/svg/SVGRenderingContext.cpp:
     15        (WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem):
     16
    1172013-08-29  Chris Fleizach  <cfleizach@apple.com>
    218
  • trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp

    r154554 r154856  
    3131#include "Frame.h"
    3232#include "FrameView.h"
     33#include "Page.h"
    3334#include "RenderLayer.h"
    3435#include "RenderSVGImage.h"
     
    199200    absoluteTransform = currentContentTransformation();
    200201
     202    float deviceScaleFactor = 1;
     203    if (Page* page = renderer->document().page())
     204        deviceScaleFactor = page->deviceScaleFactor();
     205
    201206    // Walk up the render tree, accumulating SVG transforms.
    202207    while (renderer) {
     
    219224        layer = layer->parent();
    220225    }
     226
     227    absoluteTransform.scale(deviceScaleFactor);
    221228}
    222229
Note: See TracChangeset for help on using the changeset viewer.