OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. |
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 1868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1879 computedValues.m_extent = logicalWidthLength.value() + borderAndPaddingL ogicalWidth(); | 1879 computedValues.m_extent = logicalWidthLength.value() + borderAndPaddingL ogicalWidth(); |
1880 else { | 1880 else { |
1881 LayoutUnit containerWidthInInlineDirection = containerLogicalWidth; | 1881 LayoutUnit containerWidthInInlineDirection = containerLogicalWidth; |
1882 if (hasPerpendicularContainingBlock) | 1882 if (hasPerpendicularContainingBlock) |
1883 containerWidthInInlineDirection = perpendicularContainingBlockLogica lHeight(); | 1883 containerWidthInInlineDirection = perpendicularContainingBlockLogica lHeight(); |
1884 LayoutUnit preferredWidth = computeLogicalWidthUsing(MainOrPreferredSize , styleToUse->logicalWidth(), containerWidthInInlineDirection, cb); | 1884 LayoutUnit preferredWidth = computeLogicalWidthUsing(MainOrPreferredSize , styleToUse->logicalWidth(), containerWidthInInlineDirection, cb); |
1885 computedValues.m_extent = constrainLogicalWidthByMinMax(preferredWidth, containerWidthInInlineDirection, cb); | 1885 computedValues.m_extent = constrainLogicalWidthByMinMax(preferredWidth, containerWidthInInlineDirection, cb); |
1886 } | 1886 } |
1887 | 1887 |
1888 // Margin calculations. | 1888 // Margin calculations. |
1889 computeMarginsForDirection(InlineDirection, cb, containerLogicalWidth, compu tedValues.m_extent, computedValues.m_margins.m_start, | 1889 bool hasInvertedDirection = cb->style()->isLeftToRightDirection() == style() ->isLeftToRightDirection(); |
mstensho (USE GERRIT)
2014/12/04 12:18:29
This name seems inverted. :) It's true when the di
Kyungtae Kim
2014/12/08 07:00:13
Done.
| |
1890 computedValues.m_margins.m_end, style()->marginStart(), style()->marginE nd()); | 1890 computeMarginsForDirection(InlineDirection, cb, containerLogicalWidth, compu tedValues.m_extent, |
1891 hasInvertedDirection ? computedValues.m_margins.m_start : computedValue s.m_margins.m_end, | |
mstensho (USE GERRIT)
2014/12/04 12:18:29
extraneous space
Kyungtae Kim
2014/12/08 07:00:13
Done.
| |
1892 hasInvertedDirection ? computedValues.m_margins.m_end : computedValues.m _margins.m_start, | |
1893 style()->marginStart(), style()->marginEnd()); | |
1891 | 1894 |
1892 if (!hasPerpendicularContainingBlock && containerLogicalWidth && containerLo gicalWidth != (computedValues.m_extent + computedValues.m_margins.m_start + comp utedValues.m_margins.m_end) | 1895 if (!hasPerpendicularContainingBlock && containerLogicalWidth && containerLo gicalWidth != (computedValues.m_extent + computedValues.m_margins.m_start + comp utedValues.m_margins.m_end) |
1893 && !isFloating() && !isInline() && !cb->isFlexibleBoxIncludingDeprecated () && !cb->isRenderGrid()) { | 1896 && !isFloating() && !isInline() && !cb->isFlexibleBoxIncludingDeprecated () && !cb->isRenderGrid()) { |
1894 LayoutUnit newMargin = containerLogicalWidth - computedValues.m_extent - cb->marginStartForChild(*this); | 1897 LayoutUnit newMargin = containerLogicalWidth - computedValues.m_extent - cb->marginStartForChild(*this); |
1895 bool hasInvertedDirection = cb->style()->isLeftToRightDirection() != sty le()->isLeftToRightDirection(); | 1898 bool hasInvertedDirection = cb->style()->isLeftToRightDirection() != sty le()->isLeftToRightDirection(); |
1896 if (hasInvertedDirection) | 1899 if (hasInvertedDirection) |
1897 computedValues.m_margins.m_start = newMargin; | 1900 computedValues.m_margins.m_start = newMargin; |
1898 else | 1901 else |
1899 computedValues.m_margins.m_end = newMargin; | 1902 computedValues.m_margins.m_end = newMargin; |
1900 } | 1903 } |
(...skipping 2528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4429 computedValues.m_margins.m_end = marginEnd(); | 4432 computedValues.m_margins.m_end = marginEnd(); |
4430 | 4433 |
4431 setLogicalTop(oldLogicalTop); | 4434 setLogicalTop(oldLogicalTop); |
4432 setLogicalWidth(oldLogicalWidth); | 4435 setLogicalWidth(oldLogicalWidth); |
4433 setLogicalLeft(oldLogicalLeft); | 4436 setLogicalLeft(oldLogicalLeft); |
4434 setMarginLeft(oldMarginLeft); | 4437 setMarginLeft(oldMarginLeft); |
4435 setMarginRight(oldMarginRight); | 4438 setMarginRight(oldMarginRight); |
4436 } | 4439 } |
4437 | 4440 |
4438 } // namespace blink | 4441 } // namespace blink |
OLD | NEW |