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

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

Issue 1420303002: Remove support for intrinsic and min-intrinsic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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) 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(*element) || isSVGTextElement(*element)) && style.isDisplayInlineType()) 238 if ((isSVGForeignObjectElement(*element) || isSVGTextElement(*element)) && style.isDisplayInlineType())
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(*element)) 242 if (isSVGTextElement(*element))
243 style.clearMultiCol(); 243 style.clearMultiCol();
244 } 244 }
245 adjustStyleForAlignment(style, parentStyle); 245 adjustStyleForAlignment(style, parentStyle);
246
247 if (element) {
248 if ((style.width().type() == Intrinsic)
249 | (style.minWidth().type() == Intrinsic)
250 | (style.maxWidth().type() == Intrinsic)
251 | (style.height().type() == Intrinsic)
252 | (style.minHeight().type() == Intrinsic)
253 | (style.maxHeight().type() == Intrinsic)
254 | (style.flexBasis().type() == Intrinsic)) {
255 UseCounter::countDeprecation(element->document(), UseCounter::Legacy CSSValueIntrinsic);
256 }
257 if ((style.width().type() == MinIntrinsic)
258 | (style.minWidth().type() == MinIntrinsic)
259 | (style.maxWidth().type() == MinIntrinsic)
260 | (style.height().type() == MinIntrinsic)
261 | (style.minHeight().type() == MinIntrinsic)
262 | (style.maxHeight().type() == MinIntrinsic)
263 | (style.flexBasis().type() == MinIntrinsic)) {
264 UseCounter::countDeprecation(element->document(), UseCounter::Legacy CSSValueMinIntrinsic);
265 }
266 }
267 } 246 }
268 247
269 void StyleAdjuster::adjustStyleForFirstLetter(ComputedStyle& style) 248 void StyleAdjuster::adjustStyleForFirstLetter(ComputedStyle& style)
270 { 249 {
271 if (style.styleType() != FIRST_LETTER) 250 if (style.styleType() != FIRST_LETTER)
272 return; 251 return;
273 252
274 // Force inline display (except for floating first-letters). 253 // Force inline display (except for floating first-letters).
275 style.setDisplay(style.isFloating() ? BLOCK : INLINE); 254 style.setDisplay(style.isFloating() ? BLOCK : INLINE);
276 255
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 // We want to count vertical percentage paddings/margins on flex items b ecause our current 484 // We want to count vertical percentage paddings/margins on flex items b ecause our current
506 // behavior is different from the spec and we want to gather compatibili ty data. 485 // behavior is different from the spec and we want to gather compatibili ty data.
507 if (style.paddingBefore().hasPercent() || style.paddingAfter().hasPercen t()) 486 if (style.paddingBefore().hasPercent() || style.paddingAfter().hasPercen t())
508 UseCounter::count(document, UseCounter::FlexboxPercentagePaddingVert ical); 487 UseCounter::count(document, UseCounter::FlexboxPercentagePaddingVert ical);
509 if (style.marginBefore().hasPercent() || style.marginAfter().hasPercent( )) 488 if (style.marginBefore().hasPercent() || style.marginAfter().hasPercent( ))
510 UseCounter::count(document, UseCounter::FlexboxPercentageMarginVerti cal); 489 UseCounter::count(document, UseCounter::FlexboxPercentageMarginVerti cal);
511 } 490 }
512 } 491 }
513 492
514 } 493 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698