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

Side by Side Diff: Source/core/css/CSSComputedStyleDeclaration.cpp

Issue 22482004: Add support for the object-fit CSS property. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Oops, sorry! Forgot to update UseCounter.cpp Created 7 years, 4 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
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. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 2083 matching lines...) Expand 10 before | Expand all | Expand 10 after
2094 case CSSPropertyMinHeight: 2094 case CSSPropertyMinHeight:
2095 // FIXME: For flex-items, min-height:auto should compute to min-cont ent. 2095 // FIXME: For flex-items, min-height:auto should compute to min-cont ent.
2096 if (style->minHeight().isAuto()) 2096 if (style->minHeight().isAuto())
2097 return zoomAdjustedPixelValue(0, style.get()); 2097 return zoomAdjustedPixelValue(0, style.get());
2098 return zoomAdjustedPixelValueForLength(style->minHeight(), style.get ()); 2098 return zoomAdjustedPixelValueForLength(style->minHeight(), style.get ());
2099 case CSSPropertyMinWidth: 2099 case CSSPropertyMinWidth:
2100 // FIXME: For flex-items, min-width:auto should compute to min-conte nt. 2100 // FIXME: For flex-items, min-width:auto should compute to min-conte nt.
2101 if (style->minWidth().isAuto()) 2101 if (style->minWidth().isAuto())
2102 return zoomAdjustedPixelValue(0, style.get()); 2102 return zoomAdjustedPixelValue(0, style.get());
2103 return zoomAdjustedPixelValueForLength(style->minWidth(), style.get( )); 2103 return zoomAdjustedPixelValueForLength(style->minWidth(), style.get( ));
2104 case CSSPropertyObjectFit:
2105 return cssValuePool().createValue(style->objectFit());
2104 case CSSPropertyOpacity: 2106 case CSSPropertyOpacity:
2105 return cssValuePool().createValue(style->opacity(), CSSPrimitiveValu e::CSS_NUMBER); 2107 return cssValuePool().createValue(style->opacity(), CSSPrimitiveValu e::CSS_NUMBER);
2106 case CSSPropertyOrphans: 2108 case CSSPropertyOrphans:
2107 if (style->hasAutoOrphans()) 2109 if (style->hasAutoOrphans())
2108 return cssValuePool().createIdentifierValue(CSSValueAuto); 2110 return cssValuePool().createIdentifierValue(CSSValueAuto);
2109 return cssValuePool().createValue(style->orphans(), CSSPrimitiveValu e::CSS_NUMBER); 2111 return cssValuePool().createValue(style->orphans(), CSSPrimitiveValu e::CSS_NUMBER);
2110 case CSSPropertyOutlineColor: 2112 case CSSPropertyOutlineColor:
2111 return currentColorOrValidColor(renderer, style.get(), CSSPropertyOu tlineColor); 2113 return currentColorOrValidColor(renderer, style.get(), CSSPropertyOu tlineColor);
2112 case CSSPropertyOutlineOffset: 2114 case CSSPropertyOutlineOffset:
2113 return zoomAdjustedPixelValue(style->outlineOffset(), style.get()); 2115 return zoomAdjustedPixelValue(style->outlineOffset(), style.get());
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
3071 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin, 3073 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin,
3072 CSSPropertyB ackgroundClip }; 3074 CSSPropertyB ackgroundClip };
3073 3075
3074 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); 3076 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
3075 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(CSSPropertyBackground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(prope rtiesBeforeSlashSeperator)))); 3077 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(CSSPropertyBackground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(prope rtiesBeforeSlashSeperator))));
3076 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(CSSPropertyBackground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(proper tiesAfterSlashSeperator)))); 3078 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(CSSPropertyBackground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(proper tiesAfterSlashSeperator))));
3077 return list.release(); 3079 return list.release();
3078 } 3080 }
3079 3081
3080 } // namespace WebCore 3082 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698