Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Side by Side Diff: Source/core/css/resolver/StyleBuilderCustom.cpp

Issue 137813004: Multiple selectors setting relative font-weight names to an element result in a cumulative result (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Improve testcase Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/css3/font-weight-multiple-selectors-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 void StyleBuilderFunctions::applyValueCSSPropertyFontWeight(StyleResolverState& state, CSSValue* value) 278 void StyleBuilderFunctions::applyValueCSSPropertyFontWeight(StyleResolverState& state, CSSValue* value)
279 { 279 {
280 if (!value->isPrimitiveValue()) 280 if (!value->isPrimitiveValue())
281 return; 281 return;
282 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); 282 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
283 switch (primitiveValue->getValueID()) { 283 switch (primitiveValue->getValueID()) {
284 case CSSValueInvalid: 284 case CSSValueInvalid:
285 ASSERT_NOT_REACHED(); 285 ASSERT_NOT_REACHED();
286 break; 286 break;
287 case CSSValueBolder: 287 case CSSValueBolder:
288 state.fontBuilder().setWeight(state.parentStyle()->fontDescription().wei ght());
288 state.fontBuilder().setWeightBolder(); 289 state.fontBuilder().setWeightBolder();
289 break; 290 break;
290 case CSSValueLighter: 291 case CSSValueLighter:
292 state.fontBuilder().setWeight(state.parentStyle()->fontDescription().wei ght());
291 state.fontBuilder().setWeightLighter(); 293 state.fontBuilder().setWeightLighter();
292 break; 294 break;
293 default: 295 default:
294 state.fontBuilder().setWeight(*primitiveValue); 296 state.fontBuilder().setWeight(*primitiveValue);
295 } 297 }
296 } 298 }
297 299
298 void StyleBuilderFunctions::applyValueCSSPropertyLineHeight(StyleResolverState& state, CSSValue* value) 300 void StyleBuilderFunctions::applyValueCSSPropertyLineHeight(StyleResolverState& state, CSSValue* value)
299 { 301 {
300 if (!value->isPrimitiveValue()) 302 if (!value->isPrimitiveValue())
(...skipping 1909 matching lines...) Expand 10 before | Expand all | Expand 10 after
2210 break; 2212 break;
2211 } 2213 }
2212 case CSSPropertyEnableBackground: 2214 case CSSPropertyEnableBackground:
2213 // Silently ignoring this property for now 2215 // Silently ignoring this property for now
2214 // http://bugs.webkit.org/show_bug.cgi?id=6022 2216 // http://bugs.webkit.org/show_bug.cgi?id=6022
2215 break; 2217 break;
2216 } 2218 }
2217 } 2219 }
2218 2220
2219 } // namespace WebCore 2221 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/css3/font-weight-multiple-selectors-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698