| 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 // any legacy keywords), or 'normal' if the box has no parent. | 162 // any legacy keywords), or 'normal' if the box has no parent. |
| 163 if (style.justifySelfPosition() == ItemPositionAuto) { | 163 if (style.justifySelfPosition() == ItemPositionAuto) { |
| 164 if (parentStyle.justifyItemsPositionType() == LegacyPosition) | 164 if (parentStyle.justifyItemsPositionType() == LegacyPosition) |
| 165 style.setJustifySelfPosition(parentStyle.justifyItemsPosition()); | 165 style.setJustifySelfPosition(parentStyle.justifyItemsPosition()); |
| 166 else if (parentStyle.justifyItemsPosition() != ItemPositionAuto) | 166 else if (parentStyle.justifyItemsPosition() != ItemPositionAuto) |
| 167 style.setJustifySelf(parentStyle.justifyItems()); | 167 style.setJustifySelf(parentStyle.justifyItems()); |
| 168 } | 168 } |
| 169 | 169 |
| 170 // The 'auto' keyword computes the computed value of align-items on the pare
nt | 170 // The 'auto' keyword computes the computed value of align-items on the pare
nt |
| 171 // or 'normal' if the box has no parent. | 171 // or 'normal' if the box has no parent. |
| 172 if (style.alignSelfPosition() == ItemPositionAuto && parentStyle.alignItemsP
osition() != ItemPositionNormal) | 172 if (style.alignSelfPosition() == ItemPositionAuto && parentStyle.alignItemsP
osition() != ComputedStyle::initialDefaultAlignment().position()) |
| 173 style.setAlignSelf(parentStyle.alignItems()); | 173 style.setAlignSelf(parentStyle.alignItems()); |
| 174 } | 174 } |
| 175 | 175 |
| 176 static void adjustStyleForHTMLElement(ComputedStyle& style, HTMLElement& element
) | 176 static void adjustStyleForHTMLElement(ComputedStyle& style, HTMLElement& element
) |
| 177 { | 177 { |
| 178 // <div> and <span> are the most common elements on the web, we skip all the
work for them. | 178 // <div> and <span> are the most common elements on the web, we skip all the
work for them. |
| 179 if (isHTMLDivElement(element) || isHTMLSpanElement(element)) | 179 if (isHTMLDivElement(element) || isHTMLSpanElement(element)) |
| 180 return; | 180 return; |
| 181 | 181 |
| 182 if (isHTMLTableCellElement(element)) { | 182 if (isHTMLTableCellElement(element)) { |
| (...skipping 221 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 |