| 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 // and to the computed value of align-items on the parent (minus | 288 // and to the computed value of align-items on the parent (minus |
| 289 // any 'legacy' keywords) on all other boxes. | 289 // any 'legacy' keywords) on all other boxes. |
| 290 if (style.alignSelf() == ItemPositionAuto) { | 290 if (style.alignSelf() == ItemPositionAuto) { |
| 291 if (absolutePositioned) { | 291 if (absolutePositioned) { |
| 292 style.setAlignSelf(ItemPositionStretch); | 292 style.setAlignSelf(ItemPositionStretch); |
| 293 } else { | 293 } else { |
| 294 style.setAlignSelf(parentStyle.alignItems()); | 294 style.setAlignSelf(parentStyle.alignItems()); |
| 295 style.setAlignSelfOverflowAlignment(parentStyle.alignItemsOverflowAl
ignment()); | 295 style.setAlignSelfOverflowAlignment(parentStyle.alignItemsOverflowAl
ignment()); |
| 296 } | 296 } |
| 297 } | 297 } |
| 298 |
| 299 // Block Containers: For table cells, the behavior of the 'auto' depends on
the computed |
| 300 // value of 'vertical-align', otherwise behaves as 'start'. |
| 301 // Flex Containers: 'auto' computes to 'flex-start'. |
| 302 // Grid Containers: 'auto' computes to 'start', and 'stretch' behaves like '
start'. |
| 303 if ((style.justifyContent() == ContentPositionAuto) && (style.justifyContent
Distribution() == ContentDistributionDefault)) { |
| 304 if (style.isDisplayFlexibleBox()) { |
| 305 style.setJustifyContent(ContentPositionFlexStart); |
| 306 } |
| 307 } |
| 298 } | 308 } |
| 299 | 309 |
| 300 void StyleAdjuster::adjustStyleForTagName(RenderStyle* style, RenderStyle* paren
tStyle, Element& element) | 310 void StyleAdjuster::adjustStyleForTagName(RenderStyle* style, RenderStyle* paren
tStyle, Element& element) |
| 301 { | 311 { |
| 302 // <div> and <span> are the most common elements on the web, we skip all the
work for them. | 312 // <div> and <span> are the most common elements on the web, we skip all the
work for them. |
| 303 if (isHTMLDivElement(element) || isHTMLSpanElement(element)) | 313 if (isHTMLDivElement(element) || isHTMLSpanElement(element)) |
| 304 return; | 314 return; |
| 305 | 315 |
| 306 if (isHTMLTableCellElement(element)) { | 316 if (isHTMLTableCellElement(element)) { |
| 307 // If we have a <td> that specifies a float property, in quirks mode we
just drop the float property. | 317 // If we have a <td> that specifies a float property, in quirks mode we
just drop the float property. |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B
OX || style->display() == INLINE_BOX)) | 459 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B
OX || style->display() == INLINE_BOX)) |
| 450 style->setWritingMode(TopToBottomWritingMode); | 460 style->setWritingMode(TopToBottomWritingMode); |
| 451 | 461 |
| 452 if (parentStyle->isDisplayFlexibleOrGridBox()) { | 462 if (parentStyle->isDisplayFlexibleOrGridBox()) { |
| 453 style->setFloating(NoFloat); | 463 style->setFloating(NoFloat); |
| 454 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa
ting(), !m_useQuirksModeStyles)); | 464 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa
ting(), !m_useQuirksModeStyles)); |
| 455 } | 465 } |
| 456 } | 466 } |
| 457 | 467 |
| 458 } | 468 } |
| OLD | NEW |