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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 298 |
299 // Block Containers: For table cells, the behavior of the 'auto' depends on
the computed | 299 // Block Containers: For table cells, the behavior of the 'auto' depends on
the computed |
300 // value of 'vertical-align', otherwise behaves as 'start'. | 300 // value of 'vertical-align', otherwise behaves as 'start'. |
301 // Flex Containers: 'auto' computes to 'flex-start'. | 301 // Flex Containers: 'auto' computes to 'flex-start'. |
302 // Grid Containers: 'auto' computes to 'start', and 'stretch' behaves like '
start'. | 302 // Grid Containers: 'auto' computes to 'start', and 'stretch' behaves like '
start'. |
303 if ((style.justifyContent() == ContentPositionAuto) && (style.justifyContent
Distribution() == ContentDistributionDefault)) { | 303 if ((style.justifyContent() == ContentPositionAuto) && (style.justifyContent
Distribution() == ContentDistributionDefault)) { |
304 if (style.isDisplayFlexibleBox()) { | 304 if (style.isDisplayFlexibleOrGridBox()) { |
305 style.setJustifyContent(ContentPositionFlexStart); | 305 if (style.isDisplayFlexibleBox()) |
| 306 style.setJustifyContent(ContentPositionFlexStart); |
| 307 else |
| 308 style.setJustifyContent(ContentPositionStart); |
306 } | 309 } |
307 } | 310 } |
308 } | 311 } |
309 | 312 |
310 void StyleAdjuster::adjustStyleForTagName(RenderStyle* style, RenderStyle* paren
tStyle, Element& element) | 313 void StyleAdjuster::adjustStyleForTagName(RenderStyle* style, RenderStyle* paren
tStyle, Element& element) |
311 { | 314 { |
312 // <div> and <span> are the most common elements on the web, we skip all the
work for them. | 315 // <div> and <span> are the most common elements on the web, we skip all the
work for them. |
313 if (isHTMLDivElement(element) || isHTMLSpanElement(element)) | 316 if (isHTMLDivElement(element) || isHTMLSpanElement(element)) |
314 return; | 317 return; |
315 | 318 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B
OX || style->display() == INLINE_BOX)) | 462 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B
OX || style->display() == INLINE_BOX)) |
460 style->setWritingMode(TopToBottomWritingMode); | 463 style->setWritingMode(TopToBottomWritingMode); |
461 | 464 |
462 if (parentStyle->isDisplayFlexibleOrGridBox()) { | 465 if (parentStyle->isDisplayFlexibleOrGridBox()) { |
463 style->setFloating(NoFloat); | 466 style->setFloating(NoFloat); |
464 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa
ting(), !m_useQuirksModeStyles)); | 467 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa
ting(), !m_useQuirksModeStyles)); |
465 } | 468 } |
466 } | 469 } |
467 | 470 |
468 } | 471 } |
OLD | NEW |