Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Side by Side Diff: Source/core/rendering/RenderBlockLineLayout.cpp

Issue 752723004: Use references in RenderBlock and RenderBlockFlow methods (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: cover RenderBlockFlow class as well Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/rendering/RenderBlockFlow.cpp ('k') | Source/core/rendering/RenderBox.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ight reserved. 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ight reserved.
4 * Copyright (C) 2010 Google Inc. All rights reserved. 4 * Copyright (C) 2010 Google Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 int startOverhang; 357 int startOverhang;
358 int endOverhang; 358 int endOverhang;
359 RenderObject* nextObject = 0; 359 RenderObject* nextObject = 0;
360 for (BidiRun* runWithNextObject = run->next(); runWithNextObject; runWithNex tObject = runWithNextObject->next()) { 360 for (BidiRun* runWithNextObject = run->next(); runWithNextObject; runWithNex tObject = runWithNextObject->next()) {
361 if (!runWithNextObject->m_object->isOutOfFlowPositioned() && !runWithNex tObject->m_box->isLineBreak()) { 361 if (!runWithNextObject->m_object->isOutOfFlowPositioned() && !runWithNex tObject->m_box->isLineBreak()) {
362 nextObject = runWithNextObject->m_object; 362 nextObject = runWithNextObject->m_object;
363 break; 363 break;
364 } 364 }
365 } 365 }
366 renderer->getOverhang(lineInfo.isFirstLine(), renderer->style()->isLeftToRig htDirection() ? previousObject : nextObject, renderer->style()->isLeftToRightDir ection() ? nextObject : previousObject, startOverhang, endOverhang); 366 renderer->getOverhang(lineInfo.isFirstLine(), renderer->style()->isLeftToRig htDirection() ? previousObject : nextObject, renderer->style()->isLeftToRightDir ection() ? nextObject : previousObject, startOverhang, endOverhang);
367 setMarginStartForChild(renderer, -startOverhang); 367 setMarginStartForChild(*renderer, -startOverhang);
368 setMarginEndForChild(renderer, -endOverhang); 368 setMarginEndForChild(*renderer, -endOverhang);
369 } 369 }
370 370
371 static inline void setLogicalWidthForTextRun(RootInlineBox* lineBox, BidiRun* ru n, RenderText* renderer, float xPos, const LineInfo& lineInfo, 371 static inline void setLogicalWidthForTextRun(RootInlineBox* lineBox, BidiRun* ru n, RenderText* renderer, float xPos, const LineInfo& lineInfo,
372 GlyphOverflowAndFallbackFontsMap& t extBoxDataMap, VerticalPositionCache& verticalPositionCache, WordMeasurements& w ordMeasurements) 372 GlyphOverflowAndFallbackFontsMap& t extBoxDataMap, VerticalPositionCache& verticalPositionCache, WordMeasurements& w ordMeasurements)
373 { 373 {
374 HashSet<const SimpleFontData*> fallbackFonts; 374 HashSet<const SimpleFontData*> fallbackFonts;
375 GlyphOverflow glyphOverflow; 375 GlyphOverflow glyphOverflow;
376 376
377 const Font& font = renderer->style(lineInfo.isFirstLine())->font(); 377 const Font& font = renderer->style(lineInfo.isFirstLine())->font();
378 // Always compute glyph overflow if the block's line-box-contain value is "g lyphs". 378 // Always compute glyph overflow if the block's line-box-contain value is "g lyphs".
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 needsWordSpacing = !isSpaceOrNewline(rt->characterAt(r->m_stop - 1)); 615 needsWordSpacing = !isSpaceOrNewline(rt->characterAt(r->m_stop - 1));
616 } 616 }
617 617
618 setLogicalWidthForTextRun(lineBox, r, rt, totalLogicalWidth, lineInf o, textBoxDataMap, verticalPositionCache, wordMeasurements); 618 setLogicalWidthForTextRun(lineBox, r, rt, totalLogicalWidth, lineInf o, textBoxDataMap, verticalPositionCache, wordMeasurements);
619 } else { 619 } else {
620 isAfterExpansion = false; 620 isAfterExpansion = false;
621 if (!r->m_object->isRenderInline()) { 621 if (!r->m_object->isRenderInline()) {
622 RenderBox* renderBox = toRenderBox(r->m_object); 622 RenderBox* renderBox = toRenderBox(r->m_object);
623 if (renderBox->isRubyRun()) 623 if (renderBox->isRubyRun())
624 setMarginsForRubyRun(r, toRenderRubyRun(renderBox), previous Object, lineInfo); 624 setMarginsForRubyRun(r, toRenderRubyRun(renderBox), previous Object, lineInfo);
625 r->m_box->setLogicalWidth(logicalWidthForChild(renderBox).toFloa t()); 625 r->m_box->setLogicalWidth(logicalWidthForChild(*renderBox).toFlo at());
626 totalLogicalWidth += marginStartForChild(renderBox) + marginEndF orChild(renderBox); 626 totalLogicalWidth += marginStartForChild(*renderBox) + marginEnd ForChild(*renderBox);
627 needsWordSpacing = true; 627 needsWordSpacing = true;
628 } 628 }
629 } 629 }
630 630
631 totalLogicalWidth += r->m_box->logicalWidth(); 631 totalLogicalWidth += r->m_box->logicalWidth();
632 previousObject = r->m_object; 632 previousObject = r->m_object;
633 } 633 }
634 634
635 if (isAfterExpansion && !expansionOpportunities.isEmpty()) { 635 if (isAfterExpansion && !expansionOpportunities.isEmpty()) {
636 expansionOpportunities.last()--; 636 expansionOpportunities.last()--;
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 bidiRuns.deleteRuns(); 865 bidiRuns.deleteRuns();
866 resolver.markCurrentRunEmpty(); // FIXME: This can probably be repla ced by an ASSERT (or just removed). 866 resolver.markCurrentRunEmpty(); // FIXME: This can probably be repla ced by an ASSERT (or just removed).
867 867
868 if (lineBox) { 868 if (lineBox) {
869 lineBox->setLineBreakInfo(endOfLine.object(), endOfLine.offset() , resolver.status()); 869 lineBox->setLineBreakInfo(endOfLine.object(), endOfLine.offset() , resolver.status());
870 if (layoutState.usesPaintInvalidationBounds()) 870 if (layoutState.usesPaintInvalidationBounds())
871 layoutState.updatePaintInvalidationRangeFromBox(lineBox); 871 layoutState.updatePaintInvalidationRangeFromBox(lineBox);
872 872
873 if (paginated) { 873 if (paginated) {
874 LayoutUnit adjustment = 0; 874 LayoutUnit adjustment = 0;
875 adjustLinePositionForPagination(lineBox, adjustment, layoutS tate.flowThread()); 875 adjustLinePositionForPagination(*lineBox, adjustment, layout State.flowThread());
876 if (adjustment) { 876 if (adjustment) {
877 LayoutUnit oldLineWidth = availableLogicalWidthForLine(o ldLogicalHeight, layoutState.lineInfo().isFirstLine()); 877 LayoutUnit oldLineWidth = availableLogicalWidthForLine(o ldLogicalHeight, layoutState.lineInfo().isFirstLine());
878 lineBox->adjustBlockDirectionPosition(adjustment.toFloat ()); 878 lineBox->adjustBlockDirectionPosition(adjustment.toFloat ());
879 if (layoutState.usesPaintInvalidationBounds()) 879 if (layoutState.usesPaintInvalidationBounds())
880 layoutState.updatePaintInvalidationRangeFromBox(line Box); 880 layoutState.updatePaintInvalidationRangeFromBox(line Box);
881 881
882 if (availableLogicalWidthForLine(oldLogicalHeight + adju stment, layoutState.lineInfo().isFirstLine()) != oldLineWidth) { 882 if (availableLogicalWidthForLine(oldLogicalHeight + adju stment, layoutState.lineInfo().isFirstLine()) != oldLineWidth) {
883 // We have to delete this line, remove all floats th at got added, and let line layout re-run. 883 // We have to delete this line, remove all floats th at got added, and let line layout re-run.
884 lineBox->deleteLine(); 884 lineBox->deleteLine();
885 endOfLine = restartLayoutRunsAndFloatsInRange(oldLog icalHeight, oldLogicalHeight + adjustment, lastFloatFromPreviousLine, resolver, previousEndofLine); 885 endOfLine = restartLayoutRunsAndFloatsInRange(oldLog icalHeight, oldLogicalHeight + adjustment, lastFloatFromPreviousLine, resolver, previousEndofLine);
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 { 995 {
996 if (layoutState.endLine()) { 996 if (layoutState.endLine()) {
997 if (layoutState.endLineMatched()) { 997 if (layoutState.endLineMatched()) {
998 bool paginated = view()->layoutState() && view()->layoutState()->isP aginated(); 998 bool paginated = view()->layoutState() && view()->layoutState()->isP aginated();
999 // Attach all the remaining lines, and then adjust their y-positions as needed. 999 // Attach all the remaining lines, and then adjust their y-positions as needed.
1000 LayoutUnit delta = logicalHeight() - layoutState.endLineLogicalTop() ; 1000 LayoutUnit delta = logicalHeight() - layoutState.endLineLogicalTop() ;
1001 for (RootInlineBox* line = layoutState.endLine(); line; line = line- >nextRootBox()) { 1001 for (RootInlineBox* line = layoutState.endLine(); line; line = line- >nextRootBox()) {
1002 line->attachLine(); 1002 line->attachLine();
1003 if (paginated) { 1003 if (paginated) {
1004 delta -= line->paginationStrut(); 1004 delta -= line->paginationStrut();
1005 adjustLinePositionForPagination(line, delta, layoutState.flo wThread()); 1005 adjustLinePositionForPagination(*line, delta, layoutState.fl owThread());
1006 } 1006 }
1007 if (delta) { 1007 if (delta) {
1008 layoutState.updatePaintInvalidationRangeFromBox(line, delta) ; 1008 layoutState.updatePaintInvalidationRangeFromBox(line, delta) ;
1009 line->adjustBlockDirectionPosition(delta.toFloat()); 1009 line->adjustBlockDirectionPosition(delta.toFloat());
1010 } 1010 }
1011 if (Vector<RenderBox*>* cleanLineFloats = line->floatsPtr()) { 1011 if (Vector<RenderBox*>* cleanLineFloats = line->floatsPtr()) {
1012 Vector<RenderBox*>::iterator end = cleanLineFloats->end(); 1012 Vector<RenderBox*>::iterator end = cleanLineFloats->end();
1013 for (Vector<RenderBox*>::iterator f = cleanLineFloats->begin (); f != end; ++f) { 1013 for (Vector<RenderBox*>::iterator f = cleanLineFloats->begin (); f != end; ++f) {
1014 FloatingObject* floatingObject = insertFloatingObject(*f ); 1014 FloatingObject* floatingObject = insertFloatingObject(** f);
1015 ASSERT(!floatingObject->originatingLine()); 1015 ASSERT(!floatingObject->originatingLine());
1016 floatingObject->setOriginatingLine(line); 1016 floatingObject->setOriginatingLine(line);
1017 setLogicalHeight(logicalTopForChild(*f) - marginBeforeFo rChild(*f) + delta); 1017 setLogicalHeight(logicalTopForChild(**f) - marginBeforeF orChild(**f) + delta);
1018 positionNewFloats(); 1018 positionNewFloats();
1019 } 1019 }
1020 } 1020 }
1021 } 1021 }
1022 setLogicalHeight(lastRootBox()->lineBottomWithLeading()); 1022 setLogicalHeight(lastRootBox()->lineBottomWithLeading());
1023 } else { 1023 } else {
1024 // Delete all the remaining lines. 1024 // Delete all the remaining lines.
1025 deleteLineRange(layoutState, layoutState.endLine()); 1025 deleteLineRange(layoutState, layoutState.endLine());
1026 } 1026 }
1027 } 1027 }
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
1554 Vector<RenderBox*> replacedChildren; 1554 Vector<RenderBox*> replacedChildren;
1555 for (InlineWalker walker(this); !walker.atEnd(); walker.advance()) { 1555 for (InlineWalker walker(this); !walker.atEnd(); walker.advance()) {
1556 RenderObject* o = walker.current(); 1556 RenderObject* o = walker.current();
1557 1557
1558 if (!layoutState.hasInlineChild() && o->isInline()) 1558 if (!layoutState.hasInlineChild() && o->isInline())
1559 layoutState.setHasInlineChild(true); 1559 layoutState.setHasInlineChild(true);
1560 1560
1561 if (o->isReplaced() || o->isFloating() || o->isOutOfFlowPositioned() ) { 1561 if (o->isReplaced() || o->isFloating() || o->isOutOfFlowPositioned() ) {
1562 RenderBox* box = toRenderBox(o); 1562 RenderBox* box = toRenderBox(o);
1563 1563
1564 updateBlockChildDirtyBitsBeforeLayout(relayoutChildren, box); 1564 updateBlockChildDirtyBitsBeforeLayout(relayoutChildren, *box);
1565 1565
1566 if (o->isOutOfFlowPositioned()) 1566 if (o->isOutOfFlowPositioned())
1567 o->containingBlock()->insertPositionedObject(box); 1567 o->containingBlock()->insertPositionedObject(box);
1568 else if (o->isFloating()) 1568 else if (o->isFloating())
1569 layoutState.floats().append(FloatWithRect(box)); 1569 layoutState.floats().append(FloatWithRect(box));
1570 else if (isFullLayout || o->needsLayout()) { 1570 else if (isFullLayout || o->needsLayout()) {
1571 // Replaced element. 1571 // Replaced element.
1572 box->dirtyLineBoxes(isFullLayout); 1572 box->dirtyLineBoxes(isFullLayout);
1573 if (isFullLayout) 1573 if (isFullLayout)
1574 replacedChildren.append(box); 1574 replacedChildren.append(box);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1654 // FIXME: This entire float-checking block needs to be broken into a new fun ction. 1654 // FIXME: This entire float-checking block needs to be broken into a new fun ction.
1655 bool dirtiedByFloat = false; 1655 bool dirtiedByFloat = false;
1656 if (!layoutState.isFullLayout()) { 1656 if (!layoutState.isFullLayout()) {
1657 // Paginate all of the clean lines. 1657 // Paginate all of the clean lines.
1658 bool paginated = view()->layoutState() && view()->layoutState()->isPagin ated(); 1658 bool paginated = view()->layoutState() && view()->layoutState()->isPagin ated();
1659 LayoutUnit paginationDelta = 0; 1659 LayoutUnit paginationDelta = 0;
1660 size_t floatIndex = 0; 1660 size_t floatIndex = 0;
1661 for (curr = firstRootBox(); curr && !curr->isDirty(); curr = curr->nextR ootBox()) { 1661 for (curr = firstRootBox(); curr && !curr->isDirty(); curr = curr->nextR ootBox()) {
1662 if (paginated) { 1662 if (paginated) {
1663 paginationDelta -= curr->paginationStrut(); 1663 paginationDelta -= curr->paginationStrut();
1664 adjustLinePositionForPagination(curr, paginationDelta, layoutSta te.flowThread()); 1664 adjustLinePositionForPagination(*curr, paginationDelta, layoutSt ate.flowThread());
1665 if (paginationDelta) { 1665 if (paginationDelta) {
1666 if (containsFloats() || !layoutState.floats().isEmpty()) { 1666 if (containsFloats() || !layoutState.floats().isEmpty()) {
1667 // FIXME: Do better eventually. For now if we ever shif t because of pagination and floats are present just go to a full layout. 1667 // FIXME: Do better eventually. For now if we ever shif t because of pagination and floats are present just go to a full layout.
1668 layoutState.markForFullLayout(); 1668 layoutState.markForFullLayout();
1669 break; 1669 break;
1670 } 1670 }
1671 1671
1672 layoutState.updatePaintInvalidationRangeFromBox(curr, pagina tionDelta); 1672 layoutState.updatePaintInvalidationRangeFromBox(curr, pagina tionDelta);
1673 curr->adjustBlockDirectionPosition(paginationDelta.toFloat() ); 1673 curr->adjustBlockDirectionPosition(paginationDelta.toFloat() );
1674 } 1674 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1728 1728
1729 unsigned numCleanFloats = 0; 1729 unsigned numCleanFloats = 0;
1730 if (!layoutState.floats().isEmpty()) { 1730 if (!layoutState.floats().isEmpty()) {
1731 LayoutUnit savedLogicalHeight = logicalHeight(); 1731 LayoutUnit savedLogicalHeight = logicalHeight();
1732 // Restore floats from clean lines. 1732 // Restore floats from clean lines.
1733 RootInlineBox* line = firstRootBox(); 1733 RootInlineBox* line = firstRootBox();
1734 while (line != curr) { 1734 while (line != curr) {
1735 if (Vector<RenderBox*>* cleanLineFloats = line->floatsPtr()) { 1735 if (Vector<RenderBox*>* cleanLineFloats = line->floatsPtr()) {
1736 Vector<RenderBox*>::iterator end = cleanLineFloats->end(); 1736 Vector<RenderBox*>::iterator end = cleanLineFloats->end();
1737 for (Vector<RenderBox*>::iterator f = cleanLineFloats->begin(); f != end; ++f) { 1737 for (Vector<RenderBox*>::iterator f = cleanLineFloats->begin(); f != end; ++f) {
1738 FloatingObject* floatingObject = insertFloatingObject(*f); 1738 FloatingObject* floatingObject = insertFloatingObject(**f);
1739 ASSERT(!floatingObject->originatingLine()); 1739 ASSERT(!floatingObject->originatingLine());
1740 floatingObject->setOriginatingLine(line); 1740 floatingObject->setOriginatingLine(line);
1741 setLogicalHeight(logicalTopForChild(*f) - marginBeforeForChi ld(*f)); 1741 setLogicalHeight(logicalTopForChild(**f) - marginBeforeForCh ild(**f));
1742 positionNewFloats(); 1742 positionNewFloats();
1743 ASSERT(layoutState.floats()[numCleanFloats].object == *f); 1743 ASSERT(layoutState.floats()[numCleanFloats].object == *f);
1744 numCleanFloats++; 1744 numCleanFloats++;
1745 } 1745 }
1746 } 1746 }
1747 line = line->nextRootBox(); 1747 line = line->nextRootBox();
1748 } 1748 }
1749 setLogicalHeight(savedLogicalHeight); 1749 setLogicalHeight(savedLogicalHeight);
1750 } 1750 }
1751 layoutState.setFloatIndex(numCleanFloats); 1751 layoutState.setFloatIndex(numCleanFloats);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
1813 bool paginated = view()->layoutState() && view()->layoutState()->isPaginated (); 1813 bool paginated = view()->layoutState() && view()->layoutState()->isPaginated ();
1814 if (paginated && layoutState.flowThread()) { 1814 if (paginated && layoutState.flowThread()) {
1815 // Check all lines from here to the end, and see if the hypothetical new position for the lines will result 1815 // Check all lines from here to the end, and see if the hypothetical new position for the lines will result
1816 // in a different available line width. 1816 // in a different available line width.
1817 for (RootInlineBox* lineBox = layoutState.endLine(); lineBox; lineBox = lineBox->nextRootBox()) { 1817 for (RootInlineBox* lineBox = layoutState.endLine(); lineBox; lineBox = lineBox->nextRootBox()) {
1818 if (paginated) { 1818 if (paginated) {
1819 // This isn't the real move we're going to do, so don't update t he line box's pagination 1819 // This isn't the real move we're going to do, so don't update t he line box's pagination
1820 // strut yet. 1820 // strut yet.
1821 LayoutUnit oldPaginationStrut = lineBox->paginationStrut(); 1821 LayoutUnit oldPaginationStrut = lineBox->paginationStrut();
1822 lineDelta -= oldPaginationStrut; 1822 lineDelta -= oldPaginationStrut;
1823 adjustLinePositionForPagination(lineBox, lineDelta, layoutState. flowThread()); 1823 adjustLinePositionForPagination(*lineBox, lineDelta, layoutState .flowThread());
1824 lineBox->setPaginationStrut(oldPaginationStrut); 1824 lineBox->setPaginationStrut(oldPaginationStrut);
1825 } 1825 }
1826 } 1826 }
1827 } 1827 }
1828 1828
1829 if (!lineDelta || !m_floatingObjects) 1829 if (!lineDelta || !m_floatingObjects)
1830 return true; 1830 return true;
1831 1831
1832 // See if any floats end in the range along which we want to shift the lines vertically. 1832 // See if any floats end in the range along which we want to shift the lines vertically.
1833 LayoutUnit logicalTop = std::min(logicalHeight(), layoutState.endLineLogical Top()); 1833 LayoutUnit logicalTop = std::min(logicalHeight(), layoutState.endLineLogical Top());
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
2010 --it; // Last float is newFloat, skip that one. 2010 --it; // Last float is newFloat, skip that one.
2011 FloatingObjectSetIterator begin = floatingObjectSet.begin(); 2011 FloatingObjectSetIterator begin = floatingObjectSet.begin();
2012 while (it != begin) { 2012 while (it != begin) {
2013 --it; 2013 --it;
2014 FloatingObject* floatingObject = it->get(); 2014 FloatingObject* floatingObject = it->get();
2015 if (floatingObject == lastFloatFromPreviousLine) 2015 if (floatingObject == lastFloatFromPreviousLine)
2016 break; 2016 break;
2017 if (logicalTopForFloat(floatingObject) == logicalHeight() + lineInfo.flo atPaginationStrut()) { 2017 if (logicalTopForFloat(floatingObject) == logicalHeight() + lineInfo.flo atPaginationStrut()) {
2018 floatingObject->setPaginationStrut(paginationStrut + floatingObject- >paginationStrut()); 2018 floatingObject->setPaginationStrut(paginationStrut + floatingObject- >paginationStrut());
2019 RenderBox* floatBox = floatingObject->renderer(); 2019 RenderBox* floatBox = floatingObject->renderer();
2020 setLogicalTopForChild(floatBox, logicalTopForChild(floatBox) + margi nBeforeForChild(floatBox) + paginationStrut); 2020 setLogicalTopForChild(*floatBox, logicalTopForChild(*floatBox) + mar ginBeforeForChild(*floatBox) + paginationStrut);
2021 if (floatBox->isRenderBlock()) 2021 if (floatBox->isRenderBlock())
2022 floatBox->forceChildLayout(); 2022 floatBox->forceChildLayout();
2023 else 2023 else
2024 floatBox->layoutIfNeeded(); 2024 floatBox->layoutIfNeeded();
2025 // Save the old logical top before calling removePlacedObject which will set 2025 // Save the old logical top before calling removePlacedObject which will set
2026 // isPlaced to false. Otherwise it will trigger an assert in logical TopForFloat. 2026 // isPlaced to false. Otherwise it will trigger an assert in logical TopForFloat.
2027 LayoutUnit oldLogicalTop = logicalTopForFloat(floatingObject); 2027 LayoutUnit oldLogicalTop = logicalTopForFloat(floatingObject);
2028 m_floatingObjects->removePlacedObject(floatingObject); 2028 m_floatingObjects->removePlacedObject(floatingObject);
2029 setLogicalTopForFloat(floatingObject, oldLogicalTop + paginationStru t); 2029 setLogicalTopForFloat(floatingObject, oldLogicalTop + paginationStru t);
2030 m_floatingObjects->addPlacedObject(floatingObject); 2030 m_floatingObjects->addPlacedObject(floatingObject);
(...skipping 18 matching lines...) Expand all
2049 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat (); 2049 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat ();
2050 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal se) - logicalLeft; 2050 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal se) - logicalLeft;
2051 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid th, availableLogicalWidth, 0); 2051 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid th, availableLogicalWidth, 0);
2052 2052
2053 if (!style()->isLeftToRightDirection()) 2053 if (!style()->isLeftToRightDirection())
2054 return logicalWidth() - logicalLeft; 2054 return logicalWidth() - logicalLeft;
2055 return logicalLeft; 2055 return logicalLeft;
2056 } 2056 }
2057 2057
2058 } 2058 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBlockFlow.cpp ('k') | Source/core/rendering/RenderBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698