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

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

Issue 1350963004: Deprecate 'intrinsic' and 'min-intrinsic' CSS keywords, attempt 2 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 236
237 // SVG text layout code expects us to be a block-level style element. 237 // SVG text layout code expects us to be a block-level style element.
238 if ((isSVGForeignObjectElement(*e) || isSVGTextElement(*e)) && style.isD isplayInlineType()) 238 if ((isSVGForeignObjectElement(*e) || isSVGTextElement(*e)) && style.isD isplayInlineType())
239 style.setDisplay(BLOCK); 239 style.setDisplay(BLOCK);
240 240
241 // Columns don't apply to svg text elements. 241 // Columns don't apply to svg text elements.
242 if (isSVGTextElement(*e)) 242 if (isSVGTextElement(*e))
243 style.clearMultiCol(); 243 style.clearMultiCol();
244 } 244 }
245 adjustStyleForAlignment(style, parentStyle); 245 adjustStyleForAlignment(style, parentStyle);
246
247 if (e) {
248 if (style.width().type() == Intrinsic || style.minWidth().type() == Intr insic || style.maxWidth().type() == Intrinsic
249 || style.height().type() == Intrinsic || style.minHeight().type() == Intrinsic || style.maxHeight().type() == Intrinsic
250 || style.flexBasis().type() == Intrinsic)
251 UseCounter::countDeprecation(e->document(), UseCounter::LegacyCSSVal ueIntrinsic);
252 }
246 } 253 }
247 254
248 void StyleAdjuster::adjustStyleForFirstLetter(ComputedStyle& style) 255 void StyleAdjuster::adjustStyleForFirstLetter(ComputedStyle& style)
249 { 256 {
250 if (style.styleType() != FIRST_LETTER) 257 if (style.styleType() != FIRST_LETTER)
251 return; 258 return;
252 259
253 // Force inline display (except for floating first-letters). 260 // Force inline display (except for floating first-letters).
254 style.setDisplay(style.isFloating() ? BLOCK : INLINE); 261 style.setDisplay(style.isFloating() ? BLOCK : INLINE);
255 262
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 // We want to count vertical percentage paddings/margins on flex items b ecause our current 491 // We want to count vertical percentage paddings/margins on flex items b ecause our current
485 // behavior is different from the spec and we want to gather compatibili ty data. 492 // behavior is different from the spec and we want to gather compatibili ty data.
486 if (style.paddingBefore().hasPercent() || style.paddingAfter().hasPercen t()) 493 if (style.paddingBefore().hasPercent() || style.paddingAfter().hasPercen t())
487 UseCounter::count(document, UseCounter::FlexboxPercentagePaddingVert ical); 494 UseCounter::count(document, UseCounter::FlexboxPercentagePaddingVert ical);
488 if (style.marginBefore().hasPercent() || style.marginAfter().hasPercent( )) 495 if (style.marginBefore().hasPercent() || style.marginAfter().hasPercent( ))
489 UseCounter::count(document, UseCounter::FlexboxPercentageMarginVerti cal); 496 UseCounter::count(document, UseCounter::FlexboxPercentageMarginVerti cal);
490 } 497 }
491 } 498 }
492 499
493 } 500 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698