2011-03-08 Levi Weintraub <leviw@chromium.org>
authorleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Mar 2011 19:36:51 +0000 (19:36 +0000)
committerleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Mar 2011 19:36:51 +0000 (19:36 +0000)
commitbb94f9fcbc83f4b32e89867128db8a2bef3feb9c
tree8bc46587d0380c006b917425bb28259c28b77ce4
parentb1a348502922a13a91dc5437e3c308ccc194a0a7
2011-03-08  Levi Weintraub  <leviw@chromium.org>

        Reviewed by Ryosuke Niwa.

        Get rid of firstDeepEditingPositionForNode and lastDeepEditingPositionForNode
        https://bugs.webkit.org/show_bug.cgi?id=52642

        Replacing calls to first/lastDeepEditingPositionForNode with calls to their analogous
        functions that create new positions. Also fixing various parts of editing code that
        incorrectly handled the new positions now being created.

        No new tests as this is refactoring/cleanup.

        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::visiblePositionRange):
        * dom/Position.cpp:
        (WebCore::Position::parentAnchoredEquivalent):
        (WebCore::Position::previous):
        (WebCore::Position::next):
        (WebCore::Position::atFirstEditingPositionForNode):
        (WebCore::Position::atLastEditingPositionForNode):
        (WebCore::Position::upstream):
        (WebCore::Position::isCandidate):
        (WebCore::Position::getInlineBoxAndOffset):
        * dom/Position.h:
        (WebCore::operator==):
        * dom/PositionIterator.cpp:
        (WebCore::PositionIterator::operator Position):
        * editing/ApplyBlockElementCommand.cpp:
        (WebCore::ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded):
        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary):
        * editing/DeleteSelectionCommand.cpp:
        (WebCore::isTableCellEmpty):
        (WebCore::DeleteSelectionCommand::removeNode):
        * editing/InsertLineBreakCommand.cpp:
        (WebCore::InsertLineBreakCommand::doApply):
        * editing/InsertListCommand.cpp:
        (WebCore::InsertListCommand::unlistifyParagraph):
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent):
        * editing/TypingCommand.cpp:
        (WebCore::TypingCommand::forwardDeleteKeyPressed):
        * editing/VisibleSelection.cpp:
        (WebCore::VisibleSelection::selectionFromContentsOfNode):
        (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries):
        * editing/htmlediting.cpp:
        (WebCore::firstEditablePositionAfterPositionInRoot):
        (WebCore::lastEditablePositionBeforePositionInRoot):
        (WebCore::enclosingEmptyListItem):
        * editing/htmlediting.h:
        * editing/visible_units.cpp:
        (WebCore::startOfParagraph):
        (WebCore::endOfParagraph):
        (WebCore::startOfEditableContent):
        (WebCore::endOfEditableContent):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::positionForPoint):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@81165 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/dom/Position.cpp
Source/WebCore/dom/Position.h
Source/WebCore/dom/PositionIterator.cpp
Source/WebCore/editing/ApplyBlockElementCommand.cpp
Source/WebCore/editing/CompositeEditCommand.cpp
Source/WebCore/editing/DeleteSelectionCommand.cpp
Source/WebCore/editing/InsertLineBreakCommand.cpp
Source/WebCore/editing/InsertListCommand.cpp
Source/WebCore/editing/ReplaceSelectionCommand.cpp
Source/WebCore/editing/TypingCommand.cpp
Source/WebCore/editing/VisibleSelection.cpp
Source/WebCore/editing/htmlediting.cpp
Source/WebCore/editing/htmlediting.h
Source/WebCore/editing/visible_units.cpp
Source/WebCore/rendering/RenderBox.cpp