Changeset 139962 in webkit
- Timestamp:
- Jan 16, 2013 9:13:00 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r139959 r139962 1 2013-01-16 Shinya Kawanaka <shinyak@chromium.org> 2 3 [Refactoring] HTMLTextFormControlElement should use shadowHost instead of shadowAncestorNode 4 https://bugs.webkit.org/show_bug.cgi?id=106533 5 6 Reviewed by Kent Tamura. 7 8 Since Node::shadowAncestorNode() is deprecated, we would like to use Node::shadowHost(). 9 10 No new tests, simple refactoring. 11 12 * html/HTMLTextFormControlElement.cpp: 13 (WebCore::HTMLTextFormControlElement::setSelectionRange): Here, startPosition and endPosition is in ShadowDOM, 14 converting shadowAncestorNode to shadowHost is safe. 15 (WebCore::enclosingTextFormControl): Actually ASSERT in this method is wrong since shadowAncestorNode() does not 16 return NULL. This should be shadowHost(). 17 1 18 2013-01-16 Tony Gentilcore <tonyg@chromium.org> 2 19 -
trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp
r137336 r139962 331 331 // "-webkit-user-select: none" style attribute is specified. 332 332 if (startPosition.isNotNull() && endPosition.isNotNull()) { 333 ASSERT(startPosition.deepEquivalent().deprecatedNode()->shadow AncestorNode() == this334 && endPosition.deepEquivalent().deprecatedNode()->shadow AncestorNode() == this);333 ASSERT(startPosition.deepEquivalent().deprecatedNode()->shadowHost() == this 334 && endPosition.deepEquivalent().deprecatedNode()->shadowHost() == this); 335 335 } 336 336 VisibleSelection newSelection; … … 640 640 { 641 641 ASSERT(position.isNull() || position.anchorType() == Position::PositionIsOffsetInAnchor 642 || position.containerNode() || !position.anchorNode()->shadowAncestorNode());642 || position.containerNode() || !position.anchorNode()->shadowHost()); 643 643 Node* container = position.containerNode(); 644 644 if (!container) 645 645 return 0; 646 Node* ancestor = container->shadow AncestorNode();647 return ancestor != container? toTextFormControl(ancestor) : 0;646 Node* ancestor = container->shadowHost(); 647 return ancestor ? toTextFormControl(ancestor) : 0; 648 648 } 649 649
Note: See TracChangeset
for help on using the changeset viewer.