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

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

Issue 2571023002: Add check to InlineFlowBox::computeLogicalBoxHeights (Closed)
Patch Set: Created 4 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 | « 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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 // scratch space. 581 // scratch space.
582 // 582 //
583 // Because a box can be positioned such that it ends up fully above or fully 583 // Because a box can be positioned such that it ends up fully above or fully
584 // below the root line box, we only consider it to affect the maxAscent and 584 // below the root line box, we only consider it to affect the maxAscent and
585 // maxDescent values if some part of the box (EXCLUDING leading) is above (for 585 // maxDescent values if some part of the box (EXCLUDING leading) is above (for
586 // ascent) or below (for descent) the root box's baseline. 586 // ascent) or below (for descent) the root box's baseline.
587 bool affectsAscent = false; 587 bool affectsAscent = false;
588 bool affectsDescent = false; 588 bool affectsDescent = false;
589 bool checkChildren = !descendantsHaveSameLineHeightAndBaseline(); 589 bool checkChildren = !descendantsHaveSameLineHeightAndBaseline();
590 590
591 DCHECK(rootBox);
592 if (!rootBox)
593 return;
594
591 if (isRootInlineBox()) { 595 if (isRootInlineBox()) {
592 // Examine our root box. 596 // Examine our root box.
593 int ascent = 0; 597 int ascent = 0;
594 int descent = 0; 598 int descent = 0;
595 rootBox->ascentAndDescentForBox(rootBox, textBoxDataMap, ascent, descent, 599 rootBox->ascentAndDescentForBox(rootBox, textBoxDataMap, ascent, descent,
596 affectsAscent, affectsDescent); 600 affectsAscent, affectsDescent);
597 if (noQuirksMode || hasTextChildren() || 601 if (noQuirksMode || hasTextChildren() ||
598 (!checkChildren && hasTextDescendants())) { 602 (!checkChildren && hasTextDescendants())) {
599 if (maxAscent < ascent || !setMaxAscent) { 603 if (maxAscent < ascent || !setMaxAscent) {
600 maxAscent = ascent; 604 maxAscent = ascent;
(...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after
1642 ASSERT(child->prevOnLine() == prev); 1646 ASSERT(child->prevOnLine() == prev);
1643 prev = child; 1647 prev = child;
1644 } 1648 }
1645 ASSERT(prev == m_lastChild); 1649 ASSERT(prev == m_lastChild);
1646 #endif 1650 #endif
1647 } 1651 }
1648 1652
1649 #endif 1653 #endif
1650 1654
1651 } // namespace blink 1655 } // 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