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 2469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2480 } | 2480 } |
2481 | 2481 |
2482 LayoutUnit LayoutBox::computePercentageLogicalHeight(const Length& height) const | 2482 LayoutUnit LayoutBox::computePercentageLogicalHeight(const Length& height) const |
2483 { | 2483 { |
2484 LayoutUnit availableHeight = -1; | 2484 LayoutUnit availableHeight = -1; |
2485 | 2485 |
2486 bool skippedAutoHeightContainingBlock = false; | 2486 bool skippedAutoHeightContainingBlock = false; |
2487 LayoutBlock* cb = containingBlock(); | 2487 LayoutBlock* cb = containingBlock(); |
2488 const LayoutBox* containingBlockChild = this; | 2488 const LayoutBox* containingBlockChild = this; |
2489 LayoutUnit rootMarginBorderPaddingHeight = 0; | 2489 LayoutUnit rootMarginBorderPaddingHeight = 0; |
2490 while (!cb->isLayoutView() && skipContainingBlockForPercentHeightCalculation
(cb)) { | 2490 while (!cb->isLayoutView() && height.type() == Percent && skipContainingBloc
kForPercentHeightCalculation(cb)) { |
2491 if (cb->isBody() || cb->isDocumentElement()) | 2491 if (cb->isBody() || cb->isDocumentElement()) |
2492 rootMarginBorderPaddingHeight += cb->marginBefore() + cb->marginAfte
r() + cb->borderAndPaddingLogicalHeight(); | 2492 rootMarginBorderPaddingHeight += cb->marginBefore() + cb->marginAfte
r() + cb->borderAndPaddingLogicalHeight(); |
2493 skippedAutoHeightContainingBlock = true; | 2493 skippedAutoHeightContainingBlock = true; |
2494 containingBlockChild = cb; | 2494 containingBlockChild = cb; |
2495 cb = cb->containingBlock(); | 2495 cb = cb->containingBlock(); |
2496 } | 2496 } |
2497 cb->addPercentHeightDescendant(const_cast<LayoutBox*>(this)); | 2497 cb->addPercentHeightDescendant(const_cast<LayoutBox*>(this)); |
2498 | 2498 |
2499 const ComputedStyle& cbstyle = cb->styleRef(); | 2499 const ComputedStyle& cbstyle = cb->styleRef(); |
2500 | 2500 |
(...skipping 2202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4703 computedValues.m_margins.m_end = marginEnd(); | 4703 computedValues.m_margins.m_end = marginEnd(); |
4704 | 4704 |
4705 setLogicalTop(oldLogicalTop); | 4705 setLogicalTop(oldLogicalTop); |
4706 setLogicalWidth(oldLogicalWidth); | 4706 setLogicalWidth(oldLogicalWidth); |
4707 setLogicalLeft(oldLogicalLeft); | 4707 setLogicalLeft(oldLogicalLeft); |
4708 setMarginLeft(oldMarginLeft); | 4708 setMarginLeft(oldMarginLeft); |
4709 setMarginRight(oldMarginRight); | 4709 setMarginRight(oldMarginRight); |
4710 } | 4710 } |
4711 | 4711 |
4712 } // namespace blink | 4712 } // namespace blink |
OLD | NEW |