Changeset 97597 in webkit
- Timestamp:
- Oct 17, 2011 2:18:35 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r97596 r97597 1 2011-10-17 Rosen Dash <rosen.dash@motorola.com> 2 3 when CSS pseudo selectors are applied (:before and :after) the *-of-line keyboard navigation does not work 4 https://bugs.webkit.org/show_bug.cgi?id=10123 5 6 Reviewed by Ryosuke Niwa. 7 8 * editing/selection/css-pseudo-element-expected.txt: Added. 9 * editing/selection/css-pseudo-element-hang-expected.txt: Added. 10 * editing/selection/css-pseudo-element-hang.html: Added. 11 * editing/selection/css-pseudo-element.html: Added. 12 1 13 2011-10-15 Antti Koivisto <antti@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r97596 r97597 1 2011-10-17 Rosen Dash <rosen.dash@motorola.com> 2 3 when CSS pseudo selectors are applied (:before and :after) the *-of-line keyboard navigation does not work 4 https://bugs.webkit.org/show_bug.cgi?id=10123 5 6 Reviewed by Ryosuke Niwa. 7 8 This patch addresses folllowing two issues: 9 1. When CSS pseudo elements are before or after is used with content attribute containing single character 10 at the start/end of text and we try to move cursor by right navigation key, the page freezes falling 11 into an infinite loop. 12 2. When these elements try to insert some text between a text line, navigation by right/left arrow key is prohibited. 13 14 Tests: editing/selection/css-pseudo-element-hang.html 15 editing/selection/css-pseudo-element.html 16 17 * editing/VisiblePosition.cpp: 18 (WebCore::VisiblePosition::leftVisuallyDistinctCandidate): 19 (WebCore::VisiblePosition::rightVisuallyDistinctCandidate): 20 1 21 2011-10-15 Antti Koivisto <antti@apple.com> 2 22 -
trunk/Source/WebCore/editing/VisiblePosition.cpp
r96868 r97597 1 1 /* 2 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 3 * Portions Copyright (c) 2011 Motorola Mobility, Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 126 127 return box->isLeftToRightDirection() ? previousVisuallyDistinctCandidate(m_deepPosition) : nextVisuallyDistinctCandidate(m_deepPosition); 127 128 129 if (!renderer->node()) { 130 box = box->prevLeafChild(); 131 if (!box) 132 return primaryDirection == LTR ? previousVisuallyDistinctCandidate(m_deepPosition) : nextVisuallyDistinctCandidate(m_deepPosition); 133 renderer = box->renderer(); 134 offset = box->caretRightmostOffset(); 135 continue; 136 } 137 128 138 offset = box->isLeftToRightDirection() ? renderer->previousOffset(offset) : renderer->nextOffset(offset); 129 139 … … 192 202 continue; 193 203 } 204 205 while (prevBox && !prevBox->renderer()->node()) 206 prevBox = prevBox->prevLeafChild(); 194 207 195 208 if (prevBox) { … … 235 248 if ((p.isCandidate() && p.downstream() != downstreamStart) || p.atStartOfTree() || p.atEndOfTree()) 236 249 return p; 250 251 ASSERT(p != m_deepPosition); 237 252 } 238 253 } … … 276 291 if ((renderer->isReplaced() || renderer->isBR()) && offset == box->caretLeftmostOffset()) 277 292 return box->isLeftToRightDirection() ? nextVisuallyDistinctCandidate(m_deepPosition) : previousVisuallyDistinctCandidate(m_deepPosition); 293 294 if (!renderer->node()) { 295 box = box->nextLeafChild(); 296 if (!box) 297 return primaryDirection == LTR ? nextVisuallyDistinctCandidate(m_deepPosition) : previousVisuallyDistinctCandidate(m_deepPosition); 298 renderer = box->renderer(); 299 offset = box->caretLeftmostOffset(); 300 continue; 301 } 278 302 279 303 offset = box->isLeftToRightDirection() ? renderer->nextOffset(offset) : renderer->previousOffset(offset); … … 323 347 break; 324 348 } 349 325 350 if (nextBox->bidiLevel() >= level) 326 351 break; … … 345 370 } 346 371 372 while (nextBox && !nextBox->renderer()->node()) 373 nextBox = nextBox->nextLeafChild(); 374 347 375 if (nextBox) { 348 376 box = nextBox; 349 377 renderer = box->renderer(); 350 378 offset = box->caretLeftmostOffset(); 379 351 380 if (box->bidiLevel() > level) { 352 381 do { … … 387 416 if ((p.isCandidate() && p.downstream() != downstreamStart) || p.atStartOfTree() || p.atEndOfTree()) 388 417 return p; 418 419 ASSERT(p != m_deepPosition); 389 420 } 390 421 }
Note: See TracChangeset
for help on using the changeset viewer.