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

Side by Side Diff: sky/engine/core/rendering/line/BreakingContextInlineHeaders.h

Issue 706953003: Delete unused methods/arguments from RenderBlockFlow. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/rendering/RenderObject.cpp ('k') | sky/engine/core/rendering/line/LineWidth.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) 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 * Copyright (C) 2013 Adobe Systems Incorporated. 5 * Copyright (C) 2013 Adobe Systems Incorporated.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 { 189 {
190 ASSERT(child->isOutOfFlowPositioned()); 190 ASSERT(child->isOutOfFlowPositioned());
191 // FIXME: The math here is actually not really right. It's a best-guess appr oximation that 191 // FIXME: The math here is actually not really right. It's a best-guess appr oximation that
192 // will work for the common cases 192 // will work for the common cases
193 RenderObject* containerBlock = child->container(); 193 RenderObject* containerBlock = child->container();
194 LayoutUnit blockHeight = block->logicalHeight(); 194 LayoutUnit blockHeight = block->logicalHeight();
195 if (containerBlock->isRenderInline()) { 195 if (containerBlock->isRenderInline()) {
196 // A relative positioned inline encloses us. In this case, we also have to determine our 196 // A relative positioned inline encloses us. In this case, we also have to determine our
197 // position as though we were an inline. Set |staticInlinePosition| and |staticBlockPosition| on the relative positioned 197 // position as though we were an inline. Set |staticInlinePosition| and |staticBlockPosition| on the relative positioned
198 // inline so that we can obtain the value later. 198 // inline so that we can obtain the value later.
199 toRenderInline(containerBlock)->layer()->setStaticInlinePosition(block-> startAlignedOffsetForLine(blockHeight, false)); 199 toRenderInline(containerBlock)->layer()->setStaticInlinePosition(block-> startAlignedOffsetForLine(false));
200 toRenderInline(containerBlock)->layer()->setStaticBlockPosition(blockHei ght); 200 toRenderInline(containerBlock)->layer()->setStaticBlockPosition(blockHei ght);
201 201
202 // If |child| is a leading or trailing positioned object this is its onl y opportunity to ensure it moves with an inline 202 // If |child| is a leading or trailing positioned object this is its onl y opportunity to ensure it moves with an inline
203 // container changing width. 203 // container changing width.
204 child->moveWithEdgeOfInlineContainerIfNecessary(); 204 child->moveWithEdgeOfInlineContainerIfNecessary();
205 } 205 }
206 block->updateStaticInlinePositionForChild(child, blockHeight); 206 block->updateStaticInlinePositionForChild(child);
207 child->layer()->setStaticBlockPosition(blockHeight); 207 child->layer()->setStaticBlockPosition(blockHeight);
208 } 208 }
209 209
210 // FIXME: The entire concept of the skipTrailingWhitespace function is flawed, s ince we really need to be building 210 // FIXME: The entire concept of the skipTrailingWhitespace function is flawed, s ince we really need to be building
211 // line boxes even for containers that may ultimately collapse away. Otherwise w e'll never get positioned 211 // line boxes even for containers that may ultimately collapse away. Otherwise w e'll never get positioned
212 // elements quite right. In other words, we need to build this function's work i nto the normal line 212 // elements quite right. In other words, we need to build this function's work i nto the normal line
213 // object iteration process. 213 // object iteration process.
214 // NB. this function will insert any floating elements that would otherwise 214 // NB. this function will insert any floating elements that would otherwise
215 // be skipped but it will not position them. 215 // be skipped but it will not position them.
216 inline void BreakingContext::skipTrailingWhitespace(InlineIterator& iterator, co nst LineInfo& lineInfo) 216 inline void BreakingContext::skipTrailingWhitespace(InlineIterator& iterator, co nst LineInfo& lineInfo)
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 } 390 }
391 391
392 m_width.addUncommittedWidth((inlineLogicalWidth(m_current.object()) + border PaddingMarginStart(flowBox) + borderPaddingMarginEnd(flowBox)).toFloat()); 392 m_width.addUncommittedWidth((inlineLogicalWidth(m_current.object()) + border PaddingMarginStart(flowBox) + borderPaddingMarginEnd(flowBox)).toFloat());
393 } 393 }
394 394
395 inline void BreakingContext::handleReplaced() 395 inline void BreakingContext::handleReplaced()
396 { 396 {
397 RenderBox* replacedBox = toRenderBox(m_current.object()); 397 RenderBox* replacedBox = toRenderBox(m_current.object());
398 398
399 if (m_atStart) 399 if (m_atStart)
400 m_width.updateAvailableWidth(replacedBox->logicalHeight()); 400 m_width.updateAvailableWidth();
401 401
402 // Break on replaced elements if either has normal white-space. 402 // Break on replaced elements if either has normal white-space.
403 if (m_autoWrap || RenderStyle::autoWrap(m_lastWS)) { 403 if (m_autoWrap || RenderStyle::autoWrap(m_lastWS)) {
404 m_width.commit(); 404 m_width.commit();
405 m_lineBreak.moveToStartOf(m_current.object()); 405 m_lineBreak.moveToStartOf(m_current.object());
406 } 406 }
407 407
408 if (m_ignoringSpaces) 408 if (m_ignoringSpaces)
409 m_lineMidpointState.stopIgnoringSpaces(InlineIterator(0, m_current.objec t(), 0)); 409 m_lineMidpointState.stopIgnoringSpaces(InlineIterator(0, m_current.objec t(), 0));
410 410
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 811
812 if (style->textIndentType() == TextIndentHanging) 812 if (style->textIndentType() == TextIndentHanging)
813 shouldIndentText = shouldIndentText == IndentText ? DoNotIndentText : In dentText; 813 shouldIndentText = shouldIndentText == IndentText ? DoNotIndentText : In dentText;
814 814
815 return shouldIndentText; 815 return shouldIndentText;
816 } 816 }
817 817
818 } 818 }
819 819
820 #endif // BreakingContextInlineHeaders_h 820 #endif // BreakingContextInlineHeaders_h
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderObject.cpp ('k') | sky/engine/core/rendering/line/LineWidth.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698