| OLD | NEW |
| 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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 // https://bugs.webkit.org/show_bug.cgi?id=46418 - Flexible box support. | 315 // https://bugs.webkit.org/show_bug.cgi?id=46418 - Flexible box support. |
| 316 if (style.getWritingMode() != TopToBottomWritingMode && (style.display() ==
BOX || style.display() == INLINE_BOX)) | 316 if (style.getWritingMode() != TopToBottomWritingMode && (style.display() ==
BOX || style.display() == INLINE_BOX)) |
| 317 style.setWritingMode(TopToBottomWritingMode); | 317 style.setWritingMode(TopToBottomWritingMode); |
| 318 | 318 |
| 319 if (parentStyle.isDisplayFlexibleOrGridBox()) { | 319 if (parentStyle.isDisplayFlexibleOrGridBox()) { |
| 320 style.setFloating(NoFloat); | 320 style.setFloating(NoFloat); |
| 321 style.setDisplay(equivalentBlockDisplay(style.display())); | 321 style.setDisplay(equivalentBlockDisplay(style.display())); |
| 322 | 322 |
| 323 // We want to count vertical percentage paddings/margins on flex items b
ecause our current | 323 // We want to count vertical percentage paddings/margins on flex items b
ecause our current |
| 324 // behavior is different from the spec and we want to gather compatibili
ty data. | 324 // behavior is different from the spec and we want to gather compatibili
ty data. |
| 325 if (style.paddingBefore().hasPercent() || style.paddingAfter().hasPercen
t()) | 325 if (style.paddingBefore().isPercentOrCalc() || style.paddingAfter().isPe
rcentOrCalc()) |
| 326 UseCounter::count(document, UseCounter::FlexboxPercentagePaddingVert
ical); | 326 UseCounter::count(document, UseCounter::FlexboxPercentagePaddingVert
ical); |
| 327 if (style.marginBefore().hasPercent() || style.marginAfter().hasPercent(
)) | 327 if (style.marginBefore().isPercentOrCalc() || style.marginAfter().isPerc
entOrCalc()) |
| 328 UseCounter::count(document, UseCounter::FlexboxPercentageMarginVerti
cal); | 328 UseCounter::count(document, UseCounter::FlexboxPercentageMarginVerti
cal); |
| 329 } | 329 } |
| 330 } | 330 } |
| 331 | 331 |
| 332 void StyleAdjuster::adjustComputedStyle(ComputedStyle& style, const ComputedStyl
e& parentStyle, Element* element) | 332 void StyleAdjuster::adjustComputedStyle(ComputedStyle& style, const ComputedStyl
e& parentStyle, Element* element) |
| 333 { | 333 { |
| 334 if (style.display() != NONE) { | 334 if (style.display() != NONE) { |
| 335 if (element && element->isHTMLElement()) | 335 if (element && element->isHTMLElement()) |
| 336 adjustStyleForHTMLElement(style, toHTMLElement(*element)); | 336 adjustStyleForHTMLElement(style, toHTMLElement(*element)); |
| 337 | 337 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 style.setDisplay(BLOCK); | 404 style.setDisplay(BLOCK); |
| 405 | 405 |
| 406 // Columns don't apply to svg text elements. | 406 // Columns don't apply to svg text elements. |
| 407 if (isSVGTextElement(*element)) | 407 if (isSVGTextElement(*element)) |
| 408 style.clearMultiCol(); | 408 style.clearMultiCol(); |
| 409 } | 409 } |
| 410 adjustStyleForAlignment(style, parentStyle); | 410 adjustStyleForAlignment(style, parentStyle); |
| 411 } | 411 } |
| 412 | 412 |
| 413 } // namespace blink | 413 } // namespace blink |
| OLD | NEW |