Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(348)

Issue 115053: Modify CSS Validator to coerce invalid font properties to valid ones. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
16 years, 9 months ago by MikeSamuel
Modified:
16 years, 9 months ago
Reviewers:
metaweta
CC:
google-caja-discuss_googlegroups.com
Base URL:
http://google-caja.googlecode.com/svn/trunk/
Visibility:
Public.

Description

http://code.google.com/p/google-caja/issues/detail?q=1105 This partly addresses issue 1105 Disallowed property values: font: x-small; font: 100%; font: arial; by coercing these to, respectively, font-size: x-small; font-size: 100%; font-family: arial; It takes care not to coerce things like font: inherit // Illegal, but has a clear meaning font: caption // Legal It does coerce some typos, and gives an error message at the right place, but possibly misleading since font: waption is coerced to font-family: "waption" instead of being reported with a bad property value message. font:waption is probably treated as an unknown font-name by most browsers, and previously we would not report a bad value message for the equally widgy font: 12px waption See the added testcases for details. Submitted @3713

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+173 lines, -13 lines) Patch
M src/com/google/caja/plugin/CssValidator.java View 6 chunks +78 lines, -5 lines 1 comment Download
M src/com/google/caja/plugin/PluginMessageType.java View 2 chunks +3 lines, -1 line 0 comments Download
M tests/com/google/caja/plugin/CssValidatorTest.java View 5 chunks +92 lines, -7 lines 0 comments Download

Messages

Total messages: 2
MikeSamuel
16 years, 9 months ago (2009-09-03 18:48:34 UTC) #1
metaweta
16 years, 9 months ago (2009-09-09 18:22:05 UTC) #2
LGTM

http://codereview.appspot.com/115053/diff/1/4
File src/com/google/caja/plugin/CssValidator.java (right):

http://codereview.appspot.com/115053/diff/1/4#newcode638
Line 638: if (matchCount == 1) {
Good--if it matches exactly one, then we accept it and not otherwise.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b