diff options
author | mitz@apple.com <mitz@apple.com@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2008-08-25 03:22:44 +0000 |
---|---|---|
committer | mitz@apple.com <mitz@apple.com@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2008-08-25 03:22:44 +0000 |
commit | 400ae11c5990ea3e26fcc3cfeaa43e308a25cf9e (patch) | |
tree | 033880ad61c0f28e4e9038430acac0b8d11d4395 | |
parent | 1808d8437bb746bef0fbea6c6e2647eab48f9165 (diff) | |
download | chromium_src-400ae11c5990ea3e26fcc3cfeaa43e308a25cf9e.zip chromium_src-400ae11c5990ea3e26fcc3cfeaa43e308a25cf9e.tar.gz chromium_src-400ae11c5990ea3e26fcc3cfeaa43e308a25cf9e.tar.bz2 |
WebCore:
Reviewed by Darin Adler.
- fix <rdar://problem/6065547> REGRESSION (r34879): "Subject" in unread emails in Yahoo mail is not shown in bold
Test: fast/css/font-property-priority.html
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue): Changed to pass the 'important' flag
to the font-property-parsing functions.
(WebCore::CSSParser::parseFontStyle): Added an 'important' argument and
changed to use it rather than the m_important member.
(WebCore::CSSParser::parseFontVariant): Ditto.
(WebCore::CSSParser::parseFontWeight): Ditto.
* css/CSSParser.h:
LayoutTests:
Reviewed by Darin Adler.
- test for <rdar://problem/6065547> REGRESSION (r34879): "Subject" in unread emails in Yahoo mail is not shown in bold
* fast/css/font-property-priority-expected.txt: Added.
* fast/css/font-property-priority.html: Added.
git-svn-id: svn://svn.chromium.org/blink/trunk@35910 bbb929c8-8fbe-4397-9dbb-9b2b20218538
6 files changed, 72 insertions, 15 deletions
diff --git a/third_party/WebKit/LayoutTests/ChangeLog b/third_party/WebKit/LayoutTests/ChangeLog index 3ee1889..e3018f1 100644 --- a/third_party/WebKit/LayoutTests/ChangeLog +++ b/third_party/WebKit/LayoutTests/ChangeLog @@ -1,3 +1,12 @@ +2008-08-24 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + - test for <rdar://problem/6065547> REGRESSION (r34879): "Subject" in unread emails in Yahoo mail is not shown in bold + + * fast/css/font-property-priority-expected.txt: Added. + * fast/css/font-property-priority.html: Added. + 2008-08-24 Rob Buis <buis@kde.org> Reviewed by Sam Weinig. diff --git a/third_party/WebKit/LayoutTests/fast/css/font-property-priority-expected.txt b/third_party/WebKit/LayoutTests/fast/css/font-property-priority-expected.txt new file mode 100644 index 0000000..2f5b1b4 --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/css/font-property-priority-expected.txt @@ -0,0 +1,6 @@ +Test for rdar://problem/6065547 REGRESSION (r34879): "Subject" in unread emails in Yahoo mail is not shown in bold. + +Property 'font-weight' has priority 'important'. +Property 'font-variant' has priority 'important'. +Property 'font-style' has priority 'important'. + diff --git a/third_party/WebKit/LayoutTests/fast/css/font-property-priority.html b/third_party/WebKit/LayoutTests/fast/css/font-property-priority.html new file mode 100644 index 0000000..e17d735 --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/css/font-property-priority.html @@ -0,0 +1,25 @@ +<style id="style"> + test { font-weight: bold !important; font-variant: small-caps !important; font-style: italic !important; } +</style> +<p> + Test for <i><a href="rdar://problem/6065547">rdar://problem/6065547</a> + REGRESSION (r34879): "Subject" in unread emails in Yahoo mail is not shown in bold</i>. +</p> +<pre id="console"></pre> +<script> + function log(message) + { + document.getElementById("console").appendChild(document.createTextNode(message + "\n")); + } + + if (window.layoutTestController) + layoutTestController.dumpAsText(); + + var styleDeclaration = document.getElementById("style").sheet.rules[0].style; + + for (var i = 0; i < styleDeclaration.length; ++i) { + var propertyName = styleDeclaration[i]; + var priority = styleDeclaration.getPropertyPriority(propertyName); + log("Property '" + propertyName + "' has priority '" + priority + "'."); + } +</script> diff --git a/third_party/WebKit/WebCore/ChangeLog b/third_party/WebKit/WebCore/ChangeLog index cb24ccc..2e0a77c 100644 --- a/third_party/WebKit/WebCore/ChangeLog +++ b/third_party/WebKit/WebCore/ChangeLog @@ -1,3 +1,20 @@ +2008-08-24 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + - fix <rdar://problem/6065547> REGRESSION (r34879): "Subject" in unread emails in Yahoo mail is not shown in bold + + Test: fast/css/font-property-priority.html + + * css/CSSParser.cpp: + (WebCore::CSSParser::parseValue): Changed to pass the 'important' flag + to the font-property-parsing functions. + (WebCore::CSSParser::parseFontStyle): Added an 'important' argument and + changed to use it rather than the m_important member. + (WebCore::CSSParser::parseFontVariant): Ditto. + (WebCore::CSSParser::parseFontWeight): Ditto. + * css/CSSParser.h: + 2008-08-24 Timothy Hatcher <timothy@apple.com> Fixes a bug where the Inspector's UI would not animate or diff --git a/third_party/WebKit/WebCore/css/CSSParser.cpp b/third_party/WebKit/WebCore/css/CSSParser.cpp index a578db0..9435e37 100644 --- a/third_party/WebKit/WebCore/css/CSSParser.cpp +++ b/third_party/WebKit/WebCore/css/CSSParser.cpp @@ -735,7 +735,7 @@ bool CSSParser::parseValue(int propId, bool important) break; case CSSPropertyFontWeight: // normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit - return parseFontWeight(); + return parseFontWeight(important); case CSSPropertyBorderSpacing: { const int properties[2] = { CSSPropertyWebkitBorderHorizontalSpacing, @@ -970,10 +970,10 @@ bool CSSParser::parseValue(int propId, bool important) break; case CSSPropertyFontStyle: // normal | italic | oblique | inherit - return parseFontStyle(); + return parseFontStyle(important); case CSSPropertyFontVariant: // normal | small-caps | inherit - return parseFontVariant(); + return parseFontVariant(important); case CSSPropertyVerticalAlign: // baseline | sub | super | top | text-top | middle | bottom | text-bottom | @@ -2917,7 +2917,7 @@ PassRefPtr<CSSValueList> CSSParser::parseFontFamily() return list.release(); } -bool CSSParser::parseFontStyle() +bool CSSParser::parseFontStyle(bool important) { RefPtr<CSSValueList> values; if (m_valueList->size() > 1) @@ -2950,21 +2950,21 @@ bool CSSParser::parseFontStyle() if (values) values->append(parsedValue.release()); else { - addProperty(CSSPropertyFontStyle, parsedValue.release(), m_important); + addProperty(CSSPropertyFontStyle, parsedValue.release(), important); return true; } } if (values && values->length()) { m_hasFontFaceOnlyValues = true; - addProperty(CSSPropertyFontStyle, values.release(), m_important); + addProperty(CSSPropertyFontStyle, values.release(), important); return true; } return false; } -bool CSSParser::parseFontVariant() +bool CSSParser::parseFontVariant(bool important) { RefPtr<CSSValueList> values; if (m_valueList->size() > 1) @@ -2997,21 +2997,21 @@ bool CSSParser::parseFontVariant() if (values) values->append(parsedValue.release()); else { - addProperty(CSSPropertyFontVariant, parsedValue.release(), m_important); + addProperty(CSSPropertyFontVariant, parsedValue.release(), important); return true; } } if (values && values->length()) { m_hasFontFaceOnlyValues = true; - addProperty(CSSPropertyFontVariant, values.release(), m_important); + addProperty(CSSPropertyFontVariant, values.release(), important); return true; } return false; } -bool CSSParser::parseFontWeight() +bool CSSParser::parseFontWeight(bool important) { RefPtr<CSSValueList> values; if (m_valueList->size() > 1) @@ -3050,14 +3050,14 @@ bool CSSParser::parseFontWeight() if (values) values->append(parsedValue.release()); else { - addProperty(CSSPropertyFontWeight, parsedValue.release(), m_important); + addProperty(CSSPropertyFontWeight, parsedValue.release(), important); return true; } } if (values && values->length()) { m_hasFontFaceOnlyValues = true; - addProperty(CSSPropertyFontWeight, values.release(), m_important); + addProperty(CSSPropertyFontWeight, values.release(), important); return true; } diff --git a/third_party/WebKit/WebCore/css/CSSParser.h b/third_party/WebKit/WebCore/css/CSSParser.h index 1e4b843..c9d21bc 100644 --- a/third_party/WebKit/WebCore/css/CSSParser.h +++ b/third_party/WebKit/WebCore/css/CSSParser.h @@ -120,9 +120,9 @@ namespace WebCore { static bool parseColor(const String&, RGBA32& rgb, bool strict); - bool parseFontStyle(); - bool parseFontVariant(); - bool parseFontWeight(); + bool parseFontStyle(bool important); + bool parseFontVariant(bool important); + bool parseFontWeight(bool important); bool parseFontFaceSrc(); bool parseFontFaceUnicodeRange(); |