Changeset 55773 in webkit
- Timestamp:
- Mar 10, 2010 2:44:29 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r55766 r55773 1 2010-03-07 Holger Hans Peter Freyther <zecke@selfish.org> 2 3 Reviewed by Darin Adler. 4 5 [CAIRO] DoS on iexploder test with high text stroke width. 6 https://bugs.webkit.org/show_bug.cgi?id=33759 7 8 Add a test case with the -webkit-text-stroke-width attribute 9 set to a high value to illustrate the issue. 10 11 * fast/text/text-stroke-width-cairo-dos-expected.txt: Added. 12 * fast/text/text-stroke-width-cairo-dos.html: Added. 13 1 14 2010-03-10 Roland Steiner <rolandsteiner@chromium.org> 2 15 -
trunk/WebCore/ChangeLog
r55771 r55773 1 2010-03-07 Holger Hans Peter Freyther <zecke@selfish.org> 2 3 Reviewed by Darin Adler. 4 5 [CAIRO] DoS on iexploder test with high text stroke width. 6 https://bugs.webkit.org/show_bug.cgi?id=33759 7 8 Specifying a big text stroke width can make WebKitGTK+ spend 9 a very long time in the cairo library for stroking the path of 10 the text. The best way to prevent this from happening right now 11 is to not stroke paths with a certain width. Samuel proposed to 12 not stroke with a width that is twice the width of the text. The 13 reason to use twice the text width is that even one stroke of 14 any charachter to be drawn would cover the full width. 15 16 Test: fast/text/text-stroke-width-cairo-dos.html 17 18 * platform/graphics/cairo/FontCairo.cpp: 19 (WebCore::Font::drawGlyphs): 20 1 21 2010-03-10 Andrey Kosyakov <caseq@chromium.org> 2 22 -
trunk/WebCore/platform/graphics/cairo/FontCairo.cpp
r54503 r55773 4 4 * Copyright (C) 2007, 2008 Alp Toker <alp@atoker.com> 5 5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 6 * Copyright (C) 2010 Holger Hans Peter Freyther 6 7 * 7 8 * Redistribution and use in source and binary forms, with or without … … 158 159 } 159 160 160 if (context->textDrawingMode() & cTextStroke) { 161 // Prevent running into a long computation within cairo. If the stroke width is 162 // twice the size of the width of the text we will not ask cairo to stroke 163 // the text as even one single stroke would cover the full wdth of the text. 164 // See https://bugs.webkit.org/show_bug.cgi?id=33759. 165 if (context->textDrawingMode() & cTextStroke && context->strokeThickness() < 2 * offset) { 161 166 if (context->strokeGradient()) { 162 167 cairo_set_source(cr, context->strokeGradient()->platformGradient());
Note: See TracChangeset
for help on using the changeset viewer.