Changeset 93626 in webkit
- Timestamp:
- Aug 23, 2011 12:38:05 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r93624 r93626 1 2011-08-23 Alexandru Chiculita <achicu@adobe.com> 2 3 Text-indent and floats push the text out of the container box 4 https://bugs.webkit.org/show_bug.cgi?id=66662 5 6 Reviewed by David Hyatt. 7 8 * fast/block/float/floats-and-text-indent-rl.html: Added. 9 * fast/block/float/floats-and-text-indent.html: Added. 10 * platform/chromium/test_expectations.txt: 11 * platform/gtk/Skipped: 12 * platform/mac/fast/block/float/floats-and-text-indent-expected.png: Added. 13 * platform/mac/fast/block/float/floats-and-text-indent-expected.txt: Added. 14 * platform/mac/fast/block/float/floats-and-text-indent-rl-expected.png: Added. 15 * platform/mac/fast/block/float/floats-and-text-indent-rl-expected.txt: Added. 16 * platform/qt/Skipped: 17 1 18 2011-08-23 Gavin Barraclough <barraclough@apple.com> 2 19 -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r93593 r93626 3696 3696 BUGV8_1634 : fast/js/const.html = TEXT 3697 3697 3698 // Needs new baseline. 3699 BUGWK66662 : fast/block/float/floats-and-text-indent.html = IMAGE+TEXT 3700 BUGWK66662 : fast/block/float/floats-and-text-indent-rl.html = IMAGE+TEXT 3701 3698 3702 BUGWK66730 WIN : http/tests/websocket/tests/hixie76/handshake-fail-by-no-connection-header.html = PASS TEXT 3699 3703 BUGWK66730 WIN : http/tests/websocket/tests/hybi/handshake-fail-by-no-upgrade-header.html = PASS TEXT -
trunk/LayoutTests/platform/gtk/Skipped
r93593 r93626 1613 1613 webaudio/ 1614 1614 1615 # Need new baseline http://webkit.org/b/66662 1616 fast/block/float/floats-and-text-indent.html 1617 fast/block/float/floats-and-text-indent-rl.html 1618 1615 1619 # Text shadow extents are calculated incorrectly 1616 1620 # https://bugs.webkit.org/show_bug.cgi?id=65035 -
trunk/LayoutTests/platform/qt/Skipped
r93612 r93626 2380 2380 fast/parser/innerhtml-with-prefixed-elements.xhtml 2381 2381 2382 # Need new baseline http://webkit.org/b/66662 2383 fast/block/float/floats-and-text-indent.html 2384 fast/block/float/floats-and-text-indent-rl.html 2385 2382 2386 # [Qt] editing/selection/caret-at-bidi-boundary.html fails 2383 2387 # https://bugs.webkit.org/show_bug.cgi?id=66514 -
trunk/Source/WebCore/ChangeLog
r93625 r93626 1 2011-08-23 Alexandru Chiculita <achicu@adobe.com> 2 3 Text-indent and floats push the text out of the container box 4 https://bugs.webkit.org/show_bug.cgi?id=66662 5 6 Text indent was not propagated when a new float was pushed on the line. 7 It was only calculated when the logicalLeft/RightOffsetForLine was called. 8 Because of that RenderBlock::LineBreaker::nextLineBreak used a bigger width 9 than actually available and made the line render on top of the borders. 10 11 Reviewed by David Hyatt. 12 13 Tests: fast/block/float/floats-and-text-indent-rl.html 14 fast/block/float/floats-and-text-indent.html 15 16 * rendering/RenderBlock.cpp: 17 (WebCore::RenderBlock::textIndentOffset): 18 (WebCore::RenderBlock::logicalLeftOffsetForLine): 19 (WebCore::RenderBlock::logicalRightOffsetForLine): 20 * rendering/RenderBlock.h: 21 * rendering/RenderBlockLineLayout.cpp: 22 (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): 23 1 24 2011-08-23 Al Patrick <apatrick@chromium.org> 2 25 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r93621 r93626 3536 3536 } 3537 3537 3538 LayoutUnit RenderBlock::textIndentOffset() const 3539 { 3540 LayoutUnit cw = 0; 3541 if (style()->textIndent().isPercent()) 3542 cw = containingBlock()->availableLogicalWidth(); 3543 return style()->textIndent().calcMinValue(cw); 3544 } 3545 3538 3546 LayoutUnit RenderBlock::logicalLeftOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining) const 3539 3547 { … … 3547 3555 } 3548 3556 3549 if (applyTextIndent && style()->isLeftToRightDirection()) { 3550 LayoutUnit cw = 0; 3551 if (style()->textIndent().isPercent()) 3552 cw = containingBlock()->availableLogicalWidth(); 3553 left += style()->textIndent().calcMinValue(cw); 3554 } 3557 if (applyTextIndent && style()->isLeftToRightDirection()) 3558 left += textIndentOffset(); 3555 3559 3556 3560 return left; … … 3569 3573 } 3570 3574 3571 if (applyTextIndent && !style()->isLeftToRightDirection()) { 3572 LayoutUnit cw = 0; 3573 if (style()->textIndent().isPercent()) 3574 cw = containingBlock()->availableLogicalWidth(); 3575 right -= style()->textIndent().calcMinValue(cw); 3576 } 3575 if (applyTextIndent && !style()->isLeftToRightDirection()) 3576 right -= textIndentOffset(); 3577 3577 3578 3578 return right; -
trunk/Source/WebCore/rendering/RenderBlock.h
r93621 r93626 130 130 LayoutUnit logicalLeftOffsetForLine(LayoutUnit position, bool firstLine) const { return logicalLeftOffsetForLine(position, logicalLeftOffsetForContent(), firstLine); } 131 131 LayoutUnit startOffsetForLine(LayoutUnit position, bool firstLine) const { return style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(position, firstLine) : logicalRightOffsetForLine(position, firstLine); } 132 LayoutUnit textIndentOffset() const; 132 133 133 134 virtual VisiblePosition positionForPoint(const LayoutPoint&); -
trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp
r93621 r93626 1795 1795 return; 1796 1796 1797 if (newFloat->type() == RenderBlock::FloatingObject::FloatLeft) 1797 if (newFloat->type() == RenderBlock::FloatingObject::FloatLeft) { 1798 1798 m_left = m_block->logicalRightForFloat(newFloat); 1799 else 1799 if (m_isFirstLine && m_block->style()->isLeftToRightDirection()) 1800 m_left += m_block->textIndentOffset(); 1801 } else { 1800 1802 m_right = m_block->logicalLeftForFloat(newFloat); 1803 if (m_isFirstLine && !m_block->style()->isLeftToRightDirection()) 1804 m_right -= m_block->textIndentOffset(); 1805 } 1801 1806 1802 1807 computeAvailableWidthFromLeftAndRight();
Note: See TracChangeset
for help on using the changeset viewer.