Changeset 126164 in webkit
- Timestamp:
- Aug 21, 2012, 9:43:56 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r126162 r126164 1 2012-08-21 Dan Bernstein <mitz@apple.com> 2 3 <rdar://problem/12104508> TextIterator takes O(n^2) to iterate over n empty blocks 4 https://bugs.webkit.org/show_bug.cgi?id=94429 5 6 Reviewed by Sam Weinig. 7 8 No new tests, because behavior is unchanged. 9 10 * editing/TextIterator.cpp: 11 (WebCore::TextIterator::shouldRepresentNodeOffsetZero): Enhanced the check for nodes that 12 cannot contain VisiblePosition to also check for zero-height blocks. 13 1 14 2012-08-21 'Pavel Feldman' <pfeldman@chromium.org> 2 15 -
trunk/Source/WebCore/editing/TextIterator.cpp
r121933 r126164 1 1 /* 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2005 Alexey Proskuryakov. 4 4 * … … 894 894 // Additionally, if the range we are iterating over contains huge sections of unrendered content, 895 895 // we would create VisiblePositions on every call to this function without this check. 896 if (!m_node->renderer() || m_node->renderer()->style()->visibility() != VISIBLE) 896 if (!m_node->renderer() || m_node->renderer()->style()->visibility() != VISIBLE 897 || (m_node->renderer()->isBlockFlow() && !toRenderBlock(m_node->renderer())->height() && !m_node->hasTagName(bodyTag))) 897 898 return false; 898 899 899 900 // The startPos.isNotNull() check is needed because the start could be before the body, 900 901 // and in that case we'll get null. We don't want to put in newlines at the start in that case.
Note:
See TracChangeset
for help on using the changeset viewer.