1. 07 Apr, 2011 1 commit
    • rniwa@webkit.org's avatar
      2011-04-07 Ryosuke Niwa <rniwa@webkit.org> · 5614540c
      rniwa@webkit.org authored
              Reviewed by Darin Adler.
      
              REGRESSION (r46914, r48764): When typing in Mail, line wrapping frequently occurs in the middle of words
              https://bugs.webkit.org/show_bug.cgi?id=57872
      
              Added tests to ensure WebKit inserts a paragraph separator properly around tab span.
      
              * editing/inserting/insert-div-021-expected.txt: No longer duplicates span[id="test"] incorrectly.
              * editing/inserting/insert-paragraph-after-tab-span-and-text-expected.txt: Added.
              * editing/inserting/insert-paragraph-after-tab-span-and-text.html: Added.
              * editing/inserting/insert-paragraph-separator-tab-span-expected.txt: Added.
              * editing/inserting/insert-paragraph-separator-tab-span.html: Added.
              * editing/inserting/insert-paragraph-at-end-of-line-expected.txt: No longer duplicates a[id="anchor"] incorrectly.
      2011-04-07  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              REGRESSION (r46914, r48764): When typing in Mail, line wrapping frequently occurs in the middle of words
              https://bugs.webkit.org/show_bug.cgi?id=57872
      
              r46914 initially introduced a regression by replacing calls to styleAtPosition by editingStyleAtPosition
              because editingStyleAtPosition did not avoid tab span to obtain the computed style unlike styleAtPosition.
      
              r46914 also introduced a regression by cloning hierarchy under new block at the insertion position without
              avoiding the tab span.
      
              Fixed the both regressions by avoiding tab spans when computing the editing style and when cloning hierarchy.
              Also reverted r46914 for the general code path because re-creating node hierarchy duplicates nodes when
              we're moving nodes after the paragraph separator. Instead, we now split the tree up until the start block
              before moving the nodes.
      
              Tests: editing/inserting/insert-paragraph-after-tab-span-and-text.html
                     editing/inserting/insert-paragraph-separator-tab-span.html
      
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::saveTypingStyleState): Since EditingStyle's constructor avoids a tab span,
              no longer calls positionBeforeTabSpan on the position passed to EditingStyle's constructor.
              * editing/EditingStyle.cpp:
              (WebCore::EditingStyle::init): Always avoid a tab span when computing the editing style.
              * editing/InsertParagraphSeparatorCommand.cpp:
              (WebCore::InsertParagraphSeparatorCommand::doApply): Avoid cloning tab spans and inserting a paragraph
              separator into a paragraph separator.
              * editing/htmlediting.cpp:
              (WebCore::positionOutsideTabSpan): Renamed from positionBeforeTabSpan. Also returns the position in the parent
              node after the tab span if the position was at the end of the tab span.
              * editing/htmlediting.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83247 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5614540c
  2. 31 Mar, 2011 1 commit
    • kalman@chromium.org's avatar
      2011-03-31 Benjamin Kalman <kalman@chromium.org> · 4cb651d7
      kalman@chromium.org authored
              Reviewed by Ojan Vafai.
      
              DeleteSelectionCommand::removeNode tries to insert block placeholder in non-editable table cell positions
              https://bugs.webkit.org/show_bug.cgi?id=57079
      
              Add regression test.
      
              * editing/execCommand/delete-table-with-empty-contents-expected.txt: Added.
              * editing/execCommand/delete-table-with-empty-contents.html: Added.
      2011-03-31  Benjamin Kalman  <kalman@chromium.org>
      
              Reviewed by Ojan Vafai.
      
              DeleteSelectionCommand::removeNode tries to insert block placeholder in non-editable table cell positions
              https://bugs.webkit.org/show_bug.cgi?id=57079
      
              Test: editing/execCommand/delete-table-with-empty-contents.html
      
              This bug results in an ASSERT fail in CompositeEditCommand::insertNodeAt, so is only observable in debug builds
              of WebKit.
      
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::firstEditablePositionInNode):
              (WebCore::DeleteSelectionCommand::removeNode): Use firstEditablePositionInNode rather than firstPositionInNode
              to find anchor node for the placeholder's position, if any.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82550 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4cb651d7
  3. 25 Mar, 2011 1 commit
    • commit-queue@webkit.org's avatar
      2011-03-25 Chang Shu <cshu@webkit.org> · 595681f4
      commit-queue@webkit.org authored
              Reviewed by Ryosuke Niwa.
      
              rename Node::isContentEditable and all call sites to rendererIsEditable
              https://bugs.webkit.org/show_bug.cgi?id=54290
      
              This is part of the effort to separate JS API HTMLElement isContentEditable from
              internal Node::rendererIsEditable.
      
              Code refactoring. No new tests.
      
              * accessibility/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::isReadOnly):
              (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
              * dom/Document.cpp:
              (WebCore::acceptsEditingFocus):
              * dom/Node.cpp:
              (WebCore::Node::rendererIsEditable):
              (WebCore::Node::shouldUseInputMethod):
              (WebCore::Node::canStartSelection):
              (WebCore::Node::rootEditableElement):
              * dom/Node.h:
              (WebCore::Node::isContentEditable):
              (WebCore::Node::rendererIsEditable):
              (WebCore::Node::rendererIsRichlyEditable):
              * dom/Position.cpp:
              (WebCore::nextRenderedEditable):
              (WebCore::previousRenderedEditable):
              (WebCore::Position::atEditingBoundary):
              (WebCore::Position::parentEditingBoundary):
              (WebCore::Position::upstream):
              (WebCore::Position::downstream):
              (WebCore::Position::isCandidate):
              * dom/PositionIterator.cpp:
              (WebCore::PositionIterator::isCandidate):
              * editing/AppendNodeCommand.cpp:
              (WebCore::AppendNodeCommand::AppendNodeCommand):
              (WebCore::AppendNodeCommand::doApply):
              (WebCore::AppendNodeCommand::doUnapply):
              * editing/ApplyStyleCommand.cpp:
              (WebCore::containsNonEditableRegion):
              (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
              (WebCore::ApplyStyleCommand::removeInlineStyleFromElement):
              (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
              * editing/DeleteButtonController.cpp:
              (WebCore::isDeletableElement):
              (WebCore::enclosingDeletableElement):
              * editing/DeleteFromTextNodeCommand.cpp:
              (WebCore::DeleteFromTextNodeCommand::doApply):
              (WebCore::DeleteFromTextNodeCommand::doUnapply):
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::removeNode):
              * editing/Editor.cpp:
              (WebCore::Editor::canDeleteRange):
              (WebCore::Editor::markMisspellingsOrBadGrammar):
              (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
              * editing/EditorCommand.cpp:
              (WebCore::verticalScrollDistance):
              * editing/FormatBlockCommand.cpp:
              (WebCore::enclosingBlockToSplitTreeTo):
              * editing/IndentOutdentCommand.cpp:
              (WebCore::IndentOutdentCommand::outdentParagraph):
              * editing/InsertIntoTextNodeCommand.cpp:
              (WebCore::InsertIntoTextNodeCommand::doApply):
              (WebCore::InsertIntoTextNodeCommand::doUnapply):
              * editing/InsertNodeBeforeCommand.cpp:
              (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand):
              (WebCore::InsertNodeBeforeCommand::doApply):
              (WebCore::InsertNodeBeforeCommand::doUnapply):
              * editing/JoinTextNodesCommand.cpp:
              (WebCore::JoinTextNodesCommand::doApply):
              (WebCore::JoinTextNodesCommand::doUnapply):
              * editing/MergeIdenticalElementsCommand.cpp:
              (WebCore::MergeIdenticalElementsCommand::doApply):
              (WebCore::MergeIdenticalElementsCommand::doUnapply):
              * editing/RemoveNodeCommand.cpp:
              (WebCore::RemoveNodeCommand::doApply):
              (WebCore::RemoveNodeCommand::doUnapply):
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::ReplacementFragment::ReplacementFragment):
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::selectFrameElementInParentIfFullySelected):
              (WebCore::SelectionController::setSelectionFromNone):
              * editing/SplitElementCommand.cpp:
              (WebCore::SplitElementCommand::executeApply):
              (WebCore::SplitElementCommand::doUnapply):
              * editing/SplitTextNodeCommand.cpp:
              (WebCore::SplitTextNodeCommand::doApply):
              (WebCore::SplitTextNodeCommand::doUnapply):
              (WebCore::SplitTextNodeCommand::doReapply):
              * editing/SplitTextNodeContainingElementCommand.cpp:
              (WebCore::SplitTextNodeContainingElementCommand::doApply):
              * editing/VisiblePosition.cpp:
              (WebCore::VisiblePosition::canonicalPosition):
              * editing/WrapContentsInDummySpanCommand.cpp:
              (WebCore::WrapContentsInDummySpanCommand::doUnapply):
              (WebCore::WrapContentsInDummySpanCommand::doReapply):
              * editing/htmlediting.cpp:
              (WebCore::highestEditableRoot):
              (WebCore::lowestEditableAncestor):
              (WebCore::isEditablePosition):
              (WebCore::isRichlyEditablePosition):
              (WebCore::firstEditablePositionAfterPositionInRoot):
              (WebCore::extendRangeToWrappingNodes):
              (WebCore::enclosingNodeWithTag):
              (WebCore::enclosingNodeOfType):
              (WebCore::highestEnclosingNodeOfType):
              (WebCore::canMergeLists):
              * editing/visible_units.cpp:
              (WebCore::previousLeafWithSameEditability):
              (WebCore::previousLinePosition):
              (WebCore::nextLeafWithSameEditability):
              (WebCore::nextLinePosition):
              (WebCore::startOfParagraph):
              (WebCore::endOfParagraph):
              * html/HTMLAnchorElement.cpp:
              (WebCore::HTMLAnchorElement::supportsFocus):
              (WebCore::HTMLAnchorElement::defaultEventHandler):
              (WebCore::HTMLAnchorElement::setActive):
              (WebCore::HTMLAnchorElement::canStartSelection):
              (WebCore::HTMLAnchorElement::treatLinkAsLiveForEventType):
              * html/HTMLBodyElement.cpp:
              (WebCore::HTMLBodyElement::supportsFocus):
              * html/HTMLElement.cpp:
              (WebCore::HTMLElement::supportsFocus):
              (WebCore::HTMLElement::isContentEditable):
              (WebCore::HTMLElement::contentEditable):
              * html/HTMLElement.h:
              * page/DragController.cpp:
              (WebCore::DragController::operationForLoad):
              (WebCore::DragController::canProcessDrag):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::handleMouseReleaseEvent):
              (WebCore::EventHandler::selectCursor):
              * page/FocusController.cpp:
              (WebCore::relinquishesEditingFocus):
              * rendering/HitTestResult.cpp:
              (WebCore::HitTestResult::isContentEditable):
              * rendering/RenderBlock.cpp:
              (WebCore::positionForPointRespectingEditingBoundaries):
              (WebCore::RenderBlock::hasLineIfEmpty):
              * rendering/RenderBlockLineLayout.cpp:
              (WebCore::RenderBlock::addOverflowFromInlineChildren):
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::canBeProgramaticallyScrolled):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::createVisiblePosition):
              * rendering/RootInlineBox.cpp:
              (WebCore::isEditableLeaf):
              * svg/SVGAElement.cpp:
              (WebCore::SVGAElement::supportsFocus):
      2011-03-25  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              rename Node::isContentEditable and all call sites to rendererIsEditable
              https://bugs.webkit.org/show_bug.cgi?id=54290
      
              This is part of the effort to separate JS API HTMLElement isContentEditable from
              internal Node::rendererIsEditable.
      
              * src/WebNode.cpp:
              (WebKit::WebNode::isContentEditable):
              * src/WebViewImpl.cpp:
              (WebKit::WebViewImpl::setFocus):
              (WebKit::WebViewImpl::setComposition):
              (WebKit::WebViewImpl::confirmComposition):
      2011-03-25  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              rename Node::isContentEditable and all call sites to rendererIsEditable
              https://bugs.webkit.org/show_bug.cgi?id=54290
      
              This is part of the effort to separate JS API HTMLElement isContentEditable from
              internal Node::rendererIsEditable.
      
              * WebCoreSupport/EditorClientHaiku.cpp:
              (WebCore::EditorClientHaiku::handleKeyboardEvent):
      2011-03-25  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              rename Node::isContentEditable and all call sites to rendererIsEditable
              https://bugs.webkit.org/show_bug.cgi?id=54290
      
              This is part of the effort to separate JS API HTMLElement isContentEditable from
              internal Node::rendererIsEditable.
      
              * WebCoreSupport/EditorClientQt.cpp:
              (WebCore::EditorClientQt::handleKeyboardEvent):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81965 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      595681f4
  4. 16 Mar, 2011 1 commit
    • rniwa@webkit.org's avatar
      2011-03-16 Ryosuke Niwa <rniwa@webkit.org> · 24bd1d35
      rniwa@webkit.org authored
              Reviewed by Tony Chang.
      
              Get rid of nearestMailBlockquote
              https://bugs.webkit.org/show_bug.cgi?id=56439
      
              Removed nearestMailBlockquote and replaced the calls to the function by calls
              to enclosingNodeOfType and highestEnclosingNodeOfType.
              
              Also fixed a bug in BreakBlockquoteCommand and DeleteSelectionCommand not to
              respect editing boundaries.  Added a test for the former command.
      
              Test: editing/execCommand/break-non-editable-blockquote.html
      
              * editing/BreakBlockquoteCommand.cpp:
              (WebCore::BreakBlockquoteCommand::doApply): No longer crosses editing boundary
              when looking for a Mail blockquote.
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::saveTypingStyleState): Ditto.
              (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::hasMatchingQuoteLevel):
              (WebCore::handleStyleSpansBeforeInsertion):
              (WebCore::ReplaceSelectionCommand::handleStyleSpans):
              (WebCore::ReplaceSelectionCommand::doApply):
              * editing/htmlediting.cpp:
              (WebCore::enclosingNodeOfType): Check rule upfront to improve the performance.
              (WebCore::highestEnclosingNodeOfType): Ditto; also add the missing check.
              * editing/htmlediting.h:
              (WebCore::firstPositionInOrBeforeNode): Added a null pointer check.
              (WebCore::lastPositionInOrAfterNode): Ditto.
              * editing/markup.cpp:
              (WebCore::highestAncestorToWrapMarkup):
              (WebCore::createMarkup):
      2011-03-16  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Tony Chang.
      
              Get rid of nearestMailBlockquote
              https://bugs.webkit.org/show_bug.cgi?id=56439
      
              Added a test to ensure WebKi doesn't crash when inserting newline in quoted contents,
              which is enclosed by a non-editable blockquote.
      
              * editing/execCommand/break-non-editable-blockquote-expected.txt: Added.
              * editing/execCommand/break-non-editable-blockquote.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      24bd1d35
  5. 15 Mar, 2011 2 commits
    • leviw@chromium.org's avatar
      2011-03-08 Levi Weintraub <leviw@chromium.org> · 1f95362b
      leviw@chromium.org authored
              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: http://svn.webkit.org/repository/webkit/trunk@81165 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1f95362b
    • commit-queue@webkit.org's avatar
      2011-03-15 Chris Mumford <chris.mumford@palm.com> · 49ecbf7e
      commit-queue@webkit.org authored
              Reviewed by Adam Barth.
      
              Initializing several member variables that were not initialized in
              their constructors. These values were all read prior to initialization
              as reported by Valgrind.
      
              No new tests: No feature additions/removals.
      
              * accessibility/AccessibilityImageMapLink.cpp:
              (WebCore::AccessibilityImageMapLink::AccessibilityImageMapLink):
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::DeleteSelectionCommand):
              * html/HTMLCanvasElement.cpp:
              (WebCore::HTMLCanvasElement::HTMLCanvasElement):
              * xml/XPathResult.cpp:
              (WebCore::XPathResult::XPathResult):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      49ecbf7e
  6. 14 Mar, 2011 1 commit
    • leviw@chromium.org's avatar
      2011-03-09 Levi Weintraub <leviw@chromium.org> · 688f641f
      leviw@chromium.org authored
              Reviewed by Ryosuke Niwa.
      
              Deleting content directly following a button inserts an unnecessary placeholder
              https://bugs.webkit.org/show_bug.cgi?id=56053
      
              Test to ensure unnecessary placeholders aren't inserted after buttons when delete is pressed.
      
              * editing/deleting/delete-inserts-br-after-button-expected.txt: Added.
              * editing/deleting/delete-inserts-br-after-button.html: Added.
      2011-03-09  Levi Weintraub  <leviw@chromium.org>
      
              Reviewed by Ryosuke Niwa.
      
              Deleting content directly following a button inserts an unnecessary placeholder
              https://bugs.webkit.org/show_bug.cgi?id=56053
      
              Fixing a use of Node's enclosingBlockFlowElement with enclosingBlock htmlediting's
              enclosingBlock, as enclosingBlockFlowElement would return inline-block elements despite
              DeleteSelectionCommand treating them as blockflow.
      
              Test: editing/deleting/delete-inserts-br-after-button.html
      
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::mergeParagraphs):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81056 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      688f641f
  7. 10 Mar, 2011 1 commit
    • rniwa@webkit.org's avatar
      2011-03-10 Ryosuke Niwa <rniwa@webkit.org> · 45ecbafb
      rniwa@webkit.org authored
              Reviewed by Tony Chang.
      
              startOfBlock and endOfBlock may return a position inside hr
              https://bugs.webkit.org/show_bug.cgi?id=56025
      
              Replaced calls to enclosingBlockFlowElement in startOfBlock and endOfBlock by
              calls to enclosingBlock. Added EditingBoundaryCrossingRule to the argument lists
              of startOfBlock, endOfBlock, and enclosingBlock. Also replaced the last boolean
              argument variable of enclosingNodeOfType by EditingBoundaryCrossingRule.
      
              Also replaced calls to enclosingBlockFlowElement in inSameBlock by calls to
              enclosingBlock to be consitent with startOfBlock and endOfBlock.
      
              This patch also replaced calls to deprecatedNode in startOfBlock, endOfBlock,
              and inSameBlock by calls to containerNode because the enclosing block of a position
              should never be before or after the position.
      
              No tests are added because this change only affects WebCore internally.
      
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::initializePositionData): Calls enclosingNodeOfType.
              Pass CanCrossEditingBoundary instead of false.
              * editing/htmlediting.cpp:
              (WebCore::unsplittableElementForPosition): Ditto.
              (WebCore::enclosingBlock): Takes EditingBoundaryCrossingRule and passes it to
              enclosingNodeOfType.
              (WebCore::enclosingNodeOfType): Takes EditingBoundaryCrossingRule instead of boolean.
              Fixed a bug that it stops walking the tree when it reached the root editable node
              even when the editing boundary crossing rule is CanCrossEditingBoundary.
              * editing/htmlediting.h: Prototype changes.
              * editing/visible_units.cpp:
              (WebCore::startOfBlock): Calls enclosingBlock instead of enclosingBlockFlowElement.
              Also added an early exit when there's no enclosing block.
              (WebCore::endOfBlock): Ditto. The early exist in this case prevents crash in
              lastPositionInNode.
              (WebCore::inSameBlock): Calls enclosingBlock instead of enclosingBlockFlowElement.
              (WebCore::isStartOfBlock): Calls startOfBlock with CanCrossEditingBoundary because
              we don't care where the start of block is when we're comparing against the given position.
              (WebCore::isEndOfBlock): Ditto.
              * editing/visible_units.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@80793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      45ecbafb
  8. 21 Feb, 2011 1 commit
    • rniwa@webkit.org's avatar
      2011-02-17 Ryosuke Niwa <rniwa@webkit.org> · 62b16970
      rniwa@webkit.org authored
              Reviewed by Kent Tamura.
      
              Rename Position::node() to Position::deprecatedNode()
              https://bugs.webkit.org/show_bug.cgi?id=54622
      
              Done the rename. All calls to node() are replaced by calls to deprecatedNode().
      
              * src/WebViewImpl.cpp:
              (WebKit::WebViewImpl::setComposition): Check the nullity of startContainer() instead of startPosition()->node().
              (WebKit::WebViewImpl::confirmComposition): Ditto.
              (WebKit::WebViewImpl::textInputType):
              (WebKit::WebViewImpl::caretOrSelectionBounds):
      2011-02-17  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Kent Tamura.
      
              Rename Position::node() to Position::deprecatedNode()
              https://bugs.webkit.org/show_bug.cgi?id=54622
      
              Replaced the call to node() by a call to containerNode() because the returned node is
              used to determine whether or not the selected contents are editable and such a check
              must be done against the container node.
      
              * WebCoreSupport/EditorClientQt.cpp:
              (WebCore::EditorClientQt::handleKeyboardEvent):
      2011-02-17  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Kent Tamura.
      
              Rename Position::node() to Position::deprecatedNode()
              https://bugs.webkit.org/show_bug.cgi?id=54622
      
              Done the rename. All calls to node() are replaced by calls to deprecatedNode().
      
              * webkit/webkitwebview.cpp:
              (webkit_web_view_popup_menu_handler):
      2011-02-17  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Kent Tamura.
      
              Rename Position::node() to Position::deprecatedNode()
              https://bugs.webkit.org/show_bug.cgi?id=54622
      
              * WebView/WebFrame.mm:
              (-[WebFrame _smartDeleteRangeForProposedRange:]):
      2011-02-17  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Kent Tamura.
      
              Rename Position::node() to Position::deprecatedNode()
              https://bugs.webkit.org/show_bug.cgi?id=54622
      
              Replaced the call to node() by a call to containerNode() because the returned node is
              used to determine whether or not the selected contents are editable and such a check
              must be done against the container node.
      
              * WebCoreSupport/EditorClientHaiku.cpp:
              (WebCore::EditorClientHaiku::handleKeyboardEvent):
      2011-02-17  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Kent Tamura.
      
              Rename Position::node() to Position::deprecatedNode()
              https://bugs.webkit.org/show_bug.cgi?id=54622
      
              Done the rename. All calls to node() are replaced by calls to deprecatedNode() except when
              calls were of the form node()->document() and node()->inDocument() in which case they were
              replaced by anchorNode()->document() and anchorNode()->inDocument() respectively.
      
              * WebCore.exp.in: Added Position::containerNode.
      
              The rest abbreviated for simplicity. Please see svn log.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      62b16970
  9. 19 Jan, 2011 1 commit
    • commit-queue@webkit.org's avatar
      2011-01-19 Levi Weintraub <leviw@google.com> · c56f5de7
      commit-queue@webkit.org authored
              Reviewed by Ryosuke Niwa.
      
              Replaced rangeCompliantEquivalent with Position::parentAnchoredEquivalent
              and simplified the logic a bit. Unfortunately, Tables and some legacy
              editing positions still need to be handled specifically.
      
              remove rangeCompliantEquivalent and replace it with Position methods
              https://bugs.webkit.org/show_bug.cgi?id=25057
      
              No new tests as this is a refactor that doesn't change behavior.
      
              * WebCore.exp.in:
              * dom/Document.cpp:
              (WebCore::Document::caretRangeFromPoint):
              * dom/Position.cpp:
              (WebCore::Position::parentAnchoredEquivalent):
              * dom/Position.h:
              * editing/ApplyStyleCommand.cpp:
              (WebCore::ApplyStyleCommand::applyBlockStyle):
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::insertNodeAt):
              (WebCore::CompositeEditCommand::moveParagraphs):
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::initializePositionData):
              (WebCore::DeleteSelectionCommand::mergeParagraphs):
              * editing/Editor.cpp:
              (WebCore::Editor::textDirectionForSelection):
              (WebCore::Editor::advanceToNextMisspelling):
              * editing/InsertLineBreakCommand.cpp:
              (WebCore::InsertLineBreakCommand::shouldUseBreakElement):
              * editing/InsertParagraphSeparatorCommand.cpp:
              (WebCore::InsertParagraphSeparatorCommand::doApply):
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::handleStyleSpansBeforeInsertion):
              * editing/VisiblePosition.cpp:
              (WebCore::makeRange):
              (WebCore::setStart):
              (WebCore::setEnd):
              * editing/VisibleSelection.cpp:
              (WebCore::VisibleSelection::firstRange):
              (WebCore::VisibleSelection::toNormalizedRange):
              (WebCore::makeSearchRange):
              * editing/htmlediting.cpp:
              (WebCore::indexForVisiblePosition):
              * editing/htmlediting.h:
              * editing/visible_units.cpp:
              (WebCore::previousBoundary):
              (WebCore::nextBoundary):
              * page/DOMSelection.cpp:
              (WebCore::anchorPosition):
              (WebCore::focusPosition):
              (WebCore::basePosition):
              (WebCore::extentPosition):
      2011-01-19  Levi Weintraub  <leviw@google.com>
      
              Reviewed by Ryosuke Niwa.
      
              Updating to use Position::parentAnchoredEquivalent instead of
              the old htmlediting rangeCompliantEquivalent.
      
              remove rangeCompliantEquivalent and replace it with Position methods
              https://bugs.webkit.org/show_bug.cgi?id=25057
      
              * WebView/WebFrame.mm:
              (-[WebFrame _smartDeleteRangeForProposedRange:]):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76107 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c56f5de7
  10. 18 Jan, 2011 1 commit
    • rniwa@webkit.org's avatar
      2011-01-18 Ryosuke Niwa <rniwa@webkit.org> · 186f5bb6
      rniwa@webkit.org authored
              Reviewed by Eric Seidel.
      
              Stop instantiating legacy editing positions in DeleteSelectionCommand, IndentOudentCommand,
              InsertLineBreakCommand, InsertListCOmmand.cpp, InsertParagraphSeparatorCommand, and htmlediting.cpp
              https://bugs.webkit.org/show_bug.cgi?id=52644
      
              This is a cleanup to stop instantiating legacy editing positions in the following tests.
              firstDeepEditingPositionForNode and lastDeepEditingPositionForNode in htmlediting.h are not updated
              because doing so requires significant code changes. They are tracked on the bug 52642.
      
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::initializeStartEnd):
              (WebCore::updatePositionForNodeRemoval):
              (WebCore::DeleteSelectionCommand::removeNode):
              (WebCore::updatePositionForTextRemoval):
              (WebCore::DeleteSelectionCommand::handleGeneralDelete):
              * editing/IndentOutdentCommand.cpp:
              (WebCore::IndentOutdentCommand::outdentParagraph):
              * editing/InsertLineBreakCommand.cpp:
              (WebCore::InsertLineBreakCommand::doApply):
              * editing/InsertListCommand.cpp:
              (WebCore::InsertListCommand::doApplyForSingleParagraph):
              (WebCore::InsertListCommand::unlistifyParagraph):
              (WebCore::InsertListCommand::listifyParagraph):
              * editing/InsertParagraphSeparatorCommand.cpp:
              (WebCore::InsertParagraphSeparatorCommand::doApply):
              * editing/htmlediting.cpp:
              (WebCore::enclosingBlock):
              (WebCore::enclosingList):
              (WebCore::enclosingListChild):
              (WebCore::indexForVisiblePosition):
              (WebCore::isNodeVisiblyContainedWithin):
              (WebCore::avoidIntersectionWithNode):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      186f5bb6
  11. 08 Jan, 2011 1 commit
  12. 06 Dec, 2010 1 commit
    • rniwa@webkit.org's avatar
      2010-12-06 Ryosuke Niwa <rniwa@webkit.org> · 5359dff3
      rniwa@webkit.org authored
              Reviewed by Tony Chang.
      
              ApplyStyleCommand should take EditingStyle instead of CSSStyleDeclaration
              https://bugs.webkit.org/show_bug.cgi?id=49938
      
              Modified ApplyStyleCommand::ApplyStyleCommand and ApplyStyleCommand::create to take EditingStyle*
              instead of CSSStyleDeclaration*. Also replaced much of code in Editor::computeAndSetTypingStyle
              by calls to EditingStyle's member functions and extracted EditingStyle::overrideWith and
              EditingStyle::extractAndRemoveBlockProperties.
      
              No new tests are added since this is a refactoring.
      
              * WebCore.exp.in: Added SelectionController::copyTypingStyle and EditingStyle::~EditingStyle.
              * css/CSSMutableStyleDeclaration.cpp: Made CSSMutableStyleDeclaration* in the argument list const.
              (WebCore::CSSMutableStyleDeclaration::merge):
              * css/CSSMutableStyleDeclaration.h:
              * editing/ApplyStyleCommand.cpp:
              (WebCore::ApplyStyleCommand::ApplyStyleCommand): Takes EditingStyle* instead of CSSStyleDeclaration*.
              (WebCore::ApplyStyleCommand::doApply): Uses EditingStyle.
              * editing/ApplyStyleCommand.h: m_style is now a ref-pointer to EditingStyle instead of CSSMutableStyleDeclaration.
              (WebCore::ApplyStyleCommand::create): Takes EditingStyle* instead of CSSStyleDeclaration*.
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::applyStyle): Ditto.
              (WebCore::CompositeEditCommand::moveParagraphs): Calls applyStyle.
              (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): Ditto.
              * editing/CompositeEditCommand.h:
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Ditto.
              * editing/EditCommand.cpp:
              * editing/EditCommand.h:
              * editing/EditingStyle.cpp:
              (WebCore::EditingStyle::~EditingStyle): Added.
              (WebCore::EditingStyle::overrideWithStyle): Extracted from Editor::calculateTypingStyleAfterDelete.
              (WebCore::EditingStyle::copy): Added.
              (WebCore::EditingStyle::extractAndRemoveBlockProperties): Extracted from Editor::calculateTypingStyleAfterDelete.
              * editing/EditingStyle.h:
              * editing/Editor.cpp:
              (WebCore::Editor::applyStyle): Calls ApplyStyleCommand::create.
              (WebCore::Editor::applyParagraphStyle): Ditto.
              (WebCore::Editor::computeAndSetTypingStyle): Ditto.
              * editing/InsertLineBreakCommand.cpp:
              (WebCore::InsertLineBreakCommand::doApply): Calls applyStyle.
              * editing/InsertParagraphSeparatorCommand.cpp:
              (WebCore::InsertParagraphSeparatorCommand::applyStyleAfterInsertion): Ditto.
              * editing/InsertTextCommand.cpp:
              (WebCore::InsertTextCommand::input): Ditto.
              * editing/RemoveFormatCommand.cpp:
              (WebCore::RemoveFormatCommand::doApply): Calls ApplyStyleCommand::create.
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::ReplaceSelectionCommand::completeHTMLReplacement): Calls applyStyle.
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::copyTypingStyle): Moved from SelectionController.h
              * editing/SelectionController.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73416 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5359dff3
  13. 27 Nov, 2010 1 commit
    • commit-queue@webkit.org's avatar
      2010-11-27 Benjamin Kalman <kalman@chromium.org> · f362872b
      commit-queue@webkit.org authored
              Reviewed by Darin Adler.
      
              Move Position::EditingBoundaryCrossingRule to a new header file
              https://bugs.webkit.org/show_bug.cgi?id=49630
      
              * GNUmakefile.am:
              * WebCore.exp.in:
              * WebCore.gypi:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * dom/Position.cpp:
              (WebCore::downstreamIgnoringEditingBoundaries):
              (WebCore::upstreamIgnoringEditingBoundaries):
              * dom/Position.h:
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::doApply):
              * editing/EditingBoundary.h: Added.
              * editing/visible_units.cpp:
              (WebCore::startOfParagraph):
              (WebCore::endOfParagraph):
              (WebCore::isStartOfParagraph):
              (WebCore::isEndOfParagraph):
              * editing/visible_units.h:
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::createVisiblePosition):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72777 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f362872b
  14. 17 Nov, 2010 1 commit
    • dglazkov@chromium.org's avatar
      Converge means of querying a parent node into one way, which is Node::parentNode. · e43caa78
      dglazkov@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=49686
      
      Reviewed by Darin Adler.
      
      WebCore:
      
      No change in behavior, so no new tests.
      
      * accessibility/AccessibilityObject.cpp:
      (WebCore::renderListItemContainerForNode): Changed to use parentNode.
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::mouseButtonListener): Ditto.
      (WebCore::siblingWithAriaRole): Ditto.
      (WebCore::AccessibilityRenderObject::getDocumentLinks): Ditto.
      (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest): Ditto.
      * accessibility/mac/AccessibilityObjectWrapper.mm: Ditto.
      (blockquoteLevel): Ditto.
      * bindings/v8/V8GCController.cpp:
      (WebCore::ObjectGrouperVisitor::visitDOMWrapper): Ditto.
      * dom/ContainerNode.cpp: Ditto.
      (WebCore::ContainerNode::insertBefore): Ditto.
      (WebCore::ContainerNode::insertBeforeCommon): Ditto.
      (WebCore::ContainerNode::replaceChild): Ditto.
      (WebCore::ContainerNode::removeChild): Ditto.
      (WebCore::ContainerNode::appendChild): Ditto.
      (WebCore::ContainerNode::parserAddChild): Ditto.
      * dom/DocumentType.cpp:
      (WebCore::DocumentType::insertedIntoDocument): Ditto.
      * dom/Element.cpp:
      (WebCore::Element::computeInheritedLanguage): Ditto.
      * dom/MouseRelatedEvent.cpp:
      (WebCore::MouseRelatedEvent::receivedTarget): Ditto.
      * dom/Position.cpp:
      (WebCore::Position::isCandidate): Changed to use parentNode.
      * dom/PositionIterator.cpp:
      (WebCore::PositionIterator::isCandidate): Ditto.
      * editing/AppendNodeCommand.cpp:
      (WebCore::AppendNodeCommand::AppendNodeCommand): Ditto.
      * editing/ApplyStyleCommand.cpp:
      (WebCore::dummySpanAncestorForNode): Ditto.
      (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi): Ditto.
      (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock): Ditto.
      (WebCore::highestEmbeddingAncestor): Ditto.
      (WebCore::ApplyStyleCommand::splitTextElementAtEnd): Ditto.
      (WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical): Ditto.
      (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical): Ditto.
      * editing/CompositeEditCommand.cpp:
      (WebCore::CompositeEditCommand::splitTreeToNode): Ditto.
      * editing/DeleteSelectionCommand.cpp:
      (WebCore::updatePositionForNodeRemoval): Ditto.
      * editing/Editor.cpp:
      (WebCore::Editor::textDirectionForSelection): Ditto.
      * editing/MergeIdenticalElementsCommand.cpp:
      (WebCore::MergeIdenticalElementsCommand::doUnapply): Ditto.
      * editing/htmlediting.cpp:
      (WebCore::isEmptyTableCell): Ditto.
      * editing/markup.cpp:
      (WebCore::StyledMarkupAccumulator::serializeNodes): Ditto.
      * editing/visible_units.cpp:
      (WebCore::previousLinePosition): Ditto.
      (WebCore::nextLinePosition): Ditto.
      * html/HTMLAreaElement.cpp:
      (WebCore::HTMLAreaElement::imageElement): Ditto.
      * html/HTMLElement.cpp:
      (WebCore::HTMLElement::setOuterHTML): Ditto.
      (WebCore::HTMLElement::insertAdjacent): Ditto.
      (WebCore::HTMLElement::supportsFocus): Ditto.
      * html/HTMLEmbedElement.cpp:
      (WebCore::HTMLEmbedElement::insertedIntoDocument): Ditto.
      (WebCore::HTMLEmbedElement::attributeChanged): Ditto.
      * html/HTMLTableElement.cpp:
      (WebCore::HTMLTableElement::insertRow): Ditto.
      * html/HTMLTableRowsCollection.cpp: Ditto.
      (WebCore::isInHead): Ditto.
      (WebCore::isInBody): Ditto.
      (WebCore::isInFoot): Ditto.
      (WebCore::HTMLTableRowsCollection::rowAfter): Ditto.
      * html/HTMLViewSourceDocument.cpp:
      (WebCore::HTMLViewSourceDocument::addRange): Ditto.
      * html/MediaDocument.cpp:
      (WebCore::MediaDocument::replaceMediaElementTimerFired): Ditto.
      * html/parser/HTMLConstructionSite.cpp:
      (WebCore::HTMLConstructionSite::attach): Ditto.
      (WebCore::HTMLConstructionSite::findFosterSite): Ditto.
      * html/parser/HTMLTreeBuilder.cpp:
      * page/FocusController.cpp:
      (WebCore::FocusController::findFocusableNodeInDirection): Ditto.
      * rendering/MediaControlElements.cpp:
      (WebCore::MediaControlElement::rendererIsNeeded): Ditto.
      (WebCore::MediaControlElement::attach): Ditto.
      (WebCore::MediaControlElement::updateStyle): Ditto.
      (WebCore::MediaControlInputElement::rendererIsNeeded): Ditto.
      (WebCore::MediaControlInputElement::attach): Ditto.
      (WebCore::MediaControlInputElement::updateStyle): Ditto.
      * rendering/RenderSVGGradientStop.cpp:
      (WebCore::RenderSVGGradientStop::gradientElement): Ditto.
      * svg/SVGAElement.cpp:
      (WebCore::SVGAElement::createRenderer): Ditto.
      (WebCore::SVGAElement::childShouldCreateRenderer): Ditto.
      * svg/SVGFELightElement.cpp:
      (WebCore::SVGFELightElement::svgAttributeChanged): Ditto.
      (WebCore::SVGFELightElement::childrenChanged): Ditto.
      * svg/SVGFEMergeNodeElement.cpp:
      (WebCore::SVGFEMergeNodeElement::svgAttributeChanged): Ditto.
      * svg/SVGLength.cpp:
      (WebCore::SVGLength::determineViewport): Ditto.
      * svg/SVGStyledElement.cpp:
      (WebCore::SVGStyledElement::updateRelativeLengthsInformation): Ditto.
      * svg/SVGUseElement.cpp:
      (WebCore::SVGUseElement::removeDisallowedElementsFromSubtree): Ditto.
      * svg/animation/SVGSMILElement.cpp:
      (WebCore::SVGSMILElement::insertedIntoDocument): Ditto.
      * xml/XPathNodeSet.cpp:
      (WebCore::XPath::NodeSet::sort): Ditto.
      * xml/XPathStep.cpp:
      (WebCore::XPath::Step::nodesInAxis): Ditto.
      * xml/XSLTProcessorLibxslt.cpp:
      (WebCore::xsltStylesheetPointer): Ditto.
      
      WebKit/chromium:
      
      * src/WebFrameImpl.cpp:
      (WebKit::WebFrameImpl::insertStyleText): Changed to use parentNode.
      (WebKit::WebFrameImpl::setFindEndstateFocusAndSelection): Ditto.
      
      WebKit/qt:
      
      * Api/qwebelement.cpp:
      (QWebElement::prependOutside): Changed to use parentNode.
      (QWebElement::appendOutside): Ditto.
      (QWebElement::encloseContentsWith): Ditto.
      (QWebElement::encloseWith): Ditto.
      
      WebKit2:
      
      * WebProcess/WebPage/WebPage.cpp: Changed to use parentNode.
      (WebKit::WebPage::findZoomableAreaForPoint): Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72259 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e43caa78
  15. 08 Nov, 2010 1 commit
    • rniwa@webkit.org's avatar
      2010-11-08 Ryosuke Niwa <rniwa@webkit.org> · 0d96cf61
      rniwa@webkit.org authored
              Reviewed by Darin Adler.
      
              Remove the remaining editing-style functions from ApplyStyleCommand
              https://bugs.webkit.org/show_bug.cgi?id=49155
      
              Replaced removeNonEditingProperties, editingStyleAtPosition, prepareEditingStyleToApplyAt,
              and removeStylesAddedByNode in ApplyStyleCommand.cpp by removeNonEditingProperties, EditingStyle::create,
              prepareToApplyAt, and removeStyleAddedByNode in EditingStyle.cpp.
      
              Also removed unnecessary header includes from various cpp files.
      
              No tests are added since this is a cleanup.
      
              * editing/ApplyStyleCommand.cpp: Removed removeNonEditingProperties, editingStyleAtPosition,
              prepareEditingStyleToApplyAt, and removeStylesAddedByNode.
              * editing/ApplyStyleCommand.h: Ditto.
              * editing/DeleteSelectionCommand.cpp: Removed removeEnclosingAnchorStyle.
              (WebCore::DeleteSelectionCommand::saveTypingStyleState): Calls removeStylesAddedByNode instead.
              * editing/EditingStyle.cpp:
              (WebCore::copyEditingProperties): Moved and renamed ApplyStyleCommand::removeNonEditingProperties.
              (WebCore::editingStyleFromComputedStyle): Calls copyEditingProperties. Changed the argument to PassRefPtr
              as supposed to a raw pointer for convenience.
              (WebCore::EditingStyle::init): Calls editingStyleFromComputedStyle.
              (WebCore::EditingStyle::removeStyleAddedByNode): Added.
              (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode): Added.
              (WebCore::EditingStyle::removeNonEditingProperties): Added.
              (WebCore::editingStyleIncludingTypingStyle): Calls copyEditingProperties.
              * editing/EditingStyle.h: Added prototypes.
              * editing/Editor.cpp:
              (WebCore::Editor::selectionComputedStyle): Uses EditingStyle.
              * editing/InsertParagraphSeparatorCommand.cpp:
              (WebCore::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion): Ditto.
              (WebCore::InsertParagraphSeparatorCommand::applyStyleAfterInsertion): Ditto.
              * editing/InsertParagraphSeparatorCommand.h:
              * editing/RemoveFormatCommand.cpp:
              (WebCore::RemoveFormatCommand::doApply): Ditto.
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::handleStyleSpansBeforeInsertion): Ditto.
              (WebCore::ReplaceSelectionCommand::handleStyleSpans): Ditto.
              (WebCore::ReplaceSelectionCommand::doApply): Ditto.
              (WebCore::ReplaceSelectionCommand::completeHTMLReplacement): Ditto.
              * editing/ReplaceSelectionCommand.h:
              * editing/markup.cpp: Removed removeEnclosingMailBlockquoteStyle and removeDefaultStyles.
              (WebCore::createMarkup): Uses EditingStyle.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71556 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0d96cf61
  16. 06 Nov, 2010 1 commit
    • rniwa@webkit.org's avatar
      2010-11-04 Ryosuke Niwa <rniwa@webkit.org> · 7e06f4ab
      rniwa@webkit.org authored
              Reviewed by Darin Adler.
      
              Bug 46335 - Add EditingStyle
              https://bugs.webkit.org/show_bug.cgi?id=46335
      
              Added EditingStyle to WebCore/editing.  This class is intended to encapsulate getPropertiesNotIn, removeNonEditingProperties,
              editingStyleAtPosition, and prepareEditingStyleToApplyAt in ApplyStyleCommand.cpp once deployed everywhere.
              Deployed it in typing styles.
      
              No new tests are added since this is a refactoring in progress.
      
              * CMakeLists.txt: Added EditingStyle.cpp
              * GNUmakefile.am: Added EditingStyle.cpp and EditingStyle.h
              * WebCore.gypi: Ditto.
              * WebCore.pro: Ditto.
              * WebCore.xcodeproj/project.pbxproj: Ditto.
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::moveParagraphs): Calls editingStyleIncludingTypingStyle.
              (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): Uses EditingStyle.
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::saveTypingStyleState): Ditto.
              (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Ditto.
              * editing/DeleteSelectionCommand.h:
              * editing/EditingStyle.cpp: Added.
              (WebCore::editingStyleFromComputedStyle): Added.
              (WebCore::EditingStyle::EditingStyle): Added.
              (WebCore::EditingStyle::init): Added; a clone of ApplyStyleCommand::editingStyleAtPosition.
              (WebCore::EditingStyle::removeTextFillAndStrokeColorsIfNeeded): Extracted from init.
              (WebCore::EditingStyle::replaceFontSizeByKeywordIfPossible): Extracted from init.
              (WebCore::EditingStyle::isEmpty): Added.
              (WebCore::EditingStyle::setStyle): Added.
              (WebCore::EditingStyle::clear): Added.
              (WebCore::EditingStyle::removeBlockProperties): Added.
              (WebCore::EditingStyle::prepareToApplyAt): Added.
              (WebCore::editingStyleIncludingTypingStyle): Added.
              * editing/EditingStyle.h: Added.
              (WebCore::EditingStyle::create): Added.
              (WebCore::EditingStyle::style): Added.
              * editing/RemoveFormatCommand.cpp:
              (WebCore::RemoveFormatCommand::doApply): Uses EditingStyle.
              * editing/SelectionController.h:
              (WebCore::SelectionController::typingStyle): Uses EditingStyle.
              (WebCore::SelectionController::clearTypingStyle): Uses EditingStyle.
              (WebCore::SelectionController::setTypingStyle): Uses EditingStyle.
              * rendering/style/RenderStyle.h: Added EditingStyle as a friend.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71469 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7e06f4ab
  17. 29 Oct, 2010 1 commit
    • commit-queue@webkit.org's avatar
      2010-10-29 Benjamin Kalman <kalman@google.com> · 1d836ce2
      commit-queue@webkit.org authored
              Reviewed by Tony Chang.
      
              Deleting contenteditable text to the left of a non-contenteditable span inserts unnecessary placeholder <br/>
              https://bugs.webkit.org/show_bug.cgi?id=48658
      
              * editing/deleting/5390681-expected.txt: Update test for changed behaviour.
              * editing/deleting/5390681.html: Ditto (update comment).
              * editing/deleting/delete-mixed-editable-content-001-expected.txt: Ditto.
              * editing/pasteboard/copy-backslash-with-euc-expected.txt: Ditto.
      2010-10-29  Benjamin Kalman  <kalman@google.com>
      
              Reviewed by Tony Chang.
      
              Deleting contenteditable text to the left of a non-contenteditable span inserts unnecessary placeholder <br/>
              https://bugs.webkit.org/show_bug.cgi?id=48658
      
              * WebCore.exp.in: Update is{Start,End}OfParagraph symbols.
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::doApply): Cross editability boundaries when determining whether to insert placeholder.
              * editing/visible_units.cpp: Allow editability boundary to be crossed in {start,end,isStart,isEnd}OfParagraph.
              (WebCore::startOfParagraph): Also, avoid returning a position where renderer can't accept caret, like in endOfParagraph.
              (WebCore::endOfParagraph):
              (WebCore::isStartOfParagraph):
              (WebCore::isEndOfParagraph):
              * editing/visible_units.h: Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70932 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1d836ce2
  18. 22 Sep, 2010 1 commit
    • commit-queue@webkit.org's avatar
      2010-09-22 Mario Sanchez Prada <msanchez@igalia.com> · 2aa8d03c
      commit-queue@webkit.org authored
              Reviewed by Martin Robinson.
      
              [Gtk] object:text-changed events should be emitted for entries and password text
              https://bugs.webkit.org/show_bug.cgi?id=25898
      
              Implement proper 'text-changed' signal emission for the GTK port
      
              Call deleteTextFromNode() when needed while removing text nodes.
              Do it even when removeNode() is going to be called afterwards, in
              order to allow accessibility to get properly notified about the
              text being removed alongside with that node.
      
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::handleGeneralDelete):
      
              New function in AXObjectCache to call when text changes in a node.
              Added one new function to allow notifying something changed in a
              text node through the associated RenderObject, making such a
              function dependant on the platform-specific implementation,
              provided through a protected function (provided a proper
              implementation for the GTK port and a dummy one for the others).
      
              * accessibility/AXObjectCache.cpp:
              (WebCore::AXObjectCache::nodeTextChangeNotification): New
              * accessibility/AXObjectCache.h:
              (WebCore::AXObjectCache::AXTextChange): New enumeration
              (WebCore::AXObjectCache::nodeTextChangeNotification): New
              (WebCore::AXObjectCache::nodeTextChangePlatformNotification): New
              * accessibility/AccessibilityRenderObject.h:
              (WebCore::toAccessibilityRenderObject):
              * accessibility/chromium/AXObjectCacheChromium.cpp:
              (WebCore::AXObjectCache::nodeTextChangePlatformNotification): New
              * accessibility/gtk/AXObjectCacheAtk.cpp:
              (WebCore::emitTextChanged):
              (WebCore::AXObjectCache::nodeTextChangePlatformNotification): New
              * accessibility/mac/AXObjectCacheMac.mm:
              (WebCore::AXObjectCache::nodeTextChangePlatformNotification): New
              * accessibility/win/AXObjectCacheWin.cpp:
              (WebCore::AXObjectCache::nodeTextChangePlatformNotification): New
      
              Notify accessibility when something changes in a text node.
              Call to AXObjectCache::nodeTextChangeNotification() to notify when
              text was inserted/deleted when applying/unapplying a text edition
              command, along with the offset in the original text where the
              change took place and the number of characters that got affected.
      
              * editing/AppendNodeCommand.cpp:
              (WebCore::sendAXTextChangedIgnoringLineBreaks):
              (WebCore::AppendNodeCommand::doApply):
              (WebCore::AppendNodeCommand::doUnapply):
              * editing/DeleteFromTextNodeCommand.cpp:
              (WebCore::DeleteFromTextNodeCommand::doApply):
              (WebCore::DeleteFromTextNodeCommand::doUnapply):
              * editing/InsertIntoTextNodeCommand.cpp:
              (WebCore::InsertIntoTextNodeCommand::doApply):
              (WebCore::InsertIntoTextNodeCommand::doUnapply):
              * editing/InsertNodeBeforeCommand.cpp:
              (WebCore::InsertNodeBeforeCommand::doApply):
              (WebCore::InsertNodeBeforeCommand::doUnapply):
              (WebCore::DeleteSelectionCommand::handleGeneralDelete):
      2010-09-22  Mario Sanchez Prada  <msanchez@igalia.com>
      
              Reviewed by Martin Robinson.
      
              [Gtk] object:text-changed events should be emitted for entries and password text
              https://bugs.webkit.org/show_bug.cgi?id=25898
      
              New unit test to make sure text-changed signals are emitted
      
              * tests/testatk.c:
              (textChangedCb): New. Signal handler for the
              text-changed::insert and text-changed::delete signals.
              (checkTextChangesAndBailOut): New. Source function to check
              the global result of the test and quit from the main loop.
              (testWebkitAtkTextChangedNotifications): New test.
              (main):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2aa8d03c
  19. 10 Sep, 2010 1 commit
    • darin@apple.com's avatar
      2010-09-09 Darin Adler <darin@apple.com> · b17ec2f7
      darin@apple.com authored
              Reviewed by Adam Barth.
      
              Move functions from Frame to SelectionController as planned
              https://bugs.webkit.org/show_bug.cgi?id=45508
      
              * src/WebFrameImpl.cpp:
              (WebKit::WebFrameImpl::selectionBoundsRect):
              Call functions on selection().
      2010-09-09  Darin Adler  <darin@apple.com>
      
              Reviewed by Adam Barth.
      
              Move functions from Frame to SelectionController as planned
              https://bugs.webkit.org/show_bug.cgi?id=45508
      
              * WebView.cpp:
              (WebView::selectionRect):
              (WebView::centerSelectionInVisibleArea):
              Call functions on selection().
      2010-09-09  Darin Adler  <darin@apple.com>
      
              Reviewed by Adam Barth.
      
              Move functions from Frame to SelectionController as planned
              https://bugs.webkit.org/show_bug.cgi?id=45508
      
              * WebView/WebFrame.mm:
              (-[WebFrame _selectionGranularity]):
              (-[WebFrame _insertParagraphSeparatorInQuotedContent]):
              (-[WebFrame _typingStyle]):
              (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
              * WebView/WebHTMLRepresentation.mm:
              (-[WebHTMLRepresentation currentForm]):
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView jumpToSelection:]):
              (-[WebHTMLView centerSelectionInVisibleArea:]):
              (-[WebHTMLView _canSmartCopyOrDelete]):
              (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
              (-[WebHTMLView selectionRect]):
              (-[WebHTMLView selectionTextRects]):
              (-[WebHTMLView selectionImageRect]):
              * WebView/WebView.mm:
              (-[WebView setEditable:]):
              Call functions on selection().
      2010-09-09  Darin Adler  <darin@apple.com>
      
              Reviewed by Adam Barth.
      
              Move functions from Frame to SelectionController as planned
              https://bugs.webkit.org/show_bug.cgi?id=45508
      
              Also removed Frame::dragCaretController since it just called Page::dragCaretController.
      
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::setSelection):
              (WebCore::SelectionController::modify):
              (WebCore::SelectionController::selectFrameElementInParentIfFullySelected):
              (WebCore::SelectionController::selectAll):
              (WebCore::SelectionController::focusedOrActiveStateChanged):
              (WebCore::SelectionController::notifyRendererOfSelectionChange):
              (WebCore::isFrameElement):
              (WebCore::SelectionController::setFocusedNodeIfNeeded):
              (WebCore::SelectionController::paintDragCaret):
              (WebCore::SelectionController::shouldDeleteSelection):
              (WebCore::SelectionController::selectionBounds):
              (WebCore::SelectionController::selectionTextRects):
              (WebCore::scanForForm):
              (WebCore::SelectionController::currentForm):
              (WebCore::SelectionController::revealSelection):
              (WebCore::SelectionController::setSelectionFromNone):
              (WebCore::SelectionController::shouldChangeSelection):
              * editing/SelectionController.h:
              Moved functions here from Frame.
      
              * page/Frame.cpp:
              * page/Frame.h:
              Moved functions to SelectionController.
              Reorganized header to be easier to read and a bit more logical.
      
              * WebCore.exp.in: Updated.
      
              * dom/Document.cpp:
              (WebCore::Document::nodeChildrenWillBeRemoved):
              (WebCore::Document::nodeWillBeRemoved):
              Call Page::dragCaretController directly.
      
              * dom/Element.cpp:
              (WebCore::Element::updateFocusAppearance):
              * dom/InputElement.cpp:
              (WebCore::InputElement::updateFocusAppearance):
              * editing/ApplyStyleCommand.cpp:
              (WebCore::ApplyStyleCommand::editingStyleAtPosition):
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
              * editing/Editor.cpp:
              (WebCore::Editor::canSmartCopyOrDelete):
              (WebCore::Editor::textDirectionForSelection):
              (WebCore::Editor::appliedEditing):
              (WebCore::Editor::insertTextWithoutSendingTextEvent):
              (WebCore::Editor::advanceToNextMisspelling):
              (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
              (WebCore::Editor::revealSelectionAfterEditingOperation):
              (WebCore::Editor::transpose):
              (WebCore::Editor::changeSelectionAfterCommand):
              (WebCore::Editor::computeAndSetTypingStyle):
              (WebCore::Editor::selectionComputedStyle):
              (WebCore::Editor::styleForSelectionStart):
              (WebCore::Editor::findString):
              * editing/EditorCommand.cpp:
              (WebCore::executeDelete):
              * editing/InsertLineBreakCommand.cpp:
              (WebCore::InsertLineBreakCommand::doApply):
              * editing/InsertTextCommand.cpp:
              (WebCore::InsertTextCommand::input):
              * editing/RemoveFormatCommand.cpp:
              (WebCore::RemoveFormatCommand::doApply):
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::ReplaceSelectionCommand::doApply):
              * editing/TypingCommand.cpp:
              (WebCore::TypingCommand::insertTextRunWithoutNewlines):
              (WebCore::TypingCommand::deleteKeyPressed):
              (WebCore::TypingCommand::forwardDeleteKeyPressed):
              * html/HTMLTextAreaElement.cpp:
              (WebCore::HTMLTextAreaElement::updateFocusAppearance):
              * page/ContextMenuController.cpp:
              (WebCore::ContextMenuController::contextMenuItemSelected):
              * page/DragController.cpp:
              (WebCore::DragController::concludeEditDrag):
              (WebCore::dragLocForSelectionDrag):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::selectClosestWordFromMouseEvent):
              (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
              (WebCore::EventHandler::handleMousePressEventTripleClick):
              (WebCore::EventHandler::handleMousePressEventSingleClick):
              (WebCore::EventHandler::updateSelectionForMouseDrag):
              (WebCore::EventHandler::handleMouseReleaseEvent):
              * page/FocusController.cpp:
              (WebCore::FocusController::advanceFocusInDocumentOrder):
              * page/chromium/EventHandlerChromium.cpp:
              (WebCore::EventHandler::passMousePressEventToSubframe):
              * page/chromium/FrameChromium.cpp:
              (WebCore::Frame::dragImageForSelection):
              * page/mac/FrameMac.mm:
              (WebCore::Frame::selectionImage):
              * platform/mac/ClipboardMac.mm:
              (WebCore::ClipboardMac::writeRange):
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::paintCaret):
              Call functions on selection().
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67238 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b17ec2f7
  20. 09 Sep, 2010 1 commit
    • darin@apple.com's avatar
      2010-09-08 Darin Adler <darin@apple.com> · becacd8e
      darin@apple.com authored
              Reviewed by Adam Barth.
      
              Move functions from Frame to Editor as planned
              https://bugs.webkit.org/show_bug.cgi?id=45218
      
              * src/ContextMenuClientImpl.cpp:
              (WebKit::selectMisspelledWord):
              (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
              * src/WebFrameImpl.cpp:
              (WebKit::WebFrameImpl::find):
              (WebKit::WebFrameImpl::stopFinding):
              (WebKit::WebFrameImpl::scopeStringMatches):
              * src/WebViewImpl.cpp:
              (WebKit::WebViewImpl::caretOrSelectionBounds):
              Changed call sites to use editor().
      2010-09-08  Darin Adler  <darin@apple.com>
      
              Reviewed by Adam Barth.
      
              Move functions from Frame to Editor as planned
              https://bugs.webkit.org/show_bug.cgi?id=45218
      
              * Api/qwebpage.cpp:
              (QWebPage::selectedText):
              (QWebPage::setContentEditable):
              * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
              (DumpRenderTreeSupportQt::firstRectForCharacterRange):
              Changed call sites to use editor().
      2010-09-08  Darin Adler  <darin@apple.com>
      
              Reviewed by Adam Barth.
      
              Move functions from Frame to Editor as planned
              https://bugs.webkit.org/show_bug.cgi?id=45218
      
              * webkit/webkitwebview.cpp:
              (webkit_web_view_set_highlight_text_matches):
              (webkit_web_view_get_selected_text):
              (webkit_web_view_set_editable):
              Changed call sites to use editor().
      2010-09-08  Darin Adler  <darin@apple.com>
      
              Reviewed by Adam Barth.
      
              Move functions from Frame to Editor as planned
              https://bugs.webkit.org/show_bug.cgi?id=45218
      
              * WebCoreSupport/WebContextMenuClient.cpp:
              (WebContextMenuClient::searchWithGoogle):
              * WebFrame.cpp:
              (WebFrame::selectedString):
              * WebView.cpp:
              (WebView::selectedText):
              (WebView::prepareCandidateWindow):
              (WebView::onIMERequestCharPosition):
              Changed call sites to use editor().
      2010-09-08  Darin Adler  <darin@apple.com>
      
              Reviewed by Adam Barth.
      
              Move functions from Frame to Editor as planned
              https://bugs.webkit.org/show_bug.cgi?id=45218
      
              * WebFrame.cpp:
              (wxWebFrame::FindString):
              Changed call sites to use editor().
      2010-09-08  Darin Adler  <darin@apple.com>
      
              Reviewed by Adam Barth.
      
              Move functions from Frame to Editor as planned
              https://bugs.webkit.org/show_bug.cgi?id=45218
      
              * WebView/WebFrame.mm:
              (-[WebFrame _selectedString]):
              (-[WebFrame _firstRectForDOMRange:]):
              (-[WebFrame _markDOMRange]):
              (-[WebFrame _setTypingStyle:withUndoAction:]):
              * WebView/WebHTMLRepresentation.mm:
              (-[WebHTMLRepresentation finishedLoadingWithDataSource:]):
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView _selectionStartFontAttributesAsRTF]):
              (-[WebHTMLView toggleBaseWritingDirection:]):
              (-[WebHTMLView searchFor:direction:caseSensitive:wrap:startInSelection:]):
              (-[WebHTMLView countMatchesForText:caseSensitive:limit:markMatches:]):
              (-[WebHTMLView setMarkedTextMatchesAreHighlighted:]):
              (-[WebHTMLView markedTextMatchesAreHighlighted]):
              * WebView/WebView.mm:
              (-[WebView setEditable:]):
              Changed call sites to use editor().
      2010-09-08  Darin Adler  <darin@apple.com>
      
              Reviewed by Adam Barth.
      
              Move functions from Frame to Editor as planned
              https://bugs.webkit.org/show_bug.cgi?id=45218
      
              * ewk/ewk_frame.cpp:
              (ewk_frame_editable_set):
              (ewk_frame_selection_get):
              (ewk_frame_text_search):
              (ewk_frame_text_matches_mark):
              (ewk_frame_text_matches_highlight_set):
              (ewk_frame_text_matches_highlight_get):
              * ewk/ewk_view.cpp:
              (ewk_view_selection_get):
              Changed call sites to use editor().
      2010-09-08  Darin Adler  <darin@apple.com>
      
              Reviewed by Adam Barth.
      
              Move functions from Frame to Editor as planned
              https://bugs.webkit.org/show_bug.cgi?id=45218
      
              Just executing the plan that has long been described in Frame.h
              to move a bunch of functions to Editor.
      
              * WebCore.exp.in: Updated.
      
              * editing/Editor.cpp:
              (WebCore::Editor::fontForSelection):
              (WebCore::Editor::textDirectionForSelection):
              (WebCore::Editor::applyStyle):
              (WebCore::Editor::selectionStartHasStyle):
              (WebCore::Editor::selectionHasStyle):
              (WebCore::Editor::selectionStartCSSPropertyValue):
              (WebCore::Editor::Editor):
              (WebCore::Editor::cut):
              (WebCore::Editor::copy):
              (WebCore::Editor::ignoreSpelling):
              (WebCore::Editor::learnSpelling):
              (WebCore::Editor::isSelectionMisspelled):
              (WebCore::Editor::guessesForMisspelledSelection):
              (WebCore::Editor::selectedText):
              (WebCore::Editor::firstRectForRange):
              (WebCore::Editor::shouldChangeSelection):
              (WebCore::Editor::computeAndSetTypingStyle):
              (WebCore::Editor::selectionComputedStyle):
              (WebCore::Editor::textFieldDidBeginEditing):
              (WebCore::Editor::textFieldDidEndEditing):
              (WebCore::Editor::textDidChangeInTextField):
              (WebCore::Editor::doTextFieldCommandFromEvent):
              (WebCore::Editor::textWillBeDeletedInTextField):
              (WebCore::Editor::textDidChangeInTextArea):
              (WebCore::Editor::applyEditingStyleToBodyElement):
              (WebCore::Editor::applyEditingStyleToElement):
              (WebCore::Editor::styleForSelectionStart):
              (WebCore::Editor::findString):
              (WebCore::Editor::countMatchesForText):
              (WebCore::Editor::setMarkedTextMatchesAreHighlighted):
              (WebCore::Editor::respondToChangedSelection):
              * editing/Editor.h:
              * editing/mac/EditorMac.mm:
              (WebCore::Editor::fontAttributesForSelectionStart):
              (WebCore::Editor::baseWritingDirectionForSelectionStart):
              Moved functions here.
      
              * page/Frame.cpp:
              (WebCore::Frame::Frame):
              (WebCore::Frame::shouldChangeSelection):
              * page/Frame.h:
              * page/mac/FrameMac.mm:
              Moved functions out of here.
      
              * dom/InputElement.cpp:
              (WebCore::InputElement::dispatchBlurEvent):
              (WebCore::InputElement::aboutToUnload):
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::doApply):
              * editing/EditorCommand.cpp:
              (WebCore::executeToggleStyleInList):
              (WebCore::executeDeleteToMark):
              (WebCore::executeFindString):
              (WebCore::executeSelectToMark):
              (WebCore::executeSetMark):
              (WebCore::executeSwapWithMark):
              (WebCore::enabledVisibleSelectionAndMark):
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::setSelection):
              * html/HTMLInputElement.cpp:
              (WebCore::HTMLInputElement::defaultEventHandler):
              * page/ContextMenuController.cpp:
              (WebCore::ContextMenuController::contextMenuItemSelected):
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::find):
              * page/DragController.cpp:
              (WebCore::DragController::startDrag):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::sendContextMenuEventForKey):
              * page/Page.cpp:
              (WebCore::Page::findString):
              (WebCore::Page::markAllMatchesForText):
              * rendering/InlineTextBox.cpp:
              (WebCore::InlineTextBox::paintTextMatchMarker):
              * rendering/RenderTextControlMultiLine.cpp:
              (WebCore::RenderTextControlMultiLine::subtreeHasChanged):
              * rendering/RenderTextControlSingleLine.cpp:
              (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
              Changed call sites to use editor().
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      becacd8e
  21. 25 Aug, 2010 1 commit
    • rniwa@webkit.org's avatar
      2010-08-25 Ryosuke Niwa <rniwa@webkit.org> · d39a1e73
      rniwa@webkit.org authored
              Reviewed by Darin Adler.
      
              Various designmode=&quot;on&quot;/&quot;off&quot; &amp; execCommand(&quot;Undo&quot;) NULL pointer crashes
              https://bugs.webkit.org/show_bug.cgi?id=32823
      
              The bug was caused by changeSelectionAfterCommand which updates the selection
              without checking the whether new selection is valid or not.
      
              Fixed changeSelectionAfterCommand so that it won't update the selection
              when either end of the new selection is orphaned. Also fixed various editing commands
              to exit early if either end of the selection is orphaned.
      
              Tests: editing/undo/orphaned-selection-crash-bug32823-1.html
                     editing/undo/orphaned-selection-crash-bug32823-2.html
                     editing/undo/orphaned-selection-crash-bug32823-3.html
                     editing/undo/orphaned-selection-crash-bug32823-4.html
      
              * editing/Editor.cpp:
              (WebCore::Editor::changeSelectionAfterCommand): No longer sets orphaned selection.
              * editing/VisibleSelection.h:
              (WebCore::VisibleSelection::isNonOrphanedRange): Added.
              (WebCore::VisibleSelection::isNonOrphanedCaretOrRange): Added.
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::doApply): Added an early exist. See above.
              * editing/FormatBlockCommand.cpp:
              (WebCore::FormatBlockCommand::doApply): Ditto.
              * editing/IndentOutdentCommand.cpp:
              (WebCore::IndentOutdentCommand::doApply): Ditto.
              * editing/InsertLineBreakCommand.cpp:
              (WebCore::InsertLineBreakCommand::doApply): Ditto.
              * editing/InsertListCommand.cpp:
              (WebCore::InsertListCommand::doApply): Ditto.
              * editing/InsertParagraphSeparatorCommand.cpp:
              (WebCore::InsertParagraphSeparatorCommand::doApply): Ditto.
              * editing/InsertTextCommand.cpp:
              (WebCore::InsertTextCommand::input): Ditto.
              * editing/MoveSelectionCommand.cpp:
              (WebCore::MoveSelectionCommand::doApply): Ditto.
              * editing/RemoveFormatCommand.cpp:
              (WebCore::RemoveFormatCommand::doApply): Ditto.
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::ReplaceSelectionCommand::doApply): Ditto.
              * editing/TypingCommand.cpp:
              (WebCore::TypingCommand::doApply): Ditto.
              * editing/UnlinkCommand.cpp:
              (WebCore::UnlinkCommand::doApply): Ditto.
      2010-08-25  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Darin Adler.
      
              Various designmode="on"/"off" & execCommand("Undo") NULL pointer crashes
              https://bugs.webkit.org/show_bug.cgi?id=32823
      
              These tests ensure WebKit doesn't crash when undoing some editing commands failed
              and either end of endingSelection() became orphaned.
              All tests are copied from the bug to prevent regression.
      
              * editing/undo/orphaned-selection-crash-bug32823-1-expected.txt: Added.
              * editing/undo/orphaned-selection-crash-bug32823-1.html: Added.
              * editing/undo/orphaned-selection-crash-bug32823-2-expected.txt: Added.
              * editing/undo/orphaned-selection-crash-bug32823-2.html: Added.
              * editing/undo/orphaned-selection-crash-bug32823-3-expected.txt: Added.
              * editing/undo/orphaned-selection-crash-bug32823-3.html: Added.
              * editing/undo/orphaned-selection-crash-bug32823-4-expected.txt: Added.
              * editing/undo/orphaned-selection-crash-bug32823-4.html: Added.
              * editing/undo/redo-split-text-with-removal-expected.txt: Caret is restored.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66032 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d39a1e73
  22. 11 Aug, 2010 1 commit
    • rniwa@webkit.org's avatar
      2010-08-11 Ryosuke Niwa <rniwa@webkit.org> · d34b748c
      rniwa@webkit.org authored
              Reviewed by Tony Chang.
      
              Can't unbold text in div in font-weight span
              https://bugs.webkit.org/show_bug.cgi?id=26871
      
              The bug was caused by removeInlineStyle not being able to include styled inline nodes around the start.
              Solved this problem by pushing down all inline styles instead of just text-decorations.
              This approach allows removeInlineStyle to remove styled ancestors properly and generates compact markups.
      
              Test: editing/style/push-down-inline-styles.html
      
              * editing/ApplyStyleCommand.cpp:
              (WebCore::ApplyStyleCommand::removeCSSStyle): No longer removes attributes or node when mode == RemoveNone.
              (WebCore::ApplyStyleCommand::highestAncestorWithConflictingInlineStyle): Calls shouldRemoveInlineStyleFromElement
              to determine the highest ancestor whose style needs to be pushed down.
              (WebCore::ApplyStyleCommand::extractInlineStyleToPushDown): Renamed from extractTextDecorationStyle.
              Extracts all inline CSS properties specified instead of just text decorations.
              (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown): Renamed from applyTextDecorationStyle.
              Applies inline styles using addInlineStyleIfNeeded or adds inline CSS values.
              (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode): Renamed from pushDownTextDecorationStyleAroundNode.
              (WebCore::ApplyStyleCommand::removeInlineStyle): Calls pushDownTextDecorationStyleAroundNode.
              * editing/ApplyStyleCommand.h:
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::mergeParagraphs): Prevents moveParagraph from preserving
              the style of an empty paragraph when merged with the previous paragraph because we don't use that style anyways.
      2010-08-11  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Tony Chang.
      
              Can't unbold text in div in font-weight span
              https://bugs.webkit.org/show_bug.cgi?id=26871
      
              Added a test to push down inline styles to the leaves of DOM tree.
      
              * editing/deleting/delete-br-011-expected.txt: Removed redundant style spans.
              * editing/execCommand/empty-span-removal-expected.txt: Removed a span without any attributes.
              * editing/style/push-down-inline-styles-expected.txt: Added.
              * editing/style/push-down-inline-styles.html: Added.
              * editing/style/script-tests/push-down-inline-styles.js: Added.
              (testSingleToggle):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65208 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d34b748c
  23. 20 Jul, 2010 1 commit
  24. 21 May, 2010 1 commit
    • hyatt@apple.com's avatar
      WebCore: https://bugs.webkit.org/show_bug.cgi?id=39420, :visited not working with background-color. · 36bdcfa6
      hyatt@apple.com authored
      Reviewed by Dan Bernstein.
      
      Make the RenderStyle color accessors private.  This forces callers to use visitedDependentColor
      instead (or to make the decision to become friends of the RenderStyle class in order to get access
      to the real style information).
      
      Modified history/self-is-visited.html to also test background colors.
      
      * WebCore.base.exp:
      * accessibility/AccessibilityTable.cpp:
      (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
      * accessibility/mac/AccessibilityObjectWrapper.mm:
      (AXAttributeStringSetStyle):
      * css/CSSComputedStyleDeclaration.cpp:
      (WebCore::CSSComputedStyleDeclaration::currentColorOrValidColor):
      * css/CSSComputedStyleDeclaration.h:
      * css/SVGCSSStyleSelector.cpp:
      (WebCore::colorFromSVGColorCSSValue):
      * editing/ApplyStyleCommand.cpp:
      (WebCore::ApplyStyleCommand::editingStyleAtPosition):
      (WebCore::prepareEditingStyleToApplyAt):
      (WebCore::removeStylesAddedByNode):
      (WebCore::fontColorChangesComputedStyle):
      (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
      * editing/ApplyStyleCommand.h:
      (WebCore::):
      * editing/CompositeEditCommand.cpp:
      (WebCore::CompositeEditCommand::moveParagraphs):
      (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
      * editing/DeleteButtonController.cpp:
      (WebCore::isDeletableElement):
      * editing/DeleteSelectionCommand.cpp:
      (WebCore::DeleteSelectionCommand::saveTypingStyleState):
      * editing/InsertParagraphSeparatorCommand.cpp:
      (WebCore::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion):
      * editing/RemoveFormatCommand.cpp:
      (WebCore::RemoveFormatCommand::doApply):
      * editing/ReplaceSelectionCommand.cpp:
      (WebCore::handleStyleSpansBeforeInsertion):
      (WebCore::ReplaceSelectionCommand::handleStyleSpans):
      (WebCore::ReplaceSelectionCommand::doApply):
      * editing/SelectionController.cpp:
      (WebCore::SelectionController::paintCaret):
      * editing/markup.cpp:
      (WebCore::createMarkup):
      * page/animation/AnimationBase.cpp:
      (WebCore::AnimationBase::ensurePropertyMap):
      * page/animation/AnimationBase.h:
      * page/mac/FrameMac.mm:
      (WebCore::Frame::fontAttributesForSelectionStart):
      * rendering/EllipsisBox.cpp:
      (WebCore::EllipsisBox::paint):
      (WebCore::EllipsisBox::paintSelection):
      * rendering/InlineTextBox.cpp:
      (WebCore::InlineTextBox::paint):
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::styleDidChange):
      (WebCore::RenderBox::paintRootBoxDecorations):
      (WebCore::RenderBox::paintBoxDecorationsWithSize):
      * rendering/RenderBoxModelObject.cpp:
      (WebCore::RenderBoxModelObject::paintBoxShadow):
      * rendering/RenderFieldset.cpp:
      (WebCore::RenderFieldset::paintBoxDecorations):
      * rendering/RenderFileUploadControl.cpp:
      (WebCore::RenderFileUploadControl::paintObject):
      * rendering/RenderFrameSet.cpp:
      (WebCore::RenderFrameSet::paintColumnBorder):
      (WebCore::RenderFrameSet::paintRowBorder):
      * rendering/RenderImage.cpp:
      (WebCore::RenderImage::paintReplaced):
      * rendering/RenderLayerBacking.cpp:
      (WebCore::RenderLayerBacking::rendererBackgroundColor):
      * rendering/RenderLayerBacking.h:
      * rendering/RenderListBox.cpp:
      (WebCore::RenderListBox::paintItemForeground):
      (WebCore::RenderListBox::paintItemBackground):
      * rendering/RenderListMarker.cpp:
      (WebCore::RenderListMarker::paint):
      * rendering/RenderMenuList.cpp:
      (WebCore::RenderMenuList::itemStyle):
      (WebCore::RenderMenuList::itemBackgroundColor):
      (WebCore::RenderMenuList::menuStyle):
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::selectionBackgroundColor):
      (WebCore::RenderObject::selectionForegroundColor):
      * rendering/RenderSVGResource.cpp:
      (WebCore::RenderSVGResource::adjustColorForPseudoRules):
      (WebCore::RenderSVGResource::fillPaintingResource):
      (WebCore::RenderSVGResource::strokePaintingResource):
      * rendering/RenderSVGResource.h:
      * rendering/RenderTable.cpp:
      (WebCore::RenderTable::paintBoxDecorations):
      * rendering/RenderTable.h:
      (WebCore::RenderTable::bgColor):
      * rendering/RenderTableCell.cpp:
      (WebCore::RenderTableCell::paintBackgroundsBehindCell):
      * rendering/RenderTextControl.cpp:
      (WebCore::RenderTextControl::adjustInnerTextStyle):
      * rendering/RenderTextControlSingleLine.cpp:
      (WebCore::RenderTextControlSingleLine::menuStyle):
      * rendering/RenderTheme.cpp:
      (WebCore::RenderTheme::isControlStyled):
      * rendering/RenderThemeMac.mm:
      (WebCore::RenderThemeMac::paintMenuListButton):
      * rendering/RenderTreeAsText.cpp:
      (WebCore::RenderTreeAsText::writeRenderObject):
      (WebCore::write):
      * rendering/RenderTreeAsText.h:
      * rendering/SVGInlineTextBox.cpp:
      (WebCore::SVGInlineTextBox::paintSelection):
      * rendering/SVGRenderTreeAsText.cpp:
      (WebCore::writeRenderSVGTextBox):
      * rendering/style/RenderStyle.cpp:
      (WebCore::RenderStyle::colorIncludingFallback):
      (WebCore::RenderStyle::visitedDependentColor):
      * rendering/style/RenderStyle.h:
      (WebCore::):
      (WebCore::InheritedFlags::hasBackground):
      (WebCore::InheritedFlags::borderLeftStyle):
      (WebCore::InheritedFlags::borderRightStyle):
      (WebCore::InheritedFlags::borderTopStyle):
      (WebCore::InheritedFlags::borderBottomStyle):
      (WebCore::InheritedFlags::textShadow):
      (WebCore::InheritedFlags::textStrokeWidth):
      (WebCore::InheritedFlags::hasNormalColumnGap):
      (WebCore::InheritedFlags::borderLeftColor):
      (WebCore::InheritedFlags::borderRightColor):
      (WebCore::InheritedFlags::borderTopColor):
      (WebCore::InheritedFlags::borderBottomColor):
      (WebCore::InheritedFlags::backgroundColor):
      (WebCore::InheritedFlags::color):
      (WebCore::InheritedFlags::columnRuleColor):
      (WebCore::InheritedFlags::outlineColor):
      (WebCore::InheritedFlags::textFillColor):
      (WebCore::InheritedFlags::textStrokeColor):
      * svg/SVGAnimationElement.cpp:
      (WebCore::adjustForCurrentColor):
      
      WebKit/mac: https://bugs.webkit.org/show_bug.cgi?id=39420
      
      Reviewed by Dan Bernstein.
      
      Make sure everyone who needs to is using visitedDependentColor rather than accessing styles
      directly.
      
      * Misc/WebNSAttributedStringExtras.mm:
      (+[NSAttributedString _web_attributedStringFromRange:]):
      * WebView/WebFrame.mm:
      (-[WebFrame _bodyBackgroundColor]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59956 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      36bdcfa6
  25. 09 Mar, 2010 2 commits
    • ojan@chromium.org's avatar
      2010-03-09 Ojan Vafai <ojan@chromium.org> · 078aa802
      ojan@chromium.org authored
              Reviewed by Darin Adler.
      
              Fix review comment accidentally overlooked in bug 35713
              https://bugs.webkit.org/show_bug.cgi?id=35947
      
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::setStartingSelectionOnSmartDelete):
              * editing/DeleteSelectionCommand.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      078aa802
    • ojan@chromium.org's avatar
      2010-03-03 Ojan Vafai <ojan@chromium.org> · 77dae9d9
      ojan@chromium.org authored
              Reviewed by Adam Barth.
      
              undo after smartdelete should select the deleted space
              https://bugs.webkit.org/show_bug.cgi?id=35713
      
              * editing/undo/undo-smart-delete-reversed-selection-expected.txt: Added.
              * editing/undo/undo-smart-delete-reversed-selection.html: Added.
              * editing/undo/undo-smart-delete-word-expected.txt: Added.
              * editing/undo/undo-smart-delete-word.html: Added.
      2010-03-03  Ojan Vafai  <ojan@chromium.org>
      
              Reviewed by Adam Barth.
      
              undo after smartdelete should select the deleted space
              https://bugs.webkit.org/show_bug.cgi?id=35713
      
              TextEdit behavior is to select the deleted space after a smartdelete.
      
              Tests: editing/undo/undo-smart-delete-reversed-selection.html
                     editing/undo/undo-smart-delete-word.html
      
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::setStartingSelectionOnSmartDelete):
              (WebCore::DeleteSelectionCommand::initializePositionData):
              * editing/DeleteSelectionCommand.h:
              * editing/VisibleSelection.cpp:
              (WebCore::VisibleSelection::setWithoutValidation):
              This assert looks bogus to me. undo-smart-delete-reversed-selection.html hits it
              but not as a result of the other changes in this patch. The granularity when
              deleting after making a wordgranularity selection is wordgranularity, not charactergranularity.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55752 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      77dae9d9
  26. 25 Jan, 2010 1 commit
    • dbates@webkit.org's avatar
      2010-01-25 Daniel Bates <dbates@webkit.org> · ef42d386
      dbates@webkit.org authored
              Reviewed by Adam Barth.
      
              https://bugs.webkit.org/show_bug.cgi?id=34073
      
              Fixes misspelled words in comments.
      
              * accessibility/AccessibilityListBox.cpp:
              (WebCore::AccessibilityListBox::addChildren):
              (WebCore::AccessibilityListBox::doAccessibilityHitTest):
              * accessibility/mac/AccessibilityObjectWrapper.mm:
              (-[AccessibilityObjectWrapper detach]):
              (AXAttributeStringSetElement):
              * bindings/js/JSDOMBinding.cpp:
              (WebCore::completeURL):
              * bindings/js/JSDOMWindowBase.cpp:
              * bindings/js/JSDOMWindowBase.h:
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::getOwnPropertySlot):
              * bindings/js/JSSVGPODTypeWrapper.h:
              * bindings/js/ScriptController.cpp:
              (WebCore::ScriptController::evaluateInWorld):
              * bridge/NP_jsobject.cpp:
              (_NPN_SetException):
              * bridge/jni/jsc/JavaInstanceJSC.cpp:
              (JavaInstance::invokeMethod):
              (JObjectWrapper::JObjectWrapper):
              * bridge/objc/objc_instance.mm:
              (ObjcInstance::setValueOfUndefinedField):
              (ObjcInstance::getValueOfUndefinedField):
              * css/CSSFontSelector.cpp:
              (WebCore::CSSFontSelector::addFontFaceRule):
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::CSSStyleSelector):
              (WebCore::CSSStyleSelector::sortMatchedRules):
              (WebCore::CSSStyleSelector::applyDeclarations):
              (WebCore::CSSStyleSelector::applyProperty):
              * dom/Document.cpp:
              (WebCore::Document::updateLayoutIgnorePendingStylesheets):
              (WebCore::Document::detach):
              * dom/Document.h:
              * dom/Element.cpp:
              (WebCore::Element::updateFocusAppearance):
              * dom/Element.h:
              * dom/MessagePortChannel.h:
              * dom/MouseRelatedEvent.cpp:
              (WebCore::MouseRelatedEvent::receivedTarget):
              * dom/Node.cpp:
              (WebCore::Node::isFocusable):
              (WebCore::Node::shadowAncestorNode):
              * dom/Node.h:
              * dom/Position.cpp:
              (WebCore::Position::upstream):
              * dom/Position.h:
              * dom/Range.cpp:
              (WebCore::Range::processContents):
              * dom/StyledElement.cpp:
              (WebCore::StyledElement::addCSSColor):
              * editing/ApplyStyleCommand.cpp:
              (WebCore::StyleChange::reconcileTextDecorationProperties):
              (WebCore::StyleChange::extractTextStyles):
              (WebCore::prepareEditingStyleToApplyAt):
              * editing/DeleteButtonController.cpp:
              (WebCore::isDeletableElement):
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::initializeStartEnd):
              * editing/Editor.cpp:
              (WebCore::Editor::learnSpelling):
              * inspector/front-end/ConsoleView.js:
              (WebInspector.ConsoleMessage.prototype._format):
              * loader/Cache.cpp:
              (WebCore::Cache::pruneLiveResources):
              (WebCore::Cache::pruneDeadResources):
              * loader/Cache.h:
              * loader/CachedResource.cpp:
              (WebCore::CachedResource::makePurgeable):
              * loader/CachedResource.h:
              * loader/CachedResourceHandle.h:
              * loader/DocumentLoader.h:
              * loader/FTPDirectoryParser.cpp:
              (WebCore::parseOneFTPLine):
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::didExplicitOpen):
              * loader/ResourceLoader.cpp:
              (WebCore::ResourceLoader::didCancel):
              * loader/WorkerThreadableLoader.h:
              * loader/appcache/ApplicationCacheStorage.cpp:
              (WebCore::ApplicationCacheStorage::spaceNeeded):
              * notifications/NotificationPresenter.h:
              (WebCore::NotificationPresenter::):
              * page/animation/AnimationController.cpp:
              (WebCore::AnimationController::updateAnimations):
              * platform/LinkHash.cpp:
              (WebCore::cleanPath):
              * platform/graphics/cg/GraphicsContextCG.cpp:
              (WebCore::calculateDrawingMode):
              * platform/graphics/cg/PatternCG.cpp:
              (WebCore::Pattern::createPlatformPattern):
              * platform/graphics/mac/ComplexTextController.cpp:
              (WebCore::ComplexTextController::offsetForPosition):
              * platform/graphics/mac/GraphicsLayerCA.h:
              * platform/graphics/mac/GraphicsLayerCA.mm:
              (WebCore::GraphicsLayerCA::ensureStructuralLayer):
              * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
              (WebCore::MediaPlayerPrivate::doSeek):
              (WebCore::MediaPlayerPrivate::setClosedCaptionsVisible):
              (WebCore::MediaPlayerPrivate::hasAvailableVideoFrame):
              * platform/mac/PasteboardMac.mm:
              (WebCore::Pasteboard::writeSelection):
              (WebCore::Pasteboard::writePlainText):
              (WebCore::Pasteboard::writeURL):
              * platform/text/TextCodecICU.cpp:
              (WebCore::TextCodecICU::registerExtendedEncodingNames):
              * platform/text/TextEncodingDetectorICU.cpp:
              (WebCore::detectTextEncoding):
              * rendering/AutoTableLayout.cpp:
              (WebCore::AutoTableLayout::calcEffectiveWidth):
              (WebCore::AutoTableLayout::layout):
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::calcAbsoluteHorizontalValues):
              (WebCore::RenderBox::calcAbsoluteVerticalValues):
              (WebCore::RenderBox::calcAbsoluteHorizontalReplaced):
              (WebCore::RenderBox::calcAbsoluteVerticalReplaced):
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::scrollByRecursively):
              (WebCore::RenderLayer::paintLayer):
              (WebCore::RenderLayer::hitTestLayer):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::destroy):
              * rendering/RenderTextControl.cpp:
              (WebCore::RenderTextControl::setInnerTextValue):
              * rendering/RenderTheme.cpp:
              (WebCore::RenderTheme::stateChanged):
              * rendering/SVGRenderSupport.cpp:
              (WebCore::SVGRenderBase::mapLocalToContainer):
              * rendering/SVGRootInlineBox.cpp:
              (WebCore::SVGRootInlineBox::buildTextChunks):
              * rendering/TransformState.cpp:
              (WebCore::TransformState::flattenWithTransform):
              * wml/WMLInputElement.cpp:
              (WebCore::WMLInputElement::dispatchBlurEvent):
              (WebCore::WMLInputElement::suggestedValue):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53809 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ef42d386
  27. 11 Jan, 2010 1 commit
    • enrica@apple.com's avatar
      Cannot focus on an empty editable span in a non editable div. · 25b91e31
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=33411
      <rdar://problem/5982901>
      
      Reviewed by Darin Adler.
      
      WebCore: 
      
      We now allow to set the focus inside an empty inline element if it is the only
      editable element inside non-editable content.
      
      * dom/Position.cpp:
      (WebCore::Position::isCandidate): Extended to allow positions in inline elements when
      at the border between editable and non editable content.
      (WebCore::Position::getInlineBoxAndOffset): Modified to be able to calculate the caret
      position inside an empty inline.
      * editing/DeleteSelectionCommand.cpp:
      (WebCore::DeleteSelectionCommand::mergeParagraphs): When merging, we don't always find a break
      element, since now an editable inline is a VisiblePosition if it is at editability boundary.
      * editing/VisibleSelection.h: Updated comment on the use of Position member variables
      instead of VisiblePosition.
      * page/Frame.cpp:
      (WebCore::Frame::selectionLayoutChanged): Changed to avoid multiple calls to upstream and
      downstream on the same position.
      
      LayoutTests: 
      
      * editing/deleting/6026335-expected.txt: Updated to reflect the lack of extra break element.
      * editing/selection/mixed-editability-10-expected.txt: Updated to cover the new case.
      * editing/selection/mixed-editability-10.html: Updated to cover the new case.
      * platform/mac/editing/deleting/5115601-expected.txt: Updated to reflect the lack of extra break element.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53085 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      25b91e31
  28. 04 Nov, 2009 1 commit
    • justin.garcia@apple.com's avatar
      WebCore: · 619526af
      justin.garcia@apple.com authored
      2009-11-02  Justin Garcia  <justin.garcia@apple.com>
      
              Reviewed by Adele Peterson.
      
              https://bugs.webkit.org/show_bug.cgi?id=25439
              Deleting when in front of a block image removes character from previous paragraph
      
              Added editing/deleting/25439-{1,2,3}.html
      
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::mergeParagraphs): Block images, tables and HRs cannot 
              be made inline with other content.  Instead of merging, just move the caret to just before 
              the selection we deleted.
              * editing/htmlediting.cpp:
              (WebCore::firstInSpecialElement): Added a FIXME.  This function begins iterating up from pos.node(), which 
              doesn't necessarily contain pos (suppose pos was [img, 0]).
              (WebCore::lastInSpecialElement): Ditto.
              (WebCore::isRenderedAsNonInlineTableImageOrHR): Moved from visible_units.cpp.  Added a check for non-inline images.
              * editing/htmlediting.h:
              * editing/visible_units.cpp:
              (WebCore::startOfParagraph): Use moved/renamed function.  Removed FIXME.  The problem causing 
              5027702 is now squarely in first/lastInSpecialElement
              (WebCore::endOfParagraph): Ditto.
      
      LayoutTests:
      
      2009-11-03  Justin Garcia  <justin.garcia@apple.com>
      
              Reviewed by Adele Peterson.
      
              https://bugs.webkit.org/show_bug.cgi?id=25439
              Deleting when in front of a block image removes character from previous paragraph
      
              * editing/deleting/delete-before-block-image-1-expected.txt: Added.
              * editing/deleting/delete-before-block-image-1.html: Added.
              * editing/deleting/delete-before-block-image-2-expected.txt: Added.
              * editing/deleting/delete-before-block-image-2.html: Added.
              * editing/deleting/delete-before-block-table-expected.txt: Added.
              * editing/deleting/delete-before-block-table.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50542 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      619526af
  29. 29 Sep, 2009 1 commit
    • eric@webkit.org's avatar
      2009-09-29 Enrica Casucci <enrica@apple.com> · 5fbc25ce
      eric@webkit.org authored
              Reviewed by Adele Peterson.
      
              Test case for <rdar://problem/7085453>.
      
              * editing/selection/blockquote-crash-expected.txt: Added.
              * editing/selection/blockquote-crash.html: Added.
      2009-09-29  Enrica Casucci  <enrica@apple.com>
      
              Reviewed by Adele Peterson.
      
              Reproducible crash pressing return inside quoted content
              at WebCore::BreakBlockquoteCommand::doApply.
              <rdar://problem/7085453>
              In some case, like the one provided in the test case, m_downStreamEnd
              refers to a node that gets deleted when executing the DeleteSelectionCommand.
              We shouldn't use m_downStreamEnd to recalculate the new m_endPosition when
              pruning is needed, because it may be point to a node that has been deleted, but
              rather rely on removeNode in CompositeEditCommand to update m_endPosition correctly.
      
              Test: editing/selection/blockquote-crash.html
      
              * editing/BreakBlockquoteCommand.cpp:
              (WebCore::BreakBlockquoteCommand::doApply): Added check for invalid position
              to avoid dereferencing a null node pointer.
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::mergeParagraphs): Don't reset m_endPosition
              using the value in m_downStreamEnd when it is necessary to prune the start block.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5fbc25ce
  30. 09 Sep, 2009 1 commit
    • eric@webkit.org's avatar
      2009-07-30 Eric Seidel <eric@webkit.org> · f74ae5cf
      eric@webkit.org authored
              Reviewed by Adam Barth.
      
              Rename positionBeforeNode to positionInParentBeforeNode
              and positionAfterNode to positionInParentAfterNode
              in preparation for adding a positionBeforeNode
              which returns a neighbor-anchored position.
              https://bugs.webkit.org/show_bug.cgi?id=25494
      
              No functional changes, thus no tests.
      
              * dom/PositionConstructors.h:
              (WebCore::positionInParentBeforeNode):
              (WebCore::positionInParentAfterNode):
              * dom/PositionIterator.cpp:
              (WebCore::PositionIterator::operator Position):
              * editing/ApplyStyleCommand.cpp:
              (WebCore::ApplyStyleCommand::applyInlineStyle):
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::positionOutsideTabSpan):
              (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph):
              (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary):
              * editing/CreateLinkCommand.cpp:
              (WebCore::CreateLinkCommand::doApply):
              * editing/DeleteButtonController.cpp:
              (WebCore::DeleteButtonController::deleteTarget):
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::initializeStartEnd):
              (WebCore::updatePositionForNodeRemoval):
              * editing/InsertLineBreakCommand.cpp:
              (WebCore::InsertLineBreakCommand::doApply):
              * editing/InsertListCommand.cpp:
              (WebCore::InsertListCommand::doApply):
              * editing/InsertParagraphSeparatorCommand.cpp:
              (WebCore::InsertParagraphSeparatorCommand::doApply):
              * editing/InsertTextCommand.cpp:
              (WebCore::InsertTextCommand::input):
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::ReplaceSelectionCommand::positionAtStartOfInsertedContent):
              (WebCore::ReplaceSelectionCommand::doApply):
              * editing/VisibleSelection.cpp:
              (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries):
              * editing/htmlediting.cpp:
              (WebCore::firstEditablePositionAfterPositionInRoot):
              (WebCore::lastEditablePositionBeforePositionInRoot):
              (WebCore::rangeCompliantEquivalent):
              (WebCore::positionBeforeContainingSpecialElement):
              (WebCore::positionAfterContainingSpecialElement):
              (WebCore::positionBeforeTabSpan):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48234 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f74ae5cf
  31. 07 Aug, 2009 1 commit
    • rniwa@webkit.org's avatar
      deprecatedCopyInheritableProperties must be replaced by two different functions · 1de555ee
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=28057
      
      Patch by Ryosuke Niwa <rniwa@webkit.org> on 2009-08-07
      Reviewed by Justin Garcia.
      
      This patch deletes deprecatedInheritableProperties and modifies call callees to call either editingStyleAtPosition
      or prepareEditingStyleToApplyAt. The concept of editing style is introduced in this patch,
      which consists of all CSS properties need to be preserved under editing operations.
      
      No test is added since this patch does not change any behavior.
      
      * css/CSSComputedStyleDeclaration.cpp: Removed deprecatedCopyInheritableProperties
      * css/CSSComputedStyleDeclaration.h: Removed deprecatedCopyInheritableProperties
      * editing/ApplyStyleCommand.cpp:
      (WebCore::):
      (WebCore::editingStyleAtPosition): Obtains the editing-specific computed style at the position
      (WebCore::prepareEditingStyleToApplyAt): Removes redundant editing styles at the specified position
      (WebCore::removeStylesAddedByNode): Removes the style derived from the specified node
      * editing/ApplyStyleCommand.h:
      (WebCore::):
      * editing/CompositeEditCommand.cpp:
      (WebCore::CompositeEditCommand::moveParagraphs): Uses editingStyleAtPosition
      (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): Uses editingStyleAtPosition
      * editing/DeleteSelectionCommand.cpp:
      (WebCore::removeEnclosingAnchorStyle): Uses removeStyleOfNode
      (WebCore::DeleteSelectionCommand::saveTypingStyleState): Uses editingStyleAtPosition
      (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Uses prepareEditingStyleToApplyAt
      * editing/EditCommand.cpp:
      * editing/EditCommand.h:
      * editing/InsertParagraphSeparatorCommand.cpp:
      (WebCore::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion): Uses editingStyleAtPosition
      (WebCore::InsertParagraphSeparatorCommand::applyStyleAfterInsertion): Uses prepareEditingStyleToApplyAt
      * editing/RemoveFormatCommand.cpp:
      (WebCore::RemoveFormatCommand::doApply): Uses editingStyleAtPosition
      * editing/ReplaceSelectionCommand.cpp:
      (WebCore::handleStyleSpansBeforeInsertion): Uses editingStyleAtPosition
      (WebCore::ReplaceSelectionCommand::handleStyleSpans): Uses editingStyleAtPosition and prepareEditingStyleToApplyAt
      (WebCore::ReplaceSelectionCommand::doApply): Uses prepareEditingStyleToApplyAt
      * editing/markup.cpp:
      (WebCore::removeEnclosingMailBlockquoteStyle): Uses removeStyleOfNode
      (WebCore::removeDefaultStyles): Uses prepareEditingStyleToApplyAt
      (WebCore::createMarkup): Uses editingStyleAtPosition
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46914 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1de555ee
  32. 31 Jul, 2009 1 commit
    • darin@apple.com's avatar
      WebCore: · 445c34f5
      darin@apple.com authored
      2009-07-30  Darin Adler  <darin@apple.com>
      
              Reviewed by David Levin.
      
              Use checked casts for render tree
              https://bugs.webkit.org/show_bug.cgi?id=23522
      
              Next step: Add casts for all the RenderTable classes and use them everywhere.
      
              Also added a few uses in places that were still using static_cast.
              Also made some virtual member functions private.
              Also changed RenderTable::m_tableLayout to use OwnPtr.
      
              * accessibility/AccessibilityTable.cpp:
              (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
              (WebCore::AccessibilityTable::addChildren):
              (WebCore::AccessibilityTable::cellForColumnAndRow):
              * accessibility/AccessibilityTableCell.cpp:
              (WebCore::AccessibilityTableCell::parentTable):
              (WebCore::AccessibilityTableCell::rowIndexRange):
              (WebCore::AccessibilityTableCell::columnIndexRange):
              (WebCore::AccessibilityTableCell::titleUIElement):
              * accessibility/AccessibilityTableColumn.cpp:
              (WebCore::AccessibilityTableColumn::headerObject):
              * accessibility/AccessibilityTableRow.cpp:
              (WebCore::AccessibilityTableRow::parentTable):
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::removeNode):
              * editing/TextIterator.cpp:
              (WebCore::shouldEmitTabBeforeNode):
              (WebCore::shouldEmitNewlinesBeforeAndAfterNode):
              * html/HTMLTableCellElement.cpp:
              (WebCore::HTMLTableCellElement::parseMappedAttribute):
              * html/HTMLTableColElement.cpp:
              (WebCore::HTMLTableColElement::parseMappedAttribute):
              * page/Frame.cpp:
              (WebCore::Frame::searchForLabelsAboveCell):
              * page/mac/FrameMac.mm:
              (WebCore::Frame::searchForNSLabelsAboveCell):
              * rendering/AutoTableLayout.cpp:
              (WebCore::AutoTableLayout::recalcColumn):
              (WebCore::AutoTableLayout::fullRecalc):
              (WebCore::shouldScaleColumns):
              * rendering/FixedTableLayout.cpp:
              (WebCore::FixedTableLayout::calcWidthArray):
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::calcPrefWidths):
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::calcPercentageHeight):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::addChild):
              (WebCore::RenderObject::containingBlock):
              * rendering/RenderTableCell.cpp:
              (WebCore::RenderTableCell::collapsedBottomBorder):
              * rendering/RenderTableCol.cpp:
              (WebCore::RenderTableCol::table):
              * rendering/RenderTableRow.cpp:
              (WebCore::RenderTableRow::addChild):
              (WebCore::RenderTableRow::layout):
              (WebCore::RenderTableRow::paint):
              * rendering/RenderTableSection.cpp:
              (WebCore::RenderTableSection::addChild):
              (WebCore::RenderTableSection::layoutRows):
              (WebCore::RenderTableSection::lowestPosition):
              (WebCore::RenderTableSection::rightmostPosition):
              (WebCore::RenderTableSection::leftmostPosition):
              (WebCore::RenderTableSection::paintObject):
              (WebCore::RenderTableSection::recalcCells):
              * rendering/RenderTreeAsText.cpp:
              (WebCore::operator<<):
              (WebCore::writeTextRun):
              Use checked casts.
      
              * rendering/RenderTable.cpp:
              (WebCore::RenderTable::styleDidChange): Updated to use OwnPtr.
              (WebCore::RenderTable::addChild): Use checked cast.
              (WebCore::RenderTable::layout): Ditto.
              (WebCore::RenderTable::setCellWidths): Ditto.
              (WebCore::RenderTable::paintObject): Ditto.
              (WebCore::RenderTable::splitColumn): Ditto.
              (WebCore::RenderTable::appendColumn): Ditto.
              (WebCore::RenderTable::colElement): Ditto.
              (WebCore::RenderTable::recalcSections): Ditto.
              (WebCore::RenderTable::outerBorderBottom): Ditto.
              (WebCore::RenderTable::outerBorderLeft): Ditto.
              (WebCore::RenderTable::outerBorderRight): Ditto.
              (WebCore::RenderTable::sectionAbove): Ditto.
              (WebCore::RenderTable::sectionBelow): Ditto.
      
              * rendering/RenderTable.h: Added checked cast. Made virtual
              functions private. Changed m_tableLayout to be a OwnPtr.
      
              * rendering/RenderTableCell.h: Added checked cast.
              * rendering/RenderTableCol.h: Ditto. Made virtual functions private.
              * rendering/RenderTableRow.h: Ditto.
              * rendering/RenderTableSection.h: Ditto.
      
      WebKit/mac:
      
      2009-07-30  Darin Adler  <darin@apple.com>
      
              Reviewed by David Levin.
      
              Use checked casts for render tree
              https://bugs.webkit.org/show_bug.cgi?id=23522
      
              * Misc/WebNSAttributedStringExtras.mm:
              (fileWrapperForElement):
              * Misc/WebNSPasteboardExtras.mm:
              (imageFromElement):
              (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
              * WebView/WebFrame.mm:
              (-[WebFrame _computePageRectsWithPrintWidthScaleFactor:printHeight:]):
              (-[WebFrame _accessibilityTree]):
              * WebView/WebRenderNode.mm:
              (copyRenderNode):
              Use checked casts.
      
      WebKit/win:
      
      2009-07-30  Darin Adler  <darin@apple.com>
      
              Reviewed by David Levin.
      
              Use checked casts for render tree
              https://bugs.webkit.org/show_bug.cgi?id=23522
      
              * DOMHTMLClasses.cpp:
              (DOMHTMLInputElement::isUserEdited):
              (DOMHTMLTextAreaElement::isUserEdited):
              Use checked casts.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      445c34f5
  33. 23 Jul, 2009 1 commit
    • rniwa@webkit.org's avatar
      2009-07-23 Ryosuke Niwa <rniwa@webkit.org> · e49e6734
      rniwa@webkit.org authored
              Reviewed by Eric Seidel.
      
              copyInheritableProperties and removeComputedInheritablePropertiesFrom should be deprecated
              https://bugs.webkit.org/show_bug.cgi?id=27325
      
              This patch deprecates copyInheritableProperties because it has been used for two different purposes:
              1.  Calculating the typing style.
              2.  Moving HTML subtrees and seeking to remove redundant styles.
              These tasks should be broken out into two separate functions.  New code should not use this function.
      
              It deletes removeComputedInheritablePropertiesFrom because it hasn't been used anywhere.
      
              There is no test since the patch does not change any behavior.
      
              * css/CSSComputedStyleDeclaration.cpp: removeComputedInheritablePropertiesFrom has been removed
              (WebCore::CSSComputedStyleDeclaration::deprecatedCopyInheritableProperties): has been renamed from copyInheritableProperties
              * css/CSSComputedStyleDeclaration.h: ditto
              * editing/DeleteSelectionCommand.cpp: ditto
              (WebCore::removeEnclosingAnchorStyle): ditto
              (WebCore::DeleteSelectionCommand::saveTypingStyleState): ditto
              * editing/EditCommand.cpp: ditto
              (WebCore::EditCommand::styleAtPosition): ditto
              * editing/RemoveFormatCommand.cpp: ditto
              (WebCore::RemoveFormatCommand::doApply): ditto
              * editing/ReplaceSelectionCommand.cpp: ditto
              (WebCore::handleStyleSpansBeforeInsertion): ditto
              (WebCore::ReplaceSelectionCommand::handleStyleSpans): ditto
              * editing/markup.cpp: ditto
              (WebCore::removeEnclosingMailBlockquoteStyle): ditto
              (WebCore::removeDefaultStyles): ditto
              (WebCore::createMarkup): ditto
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46280 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e49e6734
  34. 10 Jul, 2009 1 commit
    • ddkilzer@apple.com's avatar
      2009-07-10 Shinichiro Hamaji <hamaji@chromium.org> · 9c4dacca
      ddkilzer@apple.com authored
              Reviewed by David Kilzer.
      
              WebKit needs a style linting tool
              https://bugs.webkit.org/show_bug.cgi?id=25884
      
              Fix bunch of style issues by autofix of cpplint.
              This patch is created to demonstrate the autofix of cpplint.py.
      
              No new testcases because it's a style fix
      
              * css/CSSParser.cpp:
              (WebCore::CSSParser::parseMediaQuery):
              (WebCore::CSSParser::validUnit):
              (WebCore::CSSParser::parseValue):
              (WebCore::skipCommaInDashboardRegion):
              (WebCore::CSSParser::parseDashboardRegions):
              (WebCore::ShadowParseContext::commitValue):
              (WebCore::ShadowParseContext::commitLength):
              (WebCore::ShadowParseContext::commitColor):
              (WebCore::BorderImageParseContext::commitNumber):
              (WebCore::BorderImageParseContext::commitWidth):
              (WebCore::BorderImageParseContext::commitRule):
              (WebCore::BorderImageParseContext::commitBorderImage):
              (WebCore::CSSParser::lex):
              (WebCore::CSSParser::text):
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::applyProperty):
              * css/MediaList.cpp:
              (WebCore::MediaList::deleteMedium):
              * css/MediaQuery.h:
              * css/MediaQueryEvaluator.cpp:
              (WebCore::parseAspectRatio):
              * css/MediaQueryEvaluator.h:
              * css/MediaQueryExp.h:
              (WebCore::MediaQueryExp::operator==):
              * css/WebKitCSSMatrix.h:
              * dom/Comment.h:
              * dom/Document.cpp:
              (WebCore::Document::setFocusedNode):
              * dom/Document.h:
              (WebCore::Document::setHasDashboardRegions):
              * dom/DocumentFragment.cpp:
              (WebCore::DocumentFragment::nodeName):
              * dom/DocumentFragment.h:
              * dom/DynamicNodeList.h:
              * dom/EditingText.h:
              * dom/Element.cpp:
              (WebCore::Element::dispatchAttrAdditionEvent):
              * dom/NamedAttrMap.cpp:
              (WebCore::NamedNodeMap::item):
              * dom/Node.cpp:
              (WebCore::Node::nodeValue):
              (WebCore::Node::nodeIndex):
              * dom/NodeRareData.h:
              (WebCore::NodeListsNodeData::create):
              * dom/Notation.h:
              * dom/ProcessingInstruction.h:
              * dom/Range.cpp:
              (WebCore::Range::processContents):
              * dom/StyledElement.cpp:
              (WebCore::toHex):
              * dom/XMLTokenizerLibxml2.cpp:
              (WebCore::PendingCallbacks::PendingStartElementNSCallback::~PendingStartElementNSCallback):
              (WebCore::PendingCallbacks::PendingStartElementNSCallback::call):
              (WebCore::PendingCallbacks::):
              (WebCore::OffsetBuffer::readOutBytes):
              (WebCore::handleElementNamespaces):
              (WebCore::handleElementAttributes):
              (WebCore::attributesStartElementNsHandler):
              * dom/XMLTokenizerQt.cpp:
              (WebCore::attributesStartElementNsHandler):
              (WebCore::XMLTokenizer::parseStartElement):
              * editing/ApplyStyleCommand.cpp:
              (WebCore::ApplyStyleCommand::applyInlineStyle):
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::removeNode):
              * editing/Editor.cpp:
              (WebCore::Editor::pasteAsPlainText):
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::directionOfEnclosingBlock):
              * editing/SmartReplaceICU.cpp:
              (WebCore::addAllCodePoints):
              * history/HistoryItem.cpp:
              (WebCore::HistoryItem::icon):
              (WebCore::HistoryItem::adoptVisitCounts):
              * html/CanvasStyle.cpp:
              (WebCore::CanvasStyle::applyFillColor):
              * html/HTMLAnchorElement.cpp:
              (WebCore::HTMLAnchorElement::setActive):
              (WebCore::HTMLAnchorElement::isLiveLink):
              * html/HTMLAppletElement.h:
              * html/HTMLAudioElement.h:
              * html/HTMLBRElement.h:
              * html/HTMLBaseElement.h:
              * html/HTMLBaseFontElement.h:
              * html/HTMLDListElement.h:
              * html/HTMLDirectoryElement.h:
              * html/HTMLFieldSetElement.cpp:
              (WebCore::HTMLFieldSetElement::HTMLFieldSetElement):
              * html/HTMLFormElement.cpp:
              (WebCore::HTMLFormElement::reset):
              * html/HTMLHRElement.cpp:
              (WebCore::HTMLHRElement::parseMappedAttribute):
              * html/HTMLHeadElement.h:
              * html/HTMLHtmlElement.h:
              * html/HTMLImageElement.h:
              (WebCore::HTMLImageElement::setLoadManually):
              * html/HTMLInputElement.cpp:
              (WebCore::HTMLInputElement::selection):
              * html/HTMLIsIndexElement.h:
              * html/HTMLMarqueeElement.cpp:
              * html/HTMLMediaElement.h:
              (WebCore::HTMLMediaElement::):
              * html/HTMLMenuElement.h:
              * html/HTMLMetaElement.h:
              * html/HTMLModElement.h:
              * html/HTMLOListElement.h:
              * html/HTMLOptionElement.cpp:
              (WebCore::HTMLOptionElement::childrenChanged):
              * html/HTMLParamElement.h:
              * html/HTMLQuoteElement.h:
              * html/HTMLStyleElement.h:
              * html/HTMLTableCaptionElement.h:
              * html/HTMLTableCellElement.h:
              * html/HTMLTableColElement.h:
              * html/HTMLTableSectionElement.cpp:
              (WebCore::HTMLTableSectionElement::deleteRow):
              * html/HTMLTitleElement.h:
              * html/HTMLTokenizer.cpp:
              (WebCore::HTMLTokenizer::parseNonHTMLText):
              (WebCore::HTMLTokenizer::parseEntity):
              (WebCore::HTMLTokenizer::parseTag):
              (WebCore::HTMLTokenizer::write):
              * html/HTMLUListElement.h:
              * html/HTMLVideoElement.h:
              * html/TimeRanges.h:
              (WebCore::TimeRanges::Range::Range):
              * inspector/InspectorController.cpp:
              (WebCore::InspectorController::enableResourceTracking):
              (WebCore::InspectorController::disableResourceTracking):
              * inspector/InspectorFrontend.cpp:
              (WebCore::InspectorFrontend::newInspectorJSONObject):
              * page/Console.cpp:
              (WebCore::Console::addMessage):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::handleMousePressEvent):
              (WebCore::EventHandler::selectCursor):
              (WebCore::EventHandler::defaultKeyboardEventHandler):
              * page/Frame.cpp:
              (WebCore::Frame::jsDefaultStatusBarText):
              * page/android/DragControllerAndroid.cpp:
              (WebCore::DragController::dragOperation):
              * page/android/EventHandlerAndroid.cpp:
              (WebCore::EventHandler::tabsToAllControls):
              (WebCore::EventHandler::eventActivatedView):
              * page/animation/AnimationController.cpp:
              (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
              * page/gtk/DragControllerGtk.cpp:
              (WebCore::DragController::dragOperation):
              * page/qt/DragControllerQt.cpp:
              * page/win/DragControllerWin.cpp:
              (WebCore::DragController::isCopyKeyDown):
              * page/win/FrameWin.h:
              * rendering/RenderSlider.cpp:
              (WebCore::RenderSlider::mouseEventOffsetToThumb):
              * rendering/style/RenderStyle.h:
              (WebCore::InheritedFlags::setVerticalAlignLength):
              (WebCore::InheritedFlags::setUnicodeBidi):
              (WebCore::InheritedFlags::setCursor):
              * rendering/style/RenderStyleConstants.h:
              (WebCore::):
              * rendering/style/SVGRenderStyleDefs.h:
              * rendering/style/StyleInheritedData.h:
              (WebCore::StyleInheritedData::operator!=):
              * storage/DatabaseTask.h:
              * svg/GradientAttributes.h:
              * svg/LinearGradientAttributes.h:
              * svg/PatternAttributes.h:
              * svg/RadialGradientAttributes.h:
              * svg/SVGAnimatedPathData.h:
              * svg/SVGAnimatedPoints.h:
              * svg/SVGAnimationElement.h:
              * svg/SVGClipPathElement.h:
              * svg/SVGElementInstance.h:
              * svg/SVGFEBlendElement.cpp:
              (WebCore::SVGFEBlendElement::build):
              * svg/SVGFEBlendElement.h:
              * svg/SVGFEColorMatrixElement.cpp:
              (WebCore::SVGFEColorMatrixElement::build):
              * svg/SVGFEComponentTransferElement.cpp:
              (WebCore::SVGFEComponentTransferElement::build):
              * svg/SVGFECompositeElement.cpp:
              (WebCore::SVGFECompositeElement::build):
              * svg/SVGFEDiffuseLightingElement.cpp:
              (WebCore::SVGFEDiffuseLightingElement::build):
              * svg/SVGFEDisplacementMapElement.cpp:
              (WebCore::SVGFEDisplacementMapElement::build):
              * svg/SVGFEDistantLightElement.h:
              * svg/SVGFEFloodElement.cpp:
              (WebCore::SVGFEFloodElement::build):
              * svg/SVGFEFloodElement.h:
              * svg/SVGFEFuncAElement.h:
              * svg/SVGFEFuncBElement.h:
              * svg/SVGFEFuncGElement.h:
              * svg/SVGFEFuncRElement.h:
              * svg/SVGFEGaussianBlurElement.cpp:
              (WebCore::SVGFEGaussianBlurElement::build):
              * svg/SVGFEImageElement.cpp:
              (WebCore::SVGFEImageElement::build):
              * svg/SVGFEMergeElement.cpp:
              (WebCore::SVGFEMergeElement::build):
              * svg/SVGFEOffsetElement.cpp:
              (WebCore::SVGFEOffsetElement::build):
              * svg/SVGFEPointLightElement.h:
              * svg/SVGFESpecularLightingElement.cpp:
              (WebCore::SVGFESpecularLightingElement::build):
              * svg/SVGFESpotLightElement.h:
              * svg/SVGFETileElement.cpp:
              (WebCore::SVGFETileElement::build):
              * svg/SVGLineElement.cpp:
              (WebCore::SVGLineElement::parseMappedAttribute):
              * svg/SVGList.h:
              * svg/SVGListTraits.h:
              (WebCore::):
              * svg/SVGMPathElement.h:
              * svg/SVGMetadataElement.h:
              * svg/SVGParserUtilities.cpp:
              (WebCore::SVGPathParser::parseSVG):
              (WebCore::SVGPathParser::calculateArc):
              * svg/SVGPathElement.h:
              * svg/SVGPathSegClosePath.h:
              * svg/SVGSVGElement.h:
              * svg/SVGSetElement.h:
              * svg/SVGSwitchElement.h:
              * svg/SVGTextPathElement.cpp:
              (WebCore::SVGTextPathElement::parseMappedAttribute):
              * svg/SVGTextPathElement.h:
              * svg/SVGTitleElement.h:
              * svg/SVGTransformable.cpp:
              (WebCore::):
              * svg/SVGViewSpec.cpp:
              (WebCore::):
              * svg/animation/SMILTime.cpp:
              (WebCore::operator+):
              (WebCore::operator-):
              (WebCore::operator*):
              * svg/animation/SVGSMILElement.h:
              * svg/graphics/SVGResource.cpp:
              (WebCore::clientMap):
              * wml/WMLPostfieldElement.cpp:
              (WebCore::WMLPostfieldElement::value):
              * wml/WMLSetvarElement.cpp:
              (WebCore::WMLSetvarElement::value):
              * workers/WorkerRunLoop.cpp:
              * xml/XMLHttpRequest.cpp:
              (WebCore::XMLHttpRequest::dropProtection):
              * xml/XPathPath.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45747 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9c4dacca
  35. 02 Jun, 2009 1 commit
    • eric@webkit.org's avatar
      2009-06-02 Eric Seidel <eric@webkit.org> · 05d6e939
      eric@webkit.org authored
              Reviewed by Maciej Stachowiak.
      
              Remove Range::compareBoundaryPoints(Position, Position) per Darin's suggestion in bug 25056
              https://bugs.webkit.org/show_bug.cgi?id=25500
      
              Darin indicated the Range should deal only with primitive DOM node/offset
              pairs, and that Position (which is a more robust editing construct) should have
              its own comparison functions and that Range.h should not mention Position at all.
      
              Turns out that Position already has a comparePositions() function (which knows
              how to additionally handled positions in shadow trees).  So I've just changed
              all callers of compareBoundaryPoints(Position, Position) to use the existing
              comparePositions() function.  I've also added a comparePositions which takes
              VisiblePositions for convenience.
      
              * dom/Range.cpp:
              * dom/Range.h:
              * editing/ApplyStyleCommand.cpp:
              (WebCore::ApplyStyleCommand::updateStartEnd):
              (WebCore::ApplyStyleCommand::applyBlockStyle):
              (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
              (WebCore::ApplyStyleCommand::applyInlineStyle):
              (WebCore::ApplyStyleCommand::applyInlineStyleToRange):
              (WebCore::ApplyStyleCommand::removeInlineStyle):
              (WebCore::ApplyStyleCommand::nodeFullySelected):
              (WebCore::ApplyStyleCommand::nodeFullyUnselected):
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::deleteInsignificantText):
              (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
              (WebCore::CompositeEditCommand::moveParagraphs):
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::initializeStartEnd):
              (WebCore::DeleteSelectionCommand::handleGeneralDelete):
              (WebCore::DeleteSelectionCommand::mergeParagraphs):
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::nodeWillBeRemoved):
              * editing/VisibleSelection.cpp:
              (WebCore::VisibleSelection::toNormalizedRange):
              * editing/htmlediting.cpp:
              (WebCore::comparePositions):
              * editing/htmlediting.h:
              * page/EventHandler.cpp:
              (WebCore::EventHandler::handleMousePressEventSingleClick):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44367 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      05d6e939
  36. 06 May, 2009 1 commit
    • mitz@apple.com's avatar
      WebCore: · afdb80f0
      mitz@apple.com authored
              Reviewed by Justin Garcia.
      
              - fix an assertion failure in RemoveNodeCommand() when deleting a <br>
                between a block and a mail blockquote
      
              Test: editing/deleting/removeNodeCommand-assert.html
      
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::mergeParagraphs): Pass the start block
              to prune() instead of passing m_upstreamStart.node(), because the latter
              may have been removed already.
      
      LayoutTests:
      
              Reviewed by Justin Garcia.
      
              - test for an assertion failure in RemoveNodeCommand() when deleting a
                <br> between a block and a mail blockquote
      
              * editing/deleting/removeNodeCommand-assert-expected.txt: Added.
              * editing/deleting/removeNodeCommand-assert.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      afdb80f0
  37. 04 May, 2009 1 commit
    • darin@apple.com's avatar
      WebCore: · 9a925fa1
      darin@apple.com authored
      2009-05-04  Darin Adler  <darin@apple.com>
      
              Reviewed by Eric Seidel.
      
              Bug 24924: remove Document.h include of Attr.h and HTMLCollection.h,
              and NamedMappedAttrMap.h include of MappedAttribute.h
              https://bugs.webkit.org/show_bug.cgi?id=24924
      
              Make compiles faster, and debugging info smaller.
      
              * GNUmakefile.am: Added new source files.
              * WebCore.pro: Ditto.
              * WebCore.scons: Ditto.
              * WebCore.vcproj/WebCore.vcproj: Ditto.
              * WebCore.xcodeproj/project.pbxproj: Ditto.
              * WebCoreSources.bkl: Ditto.
      
              * bindings/js/JSHTMLCollectionCustom.cpp:
              (WebCore::toJS): Updated for new collection type names.
      
              * dom/Document.cpp:
              (WebCore::Document::createAttribute): Added. No longer inline.
              (WebCore::Document::images): Updated for new collection type names.
              (WebCore::Document::applets): Ditto.
              (WebCore::Document::embeds): Ditto.
              (WebCore::Document::plugins): Ditto.
              (WebCore::Document::objects): Ditto.
              (WebCore::Document::scripts): Ditto.
              (WebCore::Document::links): Ditto.
              (WebCore::Document::forms): Ditto.
              (WebCore::Document::anchors): Ditto.
              (WebCore::Document::all): Ditto.
              (WebCore::Document::windowNamedItems): Ditto.
              (WebCore::Document::documentNamedItems): Ditto.
              (WebCore::Document::nameCollectionInfo): Ditto.
      
              * dom/Document.h: Changed around includes and forward declarations.
              Updated for changes to collection types.
      
              * dom/NamedMappedAttrMap.h: Removed include of MappedAttribute.h.
      
              * html/CollectionCache.cpp: Copied from WebCore/html/HTMLCollection.cpp.
              Contains the class that used to be HTMLCollection::CollectionInfo.
              * html/CollectionCache.h: Copied from WebCore/html/HTMLCollection.h.
              Ditto.
      
              * html/CollectionType.h: Copied from WebCore/html/HTMLCollection.h.
              Has the enum that used to be HTMLCollection::Type.
      
              * html/HTMLCollection.cpp:
              (WebCore::HTMLCollection::HTMLCollection): Update for collection type change.
              (WebCore::HTMLCollection::create): Ditto.
              (WebCore::HTMLCollection::resetCollectionInfo): Ditto.
              (WebCore::HTMLCollection::itemAfter): Ditto.
              * html/HTMLCollection.h: Ditto.
      
              * html/HTMLElement.cpp:
              (WebCore::HTMLElement::children): Updated for new collection type names.
              * html/HTMLFormCollection.cpp:
              (WebCore::HTMLFormCollection::formCollectionInfo): Ditto.
              (WebCore::HTMLFormCollection::HTMLFormCollection): Ditto.
              * html/HTMLFormCollection.h: Ditto.
              * html/HTMLFormElement.h: Ditto.
              * html/HTMLMapElement.cpp:
              (WebCore::HTMLMapElement::areas): Ditto.
              * html/HTMLNameCollection.cpp:
              (WebCore::HTMLNameCollection::HTMLNameCollection): Ditto.
              * html/HTMLNameCollection.h:
              (WebCore::HTMLNameCollection::create): Ditto.
              * html/HTMLSelectElement.h:
              (WebCore::HTMLSelectElement::collectionInfo): Ditto.
              * html/HTMLTableElement.cpp:
              (WebCore::HTMLTableElement::tBodies):Ditto.
              * html/HTMLTableRowElement.cpp:
              (WebCore::HTMLTableRowElement::cells):Ditto.
              * html/HTMLTableRowsCollection.cpp:
              (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection): Ditto.
              * html/HTMLTableSectionElement.cpp:
              (WebCore::HTMLTableSectionElement::rows): Ditto.
      
              * bindings/js/JSDOMWindowBase.cpp: Added newly-needed includes.
              * bindings/js/JSHTMLFrameSetElementCustom.cpp: Ditto.
              * css/CSSStyleSelector.cpp: Ditto.
              * dom/Element.cpp: Ditto.
              * dom/InputElement.cpp: Ditto.
              * dom/NamedAttrMap.cpp: Ditto.
              * dom/NamedMappedAttrMap.cpp: Ditto.
              * dom/Node.cpp: Ditto.
              * dom/StyledElement.cpp: Ditto.
              * dom/StyledElement.h: Ditto.
              * editing/ApplyStyleCommand.cpp: Ditto.
              * editing/DeleteSelectionCommand.cpp: Ditto.
              * editing/Editor.cpp: Ditto.
              * editing/EditorCommand.cpp: Ditto.
              * editing/InsertParagraphSeparatorCommand.cpp: Ditto.
              * editing/ReplaceSelectionCommand.cpp: Ditto.
              * editing/markup.cpp: Ditto.
              * html/CanvasRenderingContext2D.cpp: Ditto.
              * html/HTMLAnchorElement.cpp: Ditto.
              * html/HTMLAppletElement.cpp: Ditto.
              * html/HTMLAreaElement.cpp: Ditto.
              * html/HTMLBRElement.cpp: Ditto.
              * html/HTMLBaseElement.cpp: Ditto.
              * html/HTMLBodyElement.cpp: Ditto.
              * html/HTMLButtonElement.cpp: Ditto.
              * html/HTMLCanvasElement.cpp: Ditto.
              * html/HTMLDivElement.cpp: Ditto.
              * html/HTMLEmbedElement.cpp: Ditto.
              * html/HTMLFontElement.cpp: Ditto.
              * html/HTMLFormControlElement.cpp: Ditto.
              * html/HTMLFormElement.cpp: Ditto.
              * html/HTMLFrameElement.cpp: Ditto.
              * html/HTMLFrameElementBase.cpp: Ditto.
              * html/HTMLFrameSetElement.cpp: Ditto.
              * html/HTMLHRElement.cpp: Ditto.
              * html/HTMLIFrameElement.cpp: Ditto.
              * html/HTMLImageElement.cpp: Ditto.
              * html/HTMLInputElement.cpp: Ditto.
              * html/HTMLIsIndexElement.cpp: Ditto.
              * html/HTMLKeygenElement.cpp: Ditto.
              * html/HTMLLIElement.cpp: Ditto.
              * html/HTMLLinkElement.cpp: Ditto.
              * html/HTMLMarqueeElement.cpp: Ditto.
              * html/HTMLMetaElement.cpp: Ditto.
              * html/HTMLOListElement.cpp: Ditto.
              * html/HTMLObjectElement.cpp: Ditto.
              * html/HTMLOptionElement.cpp: Ditto.
              * html/HTMLParagraphElement.cpp: Ditto.
              * html/HTMLParamElement.cpp: Ditto.
              * html/HTMLPlugInElement.cpp: Ditto.
              * html/HTMLPreElement.cpp: Ditto.
              * html/HTMLScriptElement.cpp: Ditto.
              * html/HTMLSelectElement.cpp: Ditto.
              * html/HTMLStyleElement.cpp: Ditto.
              * html/HTMLTableCaptionElement.cpp: Ditto.
              * html/HTMLTableCellElement.cpp: Ditto.
              * html/HTMLTableColElement.cpp: Ditto.
              * html/HTMLTablePartElement.cpp: Ditto.
              * html/HTMLTextAreaElement.cpp: Ditto.
              * html/HTMLTokenizer.cpp: Ditto.
              * html/HTMLUListElement.cpp: Ditto.
              * html/HTMLVideoElement.cpp: Ditto.
              * html/HTMLViewSourceDocument.cpp: Ditto.
              * loader/ImageDocument.cpp: Ditto.
              * page/Frame.cpp: Ditto.
              * rendering/RenderTreeAsText.cpp: Ditto.
              * svg/SVGAElement.cpp: Ditto.
              * svg/SVGAnimateMotionElement.cpp: Ditto.
              * svg/SVGAnimateTransformElement.cpp: Ditto.
              * svg/SVGAnimationElement.cpp: Ditto.
              * svg/SVGCircleElement.cpp: Ditto.
              * svg/SVGClipPathElement.cpp: Ditto.
              * svg/SVGCursorElement.cpp: Ditto.
              * svg/SVGElement.cpp: Ditto.
              * svg/SVGEllipseElement.cpp: Ditto.
              * svg/SVGExternalResourcesRequired.cpp: Ditto.
              * svg/SVGFitToViewBox.cpp: Ditto.
              * svg/SVGFontFaceElement.cpp: Ditto.
              * svg/SVGFontFaceUriElement.cpp: Ditto.
              * svg/SVGForeignObjectElement.cpp: Ditto.
              * svg/SVGGlyphElement.cpp: Ditto.
              * svg/SVGGradientElement.cpp: Ditto.
              * svg/SVGImageElement.cpp: Ditto.
              * svg/SVGLangSpace.cpp: Ditto.
              * svg/SVGLineElement.cpp: Ditto.
              * svg/SVGLinearGradientElement.cpp: Ditto.
              * svg/SVGMarkerElement.cpp: Ditto.
              * svg/SVGMaskElement.cpp: Ditto.
              * svg/SVGPathElement.cpp: Ditto.
              * svg/SVGPatternElement.cpp: Ditto.
              * svg/SVGPolyElement.cpp: Ditto.
              * svg/SVGRadialGradientElement.cpp: Ditto.
              * svg/SVGRectElement.cpp: Ditto.
              * svg/SVGSVGElement.cpp: Ditto.
              * svg/SVGScriptElement.cpp: Ditto.
              * svg/SVGStopElement.cpp: Ditto.
              * svg/SVGStyleElement.cpp: Ditto.
              * svg/SVGStyledElement.cpp: Ditto.
              * svg/SVGStyledTransformableElement.cpp: Ditto.
              * svg/SVGTests.cpp: Ditto.
              * svg/SVGTextContentElement.cpp: Ditto.
              * svg/SVGTextElement.cpp: Ditto.
              * svg/SVGTextPathElement.cpp: Ditto.
              * svg/SVGTextPositioningElement.cpp: Ditto.
              * svg/SVGURIReference.cpp: Ditto.
              * svg/SVGUseElement.cpp: Ditto.
              * svg/SVGViewElement.cpp: Ditto.
              * svg/animation/SVGSMILElement.cpp: Ditto.
              * xml/XPathStep.cpp: Ditto.
      
      WebKit/mac:
      
      2009-05-04  Darin Adler  <darin@apple.com>
      
              Reviewed by Eric Seidel.
      
              Bug 24924: remove Document.h include of Attr.h and HTMLCollection.h,
              and NamedMappedAttrMap.h include of MappedAttribute.h
              https://bugs.webkit.org/show_bug.cgi?id=24924
      
              * WebView/WebFrame.mm: Added include of CSSMutableStyleDeclaration.h
              and ScriptValue.h.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43187 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9a925fa1
  38. 02 May, 2009 1 commit
    • mitz@apple.com's avatar
      WebCore: · fc292c35
      mitz@apple.com authored
              Reviewed by Darin Adler.
      
              - another fix for <rdar://problem/6617298> Typing delete on an unquoted
                blank line unquotes the preceding, quoted blank line
      
              Test: editing/deleting/type-delete-after-quote-2.html
      
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::DeleteSelectionCommand): Initialize
              m_startsAtEmptyLine.
              (WebCore::DeleteSelectionCommand::handleSpecialCaseBRDelete): When the
              selection starts at an empty line, do not prevent the merging of blocks.
              This is what allows the text after the line break to be merged into the
              block containing the line break. Also set m_startsAtEmptyLine to true.
              (WebCore::DeleteSelectionCommand::mergeParagraphs): If
              m_startsAtEmptyLine is true, create a placeholder BR to serve as the
              merge destination.
              * editing/DeleteSelectionCommand.h:
      
      LayoutTests:
      
              Reviewed by Darin Adler.
      
              - another test for <rdar://problem/6617298> Typing delete on an unquoted
                blank line unquotes the preceding, quoted blank line
      
              * editing/deleting/type-delete-after-quote-2-expected.txt: Added.
              * editing/deleting/type-delete-after-quote-2.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43154 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fc292c35