| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 737 | 737 |
| 738 if (curr->isInlineFlowBox()) | 738 if (curr->isInlineFlowBox()) |
| 739 toInlineFlowBox(curr)->flipLinesInBlockDirection(lineTop, lineBottom
); | 739 toInlineFlowBox(curr)->flipLinesInBlockDirection(lineTop, lineBottom
); |
| 740 else | 740 else |
| 741 curr->setLogicalTop(lineBottom - (curr->logicalTop() - lineTop) - cu
rr->logicalHeight()); | 741 curr->setLogicalTop(lineBottom - (curr->logicalTop() - lineTop) - cu
rr->logicalHeight()); |
| 742 } | 742 } |
| 743 } | 743 } |
| 744 | 744 |
| 745 inline void InlineFlowBox::addBoxShadowVisualOverflow(LayoutRect& logicalVisualO
verflow) | 745 inline void InlineFlowBox::addBoxShadowVisualOverflow(LayoutRect& logicalVisualO
verflow) |
| 746 { | 746 { |
| 747 // box-shadow on root line boxes is applying to the block and not to the lin
es. | 747 const ComputedStyle& style = layoutObject().styleRef(isFirstLineStyle()); |
| 748 if (!parent()) | 748 |
| 749 // box-shadow on the block element applies to the block and not to the lines
, |
| 750 // unless it is modified by :first-line pseudo element. |
| 751 if (!parent() && (!isFirstLineStyle() || &style == layoutObject().style())) |
| 749 return; | 752 return; |
| 750 | 753 |
| 751 const ComputedStyle& style = layoutObject().styleRef(isFirstLineStyle()); | |
| 752 WritingMode writingMode = style.writingMode(); | 754 WritingMode writingMode = style.writingMode(); |
| 753 ShadowList* boxShadow = style.boxShadow(); | 755 ShadowList* boxShadow = style.boxShadow(); |
| 754 if (!boxShadow) | 756 if (!boxShadow) |
| 755 return; | 757 return; |
| 756 | 758 |
| 757 LayoutRectOutsets outsets(boxShadow->rectOutsetsIncludingOriginal()); | 759 LayoutRectOutsets outsets(boxShadow->rectOutsetsIncludingOriginal()); |
| 758 // Similar to how glyph overflow works, if our lines are flipped, then it's
actually the opposite shadow that applies, since | 760 // Similar to how glyph overflow works, if our lines are flipped, then it's
actually the opposite shadow that applies, since |
| 759 // the line is "upside down" in terms of block coordinates. | 761 // the line is "upside down" in terms of block coordinates. |
| 760 LayoutRectOutsets logicalOutsets(outsets.logicalOutsetsWithFlippedLines(writ
ingMode)); | 762 LayoutRectOutsets logicalOutsets(outsets.logicalOutsetsWithFlippedLines(writ
ingMode)); |
| 761 | 763 |
| 762 LayoutRect shadowBounds(logicalFrameRect()); | 764 LayoutRect shadowBounds(logicalFrameRect()); |
| 763 shadowBounds.expand(logicalOutsets); | 765 shadowBounds.expand(logicalOutsets); |
| 764 logicalVisualOverflow.unite(shadowBounds); | 766 logicalVisualOverflow.unite(shadowBounds); |
| 765 } | 767 } |
| 766 | 768 |
| 767 inline void InlineFlowBox::addBorderOutsetVisualOverflow(LayoutRect& logicalVisu
alOverflow) | 769 inline void InlineFlowBox::addBorderOutsetVisualOverflow(LayoutRect& logicalVisu
alOverflow) |
| 768 { | 770 { |
| 769 // border-image-outset on root line boxes is applying to the block and not t
o the lines. | 771 const ComputedStyle& style = layoutObject().styleRef(isFirstLineStyle()); |
| 770 if (!parent()) | 772 |
| 773 // border-image-outset on the block element applies to the block and not to
the lines, |
| 774 // unless it is modified by :first-line pseudo element. |
| 775 if (!parent() && (!isFirstLineStyle() || &style == layoutObject().style())) |
| 771 return; | 776 return; |
| 772 | 777 |
| 773 const ComputedStyle& style = layoutObject().styleRef(isFirstLineStyle()); | |
| 774 if (!style.hasBorderImageOutsets()) | 778 if (!style.hasBorderImageOutsets()) |
| 775 return; | 779 return; |
| 776 | 780 |
| 777 // Similar to how glyph overflow works, if our lines are flipped, then it's
actually the opposite border that applies, since | 781 // Similar to how glyph overflow works, if our lines are flipped, then it's
actually the opposite border that applies, since |
| 778 // the line is "upside down" in terms of block coordinates. vertical-rl and
horizontal-bt are the flipped line modes. | 782 // the line is "upside down" in terms of block coordinates. vertical-rl and
horizontal-bt are the flipped line modes. |
| 779 LayoutRectOutsets logicalOutsets = style.borderImageOutsets().logicalOutsets
WithFlippedLines(style.writingMode()); | 783 LayoutRectOutsets logicalOutsets = style.borderImageOutsets().logicalOutsets
WithFlippedLines(style.writingMode()); |
| 780 | 784 |
| 781 if (!includeLogicalLeftEdge()) | 785 if (!includeLogicalLeftEdge()) |
| 782 logicalOutsets.setLeft(LayoutUnit()); | 786 logicalOutsets.setLeft(LayoutUnit()); |
| 783 if (!includeLogicalRightEdge()) | 787 if (!includeLogicalRightEdge()) |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1311 ASSERT(child->prevOnLine() == prev); | 1315 ASSERT(child->prevOnLine() == prev); |
| 1312 prev = child; | 1316 prev = child; |
| 1313 } | 1317 } |
| 1314 ASSERT(prev == m_lastChild); | 1318 ASSERT(prev == m_lastChild); |
| 1315 #endif | 1319 #endif |
| 1316 } | 1320 } |
| 1317 | 1321 |
| 1318 #endif | 1322 #endif |
| 1319 | 1323 |
| 1320 } // namespace blink | 1324 } // namespace blink |
| OLD | NEW |