WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-154283-20160501235937.patch (text/plain), 3.42 KB, created by
Gwang Yoon Hwang
on 2016-05-01 07:59:02 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Gwang Yoon Hwang
Created:
2016-05-01 07:59:02 PDT
Size:
3.42 KB
patch
obsolete
>Subversion Revision: 200303 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 1b5d560cefb269e7c63900863abcfbae8b05ea39..e09bbf4491ca803097cf0bb7847d5ea045cc15a4 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,25 @@ >+2016-02-23 Gwang Yoon Hwang <yoon@igalia.com> >+ >+ [GTK] scroll with transparent background not repainted after scrollY >= 32768 >+ https://bugs.webkit.org/show_bug.cgi?id=154283 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ If the Cairo's matrix exceeds the limit of Pixman's maximum int size (which is >+ 15bit), Cairo does not render bitmap because the given matrix is invalid. When >+ we scroll a page which has a patterned bitmap as a background to more than the >+ Pixman's maximum int size, it simply doesn't render anything as background and >+ the target surface ends up with a transparent background. >+ >+ This patch translates the CTM of Cairo's context when we drawing patterns to >+ the context to remove invisible area. Because it is a pattern there is no >+ visual difference between drawing tiles from the visible area and the beginning >+ of the page. But it is more natural to draw tiles from the visible area for the >+ performance. >+ >+ * platform/graphics/cairo/CairoUtilities.cpp: >+ (WebCore::drawPatternToCairoContext): >+ > 2016-04-30 Antti Koivisto <antti@apple.com> > > REGRESSION (r199640): position:absolute generated content inherits text-decoration from its element >diff --git a/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp b/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp >index 15e8ffcfb1b239551f7e3d430f10a7cb4afc213a..14ecb12b0f7bcf453efdc5e8a6b4be64d8f112b0 100644 >--- a/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp >+++ b/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp >@@ -198,6 +198,25 @@ void drawPatternToCairoContext(cairo_t* cr, cairo_surface_t* image, const IntSiz > image = clippedImageSurface.get(); > } > >+ // Cairo cannot convert a cairo_matrix to a Pixman's matrix >+ // if any of its components is bigger than maximum int size of Pixman. >+ // With this condition, Cairo gives up to draw given pattern entirely. >+ // To workaround this problem, we reduce the coordinate space by translating CTM and destRect. >+ cairo_matrix_t ctm; >+ cairo_get_matrix(cr, &ctm); >+ >+ double dx = 0, dy = 0; >+ cairo_matrix_transform_point(&ctm, &dx, &dy); >+ double xScale = 1, yScale = 1; >+ cairo_matrix_transform_distance(&ctm, &xScale, &yScale); >+ >+ dx = std::floor(-dx / tileRect.width()) * tileRect.width() / xScale; >+ dy = std::floor(-dy / tileRect.height()) * tileRect.height() / yScale; >+ cairo_translate(cr, dx, dy); >+ >+ FloatRect adjustedDestRect(destRect); >+ adjustedDestRect.move(-dx, -dy); >+ > cairo_pattern_t* pattern = cairo_pattern_create_for_surface(image); > cairo_pattern_set_extend(pattern, CAIRO_EXTEND_REPEAT); > >@@ -211,7 +230,7 @@ void drawPatternToCairoContext(cairo_t* cr, cairo_surface_t* image, const IntSiz > cairo_set_operator(cr, op); > cairo_set_source(cr, pattern); > cairo_pattern_destroy(pattern); >- cairo_rectangle(cr, destRect.x(), destRect.y(), destRect.width(), destRect.height()); >+ cairo_rectangle(cr, adjustedDestRect.x(), adjustedDestRect.y(), adjustedDestRect.width(), adjustedDestRect.height()); > cairo_fill(cr); > > cairo_restore(cr);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 154283
:
271986
|
272084
|
277862
|
301043
|
301047
|
301051
|
301744