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 1858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1869 m_inlineBoxWrapper = nullptr; | 1869 m_inlineBoxWrapper = nullptr; |
1870 } else { | 1870 } else { |
1871 m_inlineBoxWrapper->dirtyLineBoxes(); | 1871 m_inlineBoxWrapper->dirtyLineBoxes(); |
1872 } | 1872 } |
1873 } | 1873 } |
1874 } | 1874 } |
1875 | 1875 |
1876 void LayoutBox::positionLineBox(InlineBox* box) | 1876 void LayoutBox::positionLineBox(InlineBox* box) |
1877 { | 1877 { |
1878 if (isOutOfFlowPositioned()) { | 1878 if (isOutOfFlowPositioned()) { |
1879 // Cache the x position only if we were an INLINE type originally. | 1879 // Cache the x position only if we were an EDisplay::Inline type origina lly. |
alancutter (OOO until 2018)
2016/09/26 04:23:46
This should not change.
| |
1880 bool originallyInline = style()->isOriginalDisplayInlineType(); | 1880 bool originallyInline = style()->isOriginalDisplayInlineType(); |
1881 if (originallyInline) { | 1881 if (originallyInline) { |
1882 // The value is cached in the xPos of the box. We only need this va lue if | 1882 // The value is cached in the xPos of the box. We only need this va lue if |
1883 // our object was inline originally, since otherwise it would have e nded up underneath | 1883 // our object was inline originally, since otherwise it would have e nded up underneath |
1884 // the inlines. | 1884 // the inlines. |
1885 RootInlineBox& root = box->root(); | 1885 RootInlineBox& root = box->root(); |
1886 root.block().setStaticInlinePositionForChild(LineLayoutBox(this), bo x->logicalLeft()); | 1886 root.block().setStaticInlinePositionForChild(LineLayoutBox(this), bo x->logicalLeft()); |
1887 } else { | 1887 } else { |
1888 // Our object was a block originally, so we make our normal flow pos ition be | 1888 // Our object was a block originally, so we make our normal flow pos ition be |
1889 // just below the line box (as though all the inlines that came befo re us got | 1889 // just below the line box (as though all the inlines that came befo re us got |
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2810 if (isHorizontalWritingMode() != containingBlock->isHorizontalWritingMode()) | 2810 if (isHorizontalWritingMode() != containingBlock->isHorizontalWritingMode()) |
2811 return false; | 2811 return false; |
2812 | 2812 |
2813 // Anonymous blocks should not impede percentage resolution on a child. Exam ples of such | 2813 // Anonymous blocks should not impede percentage resolution on a child. Exam ples of such |
2814 // anonymous blocks are blocks wrapped around inlines that have block siblin gs (from the CSS | 2814 // anonymous blocks are blocks wrapped around inlines that have block siblin gs (from the CSS |
2815 // spec) and multicol flow threads (an implementation detail). Another imple mentation detail, | 2815 // spec) and multicol flow threads (an implementation detail). Another imple mentation detail, |
2816 // ruby runs, create anonymous inline-blocks, so skip those too. All other t ypes of anonymous | 2816 // ruby runs, create anonymous inline-blocks, so skip those too. All other t ypes of anonymous |
2817 // objects, such as table-cells, will be treated just as if they were non-an onymous. | 2817 // objects, such as table-cells, will be treated just as if they were non-an onymous. |
2818 if (containingBlock->isAnonymous()) { | 2818 if (containingBlock->isAnonymous()) { |
2819 EDisplay display = containingBlock->styleRef().display(); | 2819 EDisplay display = containingBlock->styleRef().display(); |
2820 return display == BLOCK || display == INLINE_BLOCK; | 2820 return display == EDisplay::Block || display == EDisplay::InlineBlock; |
2821 } | 2821 } |
2822 | 2822 |
2823 // For quirks mode, we skip most auto-height containing blocks when computin g percentages. | 2823 // For quirks mode, we skip most auto-height containing blocks when computin g percentages. |
2824 return document().inQuirksMode() && !containingBlock->isTableCell() && !cont ainingBlock->isOutOfFlowPositioned() && !containingBlock->isLayoutGrid() && cont ainingBlock->style()->logicalHeight().isAuto(); | 2824 return document().inQuirksMode() && !containingBlock->isTableCell() && !cont ainingBlock->isOutOfFlowPositioned() && !containingBlock->isLayoutGrid() && cont ainingBlock->style()->logicalHeight().isAuto(); |
2825 } | 2825 } |
2826 | 2826 |
2827 LayoutUnit LayoutBox::computePercentageLogicalHeight(const Length& height) const | 2827 LayoutUnit LayoutBox::computePercentageLogicalHeight(const Length& height) const |
2828 { | 2828 { |
2829 LayoutBlock* cb = containingBlock(); | 2829 LayoutBlock* cb = containingBlock(); |
2830 const LayoutBox* containingBlockChild = this; | 2830 const LayoutBox* containingBlockChild = this; |
(...skipping 2043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4874 LayoutRect rect = frameRect(); | 4874 LayoutRect rect = frameRect(); |
4875 | 4875 |
4876 LayoutBlock* block = containingBlock(); | 4876 LayoutBlock* block = containingBlock(); |
4877 if (block) | 4877 if (block) |
4878 block->adjustChildDebugRect(rect); | 4878 block->adjustChildDebugRect(rect); |
4879 | 4879 |
4880 return rect; | 4880 return rect; |
4881 } | 4881 } |
4882 | 4882 |
4883 } // namespace blink | 4883 } // namespace blink |
OLD | NEW |