2011-05-21 Kent Tamura <tkent@chromium.org>
authortkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 May 2011 10:47:54 +0000 (10:47 +0000)
committertkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 May 2011 10:47:54 +0000 (10:47 +0000)
commit68e00e15e71483531936db7c72a17168b688d4d6
treec1f4328526cd1f5cddb5d0926cb3ccc0dab403fc
parent3439b56650c5192fe4d2d15f8997b81fd390b1ec
2011-05-21  Kent Tamura  <tkent@chromium.org>

        Reviewed by Dimitri Glazkov.

        Change text-based <input> types to the new shadow DOM model
        https://bugs.webkit.org/show_bug.cgi?id=54179

        Update test results because the shadow tree structure of <input> and
        <textarea> is changed.

        * editing/deleting/delete-all-text-in-text-field-assertion-expected.txt:
        * editing/deleting/delete-ligature-001-expected.txt:
        * editing/pasteboard/copy-in-password-field-expected.txt:
        * editing/selection/select-all-textarea-expected.txt:
        * fast/events/5056619-expected.txt:
        * fast/forms/focus-selection-input-expected.txt:
        * fast/forms/focus-selection-textarea-expected.txt:
        * platform/chromium-linux/editing/selection/select-across-readonly-input-1-expected.txt:
        * platform/chromium-linux/editing/selection/select-across-readonly-input-4-expected.txt:
        * platform/chromium-linux/editing/selection/select-across-readonly-input-5-expected.txt:
        * platform/chromium-linux/editing/selection/select-from-textfield-outwards-expected.txt:
        * platform/chromium-linux/fast/forms/input-readonly-autoscroll-expected.txt:
        * platform/chromium-linux/fast/forms/input-text-double-click-expected.txt:
        * platform/chromium-linux/fast/forms/textfield-outline-expected.txt:
        * platform/chromium-linux/fast/forms/validation-message-appearance-expected.txt:
        * platform/chromium-win/editing/inserting/4960120-1-expected.txt:
        * platform/chromium-win/editing/pasteboard/drop-text-without-selection-expected.txt:
        * platform/chromium-win/editing/pasteboard/pasting-tabs-expected.txt:
        * platform/chromium-win/editing/selection/4895428-3-expected.txt:
        * platform/chromium-win/editing/selection/4975120-expected.txt:
        * platform/chromium-win/editing/selection/select-across-readonly-input-1-expected.txt:
        * platform/chromium-win/editing/selection/select-across-readonly-input-4-expected.txt:
        * platform/chromium-win/editing/selection/select-across-readonly-input-5-expected.txt:
        * platform/chromium-win/editing/selection/select-from-textfield-outwards-expected.txt:
        * platform/chromium-win/fast/events/autoscroll-expected.txt:
        * platform/chromium-win/fast/events/context-no-deselect-expected.txt:
        * platform/chromium-win/fast/forms/input-appearance-focus-expected.txt:
        * platform/chromium-win/fast/forms/input-appearance-readonly-expected.txt:
        * platform/chromium-win/fast/forms/input-appearance-selection-expected.txt:
        * platform/chromium-win/fast/forms/input-double-click-selection-gap-bug-expected.txt:
        * platform/chromium-win/fast/forms/input-paste-undo-expected.txt:
        * platform/chromium-win/fast/forms/input-placeholder-visibility-1-expected.txt:
        * platform/chromium-win/fast/forms/input-placeholder-visibility-2-expected.txt:
        * platform/chromium-win/fast/forms/input-placeholder-visibility-3-expected.txt:
        * platform/chromium-win/fast/forms/input-readonly-autoscroll-expected.txt:
        * platform/chromium-win/fast/forms/input-text-click-inside-expected.txt:
        * platform/chromium-win/fast/forms/input-text-double-click-expected.txt:
        * platform/chromium-win/fast/forms/input-text-drag-down-expected.txt:
        * platform/chromium-win/fast/forms/input-text-option-delete-expected.txt:
        * platform/chromium-win/fast/forms/input-text-scroll-left-on-blur-expected.txt:
        * platform/chromium-win/fast/forms/input-text-self-emptying-click-expected.txt:
        * platform/chromium-win/fast/forms/plaintext-mode-2-expected.txt:
        * platform/chromium-win/fast/forms/search-rtl-expected.txt:
        * platform/chromium-win/fast/forms/search-zoomed-expected.txt:
        * platform/chromium-win/fast/forms/tabbing-input-iframe-expected.txt:
        * platform/chromium-win/fast/forms/textarea-placeholder-visibility-1-expected.txt:
        * platform/chromium-win/fast/forms/textarea-placeholder-visibility-2-expected.txt:
        * platform/chromium-win/fast/forms/textarea-scrollbar-expected.txt:
        * platform/chromium-win/fast/forms/textarea-scrolled-type-expected.txt:
        * platform/chromium-win/fast/forms/textfield-focus-ring-expected.txt:
        * platform/chromium-win/fast/forms/textfield-outline-expected.txt:
        * platform/chromium-win/fast/forms/textfield-overflow-expected.txt:
        * platform/chromium-win/fast/forms/validation-message-appearance-expected.txt:
        * platform/chromium-win/fast/frames/take-focus-from-iframe-expected.txt:
        * platform/chromium-win/fast/repaint/renderer-destruction-by-invalidateSelection-crash-expected.txt:
        * platform/chromium-win/fast/transforms/transformed-focused-text-input-expected.txt:
        * platform/chromium/test_expectations.txt:
        * platform/gtk/editing/inserting/4960120-1-expected.txt:
        * platform/gtk/editing/pasteboard/drop-text-without-selection-expected.txt:
        * platform/gtk/editing/pasteboard/pasting-tabs-expected.txt:
        * platform/gtk/editing/selection/4895428-3-expected.txt:
        * platform/gtk/editing/selection/4975120-expected.txt:
        * platform/gtk/editing/selection/select-across-readonly-input-1-expected.txt:
        * platform/gtk/editing/selection/select-across-readonly-input-4-expected.txt:
        * platform/gtk/editing/selection/select-across-readonly-input-5-expected.txt:
        * platform/gtk/editing/selection/select-from-textfield-outwards-expected.txt:
        * platform/gtk/fast/events/autoscroll-expected.txt:
        * platform/gtk/fast/events/context-no-deselect-expected.txt:
        * platform/gtk/fast/forms/input-appearance-focus-expected.txt:
        * platform/gtk/fast/forms/input-appearance-readonly-expected.txt:
        * platform/gtk/fast/forms/input-appearance-selection-expected.txt:
        * platform/gtk/fast/forms/input-double-click-selection-gap-bug-expected.txt:
        * platform/gtk/fast/forms/input-paste-undo-expected.txt:
        * platform/gtk/fast/forms/input-placeholder-visibility-1-expected.txt:
        * platform/gtk/fast/forms/input-placeholder-visibility-2-expected.txt:
        * platform/gtk/fast/forms/input-placeholder-visibility-3-expected.txt:
        * platform/gtk/fast/forms/input-readonly-autoscroll-expected.txt:
        * platform/gtk/fast/forms/input-text-click-inside-expected.txt:
        * platform/gtk/fast/forms/input-text-double-click-expected.txt:
        * platform/gtk/fast/forms/input-text-drag-down-expected.txt:
        * platform/gtk/fast/forms/input-text-option-delete-expected.txt:
        * platform/gtk/fast/forms/input-text-scroll-left-on-blur-expected.txt:
        * platform/gtk/fast/forms/input-text-self-emptying-click-expected.txt:
        * platform/gtk/fast/forms/plaintext-mode-2-expected.txt:
        * platform/gtk/fast/forms/search-rtl-expected.txt:
        * platform/gtk/fast/forms/search-transformed-expected.txt:
        * platform/gtk/fast/forms/search-zoomed-expected.txt:
        * platform/gtk/fast/forms/tabbing-input-iframe-expected.txt:
        * platform/gtk/fast/forms/textarea-placeholder-visibility-1-expected.txt:
        * platform/gtk/fast/forms/textarea-placeholder-visibility-2-expected.txt:
        * platform/gtk/fast/forms/textarea-scrollbar-expected.txt:
        * platform/gtk/fast/forms/textarea-scrolled-type-expected.txt:
        * platform/gtk/fast/forms/textfield-focus-ring-expected.txt:
        * platform/gtk/fast/forms/textfield-outline-expected.txt:
        * platform/gtk/fast/forms/textfield-overflow-expected.txt:
        * platform/gtk/fast/frames/take-focus-from-iframe-expected.txt:
        * platform/gtk/fast/repaint/renderer-destruction-by-invalidateSelection-crash-expected.txt:
        * platform/gtk/fast/transforms/transformed-focused-text-input-expected.txt:
        * platform/mac-snowleopard/fast/forms/input-placeholder-visibility-1-expected.txt:
        * platform/mac-snowleopard/fast/forms/input-placeholder-visibility-2-expected.txt:
        * platform/mac-snowleopard/fast/forms/input-placeholder-visibility-3-expected.txt:
        * platform/mac-wk2/editing/selection/select-across-readonly-input-1-expected.txt:
        * platform/mac-wk2/editing/selection/select-across-readonly-input-4-expected.txt:
        * platform/mac-wk2/editing/selection/select-across-readonly-input-5-expected.txt:
        * platform/mac/editing/inserting/4960120-1-expected.txt:
        * platform/mac/editing/pasteboard/drop-text-without-selection-expected.txt:
        * platform/mac/editing/pasteboard/pasting-tabs-expected.txt:
        * platform/mac/editing/selection/4895428-3-expected.txt:
        * platform/mac/editing/selection/4975120-expected.txt:
        * platform/mac/editing/selection/select-across-readonly-input-1-expected.txt:
        * platform/mac/editing/selection/select-across-readonly-input-4-expected.txt:
        * platform/mac/editing/selection/select-across-readonly-input-5-expected.txt:
        * platform/mac/editing/selection/select-from-textfield-outwards-expected.txt:
        * platform/mac/fast/events/autoscroll-expected.txt:
        * platform/mac/fast/events/context-no-deselect-expected.txt:
        * platform/mac/fast/forms/input-appearance-focus-expected.txt:
        * platform/mac/fast/forms/input-appearance-readonly-expected.txt:
        * platform/mac/fast/forms/input-appearance-selection-expected.txt:
        * platform/mac/fast/forms/input-appearance-spinbutton-up-expected.txt:
        * platform/mac/fast/forms/input-double-click-selection-gap-bug-expected.txt:
        * platform/mac/fast/forms/input-paste-undo-expected.txt:
        * platform/mac/fast/forms/input-placeholder-visibility-1-expected.txt:
        * platform/mac/fast/forms/input-placeholder-visibility-2-expected.txt:
        * platform/mac/fast/forms/input-placeholder-visibility-3-expected.txt:
        * platform/mac/fast/forms/input-readonly-autoscroll-expected.txt:
        * platform/mac/fast/forms/input-text-click-inside-expected.txt:
        * platform/mac/fast/forms/input-text-double-click-expected.txt:
        * platform/mac/fast/forms/input-text-drag-down-expected.txt:
        * platform/mac/fast/forms/input-text-option-delete-expected.txt:
        * platform/mac/fast/forms/input-text-scroll-left-on-blur-expected.txt:
        * platform/mac/fast/forms/input-text-self-emptying-click-expected.txt:
        * platform/mac/fast/forms/plaintext-mode-2-expected.txt:
        * platform/mac/fast/forms/search-rtl-expected.txt:
        * platform/mac/fast/forms/search-transformed-expected.txt:
        * platform/mac/fast/forms/search-zoomed-expected.txt:
        * platform/mac/fast/forms/tabbing-input-iframe-expected.txt:
        * platform/mac/fast/forms/textarea-placeholder-visibility-1-expected.txt:
        * platform/mac/fast/forms/textarea-placeholder-visibility-2-expected.txt:
        * platform/mac/fast/forms/textarea-scrollbar-expected.txt:
        * platform/mac/fast/forms/textarea-scrolled-type-expected.txt:
        * platform/mac/fast/forms/textfield-focus-ring-expected.txt:
        * platform/mac/fast/forms/textfield-outline-expected.txt:
        * platform/mac/fast/forms/textfield-overflow-expected.txt:
        * platform/mac/fast/forms/validation-message-appearance-expected.txt:
        * platform/mac/fast/frames/take-focus-from-iframe-expected.txt:
        * platform/mac/fast/repaint/renderer-destruction-by-invalidateSelection-crash-expected.txt:
        * platform/mac/fast/transforms/transformed-focused-text-input-expected.txt:
        * platform/qt/editing/inserting/4960120-1-expected.txt:
        * platform/qt/editing/pasteboard/pasting-tabs-expected.txt:
        * platform/qt/editing/selection/4895428-3-expected.txt:
        * platform/qt/editing/selection/4975120-expected.txt:
        * platform/qt/fast/forms/input-appearance-focus-expected.txt:
        * platform/qt/fast/forms/input-appearance-readonly-expected.txt:
        * platform/qt/fast/forms/input-appearance-selection-expected.txt:
        * platform/qt/fast/forms/input-double-click-selection-gap-bug-expected.txt:
        * platform/qt/fast/forms/input-paste-undo-expected.txt:
        * platform/qt/fast/forms/input-text-click-inside-expected.txt:
        * platform/qt/fast/forms/input-text-option-delete-expected.txt:
        * platform/qt/fast/forms/input-text-self-emptying-click-expected.txt:
        * platform/qt/fast/forms/plaintext-mode-2-expected.txt:
        * platform/qt/fast/forms/search-rtl-expected.txt:
        * platform/qt/fast/forms/search-transformed-expected.txt:
        * platform/qt/fast/forms/search-zoomed-expected.txt:
        * platform/qt/fast/forms/textfield-overflow-expected.txt:
        * platform/qt/fast/frames/take-focus-from-iframe-expected.txt:
        * platform/qt/fast/transforms/transformed-focused-text-input-expected.txt:
        * platform/win/editing/inserting/4960120-1-expected.txt:
        * platform/win/editing/selection/select-from-textfield-outwards-expected.txt:
        * platform/win/fast/forms/input-text-drag-down-expected.txt:
        * platform/win/fast/forms/textarea-scrollbar-expected.txt:
        * platform/win/fast/forms/textarea-scrolled-type-expected.txt:
