1. 09 Nov, 2010 1 commit
    • rniwa@webkit.org's avatar
      2010-11-08 Ryosuke Niwa <rniwa@webkit.org> · da764a89
      rniwa@webkit.org authored
              Unreviewed Chromium rebaselines for r71465.
      
              * platform/chromium-linux/editing/pasteboard/4806874-expected.checksum:
              * platform/chromium-linux/editing/pasteboard/4806874-expected.png:
              * platform/chromium-linux/editing/pasteboard/4944770-1-expected.checksum:
              * platform/chromium-linux/editing/pasteboard/4944770-1-expected.png:
              * platform/chromium-linux/editing/pasteboard/input-field-1-expected.checksum:
              * platform/chromium-linux/editing/pasteboard/input-field-1-expected.png:
              * platform/chromium-linux/editing/selection/4397952-expected.checksum:
              * platform/chromium-linux/editing/selection/4397952-expected.png:
              * platform/chromium-linux/editing/selection/caret-before-select-expected.checksum:
              * platform/chromium-linux/editing/selection/caret-before-select-expected.png:
              * platform/chromium-linux/editing/selection/click-start-of-line-expected.checksum:
              * platform/chromium-linux/editing/selection/click-start-of-line-expected.png:
              * platform/chromium-linux/editing/selection/extend-by-word-002-expected.checksum:
              * platform/chromium-linux/editing/selection/extend-by-word-002-expected.png:
              * platform/chromium-linux/editing/selection/select-element-paragraph-boundary-expected.checksum:
              * platform/chromium-linux/editing/selection/select-element-paragraph-boundary-expected.png:
              * platform/chromium-linux/fast/blockflow/border-radius-clipping-vertical-lr-expected.checksum:
              * platform/chromium-linux/fast/blockflow/border-radius-clipping-vertical-lr-expected.png:
              * platform/chromium-linux/fast/blockflow/box-shadow-horizontal-bt-expected.checksum:
              * platform/chromium-linux/fast/blockflow/box-shadow-horizontal-bt-expected.png:
              * platform/chromium-linux/fast/blockflow/box-shadow-vertical-lr-expected.checksum:
              * platform/chromium-linux/fast/blockflow/box-shadow-vertical-lr-expected.png:
              * platform/chromium-linux/fast/text/delete-hard-break-character-expected.checksum:
              * platform/chromium-linux/fast/text/delete-hard-break-character-expected.png:
              * platform/chromium-win/editing/pasteboard/4806874-expected.checksum:
              * platform/chromium-win/editing/pasteboard/4806874-expected.png:
              * platform/chromium-win/editing/pasteboard/4944770-1-expected.checksum:
              * platform/chromium-win/editing/pasteboard/4944770-1-expected.png:
              * platform/chromium-win/editing/pasteboard/input-field-1-expected.checksum:
              * platform/chromium-win/editing/pasteboard/input-field-1-expected.png:
              * platform/chromium-win/editing/selection/4397952-expected.checksum:
              * platform/chromium-win/editing/selection/4397952-expected.png:
              * platform/chromium-win/editing/selection/after-line-break-expected.txt: Added.
              * platform/chromium-win/editing/selection/caret-before-select-expected.checksum:
              * platform/chromium-win/editing/selection/caret-before-select-expected.png:
              * platform/chromium-win/editing/selection/click-start-of-line-expected.checksum:
              * platform/chromium-win/editing/selection/click-start-of-line-expected.png:
              * platform/chromium-win/editing/selection/extend-by-word-002-expected.checksum:
              * platform/chromium-win/editing/selection/extend-by-word-002-expected.png:
              * platform/chromium-win/editing/selection/select-element-paragraph-boundary-expected.checksum:
              * platform/chromium-win/editing/selection/select-element-paragraph-boundary-expected.png:
              * platform/chromium-win/fast/blockflow/border-radius-clipping-vertical-lr-expected.checksum:
              * platform/chromium-win/fast/blockflow/border-radius-clipping-vertical-lr-expected.png:
              * platform/chromium-win/fast/blockflow/border-radius-clipping-vertical-lr-expected.txt:
              * platform/chromium-win/fast/blockflow/box-shadow-horizontal-bt-expected.checksum:
              * platform/chromium-win/fast/blockflow/box-shadow-horizontal-bt-expected.png:
              * platform/chromium-win/fast/blockflow/box-shadow-horizontal-bt-expected.txt:
              * platform/chromium-win/fast/blockflow/box-shadow-vertical-lr-expected.checksum:
              * platform/chromium-win/fast/blockflow/box-shadow-vertical-lr-expected.png:
              * platform/chromium-win/fast/blockflow/box-shadow-vertical-lr-expected.txt:
              * platform/chromium-win/fast/text/delete-hard-break-character-expected.checksum:
              * platform/chromium-win/fast/text/delete-hard-break-character-expected.png:
              * platform/chromium/test_expectations.txt:
              * platform/mac/editing/pasteboard/4806874-expected.checksum:
              * platform/mac/editing/pasteboard/4806874-expected.png:
              * platform/mac/editing/pasteboard/4944770-1-expected.checksum:
              * platform/mac/editing/pasteboard/4944770-1-expected.png:
              * platform/mac/editing/pasteboard/input-field-1-expected.checksum:
              * platform/mac/editing/pasteboard/input-field-1-expected.png:
              * platform/mac/editing/selection/4397952-expected.checksum:
              * platform/mac/editing/selection/4397952-expected.png:
              * platform/mac/editing/selection/caret-before-select-expected.checksum:
              * platform/mac/editing/selection/caret-before-select-expected.png:
              * platform/mac/editing/selection/extend-by-word-002-expected.checksum:
              * platform/mac/editing/selection/extend-by-word-002-expected.png:
              * platform/mac/editing/selection/select-element-paragraph-boundary-expected.checksum:
              * platform/mac/editing/selection/select-element-paragraph-boundary-expected.png:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      da764a89
  2. 05 Nov, 2010 1 commit
    • hyatt@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=47237 · 4ad2cb13
      hyatt@apple.com authored
              
      Reviewed by Dan Bernstein and Simon Fraser.
      
      Make selection work with vertical text.  This patch fixes a bug in the computation of lineTop.  For lines
      with positive leading, lineTop was incorrectly including the top leading.  Since the flipping of lines
      for "lr" and "bt" writing modes involved flipping using lineTop and lineBottom, an incorrect lineTop meant
      that those modes were mis-rendering.  This is why the Japanese "lr" text examples have the first line smushed
      too far against the border.
              
      Fixing lineTop to no longer incorrectly include top leading has implications for editing.  I ended up
      rewriting positionForPoint to exactly match selection, since that seemed to be the most intuitive
      behavior.  I got rid of the verticalClickFudgeFactor and now just use selectionTop and selectionBottom
      instead of lineTop and lineBottom.  I am pretty sure the code used selectionTop in a previous incarnation
      anyway and that I moved away from it when I implemented lineTop and lineBottom.  The code then grew
      more complicated from people trying to work with lineTop and lineBottom, but going back to selectionTop
      and selectionBottom is the right behavior I think.  One editing test has been updated after this change
      (editing/selection/after-line-break.html), and one DOM test has been changed to not hit test past the
      bottom of a line (fast/dom/Document/CaretRangeFromPoint/basic.html).
              
      I patched selection painting of InlineTextBoxes so that the leading going up to the next line box is used
      for "lr" and "bt" modes instead of the previous box.  This makes sense for English text, but we may want
      a different policy for Japanese text eventually (possibly just splitting the difference instead).  Leaving it
      this way for now, and we can collect feedback on the design.
              
      I rewrote all of the selection gap painting code to be writing-mode aware.  During the course of rewriting this
      code I noticed a bug in the logicalLeftSelectionOffset and logicalRightSelectionOffset functions where there
      was a coordinate space mismatch on a comparison.  Fixing this improves the repaint/selection-clear.html test.
      
      Added new tests in fast/blockflow/.
      
      WebCore: 
      
      * rendering/InlineFlowBox.cpp:
      (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
      * rendering/InlineFlowBox.h:
      * rendering/InlineTextBox.cpp:
      (WebCore::InlineTextBox::selectionBottom):
      (WebCore::InlineTextBox::paintSelection):
      (WebCore::InlineTextBox::paintCompositionBackground):
      (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
      (WebCore::InlineTextBox::paintTextMatchMarker):
      * rendering/InlineTextBox.h:
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::selectionGapRectsForRepaint):
      (WebCore::RenderBlock::paintSelection):
      (WebCore::clipOutPositionedObjects):
      (WebCore::blockDirectionOffset):
      (WebCore::inlineDirectionOffset):
      (WebCore::RenderBlock::logicalRectToPhysicalRect):
      (WebCore::RenderBlock::selectionGaps):
      (WebCore::RenderBlock::inlineSelectionGaps):
      (WebCore::RenderBlock::blockSelectionGaps):
      (WebCore::RenderBlock::blockSelectionGap):
      (WebCore::RenderBlock::logicalLeftSelectionGap):
      (WebCore::RenderBlock::logicalRightSelectionGap):
      (WebCore::RenderBlock::logicalLeftSelectionOffset):
      (WebCore::RenderBlock::logicalRightSelectionOffset):
      * rendering/RenderBlock.h:
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::flipForWritingMode):
      * rendering/RenderBox.h:
      (WebCore::RenderBox::logicalBottom):
      * rendering/RootInlineBox.cpp:
      (WebCore::RootInlineBox::alignBoxesInBlockDirection):
      (WebCore::RootInlineBox::lineSelectionGap):
      (WebCore::RootInlineBox::selectionTop):
      (WebCore::RootInlineBox::selectionBottom):
      * rendering/RootInlineBox.h:
      
      LayoutTests: 
      
      * editing/selection/after-line-break-expected.txt:
      * fast/blockflow/japanese-lr-selection.html: Added.
      * fast/blockflow/japanese-rl-selection.html: Added.
      * fast/dom/Document/CaretRangeFromPoint/basic.html:
      * platform/mac/fast/blockflow/background-horizontal-bt-expected.checksum:
      * platform/mac/fast/blockflow/background-horizontal-bt-expected.png:
      * platform/mac/fast/blockflow/background-horizontal-bt-expected.txt:
      * platform/mac/fast/blockflow/background-vertical-lr-expected.checksum:
      * platform/mac/fast/blockflow/background-vertical-lr-expected.png:
      * platform/mac/fast/blockflow/background-vertical-lr-expected.txt:
      * platform/mac/fast/blockflow/border-image-horizontal-bt-expected.checksum:
      * platform/mac/fast/blockflow/border-image-horizontal-bt-expected.png:
      * platform/mac/fast/blockflow/border-image-horizontal-bt-expected.txt:
      * platform/mac/fast/blockflow/border-image-vertical-lr-expected.checksum:
      * platform/mac/fast/blockflow/border-image-vertical-lr-expected.png:
      * platform/mac/fast/blockflow/border-image-vertical-lr-expected.txt:
      * platform/mac/fast/blockflow/border-radius-clipping-vertical-lr-expected.checksum:
      * platform/mac/fast/blockflow/border-radius-clipping-vertical-lr-expected.png:
      * platform/mac/fast/blockflow/border-radius-clipping-vertical-lr-expected.txt:
      * platform/mac/fast/blockflow/border-vertical-lr-expected.checksum:
      * platform/mac/fast/blockflow/border-vertical-lr-expected.png:
      * platform/mac/fast/blockflow/border-vertical-lr-expected.txt:
      * platform/mac/fast/blockflow/box-shadow-horizontal-bt-expected.checksum:
      * platform/mac/fast/blockflow/box-shadow-horizontal-bt-expected.png:
      * platform/mac/fast/blockflow/box-shadow-horizontal-bt-expected.txt:
      * platform/mac/fast/blockflow/box-shadow-vertical-lr-expected.checksum:
      * platform/mac/fast/blockflow/box-shadow-vertical-lr-expected.png:
      * platform/mac/fast/blockflow/box-shadow-vertical-lr-expected.txt:
      * platform/mac/fast/blockflow/japanese-lr-selection-expected.checksum: Added.
      * platform/mac/fast/blockflow/japanese-lr-selection-expected.png: Added.
      * platform/mac/fast/blockflow/japanese-lr-selection-expected.txt: Added.
      * platform/mac/fast/blockflow/japanese-lr-text-expected.checksum:
      * platform/mac/fast/blockflow/japanese-lr-text-expected.png:
      * platform/mac/fast/blockflow/japanese-lr-text-expected.txt:
      * platform/mac/fast/blockflow/japanese-rl-selection-expected.checksum: Added.
      * platform/mac/fast/blockflow/japanese-rl-selection-expected.png: Added.
      * platform/mac/fast/blockflow/japanese-rl-selection-expected.txt: Added.
      * platform/mac/fast/repaint/selection-clear-expected.checksum:
      * platform/mac/fast/repaint/selection-clear-expected.png:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4ad2cb13
  3. 16 Jun, 2008 1 commit
    • mitz@apple.com's avatar
      WebCore: · 76ed659c
      mitz@apple.com authored
              Reviewed by Justin Garcia.
      
              - fix <rdar://problem/5973313> REGRESSION (r32508): Down arrow doesn't change caret with non-user entered newlines in textareas
      
              Test: editing/selection/after-line-break.html
      
              * dom/Position.cpp:
              (WebCore::Position::getInlineBoxAndOffset): Changed to not include the
              position after a line break in its line box, because that position is
              actually on the next line.
      
      LayoutTests:
      
              Reviewed by Justin Garcia.
      
              - test and updated results for <rdar://problem/5973313> REGRESSION (r32508): Down arrow doesn't change caret with non-user entered newlines in textareas
      
              * editing/selection/after-line-break-expected.txt: Added.
              * editing/selection/after-line-break.html: Added.
              * platform/mac/editing/selection/move-left-right-expected.txt: More bogus warnings.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34614 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      76ed659c