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

Side by Side Diff: Source/core/rendering/line/BreakingContextInlineHeaders.h

Issue 752723004: Use references in RenderBlock and RenderBlockFlow methods (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 if (m_ignoringSpaces) 454 if (m_ignoringSpaces)
455 m_lineMidpointState.stopIgnoringSpaces(InlineIterator(0, m_current.objec t(), 0)); 455 m_lineMidpointState.stopIgnoringSpaces(InlineIterator(0, m_current.objec t(), 0));
456 456
457 m_lineInfo.setEmpty(false, m_block, &m_width); 457 m_lineInfo.setEmpty(false, m_block, &m_width);
458 m_ignoringSpaces = false; 458 m_ignoringSpaces = false;
459 m_currentCharacterShouldCollapseIfPreWap = m_currentCharacterIsSpace = false ; 459 m_currentCharacterShouldCollapseIfPreWap = m_currentCharacterIsSpace = false ;
460 m_trailingObjects.clear(); 460 m_trailingObjects.clear();
461 461
462 // Optimize for a common case. If we can't find whitespace after the list 462 // Optimize for a common case. If we can't find whitespace after the list
463 // item, then this is all moot. 463 // item, then this is all moot.
464 LayoutUnit replacedLogicalWidth = m_block->logicalWidthForChild(replacedBox) + m_block->marginStartForChild(replacedBox) + m_block->marginEndForChild(replac edBox) + inlineLogicalWidth(m_current.object()); 464 LayoutUnit replacedLogicalWidth = m_block->logicalWidthForChild(*replacedBox ) + m_block->marginStartForChild(*replacedBox) + m_block->marginEndForChild(*rep lacedBox) + inlineLogicalWidth(m_current.object());
465 if (m_current.object()->isListMarker()) { 465 if (m_current.object()->isListMarker()) {
466 if (m_blockStyle->collapseWhiteSpace() && shouldSkipWhitespaceAfterStart Object(m_block, m_current.object(), m_lineMidpointState)) { 466 if (m_blockStyle->collapseWhiteSpace() && shouldSkipWhitespaceAfterStart Object(m_block, m_current.object(), m_lineMidpointState)) {
467 // Like with inline flows, we start ignoring spaces to make sure tha t any 467 // Like with inline flows, we start ignoring spaces to make sure tha t any
468 // additional spaces we see will be discarded. 468 // additional spaces we see will be discarded.
469 m_currentCharacterShouldCollapseIfPreWap = m_currentCharacterIsSpace = true; 469 m_currentCharacterShouldCollapseIfPreWap = m_currentCharacterIsSpace = true;
470 m_ignoringSpaces = true; 470 m_ignoringSpaces = true;
471 } 471 }
472 if (toRenderListMarker(m_current.object())->isInside()) 472 if (toRenderListMarker(m_current.object())->isInside())
473 m_width.addUncommittedWidth(replacedLogicalWidth.toFloat()); 473 m_width.addUncommittedWidth(replacedLogicalWidth.toFloat());
474 } else { 474 } else {
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 908
909 if (style->textIndentType() == TextIndentHanging) 909 if (style->textIndentType() == TextIndentHanging)
910 shouldIndentText = shouldIndentText == IndentText ? DoNotIndentText : In dentText; 910 shouldIndentText = shouldIndentText == IndentText ? DoNotIndentText : In dentText;
911 911
912 return shouldIndentText; 912 return shouldIndentText;
913 } 913 }
914 914
915 } 915 }
916 916
917 #endif // BreakingContextInlineHeaders_h 917 #endif // BreakingContextInlineHeaders_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698