Chromium Code Reviews| 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())) | |
|
fs
2015/06/18 08:47:33
This is also true for border-image outsets and out
| |
| 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 |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1311 ASSERT(child->prevOnLine() == prev); | 1313 ASSERT(child->prevOnLine() == prev); |
| 1312 prev = child; | 1314 prev = child; |
| 1313 } | 1315 } |
| 1314 ASSERT(prev == m_lastChild); | 1316 ASSERT(prev == m_lastChild); |
| 1315 #endif | 1317 #endif |
| 1316 } | 1318 } |
| 1317 | 1319 |
| 1318 #endif | 1320 #endif |
| 1319 | 1321 |
| 1320 } // namespace blink | 1322 } // namespace blink |
| OLD | NEW |