2011-05-21  Kent Tamura  <tkent@chromium.org>

        Reviewed by Dimitri Glazkov.

        Change text-based <input> types to the new shadow DOM model
        https://bugs.webkit.org/show_bug.cgi?id=54179

        By this change, text field inputs and textareas have one extra
        shadow node at the root of shadow trees.
        e.g. Before the change:
          <textarea> --(shadow-connection)-- <div> -- ...
        After the change:
          <textarea> --(shadow-connection)-- {#shadow-root} -- <div> -- ...

        The goals of this change are
        - Change to the new shadow DOM model, and
        - Minimize the patch size.

        We should use shadowPseudoId() in the new shadow DOM model, but the
        shadow elements in this patch don't use it in order to reduce the patch
        size.

        * css/html.css:
        (input::-webkit-inner-spin-button):
         Add vertical-align in order to avoid the button affect the baseline.
        (input::-webkit-outer-spin-button): ditto.
        (input::-webkit-input-speech-button): ditto.
        * dom/Element.cpp:
        (WebCore::Element::recalcStyle): Calls styleForRenderer() so that a
         subclass of Element can override it.
        (WebCore::Element::isSpellCheckingEnabled):
        Handle ShadowRoot, which is not an Element.
        * dom/Node.cpp:
          Add utility functions for editing code.
        (WebCore::Node::nonBoundaryShadowTreeRootNode):
        (WebCore::Node::nonShadowBoundaryParentNode):
        * dom/Node.h: Declare them.
        * dom/Position.cpp:
         - Add some assertions about ShadowRoot
         - Replace parentNode() with nonShadowBoundaryParentNode()
        Because input/textarea shadow structures are changed.
        (WebCore::Position::Position):
        (WebCore::Position::containerNode):
        (WebCore::Position::parentAnchoredEquivalent):
        (WebCore::Position::previous):
        (WebCore::Position::next):
        (WebCore::Position::parentEditingBoundary):
        (WebCore::Position::atStartOfTree):
        (WebCore::Position::atEndOfTree):
        * dom/Position.h: ditto.
        (WebCore::positionInParentBeforeNode):
        (WebCore::positionInParentAfterNode):
        * editing/CompositeEditCommand.cpp: ditto.
        (WebCore::CompositeEditCommand::insertNodeAfter):
        (WebCore::CompositeEditCommand::removeNode):
        * editing/Editor.cpp:
        (WebCore::Editor::findString): ditto.
        * editing/FrameSelection.cpp:
        (WebCore::FrameSelection::selectAll): Inline shadowTreeRootNode() calls.
        * editing/FrameSelection.h:
          Remove shadowTreeRootNode(). It is used only by FrameSelection::selectAll().
        * editing/InsertParagraphSeparatorCommand.cpp:
        (WebCore::InsertParagraphSeparatorCommand::doApply): Use nonShadowBoundaryParentNode()
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplacementFragment::removeNode): ditto.
        (WebCore::ReplacementFragment::insertNodeBefore): ditto.
        * editing/VisibleSelection.cpp:
          Rename shadowTreeRootNode() to nonBoundaryShadowTreeRootNode(), and it reutrns
          a child node of ShadowRoot.
        (WebCore::VisibleSelection::isAll):
        (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries):
        (WebCore::VisibleSelection::nonBoundaryShadowTreeRootNode):
        * editing/VisibleSelection.h: ditto.
        * editing/htmlediting.cpp: Add assertions.
        (WebCore::visiblePositionBeforeNode):
        (WebCore::visiblePositionAfterNode):
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::create): Calls createShadowSubtree().
        (WebCore::HTMLInputElement::createShadowSubtree):
          Calls InputType::createShadowSubTree().
        (WebCore::HTMLInputElement::innerTextElement):
          Accessor of a shadow node. This is used by RenderTextControlSingleLine.
        (WebCore::HTMLInputElement::innerBlockElement): ditto.
        (WebCore::HTMLInputElement::innerSpinButtonElement): ditto.
        (WebCore::HTMLInputElement::outerSpinButtonElement): ditto.
        (WebCore::HTMLInputElement::resultsButtonElement): ditto.
        (WebCore::HTMLInputElement::cancelButtonElement): ditto.
        (WebCore::HTMLInputElement::speechButtonElement): ditto.
        (WebCore::HTMLInputElement::parseMappedAttribute):
          Rebuild shadow trees because x-webkit-speech attribute affects it.
        * html/HTMLInputElement.h: Add declarations.
        * html/HTMLIsIndexElement.cpp:
        (WebCore::HTMLIsIndexElement::create): Calls createShadowSubtree().
        * html/HTMLTextAreaElement.cpp:
        (WebCore::HTMLTextAreaElement::create): Calls createShadowSubtree().
        (WebCore::HTMLTextAreaElement::createShadowSubtree): Added.
        * html/HTMLTextAreaElement.h: Declare createShadowSubtree().
        * html/InputType.h: Add default implementations of accessors.
        (WebCore::InputType::innerBlockElement):
        (WebCore::InputType::innerTextElement):
        (WebCore::InputType::innerSpinButtonElement):
        (WebCore::InputType::outerSpinButtonElement):
        (WebCore::InputType::resultsButtonElement):
        (WebCore::InputType::cancelButtonElement):
        (WebCore::InputType::speechButtonElement):
        * html/SearchInputType.cpp:
        (WebCore::SearchInputType::SearchInputType): Initializes new data members.
        (WebCore::SearchInputType::createShadowSubtree):
          Moved from RenderTextControlSingleLine.
        (WebCore::SearchInputType::destroyShadowSubtree): Clear element references.
        * html/SearchInputType.h: Add declarations.
        (WebCore::SearchInputType::innerBlockElement):
        (WebCore::SearchInputType::resultsButtonElement):
        (WebCore::SearchInputType::cancelButtonElement):
        * html/TextFieldInputType.cpp:
        (WebCore::TextFieldInputType::TextFieldInputType):
          Initializes new data members.
        (WebCore::TextFieldInputType::createShadowSubtree):
          Moved from RenderTextControlSingleLine.
        (WebCore::TextFieldInputType::destroyShadowSubtree): Clear element references.
        * html/TextFieldInputType.h: Add declarations.
        (WebCore::TextFieldInputType::innerTextElement):
        (WebCore::TextFieldInputType::innerSpinButtonElement):
        (WebCore::TextFieldInputType::outerSpinButtonElement):
        (WebCore::TextFieldInputType::speechButtonElement):
        (WebCore::TextFieldInputType::setInnerTextElement):
        (WebCore::TextFieldInputType::setSpeechButtonElement):
        * html/shadow/TextControlInnerElements.cpp:
        (WebCore::TextControlInnerElement::TextControlInnerElement):
          Remove shadowParent parameter. It is unnecessary because we switch to
          new shadow model.
        (WebCore::TextControlInnerElement::create):
          Change the parameter type to Document.
        (WebCore::TextControlInnerElement::styleForRenderer):
          Override this in order to set style by
          RenderTextControlSingleLine::createInnerBlockStyle().
        (WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
          Remove shadowParent parameter.
          Inherit HTMLDivElement, not TextControlInnerElement.
        (WebCore::TextControlInnerTextElement::create): Remove shadowParent parameter.
        (WebCore::TextControlInnerTextElement::styleForRenderer):
          Override this in order to set style by
          RenderTextControlSingleLine::createInnerTextStyle().
        (WebCore::SearchFieldResultsButtonElement::SearchFieldResultsButtonElement):
          Inherit HTMLDivElement, not TextControlInnerElement.
        (WebCore::SearchFieldResultsButtonElement::styleForRenderer):
          Override this in order to set style by
          RenderTextControlSingleLine::createResultButtonStyle().
        (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
          Inherit HTMLDivElement, not TextControlInnerElement.
        (WebCore::SearchFieldCancelButtonElement::styleForRenderer):
          Override this in order to set style by
          RenderTextControlSingleLine::createCancelButtonStyle().
        (WebCore::SearchFieldCancelButtonElement::detach):
          Update for the parent class change.
        (WebCore::SpinButtonElement::SpinButtonElement):
          - Change the parameter type: shadowParent -> Document
          - Add the inner flag
          - Inherit HTMLDivElement, not TextControlInnerElement.
        (WebCore::SpinButtonElement::createInner): Introduce a new factory
          method to hide a bool parameter of the constructor.
        (WebCore::SpinButtonElement::createOuter): ditto.
        (WebCore::SpinButtonElement::styleForRenderer):
          Override this in order to set style by
          RenderTextControlSingleLine::createInnerSpinButtonStyle() or
          createOuterSpinButtonStyle().
        (WebCore::SpinButtonElement::detach): Update for the parent class change.
        (WebCore::SpinButtonElement::setHovered): ditto.
        (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
          - Change the parameter type: shadowParent -> Document
          - Inherit HTMLDivElement, not TextControlInnerElement.
          - Do not register this as a speech input listener here.
        (WebCore::InputFieldSpeechButtonElement::create):
          Update for the parameter change.
        (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
          Do not handle click event if listener registration is not done.
        (WebCore::InputFieldSpeechButtonElement::attach):
          Register this as a speech input listener.
        (WebCore::InputFieldSpeechButtonElement::detach):
          Update for the parent class change.
        (WebCore::InputFieldSpeechButtonElement::styleForRenderer):
          Override this in order to set style by
          RenderTextControlSingleLine::createSpeechButtonStyle().
        * html/shadow/TextControlInnerElements.h:
        (WebCore::TextControlInnerTextElement::isMouseFocusable):
          Add this because the class is not a subclass of TextControllInnerElement.
        (WebCore::SearchFieldResultsButtonElement::isMouseFocusable): ditto.
        (WebCore::SearchFieldCancelButtonElement::isMouseFocusable): ditto.
        (WebCore::SpinButtonElement::isMouseFocusable): ditto.
        (WebCore::InputFieldSpeechButtonElement::isMouseFocusable): ditto.
        * rendering/RenderTextControl.cpp:
        (WebCore::RenderTextControl::~RenderTextControl): Remove unnecessary code.
        (WebCore::RenderTextControl::styleDidChange):
          innerTextElement can have no renderer.
          Explicitly call setNeedsStyleRecals() for innerTextElement. It is
          needed for LayoutTests/editing/selection/select-across-readonly-input-*.html.
        (WebCore::RenderTextControl::textBlockWidth): Member data -> function
        (WebCore::RenderTextControl::updateFromElement): ditto.
        (WebCore::RenderTextControl::setInnerTextValue): ditto.
        (WebCore::RenderTextControl::hasVisibleTextArea): ditto.
        (WebCore::RenderTextControl::isSelectableElement): ditto.
        (WebCore::RenderTextControl::selection): ditto.
        (WebCore::RenderTextControl::visiblePositionForIndex): ditto.
        (WebCore::RenderTextControl::indexForVisiblePosition): ditto.
        (WebCore::RenderTextControl::text): ditto.
        (WebCore::RenderTextControl::textWithHardLineBreaks): ditto.
        (WebCore::RenderTextControl::computeLogicalHeight): ditto.
        (WebCore::RenderTextControl::hitInnerTextElement): ditto.
        (WebCore::RenderTextControl::forwardEvent): ditto.
        (WebCore::RenderTextControl::computePreferredLogicalWidths): ditto.
        * rendering/RenderTextControl.h:
          - Make m_innerText virtual function.
          - Make createInnerTextStyle() public in order that
            TextControlInnerElements can call it.
        * rendering/RenderTextControlMultiLine.cpp:
        (WebCore::RenderTextControlMultiLine::innerTextElement): Added.
        (WebCore::RenderTextControlMultiLine::updateFromElement):
          Remove unnecessary createSubtreeIfNeeded() call.
        * rendering/RenderTextControlMultiLine.h: Add a declaration.
        * rendering/RenderTextControlSingleLine.cpp:
        (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine):
          Remove unnecessary code.
        (WebCore::RenderTextControlSingleLine::innerTextElement): Added.
        (WebCore::RenderTextControlSingleLine::innerBlockElement): Added.
        (WebCore::RenderTextControlSingleLine::innerSpinButtonElement): Added.
        (WebCore::RenderTextControlSingleLine::outerSpinButtonElement): Added.
        (WebCore::RenderTextControlSingleLine::resultsButtonElement): Added.
        (WebCore::RenderTextControlSingleLine::cancelButtonElement): Added.
        (WebCore::RenderTextControlSingleLine::speechButtonElement): Added.
        (WebCore::RenderTextControlSingleLine::textBaseStyle): Data member -> function
        (WebCore::RenderTextControlSingleLine::subtreeHasChanged): ditto.
        (WebCore::RenderTextControlSingleLine::layout): ditto.
        (WebCore::RenderTextControlSingleLine::nodeAtPoint): ditto.
        (WebCore::RenderTextControlSingleLine::forwardEvent): ditto.
        (WebCore::RenderTextControlSingleLine::styleDidChange): ditto.
        (WebCore::RenderTextControlSingleLine::hasControlClip): ditto.
        (WebCore::RenderTextControlSingleLine::controlClipRect): ditto.
        (WebCore::RenderTextControlSingleLine::textBlockWidth): ditto.
        (WebCore::RenderTextControlSingleLine::decorationWidthRight): ditto.
        (WebCore::RenderTextControlSingleLine::preferredContentWidth): ditto.
        (WebCore::RenderTextControlSingleLine::preferredDecorationWidthRight): ditto.
        (WebCore::RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight): ditto.
        (WebCore::RenderTextControlSingleLine::updateFromElement):
          ditto, and remove unnecessary createSubtreeIfNeeded() call.
        (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
          Data member -> function
        (WebCore::RenderTextControlSingleLine::updateCancelButtonVisibility): ditto.
        (WebCore::RenderTextControlSingleLine::clientPaddingLeft): ditto.
        (WebCore::RenderTextControlSingleLine::clientPaddingRight): ditto.
        (WebCore::RenderTextControlSingleLine::textBlockInsetTop): ditto.
        * rendering/RenderTextControlSingleLine.h:
          Add declarations, and remove unnecessary data members.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@87014 268f45cc-cd09-0410-ab3c-d52691b4dbfc
206 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/deleting/delete-all-text-in-text-field-assertion-expected.txt
LayoutTests/editing/deleting/delete-ligature-001-expected.txt
LayoutTests/editing/pasteboard/copy-in-password-field-expected.txt
LayoutTests/editing/selection/select-all-textarea-expected.txt
LayoutTests/fast/events/5056619-expected.txt
LayoutTests/fast/forms/focus-selection-input-expected.txt
LayoutTests/fast/forms/focus-selection-textarea-expected.txt
LayoutTests/platform/chromium-linux/editing/selection/select-across-readonly-input-1-expected.txt
LayoutTests/platform/chromium-linux/editing/selection/select-across-readonly-input-4-expected.txt
LayoutTests/platform/chromium-linux/editing/selection/select-across-readonly-input-5-expected.txt
LayoutTests/platform/chromium-linux/editing/selection/select-from-textfield-outwards-expected.txt
LayoutTests/platform/chromium-linux/fast/forms/input-readonly-autoscroll-expected.txt
LayoutTests/platform/chromium-linux/fast/forms/input-text-double-click-expected.txt
LayoutTests/platform/chromium-linux/fast/forms/textfield-outline-expected.txt
LayoutTests/platform/chromium-linux/fast/forms/validation-message-appearance-expected.txt
LayoutTests/platform/chromium-win/editing/inserting/4960120-1-expected.txt
LayoutTests/platform/chromium-win/editing/pasteboard/drop-text-without-selection-expected.txt
LayoutTests/platform/chromium-win/editing/pasteboard/pasting-tabs-expected.txt
LayoutTests/platform/chromium-win/editing/selection/4895428-3-expected.txt
LayoutTests/platform/chromium-win/editing/selection/4975120-expected.txt
LayoutTests/platform/chromium-win/editing/selection/select-across-readonly-input-1-expected.txt
LayoutTests/platform/chromium-win/editing/selection/select-across-readonly-input-4-expected.txt
LayoutTests/platform/chromium-win/editing/selection/select-across-readonly-input-5-expected.txt
LayoutTests/platform/chromium-win/editing/selection/select-from-textfield-outwards-expected.txt
LayoutTests/platform/chromium-win/fast/events/autoscroll-expected.txt
LayoutTests/platform/chromium-win/fast/events/context-no-deselect-expected.txt
LayoutTests/platform/chromium-win/fast/forms/input-appearance-focus-expected.txt
LayoutTests/platform/chromium-win/fast/forms/input-appearance-readonly-expected.txt
LayoutTests/platform/chromium-win/fast/forms/input-appearance-selection-expected.txt
LayoutTests/platform/chromium-win/fast/forms/input-double-click-selection-gap-bug-expected.txt
LayoutTests/platform/chromium-win/fast/forms/input-paste-undo-expected.txt
LayoutTests/platform/chromium-win/fast/forms/input-placeholder-visibility-1-expected.txt
LayoutTests/platform/chromium-win/fast/forms/input-placeholder-visibility-2-expected.txt
LayoutTests/platform/chromium-win/fast/forms/input-placeholder-visibility-3-expected.txt
LayoutTests/platform/chromium-win/fast/forms/input-readonly-autoscroll-expected.txt
LayoutTests/platform/chromium-win/fast/forms/input-text-click-inside-expected.txt
LayoutTests/platform/chromium-win/fast/forms/input-text-double-click-expected.txt
LayoutTests/platform/chromium-win/fast/forms/input-text-drag-down-expected.txt
LayoutTests/platform/chromium-win/fast/forms/input-text-option-delete-expected.txt
LayoutTests/platform/chromium-win/fast/forms/input-text-scroll-left-on-blur-expected.txt
LayoutTests/platform/chromium-win/fast/forms/input-text-self-emptying-click-expected.txt
LayoutTests/platform/chromium-win/fast/forms/plaintext-mode-2-expected.txt
LayoutTests/platform/chromium-win/fast/forms/search-rtl-expected.txt
LayoutTests/platform/chromium-win/fast/forms/search-zoomed-expected.txt
LayoutTests/platform/chromium-win/fast/forms/tabbing-input-iframe-expected.txt
LayoutTests/platform/chromium-win/fast/forms/textarea-placeholder-visibility-1-expected.txt
LayoutTests/platform/chromium-win/fast/forms/textarea-placeholder-visibility-2-expected.txt
LayoutTests/platform/chromium-win/fast/forms/textarea-scrollbar-expected.txt
LayoutTests/platform/chromium-win/fast/forms/textarea-scrolled-type-expected.txt
LayoutTests/platform/chromium-win/fast/forms/textfield-focus-ring-expected.txt
LayoutTests/platform/chromium-win/fast/forms/textfield-outline-expected.txt
LayoutTests/platform/chromium-win/fast/forms/textfield-overflow-expected.txt
LayoutTests/platform/chromium-win/fast/forms/validation-message-appearance-expected.txt
LayoutTests/platform/chromium-win/fast/frames/take-focus-from-iframe-expected.txt
LayoutTests/platform/chromium-win/fast/repaint/renderer-destruction-by-invalidateSelection-crash-expected.txt
LayoutTests/platform/chromium-win/fast/transforms/transformed-focused-text-input-expected.txt
LayoutTests/platform/chromium/test_expectations.txt
LayoutTests/platform/gtk/editing/inserting/4960120-1-expected.txt
LayoutTests/platform/gtk/editing/pasteboard/drop-text-without-selection-expected.txt
LayoutTests/platform/gtk/editing/pasteboard/pasting-tabs-expected.txt
LayoutTests/platform/gtk/editing/selection/4895428-3-expected.txt
LayoutTests/platform/gtk/editing/selection/4975120-expected.txt
LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-1-expected.txt
LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-4-expected.txt
LayoutTests/platform/gtk/editing/selection/select-across-readonly-input-5-expected.txt
LayoutTests/platform/gtk/editing/selection/select-from-textfield-outwards-expected.txt
LayoutTests/platform/gtk/fast/events/autoscroll-expected.txt
LayoutTests/platform/gtk/fast/events/context-no-deselect-expected.txt
LayoutTests/platform/gtk/fast/forms/input-appearance-focus-expected.txt
LayoutTests/platform/gtk/fast/forms/input-appearance-readonly-expected.txt
LayoutTests/platform/gtk/fast/forms/input-appearance-selection-expected.txt
LayoutTests/platform/gtk/fast/forms/input-double-click-selection-gap-bug-expected.txt
LayoutTests/platform/gtk/fast/forms/input-paste-undo-expected.txt
LayoutTests/platform/gtk/fast/forms/input-placeholder-visibility-1-expected.txt
LayoutTests/platform/gtk/fast/forms/input-placeholder-visibility-2-expected.txt
LayoutTests/platform/gtk/fast/forms/input-placeholder-visibility-3-expected.txt
LayoutTests/platform/gtk/fast/forms/input-readonly-autoscroll-expected.txt
LayoutTests/platform/gtk/fast/forms/input-text-click-inside-expected.txt
LayoutTests/platform/gtk/fast/forms/input-text-double-click-expected.txt
LayoutTests/platform/gtk/fast/forms/input-text-drag-down-expected.txt
LayoutTests/platform/gtk/fast/forms/input-text-option-delete-expected.txt
LayoutTests/platform/gtk/fast/forms/input-text-scroll-left-on-blur-expected.txt
LayoutTests/platform/gtk/fast/forms/input-text-self-emptying-click-expected.txt
LayoutTests/platform/gtk/fast/forms/plaintext-mode-2-expected.txt
LayoutTests/platform/gtk/fast/forms/search-rtl-expected.txt
LayoutTests/platform/gtk/fast/forms/search-transformed-expected.txt
LayoutTests/platform/gtk/fast/forms/search-zoomed-expected.txt
LayoutTests/platform/gtk/fast/forms/tabbing-input-iframe-expected.txt
LayoutTests/platform/gtk/fast/forms/textarea-placeholder-visibility-1-expected.txt
LayoutTests/platform/gtk/fast/forms/textarea-placeholder-visibility-2-expected.txt
LayoutTests/platform/gtk/fast/forms/textarea-scrollbar-expected.txt
LayoutTests/platform/gtk/fast/forms/textarea-scrolled-type-expected.txt
LayoutTests/platform/gtk/fast/forms/textfield-focus-ring-expected.txt
LayoutTests/platform/gtk/fast/forms/textfield-outline-expected.txt
LayoutTests/platform/gtk/fast/forms/textfield-overflow-expected.txt
LayoutTests/platform/gtk/fast/frames/take-focus-from-iframe-expected.txt
LayoutTests/platform/gtk/fast/repaint/renderer-destruction-by-invalidateSelection-crash-expected.txt
LayoutTests/platform/gtk/fast/transforms/transformed-focused-text-input-expected.txt
LayoutTests/platform/mac-snowleopard/fast/forms/input-placeholder-visibility-1-expected.txt
LayoutTests/platform/mac-snowleopard/fast/forms/input-placeholder-visibility-2-expected.txt
LayoutTests/platform/mac-snowleopard/fast/forms/input-placeholder-visibility-3-expected.txt
LayoutTests/platform/mac-wk2/editing/selection/select-across-readonly-input-1-expected.txt
LayoutTests/platform/mac-wk2/editing/selection/select-across-readonly-input-4-expected.txt
LayoutTests/platform/mac-wk2/editing/selection/select-across-readonly-input-5-expected.txt
LayoutTests/platform/mac/editing/inserting/4960120-1-expected.txt
LayoutTests/platform/mac/editing/pasteboard/drop-text-without-selection-expected.txt
LayoutTests/platform/mac/editing/pasteboard/pasting-tabs-expected.txt
LayoutTests/platform/mac/editing/selection/4895428-3-expected.txt
LayoutTests/platform/mac/editing/selection/4975120-expected.txt
LayoutTests/platform/mac/editing/selection/select-across-readonly-input-1-expected.txt
LayoutTests/platform/mac/editing/selection/select-across-readonly-input-4-expected.txt
LayoutTests/platform/mac/editing/selection/select-across-readonly-input-5-expected.txt
LayoutTests/platform/mac/editing/selection/select-from-textfield-outwards-expected.txt
LayoutTests/platform/mac/fast/events/autoscroll-expected.txt
LayoutTests/platform/mac/fast/events/context-no-deselect-expected.txt
LayoutTests/platform/mac/fast/forms/input-appearance-focus-expected.txt
LayoutTests/platform/mac/fast/forms/input-appearance-readonly-expected.txt
LayoutTests/platform/mac/fast/forms/input-appearance-selection-expected.txt
LayoutTests/platform/mac/fast/forms/input-appearance-spinbutton-up-expected.txt
LayoutTests/platform/mac/fast/forms/input-double-click-selection-gap-bug-expected.txt
LayoutTests/platform/mac/fast/forms/input-paste-undo-expected.txt
LayoutTests/platform/mac/fast/forms/input-placeholder-visibility-1-expected.txt
LayoutTests/platform/mac/fast/forms/input-placeholder-visibility-2-expected.txt
LayoutTests/platform/mac/fast/forms/input-placeholder-visibility-3-expected.txt
LayoutTests/platform/mac/fast/forms/input-readonly-autoscroll-expected.txt
LayoutTests/platform/mac/fast/forms/input-text-click-inside-expected.txt
LayoutTests/platform/mac/fast/forms/input-text-double-click-expected.txt
LayoutTests/platform/mac/fast/forms/input-text-drag-down-expected.txt
LayoutTests/platform/mac/fast/forms/input-text-option-delete-expected.txt
LayoutTests/platform/mac/fast/forms/input-text-scroll-left-on-blur-expected.txt
LayoutTests/platform/mac/fast/forms/input-text-self-emptying-click-expected.txt
LayoutTests/platform/mac/fast/forms/plaintext-mode-2-expected.txt
LayoutTests/platform/mac/fast/forms/search-rtl-expected.txt
LayoutTests/platform/mac/fast/forms/search-transformed-expected.txt
LayoutTests/platform/mac/fast/forms/search-zoomed-expected.txt
LayoutTests/platform/mac/fast/forms/tabbing-input-iframe-expected.txt
LayoutTests/platform/mac/fast/forms/textarea-placeholder-visibility-1-expected.txt
LayoutTests/platform/mac/fast/forms/textarea-placeholder-visibility-2-expected.txt
LayoutTests/platform/mac/fast/forms/textarea-scrollbar-expected.txt
LayoutTests/platform/mac/fast/forms/textarea-scrolled-type-expected.txt
LayoutTests/platform/mac/fast/forms/textfield-focus-ring-expected.txt
LayoutTests/platform/mac/fast/forms/textfield-outline-expected.txt
LayoutTests/platform/mac/fast/forms/textfield-overflow-expected.txt
LayoutTests/platform/mac/fast/forms/validation-message-appearance-expected.txt
LayoutTests/platform/mac/fast/frames/take-focus-from-iframe-expected.txt
LayoutTests/platform/mac/fast/repaint/renderer-destruction-by-invalidateSelection-crash-expected.txt
LayoutTests/platform/mac/fast/transforms/transformed-focused-text-input-expected.txt
LayoutTests/platform/qt/editing/inserting/4960120-1-expected.txt
LayoutTests/platform/qt/editing/pasteboard/pasting-tabs-expected.txt
LayoutTests/platform/qt/editing/selection/4895428-3-expected.txt
LayoutTests/platform/qt/editing/selection/4975120-expected.txt
LayoutTests/platform/qt/fast/forms/input-appearance-focus-expected.txt
LayoutTests/platform/qt/fast/forms/input-appearance-readonly-expected.txt
LayoutTests/platform/qt/fast/forms/input-appearance-selection-expected.txt
LayoutTests/platform/qt/fast/forms/input-double-click-selection-gap-bug-expected.txt
LayoutTests/platform/qt/fast/forms/input-paste-undo-expected.txt
LayoutTests/platform/qt/fast/forms/input-text-click-inside-expected.txt
LayoutTests/platform/qt/fast/forms/input-text-option-delete-expected.txt
LayoutTests/platform/qt/fast/forms/input-text-self-emptying-click-expected.txt
LayoutTests/platform/qt/fast/forms/plaintext-mode-2-expected.txt
LayoutTests/platform/qt/fast/forms/search-rtl-expected.txt
LayoutTests/platform/qt/fast/forms/search-transformed-expected.txt
LayoutTests/platform/qt/fast/forms/search-zoomed-expected.txt
LayoutTests/platform/qt/fast/forms/textfield-overflow-expected.txt
LayoutTests/platform/qt/fast/frames/take-focus-from-iframe-expected.txt
LayoutTests/platform/qt/fast/transforms/transformed-focused-text-input-expected.txt
LayoutTests/platform/win/editing/inserting/4960120-1-expected.txt
LayoutTests/platform/win/editing/selection/select-from-textfield-outwards-expected.txt
LayoutTests/platform/win/fast/forms/input-text-drag-down-expected.txt
LayoutTests/platform/win/fast/forms/textarea-scrollbar-expected.txt
LayoutTests/platform/win/fast/forms/textarea-scrolled-type-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/css/html.css
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/Node.h
Source/WebCore/dom/Position.cpp
Source/WebCore/dom/Position.h
Source/WebCore/editing/CompositeEditCommand.cpp
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/FrameSelection.cpp
Source/WebCore/editing/FrameSelection.h
Source/WebCore/editing/InsertParagraphSeparatorCommand.cpp
Source/WebCore/editing/ReplaceSelectionCommand.cpp
Source/WebCore/editing/VisibleSelection.cpp
Source/WebCore/editing/VisibleSelection.h
Source/WebCore/editing/htmlediting.cpp
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLInputElement.h
Source/WebCore/html/HTMLIsIndexElement.cpp
Source/WebCore/html/HTMLTextAreaElement.cpp
Source/WebCore/html/HTMLTextAreaElement.h
Source/WebCore/html/InputType.h
Source/WebCore/html/SearchInputType.cpp
Source/WebCore/html/SearchInputType.h
Source/WebCore/html/TextFieldInputType.cpp
Source/WebCore/html/TextFieldInputType.h
Source/WebCore/html/shadow/TextControlInnerElements.cpp
Source/WebCore/html/shadow/TextControlInnerElements.h
Source/WebCore/rendering/RenderTextControl.cpp
Source/WebCore/rendering/RenderTextControl.h
Source/WebCore/rendering/RenderTextControlMultiLine.cpp
Source/WebCore/rendering/RenderTextControlMultiLine.h
Source/WebCore/rendering/RenderTextControlSingleLine.cpp
Source/WebCore/rendering/RenderTextControlSingleLine.h