1. 29 Jun, 2005 1 commit
    • harrison's avatar
      Reviewed by Dave Hyatt (rendering) and Maciej (editing). · b43c5185
      harrison authored
              Test cases added:  Coming soon.  Will include with next round of changes for this bug.
      
              This is the first checkin for...
      
              <rdar://problem/3792529> REGRESSION (Mail): Tabs do not work the way they did in Panther (especially useful in plain text mail)
      
              Basic strategy is to put tabs into spans with white-space:pre style, and
              render them with tabs stops every 8th space, where the space width and
              the left margin are those of the enclosing block.
      
              What's left is to switch to implement white-space:pre-wrap so
              that we can coalesce consecutive tabs while maintaining proper
              line breaking.  That will keep the markup smaller.
      
              * khtml/editing/apply_style_command.cpp:
              (khtml::createStyleSpanElement):
              (khtml::ApplyStyleCommand::removeCSSStyle):
              (khtml::ApplyStyleCommand::addInlineStyleIfNeeded):
              * khtml/editing/delete_selection_command.cpp:
              (khtml::DeleteSelectionCommand::saveTypingStyleState):
              * khtml/editing/edit_command.cpp:
              (khtml::EditCommand::styleAtPosition):
              * khtml/editing/html_interchange.h:
              * khtml/editing/htmlediting.cpp:
              (khtml::isSpecialElement):
              (khtml::isTabSpanNode):
              (khtml::isTabSpanTextNode):
              (khtml::positionBeforeTabSpan):
              (khtml::createTabSpanElement):
              * khtml/editing/htmlediting.h:
              * khtml/editing/insert_text_command.cpp:
              (khtml::InsertTextCommand::prepareForTextInsertion):
              (khtml::InsertTextCommand::input):
              (khtml::InsertTextCommand::insertTab):
              * khtml/editing/insert_text_command.h:
              * khtml/editing/markup.cpp:
              (khtml::createParagraphContentsFromString):
              (khtml::createFragmentFromText):
              * khtml/editing/replace_selection_command.cpp:
              (khtml::ReplacementFragment::removeStyleNodes):
              * khtml/html/htmltokenizer.cpp:
              (khtml::HTMLTokenizer::begin):
              (khtml::HTMLTokenizer::processListing):
              (khtml::HTMLTokenizer::parseEntity):
              (khtml::HTMLTokenizer::parseTag):
              (khtml::HTMLTokenizer::addPending):
              (khtml::HTMLTokenizer::write):
              * khtml/html/htmltokenizer.h:
              (khtml::HTMLTokenizer::):
              * khtml/rendering/bidi.cpp:
              (khtml::addRun):
              (khtml::RenderBlock::tabWidth):
              (khtml::RenderBlock::computeHorizontalPositionsForLine):
              (khtml::RenderBlock::skipWhitespace):
              (khtml::RenderBlock::findNextLineBreak):
              (khtml::RenderBlock::checkLinesForTextOverflow):
              * khtml/rendering/break_lines.cpp:
              (khtml::isBreakable):
              * khtml/rendering/font.cpp:
              (Font::drawHighlightForText):
              (Font::drawText):
              (Font::floatWidth):
              (Font::floatCharacterWidths):
              (Font::checkSelectionPoint):
              (Font::width):
              * khtml/rendering/font.h:
              * khtml/rendering/render_block.cpp:
              (khtml::stripTrailingSpace):
              (khtml::RenderBlock::calcInlineMinMaxWidth):
              * khtml/rendering/render_block.h:
              * khtml/rendering/render_br.h:
              (khtml::RenderBR::width):
              * khtml/rendering/render_flexbox.cpp:
              (khtml::RenderFlexibleBox::layoutVerticalBox):
              * khtml/rendering/render_image.cpp:
              (RenderImage::setPixmap):
              (RenderImage::paint):
              * khtml/rendering/render_line.cpp:
              (khtml::EllipsisBox::paint):
              * khtml/rendering/render_line.h:
              (khtml::InlineBox::width):
              (khtml::InlineBox::xPos):
              (khtml::InlineBox::yPos):
              (khtml::InlineBox::height):
              (khtml::InlineBox::baseline):
              * khtml/rendering/render_list.cpp:
              (RenderListMarker::paint):
              (RenderListMarker::calcMinMaxWidth):
              * khtml/rendering/render_object.cpp:
              (RenderObject::tabWidth):
              (RenderObject::recalcMinMaxWidths):
              * khtml/rendering/render_object.h:
              * khtml/rendering/render_replaced.cpp:
              * khtml/rendering/render_text.cpp:
              (InlineTextBox::selectionRect):
              (InlineTextBox::paint):
              (InlineTextBox::paintSelection):
              (InlineTextBox::paintMarkedTextBackground):
              (InlineTextBox::textPos):
              (InlineTextBox::offsetForPosition):
              (InlineTextBox::positionForOffset):
              (RenderText::cacheWidths):
              (RenderText::widthFromCache):
              (RenderText::trimmedMinMaxWidth):
              (RenderText::calcMinMaxWidth):
              (RenderText::containsOnlyWhitespace):
              (RenderText::width):
              * khtml/rendering/render_text.h:
              * kwq/KWQFontMetrics.h:
              * kwq/KWQFontMetrics.mm:
              (QFontMetrics::width):
              (QFontMetrics::charWidth):
              (QFontMetrics::floatWidth):
              (QFontMetrics::floatCharacterWidths):
              (QFontMetrics::checkSelectionPoint):
              (QFontMetrics::boundingRect):
              (QFontMetrics::size):
              * kwq/KWQPainter.h:
              * kwq/KWQPainter.mm:
              (QPainter::drawText):
              (QPainter::drawHighlightForText):
              * kwq/WebCoreTextRenderer.h:
              * kwq/WebCoreTextRendererFactory.mm:
              (WebCoreInitializeEmptyTextStyle):
              * layout-tests/editing/deleting/delete-tab-001-expected.txt:
              * layout-tests/editing/deleting/delete-tab-001.html:
              * layout-tests/editing/deleting/delete-tab-002-expected.txt:
              * layout-tests/editing/deleting/delete-tab-002.html:
              * layout-tests/editing/deleting/delete-tab-003-expected.txt:
              * layout-tests/editing/deleting/delete-tab-003.html:
              * layout-tests/editing/deleting/delete-tab-004-expected.txt:
              * layout-tests/editing/deleting/delete-tab-004.html:
              * layout-tests/editing/inserting/insert-tab-001-expected.txt:
              * layout-tests/editing/inserting/insert-tab-002-expected.txt:
              * layout-tests/editing/inserting/insert-tab-003-expected.txt:
              * layout-tests/editing/inserting/insert-tab-004-expected.txt:
              * layout-tests/fast/dom/quadraticCurveTo-expected.txt:
              * layout-tests/fast/js/string-replace-2-expected.txt:
              * layout-tests/fast/table/039-expected.txt:
              * layout-tests/fast/table/border-collapsing/004-expected.txt:
              * layout-tests/fast/tokenizer/script_extra_close-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@9540 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b43c5185
  2. 24 May, 2005 1 commit
    • mjs's avatar
      Reviewed by John. · 84e724c0
      mjs authored
      	- split remaining editing command classes out of htmlediting.cpp
      	- rename InsertParagraphSeparatorInQuotedContentCommand to BreakBlockquoteCommand
      
      	No layout tests needed - this is a pure refactoring change.
      
              * WebCore.pbproj/project.pbxproj:
              * khtml/editing/apply_style_command.cpp:
              * khtml/editing/break_blockquote_command.cpp: Added.
              * khtml/editing/break_blockquote_command.h: Added.
              * khtml/editing/composite_edit_command.cpp:
              * khtml/editing/delete_selection_command.cpp:
              * khtml/editing/edit_command.cpp:
              * khtml/editing/htmlediting.cpp:
              * khtml/editing/htmlediting.h:
              * khtml/editing/insert_line_break_command.cpp: Added.
              * khtml/editing/insert_line_break_command.h: Added.
              * khtml/editing/insert_paragraph_separator_command.cpp: Added.
              * khtml/editing/insert_paragraph_separator_command.h: Added.
              * khtml/editing/insert_text_command.cpp: Added.
              * khtml/editing/insert_text_command.h: Added.
              * khtml/editing/join_text_nodes_command.cpp: Added.
              * khtml/editing/join_text_nodes_command.h: Added.
              * khtml/editing/merge_identical_elements_command.cpp: Added.
              * khtml/editing/merge_identical_elements_command.h: Added.
              * khtml/editing/move_selection_command.cpp: Added.
              * khtml/editing/move_selection_command.h: Added.
              * khtml/editing/rebalance_whitespace_command.cpp: Added.
              * khtml/editing/rebalance_whitespace_command.h: Added.
              * khtml/editing/remove_css_property_command.cpp: Added.
              * khtml/editing/remove_css_property_command.h: Added.
              * khtml/editing/remove_node_attribute_command.cpp: Added.
              * khtml/editing/remove_node_attribute_command.h: Added.
              * khtml/editing/remove_node_command.cpp: Added.
              * khtml/editing/remove_node_command.h: Added.
              * khtml/editing/remove_node_preserving_children_command.cpp: Added.
              * khtml/editing/remove_node_preserving_children_command.h: Added.
              * khtml/editing/replace_selection_command.cpp: Added.
              * khtml/editing/replace_selection_command.h: Added.
              * khtml/editing/set_node_attribute_command.cpp: Added.
              * khtml/editing/set_node_attribute_command.h: Added.
              * khtml/editing/split_element_command.cpp: Added.
              * khtml/editing/split_element_command.h: Added.
              * khtml/editing/split_text_node_command.cpp: Added.
              * khtml/editing/split_text_node_command.h: Added.
              * khtml/editing/split_text_node_containing_element_command.h: Added.
              * khtml/editing/typing_command.cpp: Added.
              * khtml/editing/typing_command.h: Added.
              * khtml/editing/wrap_contents_in_dummy_span_command.cpp: Added.
              * khtml/editing/wrap_contents_in_dummy_span_command.h: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@9196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      84e724c0
  3. 13 May, 2005 1 commit
    • mjs's avatar
      Reviewed by Dave. · a0fe4047
      mjs authored
      	- more splitting up of htmlediting.cpp
      
              * WebCore.pbproj/project.pbxproj:
              * khtml/editing/composite_edit_command.cpp:
              * khtml/editing/delete_from_text_node_command.cpp: Added.
              * khtml/editing/delete_from_text_node_command.h: Added.
              * khtml/editing/delete_selection_command.cpp: Added.
              * khtml/editing/delete_selection_command.h: Added.
              * khtml/editing/htmlediting.cpp:
              * khtml/editing/htmlediting.h:
              * khtml/editing/insert_into_text_node_command.cpp: Added.
              * khtml/editing/insert_into_text_node_command.h: Added.
              * khtml/editing/insert_node_before_command.cpp: Added.
              * khtml/editing/insert_node_before_command.h: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@9168 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a0fe4047