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

Side by Side Diff: sky/engine/core/editing/TextIterator.cpp

Issue 1068683002: Delete RenderBlockFlow. (Closed) Base URL: https://github.com/domokit/mojo.git@block
Patch Set: Remove unused float-related code instead of moving it. Created 5 years, 8 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 | « sky/engine/core/dom/PositionIterator.cpp ('k') | sky/engine/core/editing/VisibleUnits.cpp » ('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) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
3 * Copyright (C) 2005 Alexey Proskuryakov. 3 * Copyright (C) 2005 Alexey Proskuryakov.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 // emit after a preceding block. We chose not to emit (m_hasEmitted is false ), 782 // emit after a preceding block. We chose not to emit (m_hasEmitted is false ),
783 // so don't second guess that now. 783 // so don't second guess that now.
784 // NOTE: Is this really correct when m_node is not a leftmost descendant? Pr obably 784 // NOTE: Is this really correct when m_node is not a leftmost descendant? Pr obably
785 // immaterial since we likely would have already emitted something by now. 785 // immaterial since we likely would have already emitted something by now.
786 if (!m_startOffset) 786 if (!m_startOffset)
787 return false; 787 return false;
788 788
789 // If this node is unrendered or invisible the VisiblePosition checks below won't have much meaning. 789 // If this node is unrendered or invisible the VisiblePosition checks below won't have much meaning.
790 // Additionally, if the range we are iterating over contains huge sections o f unrendered content, 790 // Additionally, if the range we are iterating over contains huge sections o f unrendered content,
791 // we would create VisiblePositions on every call to this function without t his check. 791 // we would create VisiblePositions on every call to this function without t his check.
792 if (!m_node->renderer() || (m_node->renderer()->isRenderBlockFlow() && !toRe nderBlock(m_node->renderer())->height())) 792 if (!m_node->renderer() || (m_node->renderer()->isRenderParagraph() && !toRe nderBlock(m_node->renderer())->height()))
793 return false; 793 return false;
794 794
795 // The startPos.isNotNull() check is needed because the start could be befor e the body, 795 // The startPos.isNotNull() check is needed because the start could be befor e the body,
796 // and in that case we'll get null. We don't want to put in newlines at the start in that case. 796 // and in that case we'll get null. We don't want to put in newlines at the start in that case.
797 // The currPos.isNotNull() check is needed because positions in non-HTML con tent 797 // The currPos.isNotNull() check is needed because positions in non-HTML con tent
798 // (like SVG) do not have visible positions, and we don't want to emit for t hem either. 798 // (like SVG) do not have visible positions, and we don't want to emit for t hem either.
799 VisiblePosition startPos = VisiblePosition(Position(m_startContainer, m_star tOffset, Position::PositionIsOffsetInAnchor), DOWNSTREAM); 799 VisiblePosition startPos = VisiblePosition(Position(m_startContainer, m_star tOffset, Position::PositionIsOffsetInAnchor), DOWNSTREAM);
800 VisiblePosition currPos = VisiblePosition(positionBeforeNode(m_node), DOWNST REAM); 800 VisiblePosition currPos = VisiblePosition(positionBeforeNode(m_node), DOWNST REAM);
801 return startPos.isNotNull() && currPos.isNotNull() && !inSameLine(startPos, currPos); 801 return startPos.isNotNull() && currPos.isNotNull() && !inSameLine(startPos, currPos);
802 } 802 }
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after
1882 resultEnd = collapseTo; 1882 resultEnd = collapseTo;
1883 return; 1883 return;
1884 } 1884 }
1885 } 1885 }
1886 1886
1887 CharacterIterator computeRangeIterator(inputStart, inputEnd, iteratorFlagsFo rFindPlainText); 1887 CharacterIterator computeRangeIterator(inputStart, inputEnd, iteratorFlagsFo rFindPlainText);
1888 calculateCharacterSubrange(computeRangeIterator, matchStart, matchLength, re sultStart, resultEnd); 1888 calculateCharacterSubrange(computeRangeIterator, matchStart, matchLength, re sultStart, resultEnd);
1889 } 1889 }
1890 1890
1891 } 1891 }
OLDNEW
« no previous file with comments | « sky/engine/core/dom/PositionIterator.cpp ('k') | sky/engine/core/editing/VisibleUnits.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698