Changeset 128076 in webkit
- Timestamp:
- Sep 10, 2012 10:20:54 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r128075 r128076 1 2012-09-10 Thiago Marcos P. Santos <thiago.santos@intel.com> 2 3 Font value should be parsed as a individual property 4 https://bugs.webkit.org/show_bug.cgi?id=96271 5 6 Reviewed by Eric Seidel. 7 8 Updated test to the latest W3C approved version. It adds a test 9 that verifies this fix. 10 11 * canvas/philip/tests/2d.text.font.parse.invalid.html: 12 1 13 2012-09-10 Silvia Pfeiffer <silviapf@chromium.org> 2 14 -
trunk/LayoutTests/canvas/philip/tests/2d.text.font.parse.invalid.html
r71481 r128076 40 40 _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); 41 41 42 ctx.font = '20px serif'; 43 ctx.font = '1em serif; background: green; margin: 10px'; 44 _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); 42 45 43 46 }); -
trunk/Source/WebCore/ChangeLog
r128075 r128076 1 2012-09-10 Thiago Marcos P. Santos <thiago.santos@intel.com> 2 3 Font value should be parsed as a individual property 4 https://bugs.webkit.org/show_bug.cgi?id=96271 5 6 Reviewed by Eric Seidel. 7 8 Parsing the font value as an individual CSS property instead of a style 9 body should make it significantly more effective and will not 10 validate something like ctx.font = "25px serif; background: green". 11 12 Updated canvas/philip/tests/2d.text.font.parse.invalid.html to cover 13 this use case. 14 15 * html/canvas/CanvasRenderingContext2D.cpp: 16 (WebCore::CanvasRenderingContext2D::setFont): 17 1 18 2012-09-10 Silvia Pfeiffer <silviapf@chromium.org> 2 19 -
trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
r128014 r128076 2027 2027 { 2028 2028 RefPtr<StylePropertySet> parsedStyle = StylePropertySet::create(); 2029 CSSParser (strictToCSSParserMode(!m_usesCSSCompatibilityParseMode)).parseDeclaration(parsedStyle.get(), "font:" + newFont, 0, 0);2029 CSSParser::parseValue(parsedStyle.get(), CSSPropertyFont, newFont, true, strictToCSSParserMode(!m_usesCSSCompatibilityParseMode), 0); 2030 2030 if (parsedStyle->isEmpty()) 2031 2031 return;
Note: See TracChangeset
for help on using the changeset viewer.