| Differences between
and this patch
- a/Source/WebCore/ChangeLog +22 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2016-02-22  Gwang Yoon Hwang  <yoon@igalia.com>
2
3
        [GTK] scroll with transparent background not repainted after scrollY >= 32768
4
        https://bugs.webkit.org/show_bug.cgi?id=154283
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        If the Cairo's matrix exceeds the limit of Pixman's maximum int size (which is
9
        15bit), Cairo does not render bitmap because the given matrix is invalid.  When
10
        we scroll a page which has a patterned bitmap as a background to more than the
11
        Pixman's maximum int size, it simply doesn't render anything as background and
12
        the target surface ends up with a transparent background.
13
14
        This patch translates the CTM of Cairo's context when we drawing patterns to
15
        the context to remove invisible area. Because it is a pattern there is no
16
        visual difference between drawing tiles from the visible area and the beginning
17
        of the page. But it is more natural to draw tiles from the visible area for the
18
        performance.
19
20
        * platform/graphics/cairo/CairoUtilities.cpp:
21
        (WebCore::drawPatternToCairoContext):
22
1
2016-02-22  Daniel Bates  <dabates@apple.com>
23
2016-02-22  Daniel Bates  <dabates@apple.com>
2
24
3
        REGRESSION (r196892): Crash in DocumentLoader::startLoadingMainResource()
25
        REGRESSION (r196892): Crash in DocumentLoader::startLoadingMainResource()
- a/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp +11 lines
Lines 197-202 void drawPatternToCairoContext(cairo_t* cr, cairo_surface_t* image, const IntSiz a/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp_sec1
197
        image = clippedImageSurface.get();
197
        image = clippedImageSurface.get();
198
    }
198
    }
199
199
200
    cairo_matrix_t ctm;
201
    double dx = 0, dy = 0;
202
    cairo_get_matrix(cr, &ctm);
203
    cairo_matrix_transform_point(&ctm, &dx, &dy);
204
205
    if (dx < 0)
206
        dx = std::floor(std::abs(dx / tileRect.width()));
207
    if (dy < 0)
208
        dy = std::floor(std::abs(dy / tileRect.height()));
209
    cairo_translate(cr, dx, dy);
210
200
    cairo_pattern_t* pattern = cairo_pattern_create_for_surface(image);
211
    cairo_pattern_t* pattern = cairo_pattern_create_for_surface(image);
201
    cairo_pattern_set_extend(pattern, CAIRO_EXTEND_REPEAT);
212
    cairo_pattern_set_extend(pattern, CAIRO_EXTEND_REPEAT);
202
213

Return to Bug 154283