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

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

Issue 1328673003: Remove -webkit-line-box-contain implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix up a few more tests. Created 5 years, 3 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 | « Source/core/layout/LayoutText.cpp ('k') | Source/core/layout/line/RootInlineBox.h » ('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) 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 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 } 480 }
481 481
482 if (curr->isInlineFlowBox()) 482 if (curr->isInlineFlowBox())
483 toInlineFlowBox(curr)->adjustMaxAscentAndDescent(maxAscent, maxDesce nt, maxPositionTop, maxPositionBottom); 483 toInlineFlowBox(curr)->adjustMaxAscentAndDescent(maxAscent, maxDesce nt, maxPositionTop, maxPositionBottom);
484 } 484 }
485 } 485 }
486 486
487 void InlineFlowBox::computeLogicalBoxHeights(RootInlineBox* rootBox, LayoutUnit& maxPositionTop, LayoutUnit& maxPositionBottom, int& maxAscent, int& maxDescent, bool& setMaxAscent, bool& setMaxDescent, bool strictMode, GlyphOverflowAndFallb ackFontsMap& textBoxDataMap, FontBaseline baselineType, VerticalPositionCache& v erticalPositionCache) 487 void InlineFlowBox::computeLogicalBoxHeights(RootInlineBox* rootBox, LayoutUnit& maxPositionTop, LayoutUnit& maxPositionBottom, int& maxAscent, int& maxDescent, bool& setMaxAscent, bool& setMaxDescent, bool strictMode, GlyphOverflowAndFallb ackFontsMap& textBoxDataMap, FontBaseline baselineType, VerticalPositionCache& v erticalPositionCache)
488 { 488 {
489 // The primary purpose of this function is to compute the maximal ascent and descent values for 489 // The primary purpose of this function is to compute the maximal ascent and descent values for
490 // a line. These values are computed based off the block's line-box-contain property, which indicates 490 // a line.
491 // what parts of descendant boxes have to fit within the line.
492 // 491 //
493 // The maxAscent value represents the distance of the highest point of any b ox (typically including line-height) from 492 // The maxAscent value represents the distance of the highest point of any b ox (typically including line-height) from
494 // the root box's baseline. The maxDescent value represents the distance of the lowest point of any box 493 // the root box's baseline. The maxDescent value represents the distance of the lowest point of any box
495 // (also typically including line-height) from the root box baseline. These values can be negative. 494 // (also typically including line-height) from the root box baseline. These values can be negative.
496 // 495 //
497 // A secondary purpose of this function is to store the offset of every box' s baseline from the root box's 496 // A secondary purpose of this function is to store the offset of every box' s baseline from the root box's
498 // baseline. This information is cached in the logicalTop() of every box. We 're effectively just using 497 // baseline. This information is cached in the logicalTop() of every box. We 're effectively just using
499 // the logicalTop() as scratch space. 498 // the logicalTop() as scratch space.
500 // 499 //
501 // Because a box can be positioned such that it ends up fully above or fully below the 500 // Because a box can be positioned such that it ends up fully above or fully below the
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
1309 ASSERT(child->prevOnLine() == prev); 1308 ASSERT(child->prevOnLine() == prev);
1310 prev = child; 1309 prev = child;
1311 } 1310 }
1312 ASSERT(prev == m_lastChild); 1311 ASSERT(prev == m_lastChild);
1313 #endif 1312 #endif
1314 } 1313 }
1315 1314
1316 #endif 1315 #endif
1317 1316
1318 } // namespace blink 1317 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutText.cpp ('k') | Source/core/layout/line/RootInlineBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698