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. 28 Mar, 2011 1 commit
    • xji@chromium.org's avatar
      2011-03-28 Xiaomei Ji <xji@chromium.org> · d815a1f2
      xji@chromium.org authored
              Reviewed by Ryosuke Niwa.
      
              move directionOfEnclosingBlock() to be global so that it could be reused.
              https://bugs.webkit.org/show_bug.cgi?id=57233.
      
              Provide global function directionOfEnclosingBlock(Node*) so that it could be
              reused in SelectionController and other functionalities that need enclosing
              block's direcionality, such as moving caret by word in visual order.
            
              No new functionality, so no new tests.
      
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::directionOfEnclosingBlock):
              * editing/htmlediting.cpp:
              (WebCore::directionOfEnclosingBlock):
              * editing/htmlediting.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82121 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d815a1f2
  3. 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
  4. 15 Mar, 2011 1 commit
    • 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
  5. 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
  6. 10 Feb, 2011 2 commits
    • philn@webkit.org's avatar
      2011-02-10 Sheriff Bot <webkit.review.bot@gmail.com> · 1bb885b2
      philn@webkit.org authored
              Unreviewed, rolling out r78219.
              http://trac.webkit.org/changeset/78219
              https://bugs.webkit.org/show_bug.cgi?id=54215
      
              breaks editing/style/iframe-onload-crash.html on GTK 64-bit
              Debug (Requested by philn-tp on #webkit).
      
              * dom/Document.h:
              * dom/DocumentFragment.h:
              * dom/Element.h:
              * dom/Node.h:
              * dom/Text.h:
              * editing/htmlediting.cpp:
              (WebCore::editingIgnoresContent):
              (WebCore::canHaveChildrenForEditing):
              * editing/htmlediting.h:
              * html/HTMLBRElement.h:
              * html/HTMLButtonElement.h:
              * html/HTMLDataGridElement.h:
              * html/HTMLFormControlElement.h:
              * html/HTMLFrameElementBase.h:
              * html/HTMLHRElement.h:
              * html/HTMLImageElement.h:
              * html/HTMLMeterElement.h:
              * html/HTMLOutputElement.h:
              * html/HTMLPlugInElement.h:
              * html/HTMLProgressElement.h:
              * wml/WMLBRElement.h:
              * wml/WMLDoElement.h:
              * wml/WMLImageElement.h:
              * wml/WMLInputElement.h:
              * wml/WMLSelectElement.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78232 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1bb885b2
    • rniwa@webkit.org's avatar
      2011-02-10 Ryosuke Niwa <rniwa@webkit.org> · c8c02a62
      rniwa@webkit.org authored
              Reviewed by Eric Seidel.
      
              Make canHaveChildrenForEditing more efficient
              https://bugs.webkit.org/show_bug.cgi?id=53564
      
              Improved the performance (1-2% in release and 20% in debug) by adding virtual member function
              canContainRangeEndPoint to Node. It returns true whenever the associated node can have be a container
              node for a position.
      
              As of this revision, canContainRangeEndPoint returns true on Document, DocumentFragment, Text nodes
              and any elements except:
      
              HTML: applet, br, button, datagrid, embed, frame, frameset, hr, img, input,
                    meter, object, output, progress, and select.
      
              WML: br, do, img, input, and select.
      
              No new tests are added since this change cannot be tested directly.
      
              * dom/Document.h:
              (WebCore::Document::canContainRangeEndPoint): Added; returns false.
              * dom/DocumentFragment.h:
              (WebCore::DocumentFragment::canContainRangeEndPoint): Added; returns true.
              * dom/Element.h:
              (WebCore::Element::canContainRangeEndPoint): Ditto.
              * dom/Node.h:
              (WebCore::Node::canContainRangeEndPoint): Added; returns false.
              * dom/Text.h:
              (WebCore::Text::canContainRangeEndPoint): Added; returns true.
              * editing/htmlediting.cpp: Removed editingIgnoresContent and canHaveChildrenForEditing.
              * editing/htmlediting.h:
              (WebCore::editingIgnoresContent): Moved from htmlediting.cpp; made it inline.
              (WebCore::canHaveChildrenForEditing): Ditto.
              * html/HTMLBRElement.h:
              (WebCore::HTMLBRElement::canContainRangeEndPoint): Added; returns false.
              * html/HTMLButtonElement.h:
              (WebCore::HTMLButtonElement::canContainRangeEndPoint): Ditto.
              * html/HTMLDataGridElement.h:
              (WebCore::HTMLDataGridElement::canContainRangeEndPoint): Ditto.
              * html/HTMLFormControlElement.h:
              (WebCore::HTMLFormControlElementWithState::canContainRangeEndPoint): Ditto.
              * html/HTMLFrameElementBase.h:
              (WebCore::HTMLFrameElementBase::canContainRangeEndPoint): Ditto.
              * html/HTMLHRElement.h:
              (WebCore::HTMLHRElement::canContainRangeEndPoint): Ditto.
              * html/HTMLImageElement.h:
              (WebCore::HTMLImageElement::canContainRangeEndPoint): Ditto.
              * html/HTMLMeterElement.h:
              (WebCore::HTMLMeterElement::canContainRangeEndPoint): Ditto.
              * html/HTMLOutputElement.h:
              (WebCore::HTMLOutputElement::canContainRangeEndPoint): Ditto.
              * html/HTMLPlugInElement.h:
              (WebCore::HTMLPlugInElement::canContainRangeEndPoint): Ditto.
              * html/HTMLProgressElement.h:
              (WebCore::HTMLProgressElement::canContainRangeEndPoint): Ditto.
              * wml/WMLBRElement.h:
              (WebCore::WMLBRElement::canContainRangeEndPoint): Ditto.
              * wml/WMLDoElement.h:
              (WebCore::WMLDoElement::canContainRangeEndPoint): Ditto.
              * wml/WMLImageElement.h:
              (WebCore::WMLImageElement::canContainRangeEndPoint): Ditto.
              * wml/WMLInputElement.h:
              (WebCore::WMLInputElement::canContainRangeEndPoint): Ditto.
              * wml/WMLSelectElement.h:
              (WebCore::WMLSelectElement::canContainRangeEndPoint): Ditto.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c8c02a62
  7. 09 Feb, 2011 1 commit
    • yael.aharon@nokia.com's avatar
      2011-02-09 Yael Aharon <yael.aharon@nokia.com> · 3be82c17
      yael.aharon@nokia.com authored
              Reviewed by Darin Adler.
      
              Replace static_cast<HTMLElement*> with toHTMLElement
              https://bugs.webkit.org/show_bug.cgi?id=54117
      
              No new tests since no new functionality was introduced.
      
              * accessibility/AccessibilityListBox.cpp:
              (WebCore::AccessibilityListBox::addChildren):
              * accessibility/AccessibilityMenuListPopup.cpp:
              (WebCore::AccessibilityMenuListPopup::addChildren):
              * accessibility/AccessibilityRenderObject.cpp:
              (WebCore::accessibleNameForNode):
              (WebCore::AccessibilityRenderObject::accessibilityDescription):
              * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
              (webkit_accessible_get_name):
              (webkit_accessible_get_description):
              * bindings/gobject/WebKitDOMBinding.cpp:
              (WebKit::createWrapper):
              (WebKit::kit):
              * bindings/js/JSElementCustom.cpp:
              (WebCore::toJSNewlyCreated):
              * bindings/js/JSHTMLFrameSetElementCustom.cpp:
              (WebCore::JSHTMLFrameSetElement::nameGetter):
              * bindings/js/JSNodeCustom.cpp:
              (WebCore::createWrapperInline):
              * bindings/v8/custom/V8ElementCustom.cpp:
              (WebCore::toV8):
              * dom/Document.cpp:
              (WebCore::Document::body):
              * dom/Element.cpp:
              (WebCore::Element::deprecatedCreateContextualFragment):
              * dom/Range.cpp:
              (WebCore::Range::createContextualFragment):
              * editing/ApplyStyleCommand.cpp:
              (WebCore::ApplyStyleCommand::applyBlockStyle):
              (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
              (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
              (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
              (WebCore::ApplyStyleCommand::removeStyleFromRunBeforeApplyingStyle):
              (WebCore::ApplyStyleCommand::highestAncestorWithConflictingInlineStyle):
              (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
              (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
              (WebCore::ApplyStyleCommand::removeInlineStyle):
              (WebCore::ApplyStyleCommand::shouldSplitTextElement):
              (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
              * editing/DeleteButtonController.cpp:
              (WebCore::enclosingDeletableElement):
              (WebCore::DeleteButtonController::show):
              * editing/Editor.cpp:
              (WebCore::Editor::setBaseWritingDirection):
              * editing/InsertListCommand.cpp:
              (WebCore::InsertListCommand::mergeWithNeighboringLists):
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::ReplaceSelectionCommand::negateStyleRulesThatAffectAppearance):
              (WebCore::ReplaceSelectionCommand::handleStyleSpans):
              (WebCore::ReplaceSelectionCommand::copyStyleToChildren):
              * editing/SelectionController.cpp:
              (WebCore::scanForForm):
              (WebCore::SelectionController::currentForm):
              * editing/htmlediting.cpp:
              (WebCore::enclosingList):
              (WebCore::enclosingListChild):
              (WebCore::embeddedSublist):
              (WebCore::appendedSublist):
              * editing/markup.cpp:
              (WebCore::StyledMarkupAccumulator::appendElement):
              * html/HTMLCollection.cpp:
              (WebCore::HTMLCollection::checkForNameMatch):
              (WebCore::HTMLCollection::updateNameCache):
              * html/HTMLElement.cpp:
              (WebCore::HTMLElement::setOuterHTML):
              (WebCore::HTMLElement::shadowAncestorOwnerForm):
              * html/HTMLFormElement.cpp:
              (WebCore::HTMLFormElement::formElementIndex):
              * html/HTMLSelectElement.cpp:
              (WebCore::HTMLSelectElement::setOption):
              (WebCore::HTMLSelectElement::setLength):
              * inspector/InspectorDOMAgent.cpp:
              (WebCore::InspectorDOMAgent::getOuterHTML):
              (WebCore::InspectorDOMAgent::setOuterHTML):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::handleMouseMoveEvent):
              * rendering/RenderMeter.cpp:
              (WebCore::RenderMeter::createPart):
              * rendering/RenderTextControl.cpp:
              (WebCore::RenderTextControl::createSubtreeIfNeeded):
              * rendering/RenderTextControlSingleLine.cpp:
              (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78150 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3be82c17
  8. 29 Jan, 2011 1 commit
    • paroga@webkit.org's avatar
      2011-01-29 Patrick Gansterer <paroga@webkit.org> · 10c9e1b0
      paroga@webkit.org authored
              Reviewed by David Kilzer.
      
              Move CharacterNames.h into WTF directory
              https://bugs.webkit.org/show_bug.cgi?id=49618
      
              * GNUmakefile.am:
              * JavaScriptCore.gypi:
              * JavaScriptCore.vcproj/WTF/WTF.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * wtf/CMakeLists.txt:
              * wtf/unicode/CharacterNames.h: Renamed from WebCore/platform/text/CharacterNames.h.
              * wtf/unicode/UTF8.cpp:
      2011-01-29  Patrick Gansterer  <paroga@webkit.org>
      
              Reviewed by David Kilzer.
      
              Move CharacterNames.h into WTF directory
              https://bugs.webkit.org/show_bug.cgi?id=49618
      
              * ForwardingHeaders/wtf/unicode/CharacterNames.h: Added.
              * GNUmakefile.am:
              * WebCore.gypi:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * accessibility/AccessibilityObject.cpp:
              * accessibility/AccessibilityRenderObject.cpp:
              * bindings/cpp/WebDOMHTMLDocumentCustom.cpp:
              * bindings/js/JSHTMLDocumentCustom.cpp:
              * dom/Position.cpp:
              * dom/SelectElement.cpp:
              * editing/CompositeEditCommand.cpp:
              * editing/Editor.cpp:
              * editing/HTMLInterchange.cpp:
              * editing/InsertTextCommand.cpp:
              * editing/MarkupAccumulator.cpp:
              * editing/TextIterator.cpp:
              * editing/VisibleSelection.cpp:
              * editing/htmlediting.cpp:
              * editing/htmlediting.h:
              * editing/markup.cpp:
              * html/FTPDirectoryDocument.cpp:
              * html/HTMLFormControlElement.cpp:
              * html/parser/HTMLTreeBuilder.cpp:
              * loader/appcache/ManifestParser.cpp:
              * platform/chromium/PopupMenuChromium.cpp:
              * platform/graphics/Font.h:
              * platform/graphics/FontFastPath.cpp:
              * platform/graphics/GlyphPageTreeNode.cpp:
              * platform/graphics/StringTruncator.cpp:
              * platform/graphics/mac/ComplexTextController.cpp:
              * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
              * platform/graphics/wince/GraphicsContextWinCE.cpp:
              * platform/mac/PasteboardMac.mm:
              * platform/text/TextCodecICU.cpp:
              * platform/text/mac/TextCodecMac.cpp:
              * platform/text/transcoder/FontTranscoder.cpp:
              * rendering/RenderBlockLineLayout.cpp:
              * rendering/RenderFlexibleBox.cpp:
              * rendering/RenderListMarker.cpp:
              * rendering/RenderText.cpp:
              * rendering/RenderTextControl.cpp:
              * rendering/RenderTreeAsText.cpp:
              * rendering/break_lines.cpp:
              * rendering/mathml/RenderMathMLOperator.h:
              * websockets/WebSocketHandshake.cpp:
              * wml/WMLTableElement.cpp:
      2011-01-29  Patrick Gansterer  <paroga@webkit.org>
      
              Reviewed by David Kilzer.
      
              Move CharacterNames.h into WTF directory
              https://bugs.webkit.org/show_bug.cgi?id=49618
      
              * src/ChromeClientImpl.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77062 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      10c9e1b0
  9. 24 Jan, 2011 1 commit
    • rniwa@webkit.org's avatar
      2011-01-24 Ryosuke Niwa <rniwa@webkit.org> · 920c61a5
      rniwa@webkit.org authored
              Reviewed by Ojan Vafai.
      
              Inserting multiple whitespace using text composition (IME) should insert interleaved nbsp and whitespace.
              https://bugs.webkit.org/show_bug.cgi?id=52781
      
              The test was rebaselined to have interleaved space and non-breaking space.
      
              * editing/inserting/insert-composition-whitespace-expected.txt:
              * editing/inserting/insert-composition-whitespace.html:
      2011-01-24  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Ojan Vafai.
      
              Inserting multiple whitespace using text composition (IME) should insert interleaved nbsp and whitespace.
              https://bugs.webkit.org/show_bug.cgi?id=52781
      
              The bug was caused by stringWithRebalancedWhitespace's replacing the space at the beginning of a paragraph
              and the end of a paragraph by a non-breaking space after it replaced two consecutive spaces by a space and
              non-breaking space pattern, thereby replacing more spaces by non-breaking spaces than needed.
      
              Rewrote the function using Vector<UChar> to fix the bug. New function no longer calls String::replace
              multiple times but instead it traverses through the string and replaces a space that immediately follows
              another space or appears at the beginning of a paragraph or at the end of a paragraph by a non-break space.
      
              * editing/CompositeEditCommand.cpp:
              * editing/htmlediting.cpp:
              (WebCore::stringWithRebalancedWhitespace): Written.
              * editing/htmlediting.h:
              (WebCore::isWhitespace): Removed from CompositeEditCommand.cpp
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76565 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      920c61a5
  10. 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
  11. 14 Jan, 2011 1 commit
    • rniwa@webkit.org's avatar
      2011-01-14 Ryosuke Niwa <rniwa@webkit.org> · e3957692
      rniwa@webkit.org authored
              Reviewed by Eric Seidel.
      
              Stop instantiating legacy editing positions in AccessibilityRenderObject.cpp, Element.cpp,
              BreakBlockquoteCommand.cpp, CompositeEditCommand.cpp, and DeleteButtonController.cpp
              https://bugs.webkit.org/show_bug.cgi?id=52481
      
              Removed instantiation of legacy editing positions.
              Calls to Position::Position are replaced by calls to Position's convenience functions.
              
              Also fixed firstPositionInOrBeforeNode and lastPositionInOrAfterNode so that
              they instantiate right positions for text nodes.
      
              * accessibility/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::setSelectedTextRange):
              * dom/Element.cpp:
              (WebCore::Element::updateFocusAppearance):
              * editing/BreakBlockquoteCommand.cpp:
              (WebCore::BreakBlockquoteCommand::doApply):
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::inputText):
              (WebCore::CompositeEditCommand::rebalanceWhitespaceAt):
              (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
              (WebCore::CompositeEditCommand::moveParagraphs):
              (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
              (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph):
              (WebCore::CompositeEditCommand::splitTreeToNode):
              * editing/DeleteButtonController.cpp:
              (WebCore::enclosingDeletableElement):
              * editing/htmlediting.h:
              (WebCore::firstPositionInOrBeforeNode): Instantiates firstPositionInNode instead of
              positionBeforeNode for a text node.
              (WebCore::lastPositionInOrAfterNode): Ditto.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75835 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e3957692
  12. 12 Jan, 2011 1 commit
    • rniwa@webkit.org's avatar
      2011-01-12 Ryosuke Niwa <rniwa@webkit.org> · 7bfcc007
      rniwa@webkit.org authored
              Reviewed by Eric Seidel.
      
              Removed instantiation of legacy editing positions.
              Calls to Position::Position are replaced by calls to Position's convenience functions.
      
              Also added firstPositionInOrBeforeNode and lastPositionInOrAfterNode,
              which are functions that return firstPositionInNode and lastPositionInNode respectively
              when the specified node can have children for editing purpose and return positionBeforeNode
              and positionAfterNode respectively otherwise. They can be used to guarantee that we never
              create a bogus position like [img, 0] or [br, 0].
      
              No tests are added since this is a cleanup.
      
              * editing/ApplyBlockElementCommand.cpp:
              (WebCore::ApplyBlockElementCommand::formatSelection):
              * editing/ApplyStyleCommand.cpp:
              (WebCore::ApplyStyleCommand::applyBlockStyle):
              (WebCore::ApplyStyleCommand::fixRangeAndApplyInlineStyle):
              (WebCore::ApplyStyleCommand::highestAncestorWithConflictingInlineStyle):
              (WebCore::ApplyStyleCommand::removeInlineStyle):
              (WebCore::ApplyStyleCommand::nodeFullySelected):
              (WebCore::ApplyStyleCommand::nodeFullyUnselected):
              (WebCore::ApplyStyleCommand::splitTextAtStart):
              (WebCore::ApplyStyleCommand::splitTextAtEnd):
              (WebCore::ApplyStyleCommand::splitTextElementAtStart):
              (WebCore::ApplyStyleCommand::splitTextElementAtEnd):
              (WebCore::ApplyStyleCommand::isValidCaretPositionInTextNode):
              (WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
              (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
              (WebCore::ApplyStyleCommand::computedFontSize):
              (WebCore::ApplyStyleCommand::joinChildTextNodes):
              * editing/ApplyStyleCommand.h:
              * editing/htmlediting.h:
              (WebCore::firstPositionInOrBeforeNode): Added.
              (WebCore::lastPositionInOrAfterNode): Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75672 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7bfcc007
  13. 08 Jan, 2011 1 commit
  14. 14 Oct, 2010 1 commit
    • rniwa@webkit.org's avatar
      2010-10-14 Ryosuke Niwa <rniwa@webkit.org> · aeeef960
      rniwa@webkit.org authored
              Reviewed by Tony Chang and Darin Adler.
      
              execCommand FormatBlock creates lots of blockquotes
              https://bugs.webkit.org/show_bug.cgi?id=19795
      
              The bug was caused by WebKit's not reusing the block node added by previous iteration
              and its inserting block node at wrong places.
      
              Fixed the bug by rewriting FormatBlockCommand::formatRange.  New code resembles that of
              IndentOutdentCommand::indentIntoBlockquote.  The difference between two is that formatRange
              avoids the existing block elements when replacing blocks and it also adds a placeholder
              when removing the existing block caused paragraphs to collapse.
      
              Also fixed a bug in moveParagraphWithClones where erroneous br is added to the start of
              the block element to which the paragraph is moved if the block element is the start of a paragraph
              and not the end of a paragraph.
      
              Tests: editing/execCommand/format-block-multiple-paragraphs.html
                     editing/execCommand/format-block-table.html
      
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::moveParagraphWithClones): No longer adds erroneous br.
              * editing/EditorCommand.cpp:
              (WebCore::executeFormatBlock):
              * editing/FormatBlockCommand.cpp:
              (WebCore::FormatBlockCommand::formatRange): Rewritten; see above.
              (WebCore::FormatBlockCommand::isElementToApplyInFormatBlockCommand): Renamed from validBlockElement
              and moved from htmlediting.cpp.
              (WebCore::enclosingBlockToSplitTreeTo): Added.
              * editing/FormatBlockCommand.h:
              * editing/VisiblePosition.cpp:
              (WebCore::enclosingBlockFlowElement): Changed the return type to Element*
              * editing/VisiblePosition.h:
      2010-10-14  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Tony Chang and Darin Adler.
      
              execCommand FormatBlock creates lots of blockquotes
              https://bugs.webkit.org/show_bug.cgi?id=19795
      
              Added tests to ensure WebKit does not add multiple block elements when applying block element to
              multiple paragraphs.  Also added a test to ensure formatBlock works with tables.
      
              * fast/html/nav-element-expected.txt: Preserved new lines and removed redundant br.
              * editing/execCommand/format-block-expected.txt: Preserved span and removed erroneous br.
              * editing/execCommand/format-block-from-range-selection-expected.txt: Merged dl's and removed erroneous br.
              * editing/execCommand/format-block-multiple-paragraphs-expected.txt: Added.
              * editing/execCommand/format-block-multiple-paragraphs.html: Added.
              * editing/execCommand/format-block-table-expected.txt: Added.
              * editing/execCommand/format-block-table.html: Added.
              * editing/execCommand/format-block-with-braces-expected.txt: Removed erroneous br.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69836 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aeeef960
  15. 13 Oct, 2010 2 commits
    • commit-queue@webkit.org's avatar
      2010-10-12 Sheriff Bot <webkit.review.bot@gmail.com> · 93d722a2
      commit-queue@webkit.org authored
              Unreviewed, rolling out r69639.
              http://trac.webkit.org/changeset/69639
              https://bugs.webkit.org/show_bug.cgi?id=47575
      
              "regressed nav-element.html" (Requested by rniwa on #webkit).
      
              * editing/execCommand/format-block-expected.txt:
              * editing/execCommand/format-block-from-range-selection-expected.txt:
              * editing/execCommand/format-block-multiple-paragraphs-expected.txt: Removed.
              * editing/execCommand/format-block-multiple-paragraphs.html: Removed.
              * editing/execCommand/format-block-table-expected.txt: Removed.
              * editing/execCommand/format-block-table.html: Removed.
              * editing/execCommand/format-block-with-braces-expected.txt:
      2010-10-12  Sheriff Bot  <webkit.review.bot@gmail.com>
      
              Unreviewed, rolling out r69639.
              http://trac.webkit.org/changeset/69639
              https://bugs.webkit.org/show_bug.cgi?id=47575
      
              "regressed nav-element.html" (Requested by rniwa on #webkit).
      
              * editing/ApplyBlockElementCommand.cpp:
              (WebCore::ApplyBlockElementCommand::formatSelection):
              * editing/EditorCommand.cpp:
              (WebCore::executeFormatBlock):
              * editing/FormatBlockCommand.cpp:
              (WebCore::FormatBlockCommand::formatRange):
              * editing/FormatBlockCommand.h:
              (WebCore::FormatBlockCommand::editingAction):
              * editing/VisiblePosition.cpp:
              (WebCore::enclosingBlockFlowElement):
              * editing/VisiblePosition.h:
              * editing/htmlediting.cpp:
              (WebCore::validBlockTag):
              * editing/htmlediting.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69640 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      93d722a2
    • rniwa@webkit.org's avatar
      2010-10-12 Ryosuke Niwa <rniwa@webkit.org> · 65f41609
      rniwa@webkit.org authored
              Reviewed by Tony Chang.
      
              execCommand FormatBlock creates lots of blockquotes
              https://bugs.webkit.org/show_bug.cgi?id=19795
      
              The bug was caused by WebKit's not reusing the block node added by previous iteration
              and its inserting block node at wrong places.
      
              Fixed the bug by rewriting FormatBlockCommand::formatRange.  New code resembles that of
              IndentOutdentCommand::indentIntoBlockquote.  The difference between two is that formatRange
              avoids the existing block elements when replacing blocks and it also adds a placeholder
              when removing the existing block caused paragraphs to collapse.
      
              Tests: editing/execCommand/format-block-multiple-paragraphs.html
                     editing/execCommand/format-block-table.html
      
              * editing/EditorCommand.cpp:
              (WebCore::executeFormatBlock):
              * editing/FormatBlockCommand.cpp:
              (WebCore::FormatBlockCommand::formatRange): Rewritten; see above.
              (WebCore::FormatBlockCommand::isElementToApplyInFormatBlockCommand): Renamed from validBlockElement
              and moved from htmlediting.cpp.
              (WebCore::FormatBlockCommand::enclosingBlockToSplitTreeTo): Added.
              * editing/FormatBlockCommand.h:
              * editing/VisiblePosition.cpp:
              (WebCore::enclosingBlockFlowElement): Changed the return type to Element*
              * editing/VisiblePosition.h:
      2010-10-12  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Tony Chang.
      
              execCommand FormatBlock creates lots of blockquotes
              https://bugs.webkit.org/show_bug.cgi?id=19795
      
              Added tests to ensure WebKit does not add multiple block elements when applying block element to
              multiple paragraphs.  Also added a test to ensure formatBlock works with tables.
      
              * editing/execCommand/format-block-expected.txt: Preserved span and removed erroneous br.
              * editing/execCommand/format-block-from-range-selection-expected.txt: Merged dl's and removed erroneous br.
              * editing/execCommand/format-block-multiple-paragraphs-expected.txt: Added.
              * editing/execCommand/format-block-multiple-paragraphs.html: Added.
              * editing/execCommand/format-block-table-expected.txt: Added.
              * editing/execCommand/format-block-table.html: Added.
              * editing/execCommand/format-block-with-braces-expected.txt: Removed erroneous br.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69639 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      65f41609
  16. 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
  17. 09 Aug, 2010 1 commit
    • barraclough@apple.com's avatar
      Bug 43594 - Add string forwards to Forward.h · d218c2df
      barraclough@apple.com authored
      This allows us to remove forward declarations for these classes from
      WebCore/WebKit (a step in moving these class from WebCore:: to WTF::).
      
      Rubber stamped by Sam Weinig
      
      JavaScriptCore: 
      
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * wtf/Forward.h:
      
      WebCore: 
      
      * WebCore.xcodeproj/project.pbxproj:
      * accessibility/AXObjectCache.h:
      * accessibility/AccessibilityARIAGrid.h:
      * accessibility/AccessibilityListBoxOption.h:
      * accessibility/AccessibilityObject.h:
      * accessibility/AccessibilityRenderObject.h:
      * accessibility/AccessibilityTable.h:
      * bindings/cpp/WebDOMCString.h:
      * bindings/cpp/WebDOMString.h:
      * bindings/gobject/ConvertToUTF8String.h:
      * bindings/js/DOMWrapperWorld.h:
      * bindings/js/JSDOMBinding.h:
      * bindings/js/JSDOMWindowBase.h:
      * bindings/js/JSMessagePortCustom.h:
      * bindings/js/JavaScriptCallFrame.h:
      * bindings/js/ScriptController.h:
      * bindings/js/ScriptProfile.h:
      * bindings/js/ScriptSourceProvider.h:
      * bindings/js/ScriptString.h:
      * bindings/js/WorkerScriptController.h:
      * bindings/objc/DOMImplementationFront.h:
      * bindings/v8/ScheduledAction.h:
      * bindings/v8/ScriptController.h:
      * bindings/v8/V8DOMWindowShell.h:
      * bindings/v8/V8Proxy.h:
      * bindings/v8/V8Utilities.h:
      * bindings/v8/custom/V8CustomXPathNSResolver.h:
      * bridge/c/c_utility.h:
      * css/CSSFontSelector.h:
      * css/CSSHelper.h:
      * css/CSSOMUtils.h:
      * css/CSSPrimitiveValue.h:
      * css/MediaList.h:
      * css/StyleBase.h:
      * css/StyleSheetList.h:
      * css/WebKitCSSKeyframesRule.h:
      * dom/CheckedRadioButtons.h:
      * dom/DOMImplementation.h:
      * dom/DocumentMarker.h:
      * dom/DynamicNodeList.h:
      * dom/EventTarget.h:
      * dom/MessagePort.h:
      * dom/MessagePortChannel.h:
      * dom/NameNodeList.h:
      * dom/Node.h:
      * dom/NodeList.h:
      * dom/OptionGroupElement.h:
      * dom/ScriptExecutionContext.h:
      * dom/SelectElement.h:
      * dom/ViewportArguments.h:
      * dom/make_names.pl:
      * editing/HTMLInterchange.h:
      * editing/htmlediting.h:
      * editing/markup.h:
      * html/CollectionCache.h:
      * html/DOMFormData.h:
      * html/DataGridColumnList.h:
      * html/DateComponents.h:
      * html/FileStream.h:
      * html/FileStreamProxy.h:
      * html/FormDataList.h:
      (WebCore::FormDataList::appendData):
      * html/HTMLCollection.h:
      * html/HTMLElementStack.h:
      * html/HTMLFormattingElementList.h:
      * html/HTMLParserQuirks.h:
      * html/HTMLQuoteElement.h:
      * html/HTMLScriptRunnerHost.h:
      * html/StepRange.h:
      * html/canvas/CanvasGradient.h:
      * html/canvas/CanvasNumberArray.h:
      * html/canvas/CanvasPattern.h:
      * inspector/InjectedScript.h:
      * inspector/InspectorCSSStore.h:
      * inspector/InspectorClient.h:
      * inspector/InspectorFrontendClient.h:
      * inspector/InspectorValues.h:
      * inspector/ScriptDebugListener.h:
      * loader/CachedResourceClient.h:
      * loader/CrossOriginAccessControl.h:
      * loader/DocumentThreadableLoader.h:
      * loader/FrameLoaderClient.h:
      * loader/RedirectScheduler.h:
      * loader/SubframeLoader.h:
      * loader/appcache/DOMApplicationCache.h:
      * loader/archive/ArchiveFactory.h:
      * loader/icon/IconDatabaseClient.h:
      * notifications/NotificationPresenter.h:
      * page/Chrome.h:
      * page/ChromeClient.h:
      * page/Console.h:
      * page/ContextMenuClient.h:
      * page/DOMSelection.h:
      * page/EditorClient.h:
      * page/EventHandler.h:
      * page/FrameView.h:
      * page/GeolocationPositionCache.h:
      * page/History.h:
      * page/Location.h:
      * page/Navigator.h:
      * page/NavigatorBase.h:
      * page/PluginHalterClient.h:
      * page/PrintContext.h:
      * page/SpeechInput.h:
      * page/SpeechInputListener.h:
      * page/animation/AnimationController.h:
      * platform/CookieJar.h:
      * platform/CrossThreadCopier.h:
      * platform/DragImage.h:
      * platform/FileSystem.h:
      * platform/Language.h:
      * platform/Length.h:
      * platform/LinkHash.h:
      * platform/LocalizationStrategy.h:
      * platform/LocalizedStrings.h:
      * platform/Logging.h:
      * platform/Pasteboard.h:
      * platform/PopupMenuClient.h:
      * platform/SearchPopupMenu.h:
      * platform/Widget.h:
      * platform/cf/BinaryPropertyList.h:
      * platform/chromium/ChromiumBridge.h:
      * platform/chromium/ClipboardUtilitiesChromium.h:
      * platform/cocoa/KeyEventCocoa.h:
      * platform/graphics/Color.h:
      * platform/graphics/FontCache.h:
      * platform/graphics/FontData.h:
      * platform/graphics/FontSelector.h:
      * platform/graphics/GraphicsTypes.h:
      * platform/graphics/Icon.h:
      * platform/graphics/ImageBuffer.h:
      * platform/graphics/ImageSource.h:
      * platform/graphics/MediaPlayer.h:
      * platform/graphics/MediaPlayerPrivate.h:
      * platform/graphics/Path.h:
      * platform/graphics/StringTruncator.h:
      * platform/graphics/cairo/FontCustomPlatformData.h:
      * platform/graphics/cairo/FontPlatformData.h:
      * platform/graphics/cg/FontPlatformData.h:
      * platform/graphics/cg/ImageSourceCG.h:
      * platform/graphics/chromium/FontCustomPlatformData.h:
      * platform/graphics/chromium/FontPlatformDataChromiumWin.h:
      * platform/graphics/chromium/FontPlatformDataLinux.h:
      * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
      * platform/graphics/haiku/FontCustomPlatformData.h:
      * platform/graphics/mac/FontCustomPlatformData.h:
      * platform/graphics/mac/FontPlatformData.h:
      * platform/graphics/qt/FontCustomPlatformData.h:
      * platform/graphics/qt/FontPlatformData.h:
      * platform/graphics/win/FontCustomPlatformData.h:
      * platform/graphics/win/FontCustomPlatformDataCairo.h:
      * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h:
      * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
      * platform/graphics/wince/FontPlatformData.h:
      * platform/graphics/wince/MediaPlayerPrivateWince.h:
      * platform/graphics/wince/MediaPlayerProxy.h:
      * platform/graphics/wx/FontCustomPlatformData.h:
      * platform/graphics/wx/FontPlatformData.h:
      * platform/mac/PasteboardHelper.h:
      * platform/network/DNS.h:
      * platform/network/FormData.h:
      * platform/network/FormDataBuilder.h:
      * platform/network/HTTPParsers.h:
      * platform/text/Hyphenation.h:
      * platform/text/LineEnding.h:
      * platform/text/TextCodec.h:
      * platform/text/TextEncoding.h:
      * platform/text/TextStream.h:
      * platform/win/BString.h:
      * platform/win/ClipboardUtilitiesWin.h:
      * platform/win/WCDataObject.h:
      * platform/win/WebCoreTextRenderer.h:
      * plugins/DOMMimeType.h:
      * plugins/DOMMimeTypeArray.h:
      * plugins/DOMPlugin.h:
      * plugins/DOMPluginArray.h:
      * rendering/CounterNode.h:
      * rendering/HitTestResult.h:
      * rendering/RenderObjectChildList.h:
      * rendering/RenderText.h:
      * rendering/RenderTreeAsText.h:
      * rendering/TextControlInnerElements.h:
      * rendering/style/ContentData.h:
      * rendering/style/RenderStyle.h:
      * storage/DatabaseAuthorizer.h:
      * storage/DatabaseTrackerClient.h:
      * storage/SQLTransaction.h:
      * storage/SQLTransactionSync.h:
      * storage/Storage.h:
      * storage/chromium/DatabaseObserver.h:
      * svg/SVGAnimatedTemplate.h:
      * svg/SVGDocumentExtensions.h:
      * svg/SVGGlyphElement.h:
      * svg/SVGHKernElement.h:
      * svg/SVGNumberList.h:
      * svg/SVGPointList.h:
      * svg/SVGPreserveAspectRatio.h:
      * svg/SVGStylable.h:
      * svg/SVGTests.h:
      * svg/SVGTransformList.h:
      * svg/SVGTransformable.h:
      * svg/SVGVKernElement.h:
      * websockets/ThreadableWebSocketChannel.h:
      * websockets/ThreadableWebSocketChannelClientWrapper.h:
      * websockets/WebSocket.h:
      * websockets/WebSocketChannel.h:
      * websockets/WebSocketHandshakeResponse.h:
      * wml/WMLErrorHandling.h:
      * wml/WMLPageState.h:
      * wml/WMLVariables.h:
      * workers/DefaultSharedWorkerRepository.h:
      * workers/SharedWorkerRepository.h:
      * workers/Worker.h:
      * workers/WorkerContextProxy.h:
      * workers/WorkerLoaderProxy.h:
      * workers/WorkerLocation.h:
      * workers/WorkerMessagingProxy.h:
      * workers/WorkerReportingProxy.h:
      * workers/WorkerThread.h:
      * xml/DOMParser.h:
      * xml/XMLHttpRequestUpload.h:
      * xml/XPathEvaluator.h:
      * xml/XPathExpression.h:
      * xml/XPathNSResolver.h:
      * xml/XPathResult.h:
      * xml/XPathUtil.h:
      
      WebKit: 
      
      * WebKit.xcodeproj/project.pbxproj:
      
      WebKit/chromium: 
      
      * public/WebCString.h:
      * public/WebString.h:
      * src/DOMUtilitiesPrivate.h:
      * src/DebuggerAgentImpl.h:
      * src/DebuggerAgentManager.h:
      * src/WebDevToolsAgentImpl.h:
      * src/WebDevToolsFrontendImpl.h:
      * src/WebPageSerializerImpl.h:
      
      WebKit/efl: 
      
      * WebCoreSupport/InspectorClientEfl.h:
      
      WebKit/gtk: 
      
      * WebCoreSupport/InspectorClientGtk.h:
      
      WebKit/haiku: 
      
      * WebCoreSupport/FrameLoaderClientHaiku.h:
      * WebCoreSupport/InspectorClientHaiku.h:
      
      WebKit/mac: 
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.h:
      * Plugins/WebBaseNetscapePluginView.h:
      * WebCoreSupport/WebFrameLoaderClient.h:
      * WebCoreSupport/WebIconDatabaseClient.h:
      * WebCoreSupport/WebPluginHalterClient.h:
      * WebView/WebViewInternal.h:
      
      WebKit/qt: 
      
      * WebCoreSupport/FrameLoaderClientQt.h:
      * WebCoreSupport/InspectorClientQt.h:
      
      WebKit/win: 
      
      * COMVariantSetter.h:
      * MarshallingHelpers.h:
      * WebCoreSupport/WebContextMenuClient.h:
      * WebCoreSupport/WebPluginHalterClient.h:
      * WebHistory.h:
      
      WebKit/wx: 
      
      * WebKitSupport/FrameLoaderClientWx.h:
      * WebKitSupport/InspectorClientWx.h:
      
      WebKit2: 
      
      * UIProcess/PageClient.h:
      * UIProcess/VisitedLinkProvider.h:
      * UIProcess/WebContextInjectedBundleClient.h:
      * UIProcess/WebFrameProxy.h:
      * UIProcess/WebHistoryClient.h:
      * UIProcess/WebLoaderClient.h:
      * UIProcess/WebPolicyClient.h:
      * UIProcess/WebProcessProxy.h:
      * UIProcess/WebUIClient.h:
      * UIProcess/win/WebView.h:
      * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
      * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
      * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
      * WebProcess/Plugins/NPRuntimeObjectMap.h:
      * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
      * WebProcess/Plugins/PluginController.h:
      * WebProcess/WebPage/WebFrame.h:
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebProcess.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65021 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d218c2df
  18. 06 Aug, 2010 1 commit
  19. 05 Aug, 2010 1 commit
    • barraclough@apple.com's avatar
      Bug 43594 - Add string forwards to Forward.h · eead80ac
      barraclough@apple.com authored
      This allows us to remove forward declarations for these classes from
      WebCore/WebKit (a step in moving these class from WebCore:: to WTF::).
      
      Rubber stamped by Sam Weinig
      
      JavaScriptCore: 
      
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * wtf/Forward.h:
      
      WebCore: 
      
      * WebCore.xcodeproj/project.pbxproj:
      * accessibility/AXObjectCache.h:
      * accessibility/AccessibilityARIAGrid.h:
      * accessibility/AccessibilityListBoxOption.h:
      * accessibility/AccessibilityObject.h:
      * accessibility/AccessibilityRenderObject.h:
      * accessibility/AccessibilityTable.h:
      * bindings/cpp/WebDOMCString.h:
      * bindings/cpp/WebDOMString.h:
      * bindings/gobject/ConvertToUTF8String.h:
      * bindings/js/DOMWrapperWorld.h:
      * bindings/js/JSDOMBinding.h:
      * bindings/js/JSDOMWindowBase.h:
      * bindings/js/JSMessagePortCustom.h:
      * bindings/js/JavaScriptCallFrame.h:
      * bindings/js/ScriptController.h:
      * bindings/js/ScriptProfile.h:
      * bindings/js/ScriptSourceProvider.h:
      * bindings/js/ScriptString.h:
      * bindings/js/WorkerScriptController.h:
      * bindings/objc/DOMImplementationFront.h:
      * bindings/v8/ScheduledAction.h:
      * bindings/v8/ScriptController.h:
      * bindings/v8/V8DOMWindowShell.h:
      * bindings/v8/V8Proxy.h:
      * bindings/v8/V8Utilities.h:
      * bindings/v8/custom/V8CustomXPathNSResolver.h:
      * bridge/c/c_utility.h:
      * css/CSSFontSelector.h:
      * css/CSSHelper.h:
      * css/CSSOMUtils.h:
      * css/CSSPrimitiveValue.h:
      * css/MediaList.h:
      * css/StyleBase.h:
      * css/StyleSheetList.h:
      * css/WebKitCSSKeyframesRule.h:
      * dom/CheckedRadioButtons.h:
      * dom/DOMImplementation.h:
      * dom/DocumentMarker.h:
      * dom/DynamicNodeList.h:
      * dom/EventTarget.h:
      * dom/MessagePort.h:
      * dom/MessagePortChannel.h:
      * dom/NameNodeList.h:
      * dom/Node.h:
      * dom/NodeList.h:
      * dom/OptionGroupElement.h:
      * dom/ScriptExecutionContext.h:
      * dom/SelectElement.h:
      * dom/ViewportArguments.h:
      * dom/make_names.pl:
      * editing/HTMLInterchange.h:
      * editing/htmlediting.h:
      * editing/markup.h:
      * html/CollectionCache.h:
      * html/DOMFormData.h:
      * html/DataGridColumnList.h:
      * html/DateComponents.h:
      * html/FileStream.h:
      * html/FileStreamProxy.h:
      * html/FormDataList.h:
      (WebCore::FormDataList::appendData):
      * html/HTMLCollection.h:
      * html/HTMLElementStack.h:
      * html/HTMLFormattingElementList.h:
      * html/HTMLParserQuirks.h:
      * html/HTMLQuoteElement.h:
      * html/HTMLScriptRunnerHost.h:
      * html/StepRange.h:
      * html/canvas/CanvasGradient.h:
      * html/canvas/CanvasNumberArray.h:
      * html/canvas/CanvasPattern.h:
      * inspector/InjectedScript.h:
      * inspector/InspectorCSSStore.h:
      * inspector/InspectorClient.h:
      * inspector/InspectorFrontendClient.h:
      * inspector/InspectorValues.h:
      * inspector/ScriptDebugListener.h:
      * loader/CachedResourceClient.h:
      * loader/CrossOriginAccessControl.h:
      * loader/DocumentThreadableLoader.h:
      * loader/FrameLoaderClient.h:
      * loader/RedirectScheduler.h:
      * loader/SubframeLoader.h:
      * loader/appcache/DOMApplicationCache.h:
      * loader/archive/ArchiveFactory.h:
      * loader/icon/IconDatabaseClient.h:
      * notifications/NotificationPresenter.h:
      * page/Chrome.h:
      * page/ChromeClient.h:
      * page/Console.h:
      * page/ContextMenuClient.h:
      * page/DOMSelection.h:
      * page/EditorClient.h:
      * page/EventHandler.h:
      * page/FrameView.h:
      * page/GeolocationPositionCache.h:
      * page/History.h:
      * page/Location.h:
      * page/Navigator.h:
      * page/NavigatorBase.h:
      * page/PluginHalterClient.h:
      * page/PrintContext.h:
      * page/SpeechInput.h:
      * page/SpeechInputListener.h:
      * page/animation/AnimationController.h:
      * platform/CookieJar.h:
      * platform/CrossThreadCopier.h:
      * platform/DragImage.h:
      * platform/FileSystem.h:
      * platform/Language.h:
      * platform/Length.h:
      * platform/LinkHash.h:
      * platform/LocalizationStrategy.h:
      * platform/LocalizedStrings.h:
      * platform/Logging.h:
      * platform/Pasteboard.h:
      * platform/PopupMenuClient.h:
      * platform/SearchPopupMenu.h:
      * platform/Widget.h:
      * platform/cf/BinaryPropertyList.h:
      * platform/chromium/ChromiumBridge.h:
      * platform/chromium/ClipboardUtilitiesChromium.h:
      * platform/cocoa/KeyEventCocoa.h:
      * platform/graphics/Color.h:
      * platform/graphics/FontCache.h:
      * platform/graphics/FontData.h:
      * platform/graphics/FontSelector.h:
      * platform/graphics/GraphicsTypes.h:
      * platform/graphics/Icon.h:
      * platform/graphics/ImageBuffer.h:
      * platform/graphics/ImageSource.h:
      * platform/graphics/MediaPlayer.h:
      * platform/graphics/MediaPlayerPrivate.h:
      * platform/graphics/Path.h:
      * platform/graphics/StringTruncator.h:
      * platform/graphics/cairo/FontCustomPlatformData.h:
      * platform/graphics/cairo/FontPlatformData.h:
      * platform/graphics/cg/FontPlatformData.h:
      * platform/graphics/cg/ImageSourceCG.h:
      * platform/graphics/chromium/FontCustomPlatformData.h:
      * platform/graphics/chromium/FontPlatformDataChromiumWin.h:
      * platform/graphics/chromium/FontPlatformDataLinux.h:
      * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
      * platform/graphics/haiku/FontCustomPlatformData.h:
      * platform/graphics/mac/FontCustomPlatformData.h:
      * platform/graphics/mac/FontPlatformData.h:
      * platform/graphics/qt/FontCustomPlatformData.h:
      * platform/graphics/qt/FontPlatformData.h:
      * platform/graphics/win/FontCustomPlatformData.h:
      * platform/graphics/win/FontCustomPlatformDataCairo.h:
      * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h:
      * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
      * platform/graphics/wince/FontPlatformData.h:
      * platform/graphics/wince/MediaPlayerPrivateWince.h:
      * platform/graphics/wince/MediaPlayerProxy.h:
      * platform/graphics/wx/FontCustomPlatformData.h:
      * platform/graphics/wx/FontPlatformData.h:
      * platform/mac/PasteboardHelper.h:
      * platform/network/DNS.h:
      * platform/network/FormData.h:
      * platform/network/FormDataBuilder.h:
      * platform/network/HTTPParsers.h:
      * platform/text/Hyphenation.h:
      * platform/text/LineEnding.h:
      * platform/text/TextCodec.h:
      * platform/text/TextEncoding.h:
      * platform/text/TextStream.h:
      * platform/win/BString.h:
      * platform/win/ClipboardUtilitiesWin.h:
      * platform/win/WCDataObject.h:
      * platform/win/WebCoreTextRenderer.h:
      * plugins/DOMMimeType.h:
      * plugins/DOMMimeTypeArray.h:
      * plugins/DOMPlugin.h:
      * plugins/DOMPluginArray.h:
      * rendering/CounterNode.h:
      * rendering/HitTestResult.h:
      * rendering/RenderObjectChildList.h:
      * rendering/RenderText.h:
      * rendering/RenderTreeAsText.h:
      * rendering/TextControlInnerElements.h:
      * rendering/style/ContentData.h:
      * rendering/style/RenderStyle.h:
      * storage/DatabaseAuthorizer.h:
      * storage/DatabaseTrackerClient.h:
      * storage/SQLTransaction.h:
      * storage/SQLTransactionSync.h:
      * storage/Storage.h:
      * storage/chromium/DatabaseObserver.h:
      * svg/SVGAnimatedTemplate.h:
      * svg/SVGDocumentExtensions.h:
      * svg/SVGGlyphElement.h:
      * svg/SVGHKernElement.h:
      * svg/SVGNumberList.h:
      * svg/SVGPointList.h:
      * svg/SVGPreserveAspectRatio.h:
      * svg/SVGStylable.h:
      * svg/SVGTests.h:
      * svg/SVGTransformList.h:
      * svg/SVGTransformable.h:
      * svg/SVGVKernElement.h:
      * websockets/ThreadableWebSocketChannel.h:
      * websockets/ThreadableWebSocketChannelClientWrapper.h:
      * websockets/WebSocket.h:
      * websockets/WebSocketChannel.h:
      * websockets/WebSocketHandshakeResponse.h:
      * wml/WMLErrorHandling.h:
      * wml/WMLPageState.h:
      * wml/WMLVariables.h:
      * workers/DefaultSharedWorkerRepository.h:
      * workers/SharedWorkerRepository.h:
      * workers/Worker.h:
      * workers/WorkerContextProxy.h:
      * workers/WorkerLoaderProxy.h:
      * workers/WorkerLocation.h:
      * workers/WorkerMessagingProxy.h:
      * workers/WorkerReportingProxy.h:
      * workers/WorkerThread.h:
      * xml/DOMParser.h:
      * xml/XMLHttpRequestUpload.h:
      * xml/XPathEvaluator.h:
      * xml/XPathExpression.h:
      * xml/XPathNSResolver.h:
      * xml/XPathResult.h:
      * xml/XPathUtil.h:
      
      WebKit: 
      
      * WebKit.xcodeproj/project.pbxproj:
      
      WebKit/chromium: 
      
      * public/WebCString.h:
      * public/WebString.h:
      * src/DOMUtilitiesPrivate.h:
      * src/DebuggerAgentImpl.h:
      * src/DebuggerAgentManager.h:
      * src/WebDevToolsAgentImpl.h:
      * src/WebDevToolsFrontendImpl.h:
      * src/WebPageSerializerImpl.h:
      
      WebKit/efl: 
      
      * WebCoreSupport/InspectorClientEfl.h:
      
      WebKit/gtk: 
      
      * WebCoreSupport/InspectorClientGtk.h:
      
      WebKit/haiku: 
      
      * WebCoreSupport/FrameLoaderClientHaiku.h:
      * WebCoreSupport/InspectorClientHaiku.h:
      
      WebKit/mac: 
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.h:
      * Plugins/WebBaseNetscapePluginView.h:
      * WebCoreSupport/WebFrameLoaderClient.h:
      * WebCoreSupport/WebIconDatabaseClient.h:
      * WebCoreSupport/WebPluginHalterClient.h:
      * WebView/WebViewInternal.h:
      
      WebKit/qt: 
      
      * WebCoreSupport/FrameLoaderClientQt.h:
      * WebCoreSupport/InspectorClientQt.h:
      
      WebKit/win: 
      
      * COMVariantSetter.h:
      * MarshallingHelpers.h:
      * WebCoreSupport/WebContextMenuClient.h:
      * WebCoreSupport/WebPluginHalterClient.h:
      * WebHistory.h:
      
      WebKit/wx: 
      
      * WebKitSupport/FrameLoaderClientWx.h:
      * WebKitSupport/InspectorClientWx.h:
      
      WebKit2: 
      
      * UIProcess/PageClient.h:
      * UIProcess/VisitedLinkProvider.h:
      * UIProcess/WebContextInjectedBundleClient.h:
      * UIProcess/WebFrameProxy.h:
      * UIProcess/WebHistoryClient.h:
      * UIProcess/WebLoaderClient.h:
      * UIProcess/WebPolicyClient.h:
      * UIProcess/WebProcessProxy.h:
      * UIProcess/WebUIClient.h:
      * UIProcess/win/WebView.h:
      * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
      * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
      * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
      * WebProcess/Plugins/NPRuntimeObjectMap.h:
      * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
      * WebProcess/Plugins/PluginController.h:
      * WebProcess/WebPage/WebFrame.h:
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebProcess.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64801 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      eead80ac
  20. 20 Apr, 2010 1 commit
    • rniwa@webkit.org's avatar
      Nested <ul>s are mishandled when converted to <ol> using execCommand('insertorderedlist') · dfb6424f
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=19539
      
      Reviewed by Justin Garcia.
      
      WebCore: 
      
      Fixes a bug where two consecutive lists are not merged if they have been converted
      from ordered/unordered lists inside another list.
      
      The bug was caused by InsertListCommand::doApply where it did not merge a newly inserted
      list element and its neighbors. This patch adds code to doApply so that after inserting
      the list element, it updates previousList and nextList to the outermost list elements around
      insertionPos under the same enclosing list. Because the next and the previous list elements
      are not necessarily visually next to the newly inserted element before moveParagraph moves
      the paragraph into the new list element, doApply merges lists after moveParagraph is called.
      
      Test: editing/execCommand/insert-lists-inside-another-list.html
      
      * editing/InsertListCommand.cpp:
      (WebCore::InsertListCommand::doApply): Modified as described above
      * editing/htmlediting.cpp:
      (WebCore::outermostEnclosingList): Added rootNode. Returns the outermost list element,
        which is a descendent of rootNode.
      * editing/htmlediting.h:
      
      LayoutTests: 
      
      Test to make sure InsertListCommand merges consecutive lists when converting
      ordered/unordered lists to the opposite type of lists inside another list.
      
      * editing/execCommand/insert-lists-inside-another-list-expected.txt: Added.
      * editing/execCommand/insert-lists-inside-another-list.html: Added.
      * editing/execCommand/script-tests/insert-lists-inside-another-list.js: Added.
      (testList):
      * platform/mac/editing/execCommand/create-list-from-range-selection-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dfb6424f
  21. 26 Feb, 2010 1 commit
    • ossy@webkit.org's avatar
      Unreviewed. Roll-out r55263 because it broke fast/forms/textarea-type-spaces-pretty-diff.html. · 713375e0
      ossy@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=30946
      
      WebCore: 
      
      * editing/CompositeEditCommand.cpp:
      (WebCore::isWhitespace):
      (WebCore::CompositeEditCommand::rebalanceWhitespaceAt):
      * editing/InsertTextCommand.cpp:
      (WebCore::InsertTextCommand::input):
      * editing/InsertTextCommand.h:
      * editing/htmlediting.cpp:
      * editing/htmlediting.h:
      
      LayoutTests: 
      
      * editing/execCommand/5142012-3-expected.txt:
      * editing/inserting/rebalance-whitespace-1-expected.txt: Removed.
      * editing/inserting/rebalance-whitespace-1.html: Removed.
      * editing/pasteboard/5521237-expected.txt:
      * platform/mac/editing/execCommand/5482023-expected.checksum:
      * platform/mac/editing/execCommand/5482023-expected.png: Added.
      * platform/mac/editing/execCommand/5482023-expected.txt:
      * platform/mac/editing/execCommand/remove-formatting-2-expected.checksum:
      * platform/mac/editing/execCommand/remove-formatting-2-expected.png: Added.
      * platform/mac/editing/execCommand/remove-formatting-expected.checksum:
      * platform/mac/editing/execCommand/remove-formatting-expected.png: Added.
      * platform/mac/editing/execCommand/remove-formatting-expected.txt:
      * platform/mac/editing/inserting/editable-html-element-expected.checksum:
      * platform/mac/editing/inserting/editable-html-element-expected.png: Added.
      * platform/mac/editing/inserting/editable-html-element-expected.txt:
      * platform/mac/editing/pasteboard/4989774-expected.checksum:
      * platform/mac/editing/pasteboard/4989774-expected.png: Added.
      * platform/mac/editing/pasteboard/4989774-expected.txt:
      * platform/mac/editing/selection/4983858-expected.checksum:
      * platform/mac/editing/selection/4983858-expected.png: Added.
      * platform/mac/editing/selection/4983858-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55271 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      713375e0
  22. 25 Feb, 2010 1 commit
    • enrica@apple.com's avatar
      Extra layout on keypress after a space (problem with rebalanceWhitespaceAt in InsertTextCommand). · b5adb4e2
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=30946
      <rdar://problem/7639184>
      
      Reviewed by Adele Peterson.
      
      WebCore: 
      
      Do text insertion and whitespace rebalancing around the insertion in one step so that there's only one layout.
      This patch was originally made by Justin Garcia.
              
      Test: editing/inserting/rebalance-whitespace-1.html
      
      * editing/CompositeEditCommand.cpp:
      (WebCore::CompositeEditCommand::rebalanceWhitespaceAt): No behavior changes here,
      just pushed the code that determined the extent of whitespace surrounding a position
      to its own helper function.
      * editing/InsertTextCommand.cpp:
      (WebCore::InsertTextCommand::insertTextIntoNodeAndRebalanceWhitespace): Added.  Find 
      whitespace surrounding the insertion position, add the text to insert, rebalance that entire
      string, then insert it into the document.
      (WebCore::InsertTextCommand::input):
      * editing/InsertTextCommand.h:
      * editing/htmlediting.cpp:
      (WebCore::isWhitespace): Moved from CompositeEditCommand.cpp.
      (WebCore::extentOfWhitespaceForRebalancingAt): Moved code from rebalanceWhitespaceAt into this helper
      function.  Obtains the offset of the start and end of whitespace around a particular position.
      * editing/htmlediting.h:
      
      LayoutTests: 
      
      There are now regular spaces where nbsps were used unnecessarily before.  Also,
      multi-character insertions now have their whitespace rebalanced, and this is
      reflected in a few tests.
      
      * editing/execCommand/5142012-3-expected.txt:
      * editing/inserting/rebalance-whitespace-1-expected.txt: Added.
      * editing/inserting/rebalance-whitespace-1.html: Added.
      * editing/pasteboard/5521237-expected.txt:
      * platform/mac/editing/execCommand/5482023-expected.checksum:
      * platform/mac/editing/execCommand/5482023-expected.png: Removed.
      * platform/mac/editing/execCommand/5482023-expected.txt:
      * platform/mac/editing/execCommand/remove-formatting-2-expected.checksum:
      * platform/mac/editing/execCommand/remove-formatting-2-expected.png: Removed.
      * platform/mac/editing/execCommand/remove-formatting-expected.checksum:
      * platform/mac/editing/execCommand/remove-formatting-expected.png: Removed.
      * platform/mac/editing/execCommand/remove-formatting-expected.txt:
      * platform/mac/editing/inserting/editable-html-element-expected.checksum:
      * platform/mac/editing/inserting/editable-html-element-expected.png: Removed.
      * platform/mac/editing/inserting/editable-html-element-expected.txt:
      * platform/mac/editing/pasteboard/4989774-expected.checksum:
      * platform/mac/editing/pasteboard/4989774-expected.png: Removed.
      * platform/mac/editing/pasteboard/4989774-expected.txt:
      * platform/mac/editing/selection/4983858-expected.checksum:
      * platform/mac/editing/selection/4983858-expected.png: Removed.
      * platform/mac/editing/selection/4983858-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55263 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b5adb4e2
  23. 05 Feb, 2010 1 commit
    • tony@chromium.org's avatar
      2010-02-05 Tony Chang <tony@chromium.org> · cfe6587a
      tony@chromium.org authored
              Reviewed by Eric Seidel.
      
              https://bugs.webkit.org/show_bug.cgi?id=24872
              Add a test to make sure copying from a list and pasting into a list
              keeps the list at the same indention level rather than nesting.
      
              * editing/pasteboard/paste-list-002-expected.txt: Added.
              * editing/pasteboard/paste-list-002.html: Added.
      2010-02-05  Tony Chang  <tony@chromium.org>
      
              Reviewed by Eric Seidel.
      
              https://bugs.webkit.org/show_bug.cgi?id=24872
              When pasting a list into another list should not indent another level.
              If the cursor is at the beginning of the line, it should insert the
              list items before the current list item.  If the cursor is at the end
              of the line, it should insert the list items after the current list item.
      
              This matches Firefox and IE and makes the common activity of reordering a list
              work as expected.
      
              This also adds a small helper method (isListItem) to htmlediting.h.
      
              Test: editing/pasteboard/paste-list-002.html
      
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::ReplaceSelectionCommand::doApply):
              (WebCore::ReplaceSelectionCommand::insertAsListItems):
              * editing/ReplaceSelectionCommand.h:
              * editing/htmlediting.cpp:
              (WebCore::isListItem):
              (WebCore::appendedSublist):
              * editing/htmlediting.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cfe6587a
  24. 04 Feb, 2010 1 commit
    • enrica@apple.com's avatar
      REGRESSION: Dragging plain text into a styled text region does not acquire the correct style info. · 5b42a264
      enrica@apple.com authored
      <rdar://problem/7595685>
      https://bugs.webkit.org/show_bug.cgi?id=34609
      
      Reviewed by Oliver Hunt.
      
      WebCore: 
      
      Test: editing/pasteboard/drop-inputtext-acquires-style.html
      
      The dragging code did not distinguish the case of dragging the content of an input control
      as a special case. The markup placed in the pasteboard included the style information.
      I've modified the Clipboard class interface adding a new method writePlainText to match the
      behavior of the copy and cut commands and modified the drag code to detect the special case.
      I've modified all the platform specific implementations of the Clipboard class.
              
      * dom/Clipboard.h: Added writePlainText pure virtual function.
      * editing/Editor.cpp:
      (WebCore::Editor::cut): Renamed nodeIsTextFormControl to isNodeInTextFormControl.
      (WebCore::Editor::copy): Renamed nodeIsTextFormControl to isNodeInTextFormControl.
      * editing/htmlediting.cpp:
      (WebCore::isNodeInTextFormControl): Added, after removing the implementation with the old name
      in Editor.cpp
      * editing/htmlediting.h:
      * page/DragController.cpp:
      (WebCore::DragController::startDrag):
      * platform/Pasteboard.h:
      * platform/android/ClipboardAndroid.cpp:
      (WebCore::ClipboardAndroid::writePlainText): Added.
      * platform/android/ClipboardAndroid.h:
      * platform/chromium/ClipboardChromium.cpp:
      (WebCore::ClipboardChromium::writePlainText): Added.
      * platform/chromium/ClipboardChromium.h:
      * platform/gtk/ClipboardGtk.cpp:
      (WebCore::ClipboardGtk::writePlainText): Added.
      * platform/gtk/ClipboardGtk.h:
      * platform/haiku/ClipboardHaiku.cpp:
      (WebCore::ClipboardHaiku::writePlainText): Added.
      * platform/haiku/ClipboardHaiku.h:
      * platform/mac/ClipboardMac.h:
      * platform/mac/ClipboardMac.mm:
      (WebCore::ClipboardMac::writePlainText): Added.
      * platform/mac/PasteboardMac.mm:
      (WebCore::Pasteboard::writePlainText): Added helper function.
      * platform/qt/ClipboardQt.cpp:
      (WebCore::ClipboardQt::writePlainText): Added.
      * platform/qt/ClipboardQt.h:
      * platform/win/ClipboardWin.cpp:
      (WebCore::ClipboardWin::writePlainText): Added.
      * platform/win/ClipboardWin.h:
      
      LayoutTests: 
      
      * editing/pasteboard/drop-inputtext-acquires-style-expected.txt: Added.
      * editing/pasteboard/drop-inputtext-acquires-style.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54368 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5b42a264
  25. 16 Dec, 2009 1 commit
  26. 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
  27. 16 Sep, 2009 1 commit
    • eric@webkit.org's avatar
      2009-09-16 Enrica Casucci <enrica@apple.com> · 0772608c
      eric@webkit.org authored
              Reviewed by Eric Seidel.
      
              Reorganizing helper functions in htmlediting.h to group them by type of object they return/operate upon.
              https://bugs.webkit.org/show_bug.cgi?id=29319
      
              * editing/IndentOutdentCommand.cpp:
              Removed implementation of isAtUnsplittableElement.
      
              * editing/IndentOutdentCommand.h:
              Removed member function isAtUnsplittableElement, because it was not class specific and belonged logically among the helper functions.
      
              * editing/htmlediting.cpp:
              (WebCore::isAtUnsplittableElement): added. The code was taken from IndentOutdentCommand.
      
              * editing/htmlediting.h:
              Reordered functions to group them by type of object returned or operate upon.
              Added comments.
              Added isAtUnsplittableElement declaration.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48448 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0772608c
  28. 09 Sep, 2009 1 commit
    • eric@webkit.org's avatar
      2009-07-30 Eric Seidel <eric@webkit.org> · 47dd0e7b
      eric@webkit.org authored
              Reviewed by Adam Barth.
      
              Re-organize position creation functions in preparation for adding more
              https://bugs.webkit.org/show_bug.cgi?id=25494
      
              Make position functions inline to avoid ref-churn.
              Remove startPosition/endPosition as they were only used in one place.
      
              No functional changes, thus no tests.
      
              * dom/Position.cpp:
              * dom/Position.h:
              (WebCore::positionBeforeNode):
              (WebCore::positionAfterNode):
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::moveTo):
              * editing/TypingCommand.cpp:
              * editing/htmlediting.cpp:
              * editing/htmlediting.h:
              (WebCore::firstDeepEditingPositionForNode):
              (WebCore::lastDeepEditingPositionForNode):
              * rendering/RenderObject.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48233 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      47dd0e7b
  29. 19 Aug, 2009 1 commit
  30. 01 Aug, 2009 1 commit
    • rniwa@webkit.org's avatar
      2009-08-01 Ryosuke Niwa <rniwa@webkit.org> · 6d9518c1
      rniwa@webkit.org authored
              Reviewed by Adele Peterson.
      
              isContentEditable function in htmlediting.* must be removed
              https://bugs.webkit.org/show_bug.cgi?id=27870
      
              This patch removes isContentEditable function in htmlediting.cpp and
              replaces all usage by calling Node::isContentEditable or its derivatives.
      
              * editing/AppendNodeCommand.cpp: ditto
              (WebCore::AppendNodeCommand::AppendNodeCommand): ditto
              * editing/IndentOutdentCommand.cpp: ditto
              (WebCore::IndentOutdentCommand::outdentParagraph): ditto
              * editing/InsertNodeBeforeCommand.cpp: ditto
              (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand): ditto
              * editing/htmlediting.cpp: ditto
              (WebCore::enclosingNodeWithTag): ditto
              (WebCore::enclosingNodeOfType): ditto
              (WebCore::canMergeLists): ditto
              * editing/htmlediting.h: Updated prototype
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46681 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6d9518c1
  31. 20 Jul, 2009 1 commit
    • rniwa@webkit.org's avatar
      WebCore: · d96f5b41
      rniwa@webkit.org authored
      2009-07-19  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Refactoring of indentRegion to fix bugs 26816 and 25317
              https://bugs.webkit.org/show_bug.cgi?id=26816
              https://bugs.webkit.org/show_bug.cgi?id=25317
              https://bugs.webkit.org/show_bug.cgi?id=23995 (partially)
      
              This patch implements appendParagraphIntoNode, a simpler specialized version of moveParagraph
              and replaces all calls inside indentRegion. The following is the new behavior of indentRegion.
      
              1. We try to indent as many wrapping nodes as possible.
                 e.g. when indenting "hello" in <div>hello</div>, we try to indent div as well.
              2. We do not delete any wrapping elements
                 With moveParagraph, we used to remove all wrapping nodes, and replaced with a blockquote.
                 This was causing https://bugs.webkit.org/show_bug.cgi?id=23995 for indentation.
                 With appendParagraphIntoNode, we can preserve all wrapping nodes.
              3. We only split the tree until the closest block node instead of until the root editable node.
                 This behavioral change fixes the bug 25317.
              4. When multiple paragraphs are indented, we indent the highest common ancestor within the selection.
                 e.g. when a list is a child node of a div, and the entire div is intended,
                      we enclose the div by a single blockquote.
      
              Note that new behavior is more consistent with that of Internet Explorer and Firefox.
              To demonstrate this, the following tests are added.
      
              Tests: editing/execCommand/indent-div-inside-list.html
                     editing/execCommand/indent-nested-blockquotes.html
                     editing/execCommand/indent-nested-div.html
                     editing/execCommand/indent-second-paragraph-in-blockquote.html
      
              * editing/IndentOutdentCommand.cpp: prepareBlockquoteLevelForInsertion is removed
              (WebCore::IndentOutdentCommand::tryIndentingAsListItem): uses appendParagraphIntoNode now
              (WebCore::IndentOutdentCommand::indentIntoBlockquote): uses appendParagraphIntoNode now
              (WebCore::IndentOutdentCommand::appendParagraphIntoNode): removes a paragraph and appends it to a new node
              (WebCore::IndentOutdentCommand::removeUnnecessaryLineBreakAt): removes a break element at the specified position
              (WebCore::IndentOutdentCommand::indentRegion): exhibits the described behavior
              * editing/IndentOutdentCommand.h: updated prototype
              * editing/execCommand/19653-1-expected.txt: rebaselined (no longer removes wrapping div)
              * editing/execCommand/indent-div-inside-list-expected.txt: Added.
              * editing/execCommand/indent-div-inside-list.html: Added.
              * editing/execCommand/indent-nested-blockquotes-expected.txt: Added.
              * editing/execCommand/indent-nested-blockquotes.html: Added.
              * editing/execCommand/indent-nested-div-expected.txt: Added.
              * editing/execCommand/indent-nested-div.html: Added.
              * editing/execCommand/indent-nested-lists-2-expected.txt: rebaselined (selection corrected)
              * editing/execCommand/indent-nested-lists-3-expected.txt: rebaselined (selection corrected)
              * editing/execCommand/indent-nested-lists-4-expected.txt: rebaselined (selection corrected)
              * editing/execCommand/indent-nested-lists-5-expected.txt: rebaselined (selection corrected)
              * editing/execCommand/indent-second-paragraph-in-blockquote-expected.txt: Added.
              * editing/execCommand/indent-second-paragraph-in-blockquote.html: Added.
              * platform/mac/editing/execCommand/4641880-2-expected.txt: rebaselined
              * platform/mac/editing/execCommand/4916541-expected.txt: rebaselined (no longer removes wrapping span)
              * platform/mac/editing/execCommand/5138441-expected.txt: rebaselined
              * platform/mac/editing/execCommand/5481523-expected.txt: rebaselined
              * platform/mac/editing/execCommand/indent-selection-expected.txt: rebaselined
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46142 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d96f5b41
  32. 17 Jul, 2009 1 commit
    • jparent@chromium.org's avatar
      2009-07-17 Ryosuke Niwa <ryosuke.niwa@gmail.com> · 14959eab
      jparent@chromium.org authored
              Reviewed by Eric Seidel.
      
              htmlediting.cpp needs more utility functions to fix the bug 26816
              https://bugs.webkit.org/show_bug.cgi?id=27038
      
              In order to fix the bug 26816, we need several utility functions be added to htmlediting.cpp
      
              No tests because functions haven't been used anywhere yet.
      
              * dom/Range.cpp:
              (WebCore::Range::create):
              (WebCore::Range::comparePoint): added const qualifier
              (WebCore::Range::compareNode): added const qualifier
              * dom/Range.h:
              * editing/htmlediting.cpp:
              (WebCore::unsplittableElementForPosition): find the enclosing unsplittable element (editing root & table cell)
              (WebCore::positionBeforeNode): added ASSERT(node)
              (WebCore::positionAfterNode): added ASSERT(node)
              (WebCore::visiblePositionBeforeNode):
              (WebCore::visiblePositionAfterNode):
              (WebCore::createRange): create a range object from two visible positions
              (WebCore::extendRangeToWrappingNodes): extend range to include nodes that starts and ends at the boundaries
              (WebCore::canMergeLists): typo
              (WebCore::indexForVisiblePosition): added const qualifier
              (WebCore::isVisiblyAdjacent): typo
              (WebCore::isNodeVisiblyContainedWithin): determine if a node is inside a range or within the visible boundaries of the range
              * editing/htmlediting.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46063 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      14959eab
  33. 27 Jun, 2009 1 commit
    • bfulgham@webkit.org's avatar
      WebCore: · bb35f878
      bfulgham@webkit.org authored
      2009-06-27  Ryosuke Niwa  <rniwa@google.com>
      
              Reviewed by Eric Seidel.
      
              https://bugs.webkit.org/show_bug.cgi?id=26762
      
              Clean up for IndentOutdentCommand::indentRegion, and solved most of problems related to the bug 21712.
              https://bugs.webkit.org/show_bug.cgi?id=21712
      
              Added few utility functions to htmlediting.h/cpp
      
              isVisibilyAdjacent checks whether the first position is visibly next to the second position.
              i.e. there is no visible node between the first and second positions
      
              canMergeLists checks whether two lists can be merged.
              It checks the type of list, the editing boundary, and adjacency of the lists.
      
              Tests: editing/execCommand/indent-nested-lists-1.html
                     editing/execCommand/indent-nested-lists-2.html
                     editing/execCommand/indent-nested-lists-3.html
                     editing/execCommand/indent-nested-lists-4.html
                     editing/execCommand/indent-nested-lists-5.html
                     editing/execCommand/indent-nested-lists-6.html
                     editing/execCommand/indent-nested-lists-7.html
                     editing/execCommand/outdent-nested-lists-1.html
                     editing/execCommand/outdent-nested-lists-2.html
                     editing/execCommand/outdent-nested-lists-3.html
                     editing/execCommand/outdent-nested-lists-4.html
      
              * editing/IndentOutdentCommand.cpp:
              (WebCore::IndentOutdentCommand::prepareBlockquoteLevelForInsertion):
              (WebCore::IndentOutdentCommand::tryIndentingAsListItem):
              (WebCore::IndentOutdentCommand::indentIntoBlockquote):
              (WebCore::IndentOutdentCommand::indentRegion):
              * editing/IndentOutdentCommand.h:
              * editing/htmlediting.cpp:
              (WebCore::enclosingListChild):
              (WebCore::canMergeLists):
              (WebCore::isVisibilyAdjacent):
              * editing/htmlediting.h:
      
      LayoutTests:
      
      2009-06-27  Ryosuke Niwa  <set EMAIL_ADDRESS environment variable>
      
              Reviewed by Eric Seidel.
      
              https://bugs.webkit.org/show_bug.cgi?id=26762
      
              Clean up for IndentOutdentCommand::indentRegion, and solved most of problems related to the bug 21712.
              https://bugs.webkit.org/show_bug.cgi?id=21712
              
              The following test cases are intended for 21712, but included here
              since this patch already solved a lot of problems.
      
              * editing/execCommand/indent-nested-lists-1-expected.txt: Added.
              * editing/execCommand/indent-nested-lists-1.html: Added.
              * editing/execCommand/indent-nested-lists-2-expected.txt: Added.
              * editing/execCommand/indent-nested-lists-2.html: Added.
              * editing/execCommand/indent-nested-lists-3-expected.txt: Added.
              * editing/execCommand/indent-nested-lists-3.html: Added.
              * editing/execCommand/indent-nested-lists-4-expected.txt: Added.
              * editing/execCommand/indent-nested-lists-4.html: Added.
              * editing/execCommand/indent-nested-lists-5-expected.txt: Added.
              * editing/execCommand/indent-nested-lists-5.html: Added.
              * editing/execCommand/indent-nested-lists-6-expected.txt: Added.
              * editing/execCommand/indent-nested-lists-6.html: Added.
              * editing/execCommand/indent-nested-lists-7-expected.txt: Added.
              * editing/execCommand/indent-nested-lists-7.html: Added.
              * editing/execCommand/outdent-nested-lists-1-expected.txt: Added.
              * editing/execCommand/outdent-nested-lists-1.html: Added.
              * editing/execCommand/outdent-nested-lists-2-expected.txt: Added.
              * editing/execCommand/outdent-nested-lists-2.html: Added.
              * editing/execCommand/outdent-nested-lists-3-expected.txt: Added.
              * editing/execCommand/outdent-nested-lists-3.html: Added.
              * editing/execCommand/outdent-nested-lists-4-expected.txt: Added.
              * editing/execCommand/outdent-nested-lists-4.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45316 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bb35f878
  34. 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
  35. 14 Apr, 2009 1 commit
    • justin.garcia@apple.com's avatar
      2009-04-13 Justin Garcia <justin.garcia@apple.com> · d5c8f434
      justin.garcia@apple.com authored
              Reviewed by Eric Seidel.
      
              https://bugs.webkit.org/show_bug.cgi?id=25172
              Extra partial layout during the first keypress in an empty block
              
              Determining if a placeholder needs to be removed requires the creation of a VisiblePosition 
              which was triggering layout before we were finished modifying the DOM for the insert operation.
              
              Find out if we need to remove a placeholder near the start of the operation, and if we do remember 
              where it's located.  Then, later, remove it along with all of the other DOM operations we perform.
              
              Renamed lineBreakExistsAtPosition to lineBreakExistsAtVisiblePosition and added a lineBreakExistsAtPosition
              that takes in a Position.  In InsertTextCommand, we can use the latter, since we normalize manually.
              
              removePlaceholderAt now takes in a Position that it assumes has already been checked for a placeholder.
              
              No test added as this only effects performance.
      
              * editing/BreakBlockquoteCommand.cpp:
              (WebCore::BreakBlockquoteCommand::doApply):
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::removePlaceholderAt):
              (WebCore::CompositeEditCommand::moveParagraphs):
              (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph):
              (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary):
              * editing/CompositeEditCommand.h:
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
              (WebCore::DeleteSelectionCommand::doApply):
              * editing/FormatBlockCommand.cpp:
              (WebCore::FormatBlockCommand::doApply):
              * editing/InsertLineBreakCommand.cpp:
              (WebCore::InsertLineBreakCommand::doApply):
              * editing/InsertParagraphSeparatorCommand.cpp:
              (WebCore::InsertParagraphSeparatorCommand::doApply):
              * editing/InsertTextCommand.cpp:
              (WebCore::InsertTextCommand::input):
              * editing/htmlediting.cpp:
              (WebCore::lineBreakExistsAtVisiblePosition):
              (WebCore::lineBreakExistsAtPosition):
              * editing/htmlediting.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42507 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d5c8f434
  36. 20 Mar, 2009 1 commit
    • eric@webkit.org's avatar
      Reviewed by Justin Garcia. · f3a1881c
      eric@webkit.org authored
              maxDeepOffset is confusing and should be removed
              https://bugs.webkit.org/show_bug.cgi?id=24586
      
              Abstract some hard-to-read (but shared) logic into a new renderedAsNonInlineTableOrHR function.
              Add first/lastDeepEditingPositionForNode Position creation functions
              and deploy them to places we used to call maxDeepOffset.
      
              Rename Position::atStart and atEnd to atStartOfTree atEndOfTree
              Add a new Position::atFirst/atLastEditingPositionForNode() and use these
              to replace a few more callers for maxDeepOffset()
      
              Rename maxDeepOffset to lastEditingOffsetForNode (so that we mere mortals have some clue what it does)
      
              "Editing positions" are confusing because they have one
              of two behaviors, depending on if the container node is ignored
              by editing (if editingIgnoresContent(node) returns true) or not.
              Positions referring to nodes ignored by editing are
              neighbor-relative (they are before or after the node) where as
              positions reffering to other nodes are container-relative
              (they are between two child nodes of the container, identified
              by the offset() member).  I will be fixing this confusion in
              future patches.  These renames hopefully make the current behavior clearer.
      
              * dom/Position.cpp:
              (WebCore::Position::previous):
              (WebCore::Position::next):
              (WebCore::Position::atFirstEditingPositionForNode):
              (WebCore::Position::atLastEditingPositionForNode):
              (WebCore::Position::atStartOfTree):
              (WebCore::Position::atEndOfTree):
              (WebCore::Position::previousCharacterPosition):
              (WebCore::Position::nextCharacterPosition):
              (WebCore::Position::upstream):
              (WebCore::Position::isCandidate):
              (WebCore::firstDeepEditingPositionForNode):
              (WebCore::lastDeepEditingPositionForNode):
              * dom/Position.h:
              * dom/PositionIterator.cpp:
              (WebCore::PositionIterator::operator Position):
              (WebCore::PositionIterator::increment):
              (WebCore::PositionIterator::decrement):
              (WebCore::PositionIterator::atEnd):
              (WebCore::PositionIterator::atEndOfNode):
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary):
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::isTableCellEmpty):
              (WebCore::DeleteSelectionCommand::removeNode):
              (WebCore::DeleteSelectionCommand::handleGeneralDelete):
              * editing/Editor.cpp:
              (WebCore::Editor::advanceToNextMisspelling):
              * editing/InsertLineBreakCommand.cpp:
              (WebCore::InsertLineBreakCommand::doApply):
              * editing/InsertListCommand.cpp:
              (WebCore::InsertListCommand::doApply):
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent):
              * editing/TypingCommand.cpp:
              (WebCore::TypingCommand::forwardDeleteKeyPressed):
              * editing/VisiblePosition.cpp:
              (WebCore::VisiblePosition::previous):
              (WebCore::VisiblePosition::leftVisuallyDistinctCandidate):
              (WebCore::VisiblePosition::left):
              (WebCore::VisiblePosition::rightVisuallyDistinctCandidate):
              (WebCore::VisiblePosition::right):
              * editing/VisibleSelection.cpp:
              (WebCore::VisibleSelection::selectionFromContentsOfNode):
              (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries):
              * editing/htmlediting.cpp:
              (WebCore::nextVisuallyDistinctCandidate):
              (WebCore::previousVisuallyDistinctCandidate):
              (WebCore::firstEditablePositionAfterPositionInRoot):
              (WebCore::lastEditablePositionBeforePositionInRoot):
              (WebCore::lastOffsetForEditing):
              (WebCore::isFirstPositionAfterTable):
              (WebCore::isLastPositionBeforeTable):
              (WebCore::positionBeforeNode):
              (WebCore::positionAfterNode):
              (WebCore::enclosingEmptyListItem):
              (WebCore::caretMaxOffset):
              * editing/htmlediting.h:
              * editing/visible_units.cpp:
              (WebCore::renderedAsNonInlineTableOrHR):
              (WebCore::startOfParagraph):
              (WebCore::endOfParagraph):
              (WebCore::startOfEditableContent):
              (WebCore::endOfEditableContent):
              * page/AccessibilityObject.cpp:
              (WebCore::endOfStyleRange):
              * page/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::visiblePositionRange):
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::positionForPoint):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41863 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f3a1881c
  37. 09 Feb, 2009 1 commit
  38. 21 Jan, 2009 1 commit
    • eric@webkit.org's avatar
      Reviewed by Justin Garcia. · 2d6cf090
      eric@webkit.org authored
              Fix execCommand() 'super' and 'sub' commands to add <sup> and <sub> in quirks mode, and to toggle when called twice
              https://bugs.webkit.org/show_bug.cgi?id=17733
      
              Test changed: editing/execCommand/toggle-styles-expected.txt
      
              * editing/ApplyStyleCommand.cpp:
              (WebCore::StyleChange::applySubscript):
              (WebCore::StyleChange::applySuperscript):
              (WebCore::StyleChange::StyleChange):
              (WebCore::StyleChange::init):
              (WebCore::StyleChange::checkForLegacyHTMLStyleChange):
              (WebCore::ApplyStyleCommand::isHTMLStyleNode):
              (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
              * editing/EditorCommand.cpp:
              (WebCore::executeSubscript):
              (WebCore::executeSuperscript):
              * editing/htmlediting.cpp:
              (WebCore::createHTMLElement):
              * editing/htmlediting.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2d6cf090