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

Side by Side Diff: third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp

Issue 2641573003: Add DCHECK(rootBox) to InlineFlowBox::computeLogicalBoxHeights (Closed)
Patch Set: Created 3 years, 11 months 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 | « no previous file | no next file » | 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) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 InlineFlowBox* inlineFlowBox = 621 InlineFlowBox* inlineFlowBox =
622 curr->isInlineFlowBox() ? toInlineFlowBox(curr) : nullptr; 622 curr->isInlineFlowBox() ? toInlineFlowBox(curr) : nullptr;
623 623
624 bool affectsAscent = false; 624 bool affectsAscent = false;
625 bool affectsDescent = false; 625 bool affectsDescent = false;
626 626
627 // The verticalPositionForBox function returns the distance between the 627 // The verticalPositionForBox function returns the distance between the
628 // child box's baseline and the root box's baseline. The value is negative 628 // child box's baseline and the root box's baseline. The value is negative
629 // if the child box's baseline is above the root box's baseline, and it is 629 // if the child box's baseline is above the root box's baseline, and it is
630 // positive if the child box's baseline is below the root box's baseline. 630 // positive if the child box's baseline is below the root box's baseline.
631 DCHECK(rootBox);
631 curr->setLogicalTop( 632 curr->setLogicalTop(
632 rootBox->verticalPositionForBox(curr, verticalPositionCache)); 633 rootBox->verticalPositionForBox(curr, verticalPositionCache));
633 634
634 int ascent = 0; 635 int ascent = 0;
635 int descent = 0; 636 int descent = 0;
636 rootBox->ascentAndDescentForBox(curr, textBoxDataMap, ascent, descent, 637 rootBox->ascentAndDescentForBox(curr, textBoxDataMap, ascent, descent,
637 affectsAscent, affectsDescent); 638 affectsAscent, affectsDescent);
638 639
639 LayoutUnit boxHeight(ascent + descent); 640 LayoutUnit boxHeight(ascent + descent);
640 if (curr->verticalAlign() == EVerticalAlign::Top) { 641 if (curr->verticalAlign() == EVerticalAlign::Top) {
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
1647 ASSERT(child->prevOnLine() == prev); 1648 ASSERT(child->prevOnLine() == prev);
1648 prev = child; 1649 prev = child;
1649 } 1650 }
1650 ASSERT(prev == m_lastChild); 1651 ASSERT(prev == m_lastChild);
1651 #endif 1652 #endif
1652 } 1653 }
1653 1654
1654 #endif 1655 #endif
1655 1656
1656 } // namespace blink 1657 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698