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

Side by Side Diff: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp

Issue 2520873002: [css-ui] Add support for caret-color property (Closed)
Patch Set: Add new baselines for Mac and Windows Created 4 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
7 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 7 * Copyright (C) 2011 Sencha, Inc. All rights reserved.
8 * Copyright (C) 2015 Google Inc. All rights reserved. 8 * Copyright (C) 2015 Google Inc. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 2187 matching lines...) Expand 10 before | Expand all | Expand 10 after
2198 case CSSPropertyWebkitBoxOrient: 2198 case CSSPropertyWebkitBoxOrient:
2199 return CSSIdentifierValue::create(style.boxOrient()); 2199 return CSSIdentifierValue::create(style.boxOrient());
2200 case CSSPropertyWebkitBoxPack: 2200 case CSSPropertyWebkitBoxPack:
2201 return CSSIdentifierValue::create(style.boxPack()); 2201 return CSSIdentifierValue::create(style.boxPack());
2202 case CSSPropertyWebkitBoxReflect: 2202 case CSSPropertyWebkitBoxReflect:
2203 return valueForReflection(style.boxReflect(), style); 2203 return valueForReflection(style.boxReflect(), style);
2204 case CSSPropertyBoxShadow: 2204 case CSSPropertyBoxShadow:
2205 return valueForShadowList(style.boxShadow(), style, true); 2205 return valueForShadowList(style.boxShadow(), style, true);
2206 case CSSPropertyCaptionSide: 2206 case CSSPropertyCaptionSide:
2207 return CSSIdentifierValue::create(style.captionSide()); 2207 return CSSIdentifierValue::create(style.captionSide());
2208 case CSSPropertyCaretColor:
2209 if (style.caretColor().isCurrentColor())
2210 return CSSIdentifierValue::create(CSSValueCurrentcolor);
2211 if (style.caretColor().isAutoColor())
2212 return CSSIdentifierValue::create(CSSValueAuto);
2213 return CSSColorValue::create(
2214 style.caretColor().resolve(style.color()).rgb());
Timothy Loh 2016/11/28 03:11:21 This line is weird, resolve() is to handle current
Manuel Rego 2016/11/28 10:47:55 Sure, I didn't realize before but it seems we don'
2208 case CSSPropertyClear: 2215 case CSSPropertyClear:
2209 return CSSIdentifierValue::create(style.clear()); 2216 return CSSIdentifierValue::create(style.clear());
2210 case CSSPropertyColor: 2217 case CSSPropertyColor:
2211 return CSSColorValue::create( 2218 return CSSColorValue::create(
2212 allowVisitedStyle 2219 allowVisitedStyle
2213 ? style.visitedDependentColor(CSSPropertyColor).rgb() 2220 ? style.visitedDependentColor(CSSPropertyColor).rgb()
2214 : style.color().rgb()); 2221 : style.color().rgb());
2215 case CSSPropertyWebkitPrintColorAdjust: 2222 case CSSPropertyWebkitPrintColorAdjust:
2216 return CSSIdentifierValue::create(style.getPrintColorAdjust()); 2223 return CSSIdentifierValue::create(style.getPrintColorAdjust());
2217 case CSSPropertyColumnCount: 2224 case CSSPropertyColumnCount:
(...skipping 1402 matching lines...) Expand 10 before | Expand all | Expand 10 after
3620 case CSSPropertyAll: 3627 case CSSPropertyAll:
3621 return nullptr; 3628 return nullptr;
3622 default: 3629 default:
3623 break; 3630 break;
3624 } 3631 }
3625 ASSERT_NOT_REACHED(); 3632 ASSERT_NOT_REACHED();
3626 return nullptr; 3633 return nullptr;
3627 } 3634 }
3628 3635
3629 } // namespace blink 3636 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698