[webkit-changes] [115790] trunk/LayoutTests

2012-05-01 Thread xji
Title: [115790] trunk/LayoutTests








Revision 115790
Author x...@chromium.org
Date 2012-05-01 21:16:31 -0700 (Tue, 01 May 2012)


Log Message
2012-05-01  Xiaomei Ji  

Skip editing/selection/move-by-word-visually-mac.html (introduced in r115788) in qt and wk2.

* platform/qt/Skipped:
* platform/wk2/Skipped:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/qt/Skipped
trunk/LayoutTests/platform/wk2/Skipped




Diff

Modified: trunk/LayoutTests/ChangeLog (115789 => 115790)

--- trunk/LayoutTests/ChangeLog	2012-05-02 04:01:24 UTC (rev 115789)
+++ trunk/LayoutTests/ChangeLog	2012-05-02 04:16:31 UTC (rev 115790)
@@ -1,5 +1,12 @@
 2012-05-01  Xiaomei Ji  
 
+Skip editing/selection/move-by-word-visually-mac.html (introduced in r115788) in qt and wk2.
+
+* platform/qt/Skipped:
+* platform/wk2/Skipped:
+
+2012-05-01  Xiaomei Ji  
+
 enable ctrl-arrow move by word visually in other platforms (besides Windows)
 https://bugs.webkit.org/show_bug.cgi?id=85017
 


Modified: trunk/LayoutTests/platform/qt/Skipped (115789 => 115790)

--- trunk/LayoutTests/platform/qt/Skipped	2012-05-02 04:01:24 UTC (rev 115789)
+++ trunk/LayoutTests/platform/qt/Skipped	2012-05-02 04:16:31 UTC (rev 115790)
@@ -2570,6 +2570,7 @@
 editing/selection/move-by-word-visually-single-space-one-element.html
 editing/selection/move-by-word-visually-textarea.html
 editing/selection/move-by-word-visually-wrong-left-right.html
+editing/selection/move-by-word-visually-mac.html
 
 # https://bugs.webkit.org/show_bug.cgi?id=82628
 svg/hittest/svg-ellipse-non-scale-stroke.xhtml


Modified: trunk/LayoutTests/platform/wk2/Skipped (115789 => 115790)

--- trunk/LayoutTests/platform/wk2/Skipped	2012-05-02 04:01:24 UTC (rev 115789)
+++ trunk/LayoutTests/platform/wk2/Skipped	2012-05-02 04:16:31 UTC (rev 115790)
@@ -662,6 +662,7 @@
 editing/selection/move-by-word-visually-textarea.html
 editing/selection/move-by-word-visually-wrong-left-right.html
 editing/selection/move-by-word-visually-crash-test-css-generated-content.html
+editing/selection/move-by-word-visually-mac.html
 editing/selection/programmatic-selection-on-mac-is-directionless.html
 editing/selection/selection-extend-should-not-move-across-caret-on-mac.html
 editing/execCommand/query-command-state.html






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [115788] trunk

2012-05-01 Thread xji
Title: [115788] trunk








Revision 115788
Author x...@chromium.org
Date 2012-05-01 20:41:29 -0700 (Tue, 01 May 2012)


Log Message
Source/WebCore: enable ctrl-arrow move by word visually in non-Windows platforms.
https://bugs.webkit.org/show_bug.cgi?id=85017

Reviewed by Ryosuke Niwa.

Enable ctrl-arrow moves caret by word in visual order in non-Windows platforms that use ICU word
break iterator (it is not enabled for WinCE and Qt where ICU is not used). For those platforms, ctrl-arrow
moves caret to word break position before spaces. For example, given a logical text "abc def hij", the word
break positions using ctrl-left-arrow from rightmost position are "|abc |def |hij".
The word break positions using ctrl-right-arrow from leftmost position are "abc| def| hij|".

Test: editing/selection/move-by-word-visually-mac.html

* editing/EditingBehavior.h:
(EditingBehavior):
(WebCore::EditingBehavior::shouldEatSpaceToNextWord): To control different word break positions
(regards to space) for different platforms.
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::modifyMovingRight): Enable visual word movement for all platforms that use ICU.
(WebCore::FrameSelection::modifyMovingLeft):
* editing/visible_units.cpp:
(WebCore::visualWordPosition): Determine the right word break position (regards to space) based on EditingBehavior.
(WebCore::leftWordPosition):
(WebCore::rightWordPosition):
* editing/visible_units.h:

LayoutTests: enable ctrl-arrow move by word visually in other platforms (besides Windows)
https://bugs.webkit.org/show_bug.cgi?id=85017

Reviewed by Ryosuke Niwa.

Since DOMSelection.modify('move', 'left'/'right', 'word') moves caret by word in visual order (instead of
logical order) now, there are several changes to the test file:
1. file name renamed from move-left-right-by-word-mac.html to move-by-word-visually-mac.html.
2. test expectations change from moving caret by word in logical order to moving caret by word in visual order.
3. since test expectations are inside test file itself, test file itself changes accordingly.

* editing/selection/move-by-word-visually-mac-expected.txt: Copied from LayoutTests/editing/selection/move-left-right-by-word-mac-expected.txt.
* editing/selection/move-by-word-visually-mac.html: Copied from LayoutTests/editing/selection/move-left-right-by-word-mac.html.
* editing/selection/move-left-right-by-word-mac-expected.txt: Removed.
* editing/selection/move-left-right-by-word-mac.html: Removed.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/editing/EditingBehavior.h
trunk/Source/WebCore/editing/FrameSelection.cpp
trunk/Source/WebCore/editing/visible_units.cpp
trunk/Source/WebCore/editing/visible_units.h


Added Paths

trunk/LayoutTests/editing/selection/move-by-word-visually-mac-expected.txt
trunk/LayoutTests/editing/selection/move-by-word-visually-mac.html


Removed Paths

trunk/LayoutTests/editing/selection/move-left-right-by-word-mac-expected.txt
trunk/LayoutTests/editing/selection/move-left-right-by-word-mac.html




Diff

Modified: trunk/LayoutTests/ChangeLog (115787 => 115788)

--- trunk/LayoutTests/ChangeLog	2012-05-02 03:38:23 UTC (rev 115787)
+++ trunk/LayoutTests/ChangeLog	2012-05-02 03:41:29 UTC (rev 115788)
@@ -1,3 +1,21 @@
+2012-05-01  Xiaomei Ji  
+
+enable ctrl-arrow move by word visually in other platforms (besides Windows)
+https://bugs.webkit.org/show_bug.cgi?id=85017
+
+Reviewed by Ryosuke Niwa.
+  
+Since DOMSelection.modify('move', 'left'/'right', 'word') moves caret by word in visual order (instead of
+logical order) now, there are several changes to the test file:
+1. file name renamed from move-left-right-by-word-mac.html to move-by-word-visually-mac.html.
+2. test expectations change from moving caret by word in logical order to moving caret by word in visual order.
+3. since test expectations are inside test file itself, test file itself changes accordingly.
+   
+* editing/selection/move-by-word-visually-mac-expected.txt: Copied from LayoutTests/editing/selection/move-left-right-by-word-mac-expected.txt.
+* editing/selection/move-by-word-visually-mac.html: Copied from LayoutTests/editing/selection/move-left-right-by-word-mac.html.
+* editing/selection/move-left-right-by-word-mac-expected.txt: Removed.
+* editing/selection/move-left-right-by-word-mac.html: Removed.
+
 2012-05-01  Raymond Liu  
 
 Modify RealtimeAnalyserNode pull mechanism


Added: trunk/LayoutTests/editing/selection/move-by-word-visually-mac-expected.txt (0 => 115788)

--- trunk/LayoutTests/editing/selection/move-by-word-visually-mac-expected.txt	(rev 0)
+++ trunk/LayoutTests/editing/selection/move-by-word-visually-mac-expected.txt	2012-05-02 03:41:29 UTC (rev 115788)
@@ -0,0 +1,128 @@
+
+ Move By Word 
+Test 1, LTR:
+Move right by one word
+"abc def hij opq rst"[0, 3, 7, 11, 15, 19]

[webkit-changes] [114316] trunk/Source/WebCore

2012-04-16 Thread xji
Title: [114316] trunk/Source/WebCore








Revision 114316
Author x...@chromium.org
Date 2012-04-16 16:32:16 -0700 (Mon, 16 Apr 2012)


Log Message
platform/graphics/skia/GlyphPageTreeNodeSkia.cpp mis-use 'continue' for 'break'
https://bugs.webkit.org/show_bug.cgi?id=83521

Reviewed by David Levin.

No functionality change, so no new tests.

* platform/graphics/skia/GlyphPageTreeNodeSkia.cpp:
(WebCore::GlyphPage::fill):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/skia/GlyphPageTreeNodeSkia.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (114315 => 114316)

--- trunk/Source/WebCore/ChangeLog	2012-04-16 23:24:15 UTC (rev 114315)
+++ trunk/Source/WebCore/ChangeLog	2012-04-16 23:32:16 UTC (rev 114316)
@@ -1,3 +1,15 @@
+2012-04-16  Xiaomei Ji  
+
+platform/graphics/skia/GlyphPageTreeNodeSkia.cpp mis-use 'continue' for 'break'
+https://bugs.webkit.org/show_bug.cgi?id=83521
+
+Reviewed by David Levin.
+
+No functionality change, so no new tests.
+
+* platform/graphics/skia/GlyphPageTreeNodeSkia.cpp:
+(WebCore::GlyphPage::fill):
+
 2012-04-16  Levi Weintraub  
 
 Make borderBoxRect sub-pixel precise and add a pixel snapped version


Modified: trunk/Source/WebCore/platform/graphics/skia/GlyphPageTreeNodeSkia.cpp (114315 => 114316)

--- trunk/Source/WebCore/platform/graphics/skia/GlyphPageTreeNodeSkia.cpp	2012-04-16 23:24:15 UTC (rev 114315)
+++ trunk/Source/WebCore/platform/graphics/skia/GlyphPageTreeNodeSkia.cpp	2012-04-16 23:32:16 UTC (rev 114316)
@@ -96,15 +96,12 @@
 }
 
 if (fontData->hasVerticalGlyphs()) {
-bool lookVariants = false;
 for (unsigned i = 0; i < bufferLength; ++i) {
 if (!Font::isCJKIdeograph(buffer[i])) {
-lookVariants = true;
-continue;
+substituteWithVerticalGlyphs(fontData, glyphs, length);
+break;
 }
 }
-if (lookVariants)
-substituteWithVerticalGlyphs(fontData, glyphs, length);
 }
 
 unsigned allGlyphs = 0; // track if any of the glyphIDs are non-zero






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [114187] trunk/Source/WebCore

2012-04-13 Thread xji
Title: [114187] trunk/Source/WebCore








Revision 114187
Author x...@chromium.org
Date 2012-04-13 17:33:09 -0700 (Fri, 13 Apr 2012)


Log Message
REGRESSION(r102190) [chromium] text rendering (font and font size) in some Arabic/Persian page is wrong
when using certain fonts
https://bugs.webkit.org/show_bug.cgi?id=83523

Reviewed by Kent Tamura.

Revert r102190.
Convert characters being treatAsSpace to white space.

* platform/graphics/chromium/UniscribeHelper.cpp:
(WebCore::UniscribeHelper::fillRuns):
(WebCore::UniscribeHelper::adjustSpaceAdvances):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/chromium/UniscribeHelper.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (114186 => 114187)

--- trunk/Source/WebCore/ChangeLog	2012-04-14 00:27:34 UTC (rev 114186)
+++ trunk/Source/WebCore/ChangeLog	2012-04-14 00:33:09 UTC (rev 114187)
@@ -1,3 +1,18 @@
+2012-04-13  Xiaomei Ji  
+
+REGRESSION(r102190) [chromium] text rendering (font and font size) in some Arabic/Persian page is wrong
+when using certain fonts
+https://bugs.webkit.org/show_bug.cgi?id=83523
+
+Reviewed by Kent Tamura.
+
+Revert r102190.
+Convert characters being treatAsSpace to white space. 
+
+* platform/graphics/chromium/UniscribeHelper.cpp:
+(WebCore::UniscribeHelper::fillRuns):
+(WebCore::UniscribeHelper::adjustSpaceAdvances):
+
 2012-04-13  Timothy Hatcher  
 
 Change how the Web Insector is installed on Mac builds.


Modified: trunk/Source/WebCore/platform/graphics/chromium/UniscribeHelper.cpp (114186 => 114187)

--- trunk/Source/WebCore/platform/graphics/chromium/UniscribeHelper.cpp	2012-04-14 00:27:34 UTC (rev 114186)
+++ trunk/Source/WebCore/platform/graphics/chromium/UniscribeHelper.cpp	2012-04-14 00:33:09 UTC (rev 114187)
@@ -541,7 +541,7 @@
0, // fNeutralOverride:1;
0, // fNumericOverride:1;
0, // fLegacyBidiClass:1;
-   1, // fMergeNeutralItems  :1;
+   0, // fMergeNeutralItems  :1;
0};// fReserved   :7;
 // Calling ScriptApplyDigitSubstitution( 0, &inputControl, &inputState)
 // here would be appropriate if we wanted to set the language ID, and get
@@ -575,6 +575,24 @@
 &inputControl, &inputState,
 &m_runs[0], &m_scriptTags[0],
 &numberOfItems);
+
+if (SUCCEEDED(hr)) { 
+// Pack consecutive runs, the script tag of which are 
+// SCRIPT_TAG_UNKNOWN, to reduce the number of runs. 
+for (int i = 0; i < numberOfItems; ++i) { 
+if (m_scriptTags[i] == SCRIPT_TAG_UNKNOWN) { 
+int j = 1; 
+while (i + j < numberOfItems && m_scriptTags[i + j] == SCRIPT_TAG_UNKNOWN) 
+++j; 
+if (--j) { 
+m_runs.remove(i + 1, j); 
+m_scriptTags.remove(i + 1, j); 
+numberOfItems -= j; 
+} 
+} 
+} 
+m_scriptTags.resize(numberOfItems); 
+} 
 } else {
 hr = ScriptItemize(m_input, m_inputLength,
static_cast(m_runs.size()) - 1,
@@ -892,6 +910,8 @@
 int glyphIndex = shaping.m_logs[i];
 int currentAdvance = shaping.m_advance[glyphIndex];
 
+shaping.m_glyphs[glyphIndex] = shaping.m_spaceGlyph;
+
 if (treatAsSpace) {
 // currentAdvance does not include additional letter-spacing,
 // but m_spaceWidth does. Here we find out how off we are from
@@ -913,7 +933,6 @@
 shaping.m_abc.abcB -= currentAdvance;
 shaping.m_offsets[glyphIndex].du = 0;
 shaping.m_offsets[glyphIndex].dv = 0;
-shaping.m_glyphs[glyphIndex] = shaping.m_spaceGlyph;
 }
 }
 }






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [111624] trunk

2012-03-21 Thread xji
Title: [111624] trunk








Revision 111624
Author x...@chromium.org
Date 2012-03-21 17:20:43 -0700 (Wed, 21 Mar 2012)


Log Message
visual word movement: using cache to decrease the number of collectLeafBoxesInLogicalOrder on RootInlineBox
https://bugs.webkit.org/show_bug.cgi?id=81408

Reviewed by Ryosuke Niwa.

Source/WebCore:

Cache logically ordered leaf boxes under a particular root box.
Also, move 'Vector string' declared in visualWordPosition() to outside of loop (it is always
clear-ed before use).

* editing/visible_units.cpp:
(CachedLogicallyOrderedLeafBoxes): Add class to cache logically ordered leaf boxes under a particular root box.
(WebCore::CachedLogicallyOrderedLeafBoxes::size):
(WebCore::CachedLogicallyOrderedLeafBoxes::firstBox):
(WebCore):
(WebCore::CachedLogicallyOrderedLeafBoxes::CachedLogicallyOrderedLeafBoxes):
(WebCore::CachedLogicallyOrderedLeafBoxes::previousTextBox):
(WebCore::CachedLogicallyOrderedLeafBoxes::nextTextBox):
(WebCore::CachedLogicallyOrderedLeafBoxes::collectBoxes):
(WebCore::CachedLogicallyOrderedLeafBoxes::boxIndexInLeaves):
(WebCore::logicallyPreviousBox): Pass CachedLogicallyOrderedLeafBoxes object around.
(WebCore::logicallyNextBox):
(WebCore::wordBreakIteratorForMinOffsetBoundary):
(WebCore::wordBreakIteratorForMaxOffsetBoundary):
(WebCore::visualWordPosition):

LayoutTests:

* editing/selection/move-by-word-visually-single-space-one-element-expected.txt:
* editing/selection/move-by-word-visually-single-space-one-element.html:
  Add a test case that a word is spreading across multiple inline boxes.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/editing/selection/move-by-word-visually-single-space-one-element-expected.txt
trunk/LayoutTests/editing/selection/move-by-word-visually-single-space-one-element.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/editing/visible_units.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (111623 => 111624)

--- trunk/LayoutTests/ChangeLog	2012-03-22 00:20:38 UTC (rev 111623)
+++ trunk/LayoutTests/ChangeLog	2012-03-22 00:20:43 UTC (rev 111624)
@@ -1,3 +1,14 @@
+2012-03-21  Xiaomei Ji  
+
+visual word movement: using cache to decrease the number of collectLeafBoxesInLogicalOrder on RootInlineBox
+https://bugs.webkit.org/show_bug.cgi?id=81408
+
+Reviewed by Ryosuke Niwa.
+
+* editing/selection/move-by-word-visually-single-space-one-element-expected.txt:
+* editing/selection/move-by-word-visually-single-space-one-element.html:
+  Add a test case that a word is spreading across multiple inline boxes.
+
 2012-03-21  Raphael Kubo da Costa  
 
 [EFL] Unreviewed gardening; skip a few tests which are not really being rendered correctly.


Modified: trunk/LayoutTests/editing/selection/move-by-word-visually-single-space-one-element-expected.txt (111623 => 111624)

--- trunk/LayoutTests/editing/selection/move-by-word-visually-single-space-one-element-expected.txt	2012-03-22 00:20:38 UTC (rev 111623)
+++ trunk/LayoutTests/editing/selection/move-by-word-visually-single-space-one-element-expected.txt	2012-03-22 00:20:43 UTC (rev 111624)
@@ -97,6 +97,11 @@
 " opq rst "[8, 5, 1], "abc def hij "[8, 4, 0]
 Test 19, LTR:
 Move right by one word
+"abc def this"[0, 4, 8], "end opq rst "[4, 8, 11]
+Move left by one word
+"end opq rst "[11, 8, 4], "abc def this"[8, 4, 0]
+Test 20, LTR:
+Move right by one word
 [0]
 Move left by one word
 [0]


Modified: trunk/LayoutTests/editing/selection/move-by-word-visually-single-space-one-element.html (111623 => 111624)

--- trunk/LayoutTests/editing/selection/move-by-word-visually-single-space-one-element.html	2012-03-22 00:20:38 UTC (rev 111623)
+++ trunk/LayoutTests/editing/selection/move-by-word-visually-single-space-one-element.html	2012-03-22 00:20:43 UTC (rev 111624)
@@ -71,6 +71,8 @@
 
 abc def hij 
 
+abc def thisisonewordend opq rst 
+
 
 
 


Modified: trunk/Source/WebCore/ChangeLog (111623 => 111624)

--- trunk/Source/WebCore/ChangeLog	2012-03-22 00:20:38 UTC (rev 111623)
+++ trunk/Source/WebCore/ChangeLog	2012-03-22 00:20:43 UTC (rev 111624)
@@ -1,3 +1,30 @@
+2012-03-21  Xiaomei Ji  
+
+visual word movement: using cache to decrease the number of collectLeafBoxesInLogicalOrder on RootInlineBox
+https://bugs.webkit.org/show_bug.cgi?id=81408
+
+Reviewed by Ryosuke Niwa.
+
+Cache logically ordered leaf boxes under a particular root box.
+Also, move 'Vector string' declared in visualWordPosition() to outside of loop (it is always
+clear-ed before use).
+
+* editing/visible_units.cpp:
+(CachedLogicallyOrderedLeafBoxes): Add class to cache logically ordered leaf boxes under a particular root box.
+(WebCore::CachedLogicallyOrderedLeafBoxes::size):
+(WebCore::CachedLogicallyOrderedLeafBoxes::firstBox):
+(WebCore):
+(WebCore::CachedLogicallyOrderedLeafBoxes::CachedLogicallyOrderedLeafBoxes):
+(WebCore::CachedLogicallyOrderedLe

[webkit-changes] [111594] trunk/LayoutTests

2012-03-21 Thread xji
Title: [111594] trunk/LayoutTests








Revision 111594
Author x...@chromium.org
Date 2012-03-21 12:37:25 -0700 (Wed, 21 Mar 2012)


Log Message
add DOCTYPE for move-by-word-visually tests
https://bugs.webkit.org/show_bug.cgi?id=81810

Reviewed by Ryosuke Niwa.

* editing/selection/move-by-word-visually-crash-test-1.html:
* editing/selection/move-by-word-visually-crash-test-2.html:
* editing/selection/move-by-word-visually-crash-test-3.html:
* editing/selection/move-by-word-visually-crash-test-4.html:
* editing/selection/move-by-word-visually-crash-test-css-generated-content.html:
* editing/selection/move-by-word-visually-crash-test-textarea.html:
* editing/selection/move-by-word-visually-inline-block-positioned-element.html:
* editing/selection/move-by-word-visually-null-box.html:
* editing/selection/move-by-word-visually-textarea.html:
* editing/selection/move-by-word-visually-wrong-left-right.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-1.html
trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-2.html
trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-3.html
trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-4.html
trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-css-generated-content.html
trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-textarea.html
trunk/LayoutTests/editing/selection/move-by-word-visually-inline-block-positioned-element.html
trunk/LayoutTests/editing/selection/move-by-word-visually-null-box.html
trunk/LayoutTests/editing/selection/move-by-word-visually-textarea.html
trunk/LayoutTests/editing/selection/move-by-word-visually-wrong-left-right.html




Diff

Modified: trunk/LayoutTests/ChangeLog (111593 => 111594)

--- trunk/LayoutTests/ChangeLog	2012-03-21 19:24:24 UTC (rev 111593)
+++ trunk/LayoutTests/ChangeLog	2012-03-21 19:37:25 UTC (rev 111594)
@@ -1,3 +1,21 @@
+2012-03-21  Xiaomei Ji  
+
+add DOCTYPE for move-by-word-visually tests
+https://bugs.webkit.org/show_bug.cgi?id=81810
+
+Reviewed by Ryosuke Niwa.
+
+* editing/selection/move-by-word-visually-crash-test-1.html:
+* editing/selection/move-by-word-visually-crash-test-2.html:
+* editing/selection/move-by-word-visually-crash-test-3.html:
+* editing/selection/move-by-word-visually-crash-test-4.html:
+* editing/selection/move-by-word-visually-crash-test-css-generated-content.html:
+* editing/selection/move-by-word-visually-crash-test-textarea.html:
+* editing/selection/move-by-word-visually-inline-block-positioned-element.html:
+* editing/selection/move-by-word-visually-null-box.html:
+* editing/selection/move-by-word-visually-textarea.html:
+* editing/selection/move-by-word-visually-wrong-left-right.html:
+
 2012-03-21  Ojan Vafai  
 
 Some chromium rebaselines that differed due to platform-specific text rendering.


Modified: trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-1.html (111593 => 111594)

--- trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-1.html	2012-03-21 19:24:24 UTC (rev 111593)
+++ trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-1.html	2012-03-21 19:37:25 UTC (rev 111594)
@@ -1,3 +1,4 @@
+
 

[webkit-changes] [111589] trunk

2012-03-21 Thread xji
Title: [111589] trunk








Revision 111589
Author x...@chromium.org
Date 2012-03-21 12:04:30 -0700 (Wed, 21 Mar 2012)


Log Message
[chromium] Font fallback in cr-win is wrong for string contains zero-width-space.
https://bugs.webkit.org/show_bug.cgi?id=79961

Reviewed by Adam Barth.

Source/WebCore:

Treat zero-width-space (\u200B) as true for treatAsZeroWidthSpaceInComplexScipt().

* platform/graphics/Font.h:
(WebCore::Font::treatAsZeroWidthSpaceInComplexScript):
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::adjustGlyphsAndAdvances):
* platform/graphics/win/UniscribeController.cpp:
(WebCore::UniscribeController::shapeAndPlaceItem):

LayoutTests:

* fast/text/zero-width-characters-complex-script.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/text/zero-width-characters-complex-script.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/Font.h
trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp
trunk/Source/WebCore/platform/graphics/win/UniscribeController.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (111588 => 111589)

--- trunk/LayoutTests/ChangeLog	2012-03-21 19:01:59 UTC (rev 111588)
+++ trunk/LayoutTests/ChangeLog	2012-03-21 19:04:30 UTC (rev 111589)
@@ -1,3 +1,12 @@
+2012-03-21  Xiaomei Ji  
+
+[chromium] Font fallback in cr-win is wrong for string contains zero-width-space.
+https://bugs.webkit.org/show_bug.cgi?id=79961
+
+Reviewed by Adam Barth.
+
+* fast/text/zero-width-characters-complex-script.html:
+
 2012-03-21  Emil A Eklund  
 
 Unreviewed test_expectations update for chromium.


Modified: trunk/LayoutTests/fast/text/zero-width-characters-complex-script.html (111588 => 111589)

--- trunk/LayoutTests/fast/text/zero-width-characters-complex-script.html	2012-03-21 19:01:59 UTC (rev 111588)
+++ trunk/LayoutTests/fast/text/zero-width-characters-complex-script.html	2012-03-21 19:04:30 UTC (rev 111589)
@@ -1,11 +1,9 @@
 
 
 
-function testChar(ch)
+function testChar(a, b, ch)
 {
 // Strings a and b selected here do not have any 'interaction' between them.
-var a = "\u0915\u093E"
-var b = "\u0916";
 var span = document.getElementById("characters");
 span.firstChild.data = a + b;
 var abWidth = span.offsetWidth;
@@ -21,39 +19,56 @@
 return 1;
 }
 
-function test()
-{
-if (window.layoutTestController)
-layoutTestController.dumpAsText();
+function testWithZeroWidthSpace(a, b) {
 var failedCount = 0;
+
 for (var i = 1; i < 32; ++i)
 if (i != 9 && i != 10 && i != 13)
-failedCount += testChar(i);
+failedCount += testChar(a, b, i);
 
 for (var i = 0x7F; i < 0xA0; ++i)
-failedCount += testChar(i);
-failedCount += testChar(0xAD);
+failedCount += testChar(a, b, i);
+failedCount += testChar(a, b, 0xAD);
+
 // ZWJ (U+200C) and ZWNJ (U+200D) are excluded because they
 // can affect the rendering in complex script text.
-failedCount += testChar(0x200B);
-failedCount += testChar(0x200E);
-failedCount += testChar(0x200F);
-failedCount += testChar(0x202A);
-failedCount += testChar(0x202B);
-failedCount += testChar(0x202C);
-failedCount += testChar(0x202D);
-failedCount += testChar(0x202E);
-failedCount += testChar(0xFEFF);
-failedCount += testChar(0xFFFC);
+failedCount += testChar(a, b, 0x200B);
+failedCount += testChar(a, b, 0x200E);
+failedCount += testChar(a, b, 0x200F);
+failedCount += testChar(a, b, 0x202A);
+failedCount += testChar(a, b, 0x202B);
+failedCount += testChar(a, b, 0x202C);
+failedCount += testChar(a, b, 0x202D);
+failedCount += testChar(a, b, 0x202E);
+failedCount += testChar(a, b, 0xFEFF);
+failedCount += testChar(a, b, 0xFFFC);
 
+return failedCount;
+}
+
+function test()
+{
+if (window.layoutTestController)
+layoutTestController.dumpAsText();
+
+var failedDevanagariCount = testWithZeroWidthSpace("\u0915\u093E", "\u0916");
+
+var failedArabicCount = testWithZeroWidthSpace("\u0627\u0644\u0645\u062A\u0648\u0633\u0637\u0020\u200B\u200B\u0647\u0648\u0020\u0020", "\u0647\u0648\u0020");
+
 var testArea = document.getElementById("testArea");
 testArea.parentNode.removeChild(testArea);
 


[webkit-changes] [111568] trunk/LayoutTests

2012-03-21 Thread xji
Title: [111568] trunk/LayoutTests








Revision 111568
Author x...@chromium.org
Date 2012-03-21 10:25:54 -0700 (Wed, 21 Mar 2012)


Log Message
Skipped editing/selection/move-by-word-visually-crash-test-5.html due to isWordTextBreak() is not implemented.

* platform/gtk/Skipped:
* platform/qt/Skipped:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/gtk/Skipped
trunk/LayoutTests/platform/qt/Skipped




Diff

Modified: trunk/LayoutTests/ChangeLog (111567 => 111568)

--- trunk/LayoutTests/ChangeLog	2012-03-21 17:25:07 UTC (rev 111567)
+++ trunk/LayoutTests/ChangeLog	2012-03-21 17:25:54 UTC (rev 111568)
@@ -1,3 +1,10 @@
+2012-03-21  Xiaomei Ji  
+
+Skipped editing/selection/move-by-word-visually-crash-test-5.html due to isWordTextBreak() is not implemented.
+
+* platform/gtk/Skipped:
+* platform/qt/Skipped:
+
 2012-03-21  Dan Bernstein  
 
 Updated Mac WebKit2 expected results for this test.  tracks the


Modified: trunk/LayoutTests/platform/gtk/Skipped (111567 => 111568)

--- trunk/LayoutTests/platform/gtk/Skipped	2012-03-21 17:25:07 UTC (rev 111567)
+++ trunk/LayoutTests/platform/gtk/Skipped	2012-03-21 17:25:54 UTC (rev 111568)
@@ -1588,6 +1588,7 @@
 editing/selection/move-by-word-visually-crash-test-2.html
 editing/selection/move-by-word-visually-crash-test-3.html
 editing/selection/move-by-word-visually-crash-test-4.html
+editing/selection/move-by-word-visually-crash-test-5.html
 editing/selection/move-by-word-visually-crash-test-textarea.html
 editing/selection/move-by-word-visually-crash-test-css-generated-content.html
 editing/selection/move-by-word-visually-empty-div.html


Modified: trunk/LayoutTests/platform/qt/Skipped (111567 => 111568)

--- trunk/LayoutTests/platform/qt/Skipped	2012-03-21 17:25:07 UTC (rev 111567)
+++ trunk/LayoutTests/platform/qt/Skipped	2012-03-21 17:25:54 UTC (rev 111568)
@@ -2749,6 +2749,7 @@
 editing/selection/move-by-word-visually-crash-test-2.html
 editing/selection/move-by-word-visually-crash-test-3.html
 editing/selection/move-by-word-visually-crash-test-4.html
+editing/selection/move-by-word-visually-crash-test-5.html
 editing/selection/move-by-word-visually-crash-test-textarea.html
 editing/selection/move-by-word-visually-crash-test-css-generated-content.html
 editing/selection/move-by-word-visually-inline-block-positioned-element.html
@@ -2769,4 +2770,4 @@
 fast/notifications/notifications-cancel-request-permission.html
 fast/notifications/notifications-check-permission.html
 fast/notifications/notifications-request-permission.html
-fast/notifications/notifications-without-permission.html
\ No newline at end of file
+fast/notifications/notifications-without-permission.html






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [111492] trunk

2012-03-20 Thread xji
Title: [111492] trunk








Revision 111492
Author x...@chromium.org
Date 2012-03-20 20:56:05 -0700 (Tue, 20 Mar 2012)


Log Message
Crash introduced in r110965.
https://bugs.webkit.org/show_bug.cgi?id=81720

Reviewed by Ryosuke Niwa.

Source/WebCore:

Since word break iterator just keeps a pointer to the UChar array given to the constructor,
we need to allocate the UChar array deeper in the stack than the iterator.

Test: editing/selection/move-by-word-visually-crash-test-5.html

* editing/visible_units.cpp:
(WebCore::wordBreakIteratorForMinOffsetBoundary):
(WebCore::wordBreakIteratorForMaxOffsetBoundary):
(WebCore::visualWordPosition):

LayoutTests:

* editing/selection/move-by-word-visually-crash-test-5-expected.txt: Added.
* editing/selection/move-by-word-visually-crash-test-5.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/editing/visible_units.cpp


Added Paths

trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-5-expected.txt
trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-5.html




Diff

Modified: trunk/LayoutTests/ChangeLog (111491 => 111492)

--- trunk/LayoutTests/ChangeLog	2012-03-21 03:50:37 UTC (rev 111491)
+++ trunk/LayoutTests/ChangeLog	2012-03-21 03:56:05 UTC (rev 111492)
@@ -1,3 +1,13 @@
+2012-03-20  Xiaomei Ji  
+
+Crash introduced in r110965.
+https://bugs.webkit.org/show_bug.cgi?id=81720
+
+Reviewed by Ryosuke Niwa.
+
+* editing/selection/move-by-word-visually-crash-test-5-expected.txt: Added.
+* editing/selection/move-by-word-visually-crash-test-5.html: Added.
+
 2012-03-20  Keishi Hattori  
 
 [chromium] Marking integer-division-neg2tothe32-by-neg1.html as crashing.


Added: trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-5-expected.txt (0 => 111492)

--- trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-5-expected.txt	(rev 0)
+++ trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-5-expected.txt	2012-03-21 03:56:05 UTC (rev 111492)
@@ -0,0 +1 @@
+Crash test passed


Added: trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-5.html (0 => 111492)

--- trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-5.html	(rev 0)
+++ trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-5.html	2012-03-21 03:56:05 UTC (rev 111492)
@@ -0,0 +1,21 @@
+
+
+_onload_ = function() {
+try {
+runTest();
+document.body.innerHTML = "Crash test passed";
+} finally {
+}
+};
+
+if (window.layoutTestController) {
+layoutTestController.dumpAsText();
+layoutTestController.setEditingBehavior('win');
+}
+
+
+class="test_move_by_word"
+style="-wap-marquee-style:mix; marker:sliderthumb-vertical; position:-0.0001; border-top-style:rl-tb; -webkit-padding-after:absolute; position:destination-atop; border:ethiopic-halehame-ti-et; clip-rule:absolute; position:menulist-text; color-profile:-webkit-activelink; position:reset-size; margin-right:message-box; filter:absolute; position:no-punctuation; -webkit-border-end:no-punctuation; border-bottom-style:absolute; position:line-through; text-underline-mode:repeat-y; clip-rule:absolute; position:amharic-abegede; -webkit-text-fill-color:nowrap; -webkit-text-decorations-in-effect:absolute; position:sliderthumb-horizontal; border-top-right-radius:wave; border-top:absolute; position:up; border-right:not-allowed; enable-background:absolute; position:caption; max-height:ne-resize;


Modified: trunk/Source/WebCore/ChangeLog (111491 => 111492)

--- trunk/Source/WebCore/ChangeLog	2012-03-21 03:50:37 UTC (rev 111491)
+++ trunk/Source/WebCore/ChangeLog	2012-03-21 03:56:05 UTC (rev 111492)
@@ -1,3 +1,20 @@
+2012-03-20  Xiaomei Ji  
+
+Crash introduced in r110965.
+https://bugs.webkit.org/show_bug.cgi?id=81720
+
+Reviewed by Ryosuke Niwa.
+
+Since word break iterator just keeps a pointer to the UChar array given to the constructor,
+we need to allocate the UChar array deeper in the stack than the iterator.
+
+Test: editing/selection/move-by-word-visually-crash-test-5.html
+
+* editing/visible_units.cpp:
+(WebCore::wordBreakIteratorForMinOffsetBoundary):
+(WebCore::wordBreakIteratorForMaxOffsetBoundary):
+(WebCore::visualWordPosition):
+
 2012-03-20  W. James MacLean  
 
 [chromium] Convert TouchFlingPlatformGestureCurve to a 2-D Bezier for better control of curve shape.


Modified: trunk/Source/WebCore/editing/visible_units.cpp (111491 => 111492)

--- trunk/Source/WebCore/editing/visible_units.cpp	2012-03-21 03:50:37 UTC (rev 111491)
+++ tru

[webkit-changes] [111472] trunk/LayoutTests

2012-03-20 Thread xji
Title: [111472] trunk/LayoutTests








Revision 111472
Author x...@chromium.org
Date 2012-03-20 17:24:49 -0700 (Tue, 20 Mar 2012)


Log Message
Skip move-by-word-visually-crash-test-css-generated-content.html introduced in r111469
because isWordTextBreak or setEditingBehavior is not implemented.

* platform/gtk/Skipped:
* platform/qt/Skipped:
* platform/wk2/Skipped:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/gtk/Skipped
trunk/LayoutTests/platform/qt/Skipped
trunk/LayoutTests/platform/wk2/Skipped




Diff

Modified: trunk/LayoutTests/ChangeLog (111471 => 111472)

--- trunk/LayoutTests/ChangeLog	2012-03-21 00:04:13 UTC (rev 111471)
+++ trunk/LayoutTests/ChangeLog	2012-03-21 00:24:49 UTC (rev 111472)
@@ -1,5 +1,14 @@
 2012-03-20  Xiaomei Ji  
 
+Skip move-by-word-visually-crash-test-css-generated-content.html introduced in r111469
+because isWordTextBreak or setEditingBehavior is not implemented.
+
+* platform/gtk/Skipped:
+* platform/qt/Skipped:
+* platform/wk2/Skipped:
+
+2012-03-20  Xiaomei Ji  
+
 visual word movement: crashes on CSS generated content.
 https://bugs.webkit.org/show_bug.cgi?id=81581
 


Modified: trunk/LayoutTests/platform/gtk/Skipped (111471 => 111472)

--- trunk/LayoutTests/platform/gtk/Skipped	2012-03-21 00:04:13 UTC (rev 111471)
+++ trunk/LayoutTests/platform/gtk/Skipped	2012-03-21 00:24:49 UTC (rev 111472)
@@ -1589,6 +1589,7 @@
 editing/selection/move-by-word-visually-crash-test-3.html
 editing/selection/move-by-word-visually-crash-test-4.html
 editing/selection/move-by-word-visually-crash-test-textarea.html
+editing/selection/move-by-word-visually-crash-test-css-generated-content.html
 editing/selection/move-by-word-visually-empty-div.html
 editing/selection/move-by-word-visually-inline-block-positioned-element.html
 editing/selection/move-by-word-visually-multi-line.html


Modified: trunk/LayoutTests/platform/qt/Skipped (111471 => 111472)

--- trunk/LayoutTests/platform/qt/Skipped	2012-03-21 00:04:13 UTC (rev 111471)
+++ trunk/LayoutTests/platform/qt/Skipped	2012-03-21 00:24:49 UTC (rev 111472)
@@ -2752,6 +2752,7 @@
 editing/selection/move-by-word-visually-crash-test-3.html
 editing/selection/move-by-word-visually-crash-test-4.html
 editing/selection/move-by-word-visually-crash-test-textarea.html
+editing/selection/move-by-word-visually-crash-test-css-generated-content.html
 editing/selection/move-by-word-visually-inline-block-positioned-element.html
 editing/selection/move-by-word-visually-multi-line.html
 editing/selection/move-by-word-visually-multi-space.html


Modified: trunk/LayoutTests/platform/wk2/Skipped (111471 => 111472)

--- trunk/LayoutTests/platform/wk2/Skipped	2012-03-21 00:04:13 UTC (rev 111471)
+++ trunk/LayoutTests/platform/wk2/Skipped	2012-03-21 00:24:49 UTC (rev 111472)
@@ -663,6 +663,7 @@
 editing/selection/move-by-word-visually-single-space-one-element.html
 editing/selection/move-by-word-visually-textarea.html
 editing/selection/move-by-word-visually-wrong-left-right.html
+editing/selection/move-by-word-visually-crash-test-css-generated-content.html
 editing/selection/programmatic-selection-on-mac-is-directionless.html
 editing/selection/selection-extend-should-not-move-across-caret-on-mac.html
 editing/execCommand/query-command-state.html






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [111469] trunk

2012-03-20 Thread xji
Title: [111469] trunk








Revision 111469
Author x...@chromium.org
Date 2012-03-20 16:49:52 -0700 (Tue, 20 Mar 2012)


Log Message
visual word movement: crashes on CSS generated content.
https://bugs.webkit.org/show_bug.cgi?id=81581

Reviewed by Ryosuke Niwa.

Source/WebCore:

Check for null pointer when referencing box->renderer()->node() in previousRootInlineBox and nextRootInlineBox.

Test: editing/selection/move-by-word-visually-crash-test-css-generated-content.html

* editing/visible_units.cpp:
(WebCore::previousRootInlineBox):
(WebCore::nextRootInlineBox):

LayoutTests:

* editing/selection/move-by-word-visually-crash-test-css-generated-content-expected.txt: Added.
* editing/selection/move-by-word-visually-crash-test-css-generated-content.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/editing/visible_units.cpp


Added Paths

trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-css-generated-content-expected.txt
trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-css-generated-content.html




Diff

Modified: trunk/LayoutTests/ChangeLog (111468 => 111469)

--- trunk/LayoutTests/ChangeLog	2012-03-20 23:47:38 UTC (rev 111468)
+++ trunk/LayoutTests/ChangeLog	2012-03-20 23:49:52 UTC (rev 111469)
@@ -1,3 +1,13 @@
+2012-03-20  Xiaomei Ji  
+
+visual word movement: crashes on CSS generated content.
+https://bugs.webkit.org/show_bug.cgi?id=81581
+
+Reviewed by Ryosuke Niwa.
+
+* editing/selection/move-by-word-visually-crash-test-css-generated-content-expected.txt: Added.
+* editing/selection/move-by-word-visually-crash-test-css-generated-content.html: Added.
+
 2012-03-20  Dan Bernstein  
 
 Updated expected results for this test after r110409.


Added: trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-css-generated-content-expected.txt (0 => 111469)

--- trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-css-generated-content-expected.txt	(rev 0)
+++ trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-css-generated-content-expected.txt	2012-03-20 23:49:52 UTC (rev 111469)
@@ -0,0 +1 @@
+Crash test passed


Added: trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-css-generated-content.html (0 => 111469)

--- trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-css-generated-content.html	(rev 0)
+++ trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-css-generated-content.html	2012-03-20 23:49:52 UTC (rev 111469)
@@ -0,0 +1,28 @@
+
+
+div:before {
+content: url(../../accessibility/resources/cake.png);
+}
+
+
+
+
+_onload_ = function() {
+try {
+runTest();
+document.body.innerHTML = "Crash test passed";
+} finally {
+}
+};
+
+if (window.layoutTestController) {
+layoutTestController.dumpAsText();
+layoutTestController.setEditingBehavior('win');
+}
+
+
+in div 1
+text area
+


Modified: trunk/Source/WebCore/ChangeLog (111468 => 111469)

--- trunk/Source/WebCore/ChangeLog	2012-03-20 23:47:38 UTC (rev 111468)
+++ trunk/Source/WebCore/ChangeLog	2012-03-20 23:49:52 UTC (rev 111469)
@@ -1,3 +1,18 @@
+2012-03-20  Xiaomei Ji  
+
+visual word movement: crashes on CSS generated content.
+https://bugs.webkit.org/show_bug.cgi?id=81581
+
+Reviewed by Ryosuke Niwa.
+
+Check for null pointer when referencing box->renderer()->node() in previousRootInlineBox and nextRootInlineBox.
+
+Test: editing/selection/move-by-word-visually-crash-test-css-generated-content.html
+
+* editing/visible_units.cpp:
+(WebCore::previousRootInlineBox):
+(WebCore::nextRootInlineBox):
+
 2012-03-20  Luke Macpherson  
 
 Use CSSPrimitiveValue::convertToLength() to handle CSSPropertyWebkitBoxReflect and in createGridTrackBreadth.


Modified: trunk/Source/WebCore/editing/visible_units.cpp (111468 => 111469)

--- trunk/Source/WebCore/editing/visible_units.cpp	2012-03-20 23:47:38 UTC (rev 111468)
+++ trunk/Source/WebCore/editing/visible_units.cpp	2012-03-20 23:49:52 UTC (rev 111469)
@@ -103,6 +103,10 @@
 static const RootInlineBox* previousRootInlineBox(const InlineBox* box, const VisiblePosition& visiblePosition)
 {
 Node* highestRoot = highestEditableRoot(visiblePosition.deepEquivalent(), ContentIsEditable);
+
+if (!box->renderer() || !box->renderer()->node())
+return 0;
+
 Node* node = box->renderer()->node();
 Node* enclosingBlockNode = enclosingNodeWithNonInlineRenderer(node);
 Node* previousNode = previousLeafWithSameEditability(node, ContentIsEditable);
@@ -132,6 +136,10 @@
 static const RootInlineBox* nextRootInlineBox(const InlineBox* box, const VisiblePosition& visiblePosition)
 {
 Node* highestRoot = highestEditableRoot(visiblePosition.deepEquivalent(), ContentIsEditable);
+
+if (!box->renderer() || !box

[webkit-changes] [111057] trunk/LayoutTests

2012-03-16 Thread xji
Title: [111057] trunk/LayoutTests








Revision 111057
Author x...@chromium.org
Date 2012-03-16 13:41:31 -0700 (Fri, 16 Mar 2012)


Log Message
Skip move-by-word-visually-wrong-left-right.html added in r110965 in wk2 since SetEditingBehavior is not supported.

* platform/wk2/Skipped:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/wk2/Skipped




Diff

Modified: trunk/LayoutTests/ChangeLog (111056 => 111057)

--- trunk/LayoutTests/ChangeLog	2012-03-16 20:32:39 UTC (rev 111056)
+++ trunk/LayoutTests/ChangeLog	2012-03-16 20:41:31 UTC (rev 111057)
@@ -1,3 +1,9 @@
+2012-03-16  Xiaomei Ji  
+
+Skip move-by-word-visually-wrong-left-right.html added in r110965 in wk2 since SetEditingBehavior is not supported.
+
+* platform/wk2/Skipped:
+
 2012-03-16  Erik Arvidsson  
 
 Fix layout test to output the same result for V8 and JSC


Modified: trunk/LayoutTests/platform/wk2/Skipped (111056 => 111057)

--- trunk/LayoutTests/platform/wk2/Skipped	2012-03-16 20:32:39 UTC (rev 111056)
+++ trunk/LayoutTests/platform/wk2/Skipped	2012-03-16 20:41:31 UTC (rev 111057)
@@ -654,6 +654,7 @@
 editing/selection/move-by-word-visually-single-space-inline-element.html
 editing/selection/move-by-word-visually-single-space-one-element.html
 editing/selection/move-by-word-visually-textarea.html
+editing/selection/move-by-word-visually-wrong-left-right.html
 editing/selection/programmatic-selection-on-mac-is-directionless.html
 editing/selection/selection-extend-should-not-move-across-caret-on-mac.html
 editing/execCommand/query-command-state.html






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [111016] trunk/LayoutTests

2012-03-16 Thread xji
Title: [111016] trunk/LayoutTests








Revision 111016
Author x...@chromium.org
Date 2012-03-16 09:49:09 -0700 (Fri, 16 Mar 2012)


Log Message
Skip visual word movement tests in gtk and qt after r110965 since isWordTextBreak is not implemented.

* platform/gtk/Skipped:
* platform/qt/Skipped:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/gtk/Skipped
trunk/LayoutTests/platform/qt/Skipped




Diff

Modified: trunk/LayoutTests/ChangeLog (111015 => 111016)

--- trunk/LayoutTests/ChangeLog	2012-03-16 16:43:31 UTC (rev 111015)
+++ trunk/LayoutTests/ChangeLog	2012-03-16 16:49:09 UTC (rev 111016)
@@ -1,3 +1,10 @@
+2012-03-16  Xiaomei Ji  
+
+Skip visual word movement tests in gtk and qt after r110965 since isWordTextBreak is not implemented.
+
+* platform/gtk/Skipped:
+* platform/qt/Skipped:
+
 2012-03-16  Yoshifumi Inoue  
 
 [Forms] The "progress" element should not be a form-associated element.


Modified: trunk/LayoutTests/platform/gtk/Skipped (111015 => 111016)

--- trunk/LayoutTests/platform/gtk/Skipped	2012-03-16 16:43:31 UTC (rev 111015)
+++ trunk/LayoutTests/platform/gtk/Skipped	2012-03-16 16:49:09 UTC (rev 111016)
@@ -1483,7 +1483,6 @@
 fast/repaint/moving-shadow-on-container.html
 fast/repaint/moving-shadow-on-path.html
 css3/flexbox/line-wrapping.html
-editing/selection/move-by-word-visually-multi-line.html
 fast/block/float/overhanging-tall-block.html
 fast/css/font-face-data-uri.html
 fast/css/font-face-download-error.html
@@ -1580,3 +1579,19 @@
 
 # https://bugs.webkit.org/show_bug.cgi?id=81320
 editing/pasteboard/copy-two-pasteboard-types-both-work.html
+
+# Failing since isWordTextBreak is not implemented. https://bugs.webkit.org/show_bug.cgi?id=81136
+editing/selection/move-by-word-visually-crash-test-1.html
+editing/selection/move-by-word-visually-crash-test-2.html
+editing/selection/move-by-word-visually-crash-test-3.html
+editing/selection/move-by-word-visually-crash-test-4.html
+editing/selection/move-by-word-visually-crash-test-textarea.html
+editing/selection/move-by-word-visually-empty-div.html
+editing/selection/move-by-word-visually-inline-block-positioned-element.html
+editing/selection/move-by-word-visually-multi-line.html
+editing/selection/move-by-word-visually-multi-space.html
+editing/selection/move-by-word-visually-null-box.html
+editing/selection/move-by-word-visually-single-space-inline-element.html
+editing/selection/move-by-word-visually-single-space-one-element.html
+editing/selection/move-by-word-visually-textarea.html
+editing/selection/move-by-word-visually-wrong-left-right.html


Modified: trunk/LayoutTests/platform/qt/Skipped (111015 => 111016)

--- trunk/LayoutTests/platform/qt/Skipped	2012-03-16 16:43:31 UTC (rev 111015)
+++ trunk/LayoutTests/platform/qt/Skipped	2012-03-16 16:49:09 UTC (rev 111016)
@@ -752,14 +752,6 @@
 # https://bugs.webkit.org/show_bug.cgi?id=54725
 editing/selection/mixed-editability-10.html
 
-# https://bugs.webkit.org/show_bug.cgi?id=59265
-editing/selection/move-by-word-visually-multi-line.html
-editing/selection/move-by-word-visually-multi-space.html
-editing/selection/move-by-word-visually-null-box.html
-editing/selection/move-by-word-visually-single-space-inline-element.html
-editing/selection/move-by-word-visually-single-space-one-element.html
-editing/selection/move-by-word-visually-inline-block-positioned-element.html
-
 # = #
 # Failing editing/spelling tests
 # = #
@@ -2739,3 +2731,19 @@
 # https://bugs.webkit.org/show_bug.cgi?id=75568
 plugins/mouse-click-plugin-clears-selection.html
 fast/events/mouse-relative-position.html
+
+# Failing since isWordTextBreak is not implemented. https://bugs.webkit.org/show_bug.cgi?id=81136
+editing/selection/move-by-word-visually-crash-test-1.html
+editing/selection/move-by-word-visually-crash-test-2.html
+editing/selection/move-by-word-visually-crash-test-3.html
+editing/selection/move-by-word-visually-crash-test-4.html
+editing/selection/move-by-word-visually-crash-test-textarea.html
+editing/selection/move-by-word-visually-empty-div.html
+editing/selection/move-by-word-visually-inline-block-positioned-element.html
+editing/selection/move-by-word-visually-multi-line.html
+editing/selection/move-by-word-visually-multi-space.html
+editing/selection/move-by-word-visually-null-box.html
+editing/selection/move-by-word-visually-single-space-inline-element.html
+editing/selection/move-by-word-visually-single-space-one-element.html
+editing/selection/move-by-word-visually-textarea.html
+editing/selection/move-by-word-visually-wrong-left-right.html






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [102252] trunk

2011-12-07 Thread xji
Title: [102252] trunk








Revision 102252
Author x...@chromium.org
Date 2011-12-07 11:05:50 -0800 (Wed, 07 Dec 2011)


Log Message
Source/WebCore: Turn on move caret by word visually for Windows platform.
https://bugs.webkit.org/show_bug.cgi?id=59652

Reviewed by Ryosuke Niwa.

We already support (arrow key) moving cursor by character in visual order.
This patch implements (ctrl/alt-arrow) moving cursor by word in visual order (in Windows).
It matches Firefox's default behavior.

Without this patch, ctrl(alt for mac)-arrow key or
selection.modify("move", "left"/"right", "word") moves cursor by word in logical order. 

IE implements moving cursor by logical order for both arrow key and ctrl-arrow key.
Firefox implements moving cursor by visual order for both operations.
>From Chromium bug report, native speakers would like moving cursor by visual order since it
is more intuitive.

The patch is only enabled for Windows (by EditingBehavior) because current implementation
matches Windows' native behavior.
For exmaple, if the logical text is "abc def hij", the cursor positions are
"|abc |def |hij|" no matter pressing ctrl-left-arrow or ctrl-right-arrow.

Mac and Linux's native behavior is slightly different. In which, when pressing
ctrl-left-arrow, the cursor positions are "|abc |def |hij|". When pressing ctrl-right-arrow,
the cursor positions are "|abc| def| hij|". We will implement it next.

Test: editing/selection/move-left-right-by-word-mac.html

* editing/EditingBehavior.h:
(WebCore::EditingBehavior::shouldMoveLeftRightByWordInVisualOrder):
* editing/FrameSelection.cpp: Remove experimental enum WebKitVisualWordGranularity.
(WebCore::FrameSelection::modifyExtendingRight):
(WebCore::FrameSelection::modifyExtendingForward):
(WebCore::FrameSelection::modifyMovingRight):
(WebCore::FrameSelection::modifyMovingForward):
(WebCore::FrameSelection::modifyExtendingLeft):
(WebCore::FrameSelection::modifyExtendingBackward):
(WebCore::FrameSelection::modifyMovingLeft):
(WebCore::FrameSelection::modifyMovingBackward):
* editing/TextGranularity.h: Remove experimental enum WebKitVisualWordGranularity.
* editing/VisibleSelection.cpp: Remove experimental enum WebKitVisualWordGranularity.
(WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity):
* page/DOMSelection.cpp: Remove experimental experimental flag -webkit-visual-word.
(WebCore::DOMSelection::modify):

LayoutTests: Turn on move caret by word visually for windows platform.
https://bugs.webkit.org/show_bug.cgi?id=59652

Reviewed by Ryosuke Niwa.

* editing/selection/caret-mode-paragraph-keys-navigation.html:
* editing/selection/move-by-word-visually-crash-test-1.html:
* editing/selection/move-by-word-visually-crash-test-2.html:
* editing/selection/move-by-word-visually-crash-test-3.html:
* editing/selection/move-by-word-visually-crash-test-4.html:
* editing/selection/move-by-word-visually-crash-test-textarea.html:
* editing/selection/move-by-word-visually-inline-block-positioned-element.html:
* editing/selection/move-by-word-visually-multi-line.html:
* editing/selection/move-by-word-visually-multi-space.html:
* editing/selection/move-by-word-visually-null-box.html:
* editing/selection/move-by-word-visually-single-space-inline-element.html:
* editing/selection/move-by-word-visually-single-space-one-element.html:
* editing/selection/move-by-word-visually-textarea.html:
* editing/selection/move-left-right-by-word-mac-expected.txt: Added.
* editing/selection/move-left-right-by-word-mac.html: Added.
* editing/selection/resources/move-by-word-visually.js:
(moveByWord):
(moveByWordOnEveryChar):

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/editing/selection/caret-mode-paragraph-keys-navigation.html
trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-1.html
trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-2.html
trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-3.html
trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-4.html
trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-textarea.html
trunk/LayoutTests/editing/selection/move-by-word-visually-inline-block-positioned-element.html
trunk/LayoutTests/editing/selection/move-by-word-visually-multi-line.html
trunk/LayoutTests/editing/selection/move-by-word-visually-multi-space.html
trunk/LayoutTests/editing/selection/move-by-word-visually-null-box.html
trunk/LayoutTests/editing/selection/move-by-word-visually-single-space-inline-element.html
trunk/LayoutTests/editing/selection/move-by-word-visually-single-space-one-element.html
trunk/LayoutTests/editing/selection/move-by-word-visually-textarea.html
trunk/LayoutTests/editing/selection/resources/move-by-word-visually.js
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/editing/EditingBehavior.h
trunk/Source/WebCore/editing/FrameSelection.cpp
trunk/Source/WebCore/editing/TextGranularity.h
trunk/Source/WebCore/editing/VisibleSelection.cpp
trunk/So

[webkit-changes] [101430] trunk

2011-11-29 Thread xji
Title: [101430] trunk








Revision 101430
Author x...@chromium.org
Date 2011-11-29 16:23:23 -0800 (Tue, 29 Nov 2011)


Log Message
--webkit-visual-word should be able to reach end of text, instead of end of line
https://bugs.webkit.org/show_bug.cgi?id=72048

Reviewed by Ryosuke Niwa.

Source/WebCore: 

Revert r92223 -- webkit-visual-word should reach boundary of line.
When there is no more left or right words in the same editing boundary and
current position is an editable position, return start or end position in this
editable content.

Test: editing/selection/move-by-word-visually-textarea.html

* editing/visible_units.cpp:
(WebCore::collectWordBreaksInBoxInsideBlockWithSameDirectionality):
(WebCore::collectWordBreaksInBoxInsideBlockWithDifferntDirectionality):
(WebCore::leftWordPosition):
(WebCore::rightWordPosition):

LayoutTests: 

* editing/selection/move-by-word-visually-inline-block-positioned-element-expected.txt:
* editing/selection/move-by-word-visually-inline-block-positioned-element.html:
* editing/selection/move-by-word-visually-multi-line-expected.txt:
* editing/selection/move-by-word-visually-multi-line.html:
* editing/selection/move-by-word-visually-single-space-inline-element-expected.txt:
* editing/selection/move-by-word-visually-textarea-expected.txt: Added.
* editing/selection/move-by-word-visually-textarea.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/editing/selection/move-by-word-visually-inline-block-positioned-element-expected.txt
trunk/LayoutTests/editing/selection/move-by-word-visually-inline-block-positioned-element.html
trunk/LayoutTests/editing/selection/move-by-word-visually-multi-line-expected.txt
trunk/LayoutTests/editing/selection/move-by-word-visually-multi-line.html
trunk/LayoutTests/editing/selection/move-by-word-visually-single-space-inline-element-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/editing/visible_units.cpp


Added Paths

trunk/LayoutTests/editing/selection/move-by-word-visually-textarea-expected.txt
trunk/LayoutTests/editing/selection/move-by-word-visually-textarea.html




Diff

Modified: trunk/LayoutTests/ChangeLog (101429 => 101430)

--- trunk/LayoutTests/ChangeLog	2011-11-30 00:19:58 UTC (rev 101429)
+++ trunk/LayoutTests/ChangeLog	2011-11-30 00:23:23 UTC (rev 101430)
@@ -1,3 +1,18 @@
+2011-11-10  Xiaomei Ji  
+
+--webkit-visual-word should be able to reach end of text, instead of end of line
+https://bugs.webkit.org/show_bug.cgi?id=72048
+
+Reviewed by Ryosuke Niwa.
+
+* editing/selection/move-by-word-visually-inline-block-positioned-element-expected.txt:
+* editing/selection/move-by-word-visually-inline-block-positioned-element.html:
+* editing/selection/move-by-word-visually-multi-line-expected.txt:
+* editing/selection/move-by-word-visually-multi-line.html:
+* editing/selection/move-by-word-visually-single-space-inline-element-expected.txt:
+* editing/selection/move-by-word-visually-textarea-expected.txt: Added.
+* editing/selection/move-by-word-visually-textarea.html: Added.
+
 2011-11-29  Alan Stearns  
 
 Clean up fast/regions/no-split-line-box.html test


Modified: trunk/LayoutTests/editing/selection/move-by-word-visually-inline-block-positioned-element-expected.txt (101429 => 101430)

--- trunk/LayoutTests/editing/selection/move-by-word-visually-inline-block-positioned-element-expected.txt	2011-11-30 00:19:58 UTC (rev 101429)
+++ trunk/LayoutTests/editing/selection/move-by-word-visually-inline-block-positioned-element-expected.txt	2011-11-30 00:23:23 UTC (rev 101430)
@@ -2,32 +2,32 @@
  Move By Word 
 Test 1, LTR:
 Move right by one word
-"begin start"[0, 6, 11], "abc def"[0, 4, 7], "end ing"[0, 4, 7], "this is float"[0, 5, 8, 13], "this is fixed"[5, 8, 13], "this is relative"[0, 5, 8, 16], "this is absolute"[0, 5, 8, 16]
+"begin start"[0, 6], "abc def"[0, 4], "end ing"[0, 4], "this is float"[0, 5, 8], "this is fixed"[5, 8], "this is relative"[0, 5, 8], "this is absolute"[0, 5, 8, 16]
 Move left by one word
 "this is absolute"[16, 8, 5, 0], "this is relative"[8, 5, 0], "this is fixed"[8, 5], "this is float"[8, 5, 0], "end ing"[4, 0], "abc def"[4, 0], "begin start"[6, 0]
 Test 2, LTR:
 Move right by one word
-"abc def"[0, 4, 7], "end ing"[0, 4, 7], "this is float"[0, 5, 8, 13], "this is fixed"[5, 8, 13], "this is relative"[0, 5, 8, 16], "this is absolute"[0, 5, 8, 16]
+"abc def"[0, 4], "end ing"[0, 4], "this is float"[0, 5, 8], "this is fixed"[5, 8], "this is relative"[0, 5, 8], "this is absolute"[0, 5, 8, 16]
 Move left by one word
 "this is absolute"[16, 8, 5, 0], "this is relative"[8, 5, 0], "this is fixed"[8, 5], "this is float"[8, 5, 0], "end ing"[4, 0], "abc def"[4, 0], "begin start"[6, 0]
 Test 3, LTR:
 Move right by one word
-"end ing"[0, 4, 7], "this is float"[0, 5, 8, 13], "this is fixed"[5, 8, 13], "this is relative"[0, 5, 8, 16], "this is absolute"[0, 5, 8, 16]
+"end ing"[0, 4], "t

[webkit-changes] [101400] trunk/LayoutTests

2011-11-29 Thread xji
Title: [101400] trunk/LayoutTests








Revision 101400
Author x...@chromium.org
Date 2011-11-29 11:31:09 -0800 (Tue, 29 Nov 2011)


Log Message
Rebase after r100819.

* platform/chromium-cg-mac-leopard/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png: Added.
* platform/chromium-mac/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png: Removed.
* platform/chromium-mac/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt: Removed.
* platform/chromium/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png: Added.
* platform/chromium/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt: Added.
* platform/chromium/test_expectations.txt:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/chromium/test_expectations.txt


Added Paths

trunk/LayoutTests/platform/chromium/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png
trunk/LayoutTests/platform/chromium/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt
trunk/LayoutTests/platform/chromium-cg-mac-leopard/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png




Diff

Modified: trunk/LayoutTests/ChangeLog (101399 => 101400)

--- trunk/LayoutTests/ChangeLog	2011-11-29 19:07:57 UTC (rev 101399)
+++ trunk/LayoutTests/ChangeLog	2011-11-29 19:31:09 UTC (rev 101400)
@@ -1,3 +1,14 @@
+2011-11-29  Xiaomei Ji  
+
+Rebase after r100819.
+
+* platform/chromium-cg-mac-leopard/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png: Added.
+* platform/chromium-mac/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png: Removed.
+* platform/chromium-mac/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt: Removed.
+* platform/chromium/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png: Added.
+* platform/chromium/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt: Added.
+* platform/chromium/test_expectations.txt:
+
 2011-11-29  Tony Chang  
 
 flex-align:stretch + max-height needs to clamp to max-height and position appropriately


Added: trunk/LayoutTests/platform/chromium/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png

(Binary files differ)

Property changes on: trunk/LayoutTests/platform/chromium/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png
___

Added: svn:mime-type

Added: trunk/LayoutTests/platform/chromium/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt (0 => 101400)

--- trunk/LayoutTests/platform/chromium/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt	(rev 0)
+++ trunk/LayoutTests/platform/chromium/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt	2011-11-29 19:31:09 UTC (rev 101400)
@@ -0,0 +1,8 @@
+layer at (0,0) size 329x4018
+  RenderView at (0,0) size 329x573
+layer at (0,0) size 329x4018
+  RenderBlock {HTML} at (0,0) size 329x4018
+RenderBody {BODY} at (8,8) size 313x4002
+  RenderBlock {DIV} at (-689,0) size 1002x4002 [border: (1px solid #FF)]
+RenderText {#text} at (-491,1) size 1492x18
+  text run at (-491,1) width 1492: "BEGINEND"


Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (101399 => 101400)

--- trunk/LayoutTests/platform/chromium/test_expectations.txt	2011-11-29 19:07:57 UTC (rev 101399)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt	2011-11-29 19:31:09 UTC (rev 101400)
@@ -3723,8 +3723,6 @@
 BUGWK72053 MAC DEBUG : fast/borders/inline-mask-overlay-image-outset-vertical-rl.html = PASS CRASH
 BUGWK72053 MAC DEBUG : fast/borders/block-mask-overlay-image-outset.html = PASS CRASH
 
-BUGWK70395 MAC : fast/dom/rtl-scroll-to-leftmost-and-resize.html = IMAGE+TEXT
-
 BUGWK72264 MAC : inspector/debugger/script-formatter.html = TIMEOUT
 
 // Fixed ES5 bugs during the V8 roll, upstream in progress.


Added: trunk/LayoutTests/platform/chromium-cg-mac-leopard/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png

(Binary files differ)

Property changes on: trunk/LayoutTests/platform/chromium-cg-mac-leopard/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png
___

Added: svn:mime-type




___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [100819] trunk

2011-11-18 Thread xji
Title: [100819] trunk








Revision 100819
Author x...@chromium.org
Date 2011-11-18 15:22:37 -0800 (Fri, 18 Nov 2011)


Log Message
REGRESSION: rtl horizontal scrollbar / resize bug - Body shifts on resize when scrolled all the way to the left
https://bugs.webkit.org/show_bug.cgi?id=70395

Reviewed by Tony Chang.

Source/WebCore: 

This patch fixes the problem in Mac and Chromium Mac.
   
The existing test fast/dom/rtl-scroll-to-leftmost-and-resize.html seems does not really work in Mac DRT
(the browswer window is not resized). It works in Chromium-Mac. And Chromium-Mac's code
is forked from Mac.

* platform/chromium/ScrollAnimatorChromiumMac.mm:
(WebCore::ScrollAnimatorChromiumMac::immediateScrollToPoint):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::immediateScrollToPoint):

LayoutTests: 

The test still marks as FAIL in test_expectations because cg-mac might need rebase.

* platform/chromium-mac/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png: Added.
* platform/chromium-mac/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/chromium/ScrollAnimatorChromiumMac.mm
trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm


Added Paths

trunk/LayoutTests/platform/chromium-mac/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png
trunk/LayoutTests/platform/chromium-mac/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt




Diff

Modified: trunk/LayoutTests/ChangeLog (100818 => 100819)

--- trunk/LayoutTests/ChangeLog	2011-11-18 23:16:58 UTC (rev 100818)
+++ trunk/LayoutTests/ChangeLog	2011-11-18 23:22:37 UTC (rev 100819)
@@ -1,3 +1,15 @@
+2011-11-18  Xiaomei Ji  
+
+REGRESSION: rtl horizontal scrollbar / resize bug - Body shifts on resize when scrolled all the way to the left
+https://bugs.webkit.org/show_bug.cgi?id=70395
+
+Reviewed by Tony Chang.
+
+The test still marks as FAIL in test_expectations because cg-mac might need rebase.
+
+* platform/chromium-mac/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png: Added.
+* platform/chromium-mac/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt: Added.
+
 2011-11-18  Martin Robinson  
 
 REGRESSION (r99924): broke 2 pasteboard tests on GTK


Added: trunk/LayoutTests/platform/chromium-mac/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png

(Binary files differ)

Property changes on: trunk/LayoutTests/platform/chromium-mac/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png
___

Added: svn:mime-type

Added: trunk/LayoutTests/platform/chromium-mac/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt (0 => 100819)

--- trunk/LayoutTests/platform/chromium-mac/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt	(rev 0)
+++ trunk/LayoutTests/platform/chromium-mac/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt	2011-11-18 23:22:37 UTC (rev 100819)
@@ -0,0 +1,8 @@
+layer at (0,0) size 329x4018
+  RenderView at (0,0) size 329x573
+layer at (0,0) size 329x4018
+  RenderBlock {HTML} at (0,0) size 329x4018
+RenderBody {BODY} at (8,8) size 313x4002
+  RenderBlock {DIV} at (-689,0) size 1002x4002 [border: (1px solid #FF)]
+RenderText {#text} at (-491,1) size 1492x18
+  text run at (-491,1) width 1492: "BEGINEND"


Modified: trunk/Source/WebCore/ChangeLog (100818 => 100819)

--- trunk/Source/WebCore/ChangeLog	2011-11-18 23:16:58 UTC (rev 100818)
+++ trunk/Source/WebCore/ChangeLog	2011-11-18 23:22:37 UTC (rev 100819)
@@ -1,3 +1,21 @@
+2011-11-18  Xiaomei Ji  
+
+REGRESSION: rtl horizontal scrollbar / resize bug - Body shifts on resize when scrolled all the way to the left
+https://bugs.webkit.org/show_bug.cgi?id=70395
+
+Reviewed by Tony Chang.
+
+This patch fixes the problem in Mac and Chromium Mac.
+   
+The existing test fast/dom/rtl-scroll-to-leftmost-and-resize.html seems does not really work in Mac DRT
+(the browswer window is not resized). It works in Chromium-Mac. And Chromium-Mac's code
+is forked from Mac.
+
+* platform/chromium/ScrollAnimatorChromiumMac.mm:
+(WebCore::ScrollAnimatorChromiumMac::immediateScrollToPoint):
+* platform/mac/ScrollAnimatorMac.mm:
+(WebCore::ScrollAnimatorMac::immediateScrollToPoint):
+
 2011-11-18  Martin Robinson  
 
 REGRESSION (r99924): broke 2 pasteboard tests on GTK


Modified: trunk/Source/WebCore/platform/chromium/ScrollAnimatorChromiumMac.mm (100818 => 100819)

--- trunk/Source/WebCore/platform/chromium/ScrollAnimatorChromiumMac.mm	2011-11-18 23:16:58 UTC (rev 100818)
+++ trunk/Source/WebCore/platform/chromium/

[webkit-changes] [99886] trunk

2011-11-10 Thread xji
Title: [99886] trunk








Revision 99886
Author x...@chromium.org
Date 2011-11-10 11:51:58 -0800 (Thu, 10 Nov 2011)


Log Message
Source/WebCore: --webkit-visual-word crash when create legacy position for shadowRoot
https://bugs.webkit.org/show_bug.cgi?id=71600

Reviewed by Ryosuke Niwa.

Inside textarea, the shadowed text node's previous leaf node could be the
shadowRoot node, which cause assert exception in creating legacy position based
on such node. Exit previousRootInlineBox() when reach shadowRoot node.

It does not cause problem when looking for text node's next leaf node. Adding
the same checking in nextRootInlineBox just to be safe.

Test: editing/selection/move-by-word-visually-crash-test-textarea.html

* editing/visible_units.cpp:
(WebCore::previousRootInlineBox):
(WebCore::nextRootInlineBox):

LayoutTests: --webkit-visual-word crash when create legacy position for shadowRoot
https://bugs.webkit.org/show_bug.cgi?id=71600

Reviewed by Ryosuke Niwa.

* editing/selection/move-by-word-visually-crash-test-textarea-expected.txt: Added.
* editing/selection/move-by-word-visually-crash-test-textarea.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/editing/visible_units.cpp


Added Paths

trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-textarea-expected.txt
trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-textarea.html




Diff

Modified: trunk/LayoutTests/ChangeLog (99885 => 99886)

--- trunk/LayoutTests/ChangeLog	2011-11-10 19:36:23 UTC (rev 99885)
+++ trunk/LayoutTests/ChangeLog	2011-11-10 19:51:58 UTC (rev 99886)
@@ -1,3 +1,13 @@
+2011-11-10  Xiaomei Ji  
+
+--webkit-visual-word crash when create legacy position for shadowRoot
+https://bugs.webkit.org/show_bug.cgi?id=71600
+
+Reviewed by Ryosuke Niwa.
+
+* editing/selection/move-by-word-visually-crash-test-textarea-expected.txt: Added.
+* editing/selection/move-by-word-visually-crash-test-textarea.html: Added.
+
 2011-11-10  Ojan Vafai  
 
 Add line for very flaky test storage/indexeddb/factory-deletedatabase-interactions.html.


Added: trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-textarea-expected.txt (0 => 99886)

--- trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-textarea-expected.txt	(rev 0)
+++ trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-textarea-expected.txt	2011-11-10 19:51:58 UTC (rev 99886)
@@ -0,0 +1 @@
+Crash test passed


Added: trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-textarea.html (0 => 99886)

--- trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-textarea.html	(rev 0)
+++ trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-textarea.html	2011-11-10 19:51:58 UTC (rev 99886)
@@ -0,0 +1,22 @@
+
+
+_onload_ = function() {
+var sel = window.getSelection();
+sel.empty();
+
+var test = document.getElementById("test_move_by_word");
+test.focus();
+test.selectionDirection = 'none';
+test.selectionStart = 1;
+test.selectionEnd = 1;
+
+getSelection().modify("move", "left", "-webkit-visual-word");
+getSelection().modify("move", "left", "-webkit-visual-word");
+document.body.innerHTML = "Crash test passed";
+};
+
+if (window.layoutTestController)
+layoutTestController.dumpAsText();
+
+
+At where are you


Modified: trunk/Source/WebCore/ChangeLog (99885 => 99886)

--- trunk/Source/WebCore/ChangeLog	2011-11-10 19:36:23 UTC (rev 99885)
+++ trunk/Source/WebCore/ChangeLog	2011-11-10 19:51:58 UTC (rev 99886)
@@ -1,3 +1,23 @@
+2011-11-10  Xiaomei Ji  
+
+--webkit-visual-word crash when create legacy position for shadowRoot
+https://bugs.webkit.org/show_bug.cgi?id=71600
+
+Reviewed by Ryosuke Niwa.
+
+Inside textarea, the shadowed text node's previous leaf node could be the
+shadowRoot node, which cause assert exception in creating legacy position based
+on such node. Exit previousRootInlineBox() when reach shadowRoot node.
+
+It does not cause problem when looking for text node's next leaf node. Adding
+the same checking in nextRootInlineBox just to be safe.
+
+Test: editing/selection/move-by-word-visually-crash-test-textarea.html
+
+* editing/visible_units.cpp:
+(WebCore::previousRootInlineBox):
+(WebCore::nextRootInlineBox):
+
 2011-11-10  Dean Jackson  
 
 Parse drop-shadow() filter syntax


Modified: trunk/Source/WebCore/editing/visible_units.cpp (99885 => 99886)

--- trunk/Source/WebCore/editing/visible_units.cpp	2011-11-10 19:36:23 UTC (rev 99885)
+++ trunk/Source/WebCore/editing/visible_units.cpp	2011-11-10 19:51:58 UTC (rev 99886)
@@ -1434,7 +1434,7 @@
 while (previousNode && enclosingBlockNode == enclosingNodeWithNonInlineRenderer(previousNode))
 previou

[webkit-changes] [99753] trunk/LayoutTests

2011-11-09 Thread xji
Title: [99753] trunk/LayoutTests








Revision 99753
Author x...@chromium.org
Date 2011-11-09 12:49:01 -0800 (Wed, 09 Nov 2011)


Log Message
Rebaseline after r99616 and r99736.
Delete platform/chromium/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt
so that cr-mac failed for text too.

* platform/chromium/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt: Removed.

Modified Paths

trunk/LayoutTests/ChangeLog


Removed Paths

trunk/LayoutTests/platform/chromium/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt




Diff

Modified: trunk/LayoutTests/ChangeLog (99752 => 99753)

--- trunk/LayoutTests/ChangeLog	2011-11-09 20:35:23 UTC (rev 99752)
+++ trunk/LayoutTests/ChangeLog	2011-11-09 20:49:01 UTC (rev 99753)
@@ -1,3 +1,11 @@
+2011-11-09  Xiaomei Ji  
+
+Rebaseline after r99616 and r99736.
+Delete platform/chromium/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt
+so that cr-mac failed for text too.
+
+* platform/chromium/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt: Removed.
+
 2011-11-09  Julien Chaffraix  
 
 REGRESSION (r93614): Content remains despite parent element being scrolled off page using _javascript_.


Deleted: trunk/LayoutTests/platform/chromium/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt (99752 => 99753)

--- trunk/LayoutTests/platform/chromium/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt	2011-11-09 20:35:23 UTC (rev 99752)
+++ trunk/LayoutTests/platform/chromium/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt	2011-11-09 20:49:01 UTC (rev 99753)
@@ -1,8 +0,0 @@
-layer at (0,0) size 329x4018
-  RenderView at (0,0) size 329x573
-layer at (0,0) size 329x4018
-  RenderBlock {HTML} at (0,0) size 329x4018
-RenderBody {BODY} at (8,8) size 313x4002
-  RenderBlock {DIV} at (-689,0) size 1002x4002 [border: (1px solid #FF)]
-RenderText {#text} at (-491,1) size 1492x18
-  text run at (-491,1) width 1492: "BEGINEND"






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [99736] trunk/LayoutTests

2011-11-09 Thread xji
Title: [99736] trunk/LayoutTests








Revision 99736
Author x...@chromium.org
Date 2011-11-09 10:44:25 -0800 (Wed, 09 Nov 2011)


Log Message
Rebaseline after r99616.

* platform/chromium-linux/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png: Added.
* platform/chromium-win/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png: Added.
* platform/chromium-win/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt: Added.
* platform/chromium/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt: Added.
* platform/chromium/test_expectations.txt:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/chromium/test_expectations.txt


Added Paths

trunk/LayoutTests/platform/chromium/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt
trunk/LayoutTests/platform/chromium-linux/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png
trunk/LayoutTests/platform/chromium-win/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png
trunk/LayoutTests/platform/chromium-win/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt




Diff

Modified: trunk/LayoutTests/ChangeLog (99735 => 99736)

--- trunk/LayoutTests/ChangeLog	2011-11-09 18:41:14 UTC (rev 99735)
+++ trunk/LayoutTests/ChangeLog	2011-11-09 18:44:25 UTC (rev 99736)
@@ -1,3 +1,13 @@
+2011-11-09  Xiaomei Ji  
+
+Rebaseline after r99616.
+
+* platform/chromium-linux/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png: Added.
+* platform/chromium-win/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png: Added.
+* platform/chromium-win/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt: Added.
+* platform/chromium/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt: Added.
+* platform/chromium/test_expectations.txt:
+
 2011-11-09  Ken Buchanan 
 
 SVG foreignObject wrong container


Added: trunk/LayoutTests/platform/chromium/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt (0 => 99736)

--- trunk/LayoutTests/platform/chromium/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt	(rev 0)
+++ trunk/LayoutTests/platform/chromium/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt	2011-11-09 18:44:25 UTC (rev 99736)
@@ -0,0 +1,8 @@
+layer at (0,0) size 329x4018
+  RenderView at (0,0) size 329x573
+layer at (0,0) size 329x4018
+  RenderBlock {HTML} at (0,0) size 329x4018
+RenderBody {BODY} at (8,8) size 313x4002
+  RenderBlock {DIV} at (-689,0) size 1002x4002 [border: (1px solid #FF)]
+RenderText {#text} at (-491,1) size 1492x18
+  text run at (-491,1) width 1492: "BEGINEND"


Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (99735 => 99736)

--- trunk/LayoutTests/platform/chromium/test_expectations.txt	2011-11-09 18:41:14 UTC (rev 99735)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt	2011-11-09 18:44:25 UTC (rev 99736)
@@ -3949,6 +3949,6 @@
 BUGRICOW : fast/js/toString-recursion.html = TEXT
 BUGRICOW : http/tests/security/xss-eval.html = TEXT
 
-BUGXJI : fast/dom/rtl-scroll-to-leftmost-and-resize.html = IMAGE+TEXT MISSING
+BUGWK70395 MAC : fast/dom/rtl-scroll-to-leftmost-and-resize.html = IMAGE+TEXT
 
 BUGWK71880 DEBUG : fast/forms/select-clientheight-large-size.html = TIMEOUT


Added: trunk/LayoutTests/platform/chromium-linux/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png

(Binary files differ)

Property changes on: trunk/LayoutTests/platform/chromium-linux/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png
___

Added: svn:mime-type

Added: trunk/LayoutTests/platform/chromium-win/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png

(Binary files differ)

Property changes on: trunk/LayoutTests/platform/chromium-win/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png
___

Added: svn:mime-type

Added: trunk/LayoutTests/platform/chromium-win/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt (0 => 99736)

--- trunk/LayoutTests/platform/chromium-win/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt	(rev 0)
+++ trunk/LayoutTests/platform/chromium-win/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt	2011-11-09 18:44:25 UTC (rev 99736)
@@ -0,0 +1,8 @@
+layer at (0,0) size 329x4018
+  RenderView at (0,0) size 329x573
+layer at (0,0) size 329x4018
+  RenderBlock {HTML} at (0,0) size 329x4018
+RenderBody {BODY} at (8,8) size 313x4002
+  RenderBlock {DIV} at (-689,0) size 1002x4002 [border: (1px solid #FF)]
+RenderText {#text} at (-486,1) size 1487x19
+  text run at (-486,1) width 1487: "BEGINdd

[webkit-changes] [99616] trunk

2011-11-08 Thread xji
Title: [99616] trunk








Revision 99616
Author x...@chromium.org
Date 2011-11-08 14:22:24 -0800 (Tue, 08 Nov 2011)


Log Message
REGRESSION: rtl horizontal scrollbar / resize bug - Body shifts on resize when scrolled all the way to the left
https://bugs.webkit.org/show_bug.cgi?id=70395

Reviewed by Tony Chang.

Source/WebCore: 

Change the condition to perform immediate scolling inside ScrollView::updateScrollbars()
to be correct for RTL page as well, which is checking either the scroll position change or
the m_scrollOrigin changes (such as in window resize in which scroll position might remain the same).

And remove condition checking inside ScrollableArea::scrollToOffsetWithoutAnimation() since
the pass-in offset is adjusted within the current scroll range, it could be the same as
m_currentPos when m_currentPos is (0, 0) and current scroll range is smaller than old 
scroll range, but scolling is still needed when page resize and scroll range changes.

Test: fast/dom/rtl-scroll-to-leftmost-and-resize.html

* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation): Remove condition checking.
* platform/ScrollView.cpp:
(WebCore::ScrollView::updateScrollbars): Change condition to perform immediate scrolling to be
correct for RTL pages as well.
* platform/ScrollableArea.cpp: Update m_scrollOriginChanged.
(WebCore::ScrollableArea::ScrollableArea):
(WebCore::ScrollableArea::setScrollOrigin):
(WebCore::ScrollableArea::setScrollOriginX):
(WebCore::ScrollableArea::setScrollOriginY):
* platform/ScrollableArea.h: Add m_scrollOriginChanged.
(WebCore::ScrollableArea::scrollOriginChanged):
(WebCore::ScrollableArea::resetScrollOriginChanged):

LayoutTests: 

* fast/dom/rtl-scroll-to-leftmost-and-resize.html: Added.
* platform/chromium/test_expectations.txt:
* platform/mac-snowleopard/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png: Added.
* platform/mac-snowleopard/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/chromium/test_expectations.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/ScrollAnimator.cpp
trunk/Source/WebCore/platform/ScrollView.cpp
trunk/Source/WebCore/platform/ScrollableArea.cpp
trunk/Source/WebCore/platform/ScrollableArea.h


Added Paths

trunk/LayoutTests/fast/dom/rtl-scroll-to-leftmost-and-resize.html
trunk/LayoutTests/platform/mac-snowleopard/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png
trunk/LayoutTests/platform/mac-snowleopard/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt




Diff

Modified: trunk/LayoutTests/ChangeLog (99615 => 99616)

--- trunk/LayoutTests/ChangeLog	2011-11-08 22:01:16 UTC (rev 99615)
+++ trunk/LayoutTests/ChangeLog	2011-11-08 22:22:24 UTC (rev 99616)
@@ -1,3 +1,15 @@
+2011-11-08  Xiaomei Ji  
+
+REGRESSION: rtl horizontal scrollbar / resize bug - Body shifts on resize when scrolled all the way to the left
+https://bugs.webkit.org/show_bug.cgi?id=70395
+
+Reviewed by Tony Chang.
+
+* fast/dom/rtl-scroll-to-leftmost-and-resize.html: Added.
+* platform/chromium/test_expectations.txt:
+* platform/mac-snowleopard/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png: Added.
+* platform/mac-snowleopard/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt: Added.
+
 2011-11-08  Dan Bernstein  
 
  Allow RenderView to have columns


Added: trunk/LayoutTests/fast/dom/rtl-scroll-to-leftmost-and-resize.html (0 => 99616)

--- trunk/LayoutTests/fast/dom/rtl-scroll-to-leftmost-and-resize.html	(rev 0)
+++ trunk/LayoutTests/fast/dom/rtl-scroll-to-leftmost-and-resize.html	2011-11-08 22:22:24 UTC (rev 99616)
@@ -0,0 +1,19 @@
+
+
+
+
+_onload_ = function()
+{
+window.resizeTo(250, window.innerHeight);
+window.scrollTo(-10, 0);
+window.resizeTo(350, window.innerHeight);
+}
+
+
+
+
+BEGINEND
+
+
+
+


Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (99615 => 99616)

--- trunk/LayoutTests/platform/chromium/test_expectations.txt	2011-11-08 22:01:16 UTC (rev 99615)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt	2011-11-08 22:22:24 UTC (rev 99616)
@@ -3939,3 +3939,6 @@
 BUGRICOW : fast/js/toString-overrides.html = TEXT
 BUGRICOW : fast/js/toString-recursion.html = TEXT
 BUGRICOW : http/tests/security/xss-eval.html = TEXT
+
+// Need rebaseline.
+BUGXJI WIN LINUX : fast/dom/rtl-scroll-to-leftmost-and-resize.html = IMAGE+TEXT


Added: trunk/LayoutTests/platform/mac-snowleopard/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png

(Binary files differ)

Property changes on: trunk/LayoutTests/platform/mac-snowleopard/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png

[webkit-changes] [99255] trunk

2011-11-03 Thread xji
Title: [99255] trunk








Revision 99255
Author x...@chromium.org
Date 2011-11-03 18:18:16 -0700 (Thu, 03 Nov 2011)


Log Message
Enable ctrl-arrow move cursor by word in visual order in cr-win by command line flag.
https://bugs.webkit.org/show_bug.cgi?id=71163

Reviewed by Ryosuke Niwa.

Source/WebCore: 

Add m_visualWordMovementEnabled page setting, trigger visual word movement
function (instead of logical one) when it is set as true.

right|leftWordPosition() are tested in editing/selection/move-by-word-visually*
by using --webkit-visual-word flag.

* editing/FrameSelection.cpp:
(WebCore::FrameSelection::modifyMovingRight):
(WebCore::FrameSelection::modifyMovingLeft):
(WebCore::FrameSelection::visualWordMovementEnabled):
* editing/FrameSelection.h:
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
(WebCore::Settings::setVisualWordMovementEnabled):
(WebCore::Settings::visualWordMovementEnabled):

Source/WebKit/chromium: 

To minimize the risk to LTR users, we enable this feature first to chromium win
by command line flag. This and corresponding changset in chromium
(http://codereview.chromium.org/8400078/)
should be removed after this feature is enabled without command line flag. 

The work flow is:
1. (chromium) adds command line flag --enable-visual-word-movement,
   pass it to WebCore::Settings through WebPreferences.
2. in FrameSelection::modifyMovingLeft|Right, when 'visualWordMovementEnabled' is true in page's Settings,
   trigger visual word movement instead of logical one.
 
* public/WebSettings.h:
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::setVisualWordMovementEnabled):
* src/WebSettingsImpl.h:

Tools: 

* DumpRenderTree/chromium/WebPreferences.cpp: Set visualWordMovementEabled to false in DRT.
(WebPreferences::applyTo):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/editing/FrameSelection.cpp
trunk/Source/WebCore/editing/FrameSelection.h
trunk/Source/WebCore/page/Settings.cpp
trunk/Source/WebCore/page/Settings.h
trunk/Source/WebKit/chromium/ChangeLog
trunk/Source/WebKit/chromium/public/WebSettings.h
trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp
trunk/Source/WebKit/chromium/src/WebSettingsImpl.h
trunk/Tools/ChangeLog
trunk/Tools/DumpRenderTree/chromium/WebPreferences.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (99254 => 99255)

--- trunk/Source/WebCore/ChangeLog	2011-11-04 00:56:59 UTC (rev 99254)
+++ trunk/Source/WebCore/ChangeLog	2011-11-04 01:18:16 UTC (rev 99255)
@@ -1,3 +1,27 @@
+2011-11-02  Xiaomei Ji  
+
+Enable ctrl-arrow move cursor by word in visual order in cr-win by command line flag.
+https://bugs.webkit.org/show_bug.cgi?id=71163
+
+Reviewed by Ryosuke Niwa.
+
+Add m_visualWordMovementEnabled page setting, trigger visual word movement
+function (instead of logical one) when it is set as true.
+
+right|leftWordPosition() are tested in editing/selection/move-by-word-visually*
+by using --webkit-visual-word flag.
+
+* editing/FrameSelection.cpp:
+(WebCore::FrameSelection::modifyMovingRight):
+(WebCore::FrameSelection::modifyMovingLeft):
+(WebCore::FrameSelection::visualWordMovementEnabled):
+* editing/FrameSelection.h:
+* page/Settings.cpp:
+(WebCore::Settings::Settings):
+* page/Settings.h:
+(WebCore::Settings::setVisualWordMovementEnabled):
+(WebCore::Settings::visualWordMovementEnabled):
+
 2011-11-03  Levi Weintraub  
 
 Correct usage of LayoutUnits and integers in Table rendering classes


Modified: trunk/Source/WebCore/editing/FrameSelection.cpp (99254 => 99255)

--- trunk/Source/WebCore/editing/FrameSelection.cpp	2011-11-04 00:56:59 UTC (rev 99254)
+++ trunk/Source/WebCore/editing/FrameSelection.cpp	2011-11-04 01:18:16 UTC (rev 99255)
@@ -634,6 +634,10 @@
 pos = VisiblePosition(m_selection.extent(), m_selection.affinity()).right(true);
 break;
 case WordGranularity:
+if (visualWordMovementEnabled()) {
+pos = rightWordPosition(VisiblePosition(m_selection.extent(), m_selection.affinity()));
+break;
+}
 case SentenceGranularity:
 case LineGranularity:
 case ParagraphGranularity:
@@ -805,6 +809,10 @@
 pos = VisiblePosition(m_selection.extent(), m_selection.affinity()).left(true);
 break;
 case WordGranularity:
+if (visualWordMovementEnabled()) {
+pos = leftWordPosition(VisiblePosition(m_selection.extent(), m_selection.affinity()));
+break;
+}
 case SentenceGranularity:
 case LineGranularity:
 case ParagraphGranularity:
@@ -1957,6 +1965,12 @@
 return selectStartTarget->dispatchEvent(Event::create(eventNames().selectstartEvent, true, true));
 }
 
+inline bool FrameSelection::visualWordMovementEnabled() const
+{
+Settings* settings = m_frame ? m_frame->settings() : 0;
+return settings && settings->visualWordMov

[webkit-changes] [99002] trunk/Source/WebCore

2011-11-01 Thread xji
Title: [99002] trunk/Source/WebCore








Revision 99002
Author x...@chromium.org
Date 2011-11-01 15:06:46 -0700 (Tue, 01 Nov 2011)


Log Message
Refactor: change Scrollable::m_scrollOrigin from protected to private.
https://bugs.webkit.org/show_bug.cgi?id=71236

Reviewed by Darin Adler.

Only refactor, no new tests needed.

* page/FrameView.cpp:
(WebCore::FrameView::scrollXForFixedPosition):
(WebCore::FrameView::scrollYForFixedPosition):
* platform/ScrollView.cpp:
(WebCore::ScrollView::maximumScrollPosition):
(WebCore::ScrollView::minimumScrollPosition):
(WebCore::ScrollView::setScrollOffset):
(WebCore::ScrollView::scrollPosition):
(WebCore::ScrollView::overhangAmount):
(WebCore::ScrollView::updateScrollbars):
(WebCore::ScrollView::wheelEvent):
* platform/ScrollView.h:
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::setScrollOrigin):
(WebCore::ScrollableArea::setScrollOriginX):
(WebCore::ScrollableArea::setScrollOriginY):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo):
(WebCore::RenderLayer::scrollPosition):
(WebCore::RenderLayer::minimumScrollPosition):
(WebCore::RenderLayer::maximumScrollPosition):
(WebCore::RenderLayer::computeScrollDimensions):
* rendering/RenderLayer.h:
(WebCore::RenderLayer::scrollXOffset):
(WebCore::RenderLayer::scrollYOffset):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/page/FrameView.cpp
trunk/Source/WebCore/platform/ScrollView.cpp
trunk/Source/WebCore/platform/ScrollView.h
trunk/Source/WebCore/platform/ScrollableArea.h
trunk/Source/WebCore/rendering/RenderLayer.cpp
trunk/Source/WebCore/rendering/RenderLayer.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (99001 => 99002)

--- trunk/Source/WebCore/ChangeLog	2011-11-01 21:54:05 UTC (rev 99001)
+++ trunk/Source/WebCore/ChangeLog	2011-11-01 22:06:46 UTC (rev 99002)
@@ -1,3 +1,38 @@
+2011-11-01  Xiaomei Ji  
+
+Refactor: change Scrollable::m_scrollOrigin from protected to private.
+https://bugs.webkit.org/show_bug.cgi?id=71236
+
+Reviewed by Darin Adler.
+
+Only refactor, no new tests needed.
+
+* page/FrameView.cpp:
+(WebCore::FrameView::scrollXForFixedPosition):
+(WebCore::FrameView::scrollYForFixedPosition):
+* platform/ScrollView.cpp:
+(WebCore::ScrollView::maximumScrollPosition):
+(WebCore::ScrollView::minimumScrollPosition):
+(WebCore::ScrollView::setScrollOffset):
+(WebCore::ScrollView::scrollPosition):
+(WebCore::ScrollView::overhangAmount):
+(WebCore::ScrollView::updateScrollbars):
+(WebCore::ScrollView::wheelEvent):
+* platform/ScrollView.h:
+* platform/ScrollableArea.h:
+(WebCore::ScrollableArea::setScrollOrigin):
+(WebCore::ScrollableArea::setScrollOriginX):
+(WebCore::ScrollableArea::setScrollOriginY):
+* rendering/RenderLayer.cpp:
+(WebCore::RenderLayer::scrollTo):
+(WebCore::RenderLayer::scrollPosition):
+(WebCore::RenderLayer::minimumScrollPosition):
+(WebCore::RenderLayer::maximumScrollPosition):
+(WebCore::RenderLayer::computeScrollDimensions):
+* rendering/RenderLayer.h:
+(WebCore::RenderLayer::scrollXOffset):
+(WebCore::RenderLayer::scrollYOffset):
+
 2011-11-01  Dominic Cooney  
 
 display: table-cell and box-sizing: border-box calculates content-box height


Modified: trunk/Source/WebCore/page/FrameView.cpp (99001 => 99002)

--- trunk/Source/WebCore/page/FrameView.cpp	2011-11-01 21:54:05 UTC (rev 99001)
+++ trunk/Source/WebCore/page/FrameView.cpp	2011-11-01 22:06:46 UTC (rev 99002)
@@ -1367,7 +1367,7 @@
 
 LayoutUnit x = scrollX();
 
-if (!ScrollView::scrollOrigin().x()) {
+if (!scrollOrigin().x()) {
 if (x < 0)
 x = 0;
 else if (x > maxX)
@@ -1402,7 +1402,7 @@
 
 LayoutUnit y = scrollY();
 
-if (!ScrollView::scrollOrigin().y()) {
+if (!scrollOrigin().y()) {
 if (y < 0)
 y = 0;
 else if (y > maxY)


Modified: trunk/Source/WebCore/platform/ScrollView.cpp (99001 => 99002)

--- trunk/Source/WebCore/platform/ScrollView.cpp	2011-11-01 21:54:05 UTC (rev 99001)
+++ trunk/Source/WebCore/platform/ScrollView.cpp	2011-11-01 22:06:46 UTC (rev 99002)
@@ -296,14 +296,14 @@
 
 IntPoint ScrollView::maximumScrollPosition() const
 {
-IntPoint maximumOffset(contentsWidth() - visibleWidth() - m_scrollOrigin.x(), contentsHeight() - visibleHeight() - m_scrollOrigin.y());
+IntPoint maximumOffset(contentsWidth() - visibleWidth() - scrollOrigin().x(), contentsHeight() - visibleHeight() - scrollOrigin().y());
 maximumOffset.clampNegativeToZero();
 return maximumOffset;
 }
 
 IntPoint ScrollView::minimumScrollPosition() const
 {
-return IntPoint(-m_scrollOrigin.x(), -m_scrollOrigin.y());
+return IntPoint(-scrollOrigin().x(), -scrollOrigin().y());
 }
 
 IntPoint ScrollView::adjustScrollPositionWithinRange(const IntPoint& scrollPoint) const
@@ -337,8

[webkit-changes] [98430] trunk/LayoutTests

2011-10-25 Thread xji
Title: [98430] trunk/LayoutTests








Revision 98430
Author x...@chromium.org
Date 2011-10-25 22:17:48 -0700 (Tue, 25 Oct 2011)


Log Message
Disable editing/selection/move-by-word-visually-inline-block-positioned-element.html in QT after r98428.

* platform/qt/Skipped:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/qt/Skipped




Diff

Modified: trunk/LayoutTests/ChangeLog (98429 => 98430)

--- trunk/LayoutTests/ChangeLog	2011-10-26 05:02:41 UTC (rev 98429)
+++ trunk/LayoutTests/ChangeLog	2011-10-26 05:17:48 UTC (rev 98430)
@@ -1,5 +1,11 @@
 2011-10-25  Xiaomei Ji  
 
+Disable editing/selection/move-by-word-visually-inline-block-positioned-element.html in QT after r98428.
+
+* platform/qt/Skipped:
+
+2011-10-25  Xiaomei Ji  
+
 --webkit-visual-word does not work in multi-line
 https://bugs.webkit.org/show_bug.cgi?id=61344
 


Modified: trunk/LayoutTests/platform/qt/Skipped (98429 => 98430)

--- trunk/LayoutTests/platform/qt/Skipped	2011-10-26 05:02:41 UTC (rev 98429)
+++ trunk/LayoutTests/platform/qt/Skipped	2011-10-26 05:17:48 UTC (rev 98430)
@@ -2096,6 +2096,7 @@
 editing/selection/move-by-word-visually-null-box.html
 editing/selection/move-by-word-visually-single-space-inline-element.html
 editing/selection/move-by-word-visually-single-space-one-element.html
+editing/selection/move-by-word-visually-inline-block-positioned-element.html
 
 # [Qt] New tests introduced in r84742 fail
 # https://bugs.webkit.org/show_bug.cgi?id=59334






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [98428] trunk

2011-10-25 Thread xji
Title: [98428] trunk








Revision 98428
Author x...@chromium.org
Date 2011-10-25 21:57:39 -0700 (Tue, 25 Oct 2011)


Log Message
--webkit-visual-word does not work in multi-line
https://bugs.webkit.org/show_bug.cgi?id=61344

Reviewed by Ryosuke Niwa.

Source/WebCore: 

Get next or previous root inline box (which is not in the same
render object as the current root inline box) by traversing DOM node.

Test: editing/selection/move-by-word-visually-inline-block-positioned-element.html

* editing/visible_units.cpp:
(WebCore::previousRootInlineBox):
(WebCore::nextRootInlineBox):
(WebCore::leftInlineBox):
(WebCore::rightInlineBox):

LayoutTests: 

* editing/selection/move-by-word-visually-inline-block-positioned-element-expected.txt: Added.
* editing/selection/move-by-word-visually-inline-block-positioned-element.html: Added.
* editing/selection/move-by-word-visually-multi-line-expected.txt:
* editing/selection/move-by-word-visually-single-space-one-element-expected.txt:
* editing/selection/move-by-word-visually-single-space-one-element.html:
* platform/gtk/editing/selection/move-by-word-visually-multi-line-expected.txt:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/editing/selection/move-by-word-visually-multi-line-expected.txt
trunk/LayoutTests/editing/selection/move-by-word-visually-single-space-one-element-expected.txt
trunk/LayoutTests/editing/selection/move-by-word-visually-single-space-one-element.html
trunk/LayoutTests/platform/gtk/editing/selection/move-by-word-visually-multi-line-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/editing/visible_units.cpp


Added Paths

trunk/LayoutTests/editing/selection/move-by-word-visually-inline-block-positioned-element-expected.txt
trunk/LayoutTests/editing/selection/move-by-word-visually-inline-block-positioned-element.html




Diff

Modified: trunk/LayoutTests/ChangeLog (98427 => 98428)

--- trunk/LayoutTests/ChangeLog	2011-10-26 03:06:58 UTC (rev 98427)
+++ trunk/LayoutTests/ChangeLog	2011-10-26 04:57:39 UTC (rev 98428)
@@ -1,3 +1,17 @@
+2011-10-25  Xiaomei Ji  
+
+--webkit-visual-word does not work in multi-line
+https://bugs.webkit.org/show_bug.cgi?id=61344
+
+Reviewed by Ryosuke Niwa.
+
+* editing/selection/move-by-word-visually-inline-block-positioned-element-expected.txt: Added.
+* editing/selection/move-by-word-visually-inline-block-positioned-element.html: Added.
+* editing/selection/move-by-word-visually-multi-line-expected.txt:
+* editing/selection/move-by-word-visually-single-space-one-element-expected.txt:
+* editing/selection/move-by-word-visually-single-space-one-element.html:
+* platform/gtk/editing/selection/move-by-word-visually-multi-line-expected.txt:
+
 2011-10-25  Erik Arvidsson  
 
 Fix ad hoc test.


Added: trunk/LayoutTests/editing/selection/move-by-word-visually-inline-block-positioned-element-expected.txt (0 => 98428)

--- trunk/LayoutTests/editing/selection/move-by-word-visually-inline-block-positioned-element-expected.txt	(rev 0)
+++ trunk/LayoutTests/editing/selection/move-by-word-visually-inline-block-positioned-element-expected.txt	2011-10-26 04:57:39 UTC (rev 98428)
@@ -0,0 +1,38 @@
+
+ Move By Word 
+Test 1, LTR:
+Move right by one word
+"begin start"[0, 6, 11], "abc def"[0, 4, 7], "end ing"[0, 4, 7], "this is float"[0, 5, 8, 13], "this is fixed"[5, 8, 13], "this is relative"[0, 5, 8, 16], "this is absolute"[0, 5, 8, 16]
+Move left by one word
+"this is absolute"[16, 8, 5, 0], "this is relative"[8, 5, 0], "this is fixed"[8, 5], "this is float"[8, 5, 0], "end ing"[4, 0], "abc def"[4, 0], "begin start"[6, 0]
+Test 2, LTR:
+Move right by one word
+"abc def"[0, 4, 7], "end ing"[0, 4, 7], "this is float"[0, 5, 8, 13], "this is fixed"[5, 8, 13], "this is relative"[0, 5, 8, 16], "this is absolute"[0, 5, 8, 16]
+Move left by one word
+"this is absolute"[16, 8, 5, 0], "this is relative"[8, 5, 0], "this is fixed"[8, 5], "this is float"[8, 5, 0], "end ing"[4, 0], "abc def"[4, 0], "begin start"[6, 0]
+Test 3, LTR:
+Move right by one word
+"end ing"[0, 4, 7], "this is float"[0, 5, 8, 13], "this is fixed"[5, 8, 13], "this is relative"[0, 5, 8, 16], "this is absolute"[0, 5, 8, 16]
+Move left by one word
+"this is absolute"[16, 8, 5, 0], "this is relative"[8, 5, 0], "this is fixed"[8, 5], "this is float"[8, 5, 0], "end ing"[4, 0], "abc def"[4, 0], "begin start"[6, 0]
+Test 4, LTR:
+Move right by one word
+"this is float"[0, 5, 8, 13], "this is fixed"[5, 8, 13], "this is relative"[0, 5, 8, 16], "this is absolute"[0, 5, 8, 16]
+Move left by one word
+"this is absolute"[16, 8, 5, 0], "this is relative"[8, 5, 0], "this is fixed"[8, 5], "this is float"[8, 5, 0], "end ing"[4, 0], "abc def"[4, 0], "begin start"[6, 0]
+Test 5, LTR:
+Move right by one word
+"this is fixed"[0, 5, 8, 13], "this is relative"[0, 5, 8, 16], "this is absolute"[0, 5, 8, 16]
+Move left by one word
+"this is absolute"[16, 8, 5, 0]

[webkit-changes] [94702] trunk/LayoutTests

2011-09-07 Thread xji
Title: [94702] trunk/LayoutTests








Revision 94702
Author x...@chromium.org
Date 2011-09-07 12:51:24 -0700 (Wed, 07 Sep 2011)


Log Message
Rebaseline after r93935.

* platform/gtk/editing/selection/move-by-word-visually-multi-line-expected.txt:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/gtk/editing/selection/move-by-word-visually-multi-line-expected.txt




Diff

Modified: trunk/LayoutTests/ChangeLog (94701 => 94702)

--- trunk/LayoutTests/ChangeLog	2011-09-07 19:40:41 UTC (rev 94701)
+++ trunk/LayoutTests/ChangeLog	2011-09-07 19:51:24 UTC (rev 94702)
@@ -1,3 +1,9 @@
+2011-09-07  Xiaomei Ji  
+
+Rebaseline after r93935.
+
+* platform/gtk/editing/selection/move-by-word-visually-multi-line-expected.txt:
+
 2011-09-07  Elliot Poger  
 
 now that layout tests distinguish between Core Graphics and Skia


Modified: trunk/LayoutTests/platform/gtk/editing/selection/move-by-word-visually-multi-line-expected.txt (94701 => 94702)

--- trunk/LayoutTests/platform/gtk/editing/selection/move-by-word-visually-multi-line-expected.txt	2011-09-07 19:40:41 UTC (rev 94701)
+++ trunk/LayoutTests/platform/gtk/editing/selection/move-by-word-visually-multi-line-expected.txt	2011-09-07 19:51:24 UTC (rev 94702)
@@ -7,9 +7,17 @@
 "opq rst uvw xyz"[15, 12, 8, 4, 0], "abc def ghi jkl mn "[16, 12, 8, 4, 0]
 Test 2, LTR:
 Move right by one word
-"abc def ghi jkl mn "[0, 4, 8, 12, 16, 18], "opq rst uvw xyz"[0, 4, 8, 12, 15]
+"abc def ghi jkl mn "[0, 4, 8, 12, 16, 18]FAIL expected: ["abc def ghi jkl mn "[ 0,  4,  8,  12,  16,  18, ]"opq rst uvw xyz"[ 0,  4,  8,  12,  15]
+"abc def ghi jkl mn "[18, 18]   FAIL expected "opq rst uvw xyz"[ 0]
+[0, 0]   FAIL expected "opq rst uvw xyz"[ 0]
+[0, 0]   FAIL expected "opq rst uvw xyz"[ 0]
+[0, 0]   FAIL expected "opq rst uvw xyz"[ 0]
 Move left by one word
-"opq rst uvw xyz"[15, 12, 8, 4, 0], "abc def ghi jkl mn "[16, 12, 8, 4, 0]
+"opq rst uvw xyz"[15, 12, 8, 4, 0]FAIL expected: ["opq rst uvw xyz"[ 15,  12,  8,  4,  0, ]"abc def ghi jkl mn "[ 16,  12,  8,  4,  0]
+"opq rst uvw xyz"[0, 0]   FAIL expected "abc def ghi jkl mn "[ 16]
+[0, 0]   FAIL expected "abc def ghi jkl mn "[ 16]
+[0, 0]   FAIL expected "abc def ghi jkl mn "[ 16]
+[0, 0]   FAIL expected "abc def ghi jkl mn "[ 16]
 Test 3, LTR:
 Move right by one word
 "AAA AAA AAA AAA "[0, 3, 8, 11, 16], "AAA AAA AAA AAA"[0, 3, 8, 11, 15]
@@ -17,9 +25,17 @@
 "AAA AAA AAA AAA"[15, 11, 8, 3, 0], "AAA AAA AAA AAA "[11, 8, 3, 0]
 Test 4, LTR:
 Move right by one word
-"AAA AAA AAA AAA "[0, 3, 8, 11, 16], "AAA AAA AAA AAA"[0, 3, 8, 11, 15]
+"AAA AAA AAA AAA "[0, 3, 8, 11, 16]FAIL expected: ["AAA AAA AAA AAA "[ 0,  3,  8,  11,  16, ]"AAA AAA AAA AAA"[ 0,  3,  8,  11,  15]
+"AAA AAA AAA AAA "[16, 16]   FAIL expected "AAA AAA AAA AAA"[ 0]
+[0, 0]   FAIL expected "AAA AAA AAA AAA"[ 0]
+[0, 0]   FAIL expected "AAA AAA AAA AAA"[ 0]
+[0, 0]   FAIL expected "AAA AAA AAA AAA"[ 0]
 Move left by one word
-"AAA AAA AAA AAA"[15, 11, 8, 3, 0], "AAA AAA AAA AAA "[11, 8, 3, 0]
+"AAA AAA AAA AAA"[15, 11, 8, 3, 0]FAIL expected: ["AAA AAA AAA AAA"[ 15,  11,  8,  3,  0, ]"AAA AAA AAA AAA "[ 11,  8,  3,  0]
+"AAA AAA AAA AAA"[0, 0]   FAIL expected "AAA AAA AAA AAA "[ 11]
+[0, 0]   FAIL expected "AAA AAA AAA AAA "[ 11]
+[0, 0]   FAIL expected "AAA AAA AAA AAA "[ 11]
+[0, 0]   FAIL expected "AAA AAA AAA AAA "[ 11]
 Test 5, LTR:
 Move right by one word
 " abc def AAA AAA hij AAA AAA uvw xyz "[1, 5, 9, 12, 17, 21, 25, 29, 33, 37], "AAA kj AAA mn opq AAA AAA"[0, 4, 7, 11, 14, 18, 22, 25]
@@ -27,9 +43,17 @@
 "AAA kj AAA mn opq AAA AAA"[25, 22, 18, 14, 11, 7, 4, 0], " abc def AAA AAA hij AAA AAA uvw xyz "[33, 29, 25, 21, 17, 12, 9, 5, 1]
 Test 6, LTR:
 Move right by one word
-" abc def AAA AAA hij AAA AAA uvw xyz "[1, 5, 9, 12, 17, 21, 25, 29, 33, 36], "AAA kj AAA mn opq AAA AAA"[0, 4, 7, 11, 14, 18, 22, 25]
+" abc def AAA AAA hij AAA AAA uvw xyz "[1, 5, 9, 12, 17, 21, 25, 29, 33, 36]FAIL expected: [" abc def AAA AAA hij AAA AAA uvw xyz "[ 1,  5,  9,  12,  17,  21,  25,  29,  33,  36, ]"AAA kj AAA mn opq AAA AAA"[ 0,  4,  7,  11,  14,  18,  22,  25]
+" abc def AAA AAA hij AAA AAA uvw xyz "[36, 36]   FAIL expected "AAA kj AAA mn opq AAA AAA"[ 0]
+[0, 0]   FAIL expected "AAA kj AAA mn opq AAA AAA"[ 0]
+[0, 0]   FAIL expected "AAA kj AAA mn opq AAA AAA"[ 0]
+[0, 0]   FAIL expected "AAA kj AAA mn opq AAA AAA"[ 0]
 Move left by one word
-"AAA kj AAA mn opq AAA AAA"[25, 22, 18, 14, 11, 7, 4, 0], " abc def AAA AAA hij AAA AAA uvw xyz "[33, 29, 25, 21, 17, 12, 9, 5, 1]
+"AAA kj AAA mn opq AAA AAA"[25, 22, 18, 14, 11, 7, 4, 0]FAIL expected: ["AAA kj AAA mn opq AAA AAA"[ 25,  22,  18,  14,  11,  7,  4,  0, ]" abc def AAA AAA hij AAA AAA uvw xyz "[ 33,  29,  25,  21,  17,  12,  9,  5,  1]
+"AAA kj AAA mn opq AAA AAA"[0, 0]   FAIL expected " abc def AAA AAA hij AAA AAA uvw xyz "[ 33]
+[0, 0]   FAIL expected " abc def AAA AAA hij AAA AAA uvw xyz "[ 33]
+[0, 0]   FAIL expected " abc def AAA AAA hij AAA AAA uvw xyz

[webkit-changes] [93935] trunk

2011-08-26 Thread xji
Title: [93935] trunk








Revision 93935
Author x...@chromium.org
Date 2011-08-26 21:42:59 -0700 (Fri, 26 Aug 2011)


Log Message
Regression(91788): Bad cast in WebCore::blockWithNextLineBox
https://bugs.webkit.org/show_bug.cgi?id=66090

Reviewed by Ryosuke Niwa.

Source/WebCore:

This is more like (but not exactly) a revert of r91788.
It does not search for previous or next root inline box in different
render object, which completely eliminates the cause of this issue.
And it removes createPositionAvoidingIgnoredNode(), changed its caller
to use createLegacyEditingPosition(). createPositionAvoidingIgnoredNode
is not correct when node is a replaced element whose caretMaxOffset
could be greater than 1.

Tests: editing/selection/move-by-word-visually-crash-test-1.html
   editing/selection/move-by-word-visually-crash-test-2.html
   editing/selection/move-by-word-visually-crash-test-3.html
   editing/selection/move-by-word-visually-crash-test-4.html

* editing/htmlediting.cpp:
* editing/htmlediting.h:
* editing/visible_units.cpp:
(WebCore::previousWordBreakInBoxInsideBlockWithSameDirectionality):
(WebCore::leftmostPositionInRTLBoxInLTRBlock):
(WebCore::rightmostPositionInLTRBoxInRTLBlock):
(WebCore::nextWordBreakInBoxInsideBlockWithDifferentDirectionality):
(WebCore::appendPositionAtLogicalEndOfLine):
(WebCore::leftInlineBox):
(WebCore::rightInlineBox):

LayoutTests:

* editing/selection/move-by-word-visually-crash-test-1-expected.txt: Added.
* editing/selection/move-by-word-visually-crash-test-1.html: Added.
* editing/selection/move-by-word-visually-crash-test-2-expected.txt: Added.
* editing/selection/move-by-word-visually-crash-test-2.html: Added.
* editing/selection/move-by-word-visually-crash-test-3-expected.txt: Added.
* editing/selection/move-by-word-visually-crash-test-3.html: Added.
* editing/selection/move-by-word-visually-crash-test-4-expected.txt: Added.
* editing/selection/move-by-word-visually-crash-test-4.html: Added.
* editing/selection/move-by-word-visually-multi-line-expected.txt:
* editing/selection/resources/move-by-word-visually.js:
(runMoveLeftRight):

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/editing/selection/move-by-word-visually-multi-line-expected.txt
trunk/LayoutTests/editing/selection/resources/move-by-word-visually.js
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/editing/htmlediting.cpp
trunk/Source/WebCore/editing/htmlediting.h
trunk/Source/WebCore/editing/visible_units.cpp


Added Paths

trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-1-expected.txt
trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-1.html
trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-2-expected.txt
trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-2.html
trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-3-expected.txt
trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-3.html
trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-4-expected.txt
trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-4.html




Diff

Modified: trunk/LayoutTests/ChangeLog (93934 => 93935)

--- trunk/LayoutTests/ChangeLog	2011-08-27 04:19:22 UTC (rev 93934)
+++ trunk/LayoutTests/ChangeLog	2011-08-27 04:42:59 UTC (rev 93935)
@@ -1,3 +1,22 @@
+2011-08-26  Xiaomei Ji  
+
+Regression(91788): Bad cast in WebCore::blockWithNextLineBox
+https://bugs.webkit.org/show_bug.cgi?id=66090
+
+Reviewed by Ryosuke Niwa.
+
+* editing/selection/move-by-word-visually-crash-test-1-expected.txt: Added.
+* editing/selection/move-by-word-visually-crash-test-1.html: Added.
+* editing/selection/move-by-word-visually-crash-test-2-expected.txt: Added.
+* editing/selection/move-by-word-visually-crash-test-2.html: Added.
+* editing/selection/move-by-word-visually-crash-test-3-expected.txt: Added.
+* editing/selection/move-by-word-visually-crash-test-3.html: Added.
+* editing/selection/move-by-word-visually-crash-test-4-expected.txt: Added.
+* editing/selection/move-by-word-visually-crash-test-4.html: Added.
+* editing/selection/move-by-word-visually-multi-line-expected.txt:
+* editing/selection/resources/move-by-word-visually.js:
+(runMoveLeftRight):
+
 2011-08-26  Gavin Barraclough  
 
 DFG JIT - ArithMod may clobber operands.


Added: trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-1-expected.txt (0 => 93935)

--- trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-1-expected.txt	(rev 0)
+++ trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-1-expected.txt	2011-08-27 04:42:59 UTC (rev 93935)
@@ -0,0 +1 @@
+Crash test passed


Added: trunk/LayoutTests/editing/selection/move-by-word-visually-crash-test-1.html (0 => 93935)

--- trunk/LayoutTests/editing/selection/move-by-word-visuall

[webkit-changes] [93368] trunk/Source/WebCore

2011-08-18 Thread xji
Title: [93368] trunk/Source/WebCore








Revision 93368
Author x...@chromium.org
Date 2011-08-18 16:05:42 -0700 (Thu, 18 Aug 2011)


Log Message
--webkit-visual-word renaming right/leftWordPositionAcrossBoundary
https://bugs.webkit.org/show_bug.cgi?id=66436

Reviewed by Ryosuke Niwa.

Rename them to right/leftWordPositionIgnoringEditingBoundary.

* editing/visible_units.cpp:
(WebCore::leftWordPositionIgnoringEditingBoundary):
(WebCore::rightWordPositionIgnoringEditingBoundary):
(WebCore::leftWordPosition):
(WebCore::rightWordPosition):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/editing/visible_units.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (93367 => 93368)

--- trunk/Source/WebCore/ChangeLog	2011-08-18 23:05:19 UTC (rev 93367)
+++ trunk/Source/WebCore/ChangeLog	2011-08-18 23:05:42 UTC (rev 93368)
@@ -1,3 +1,18 @@
+2011-08-18  Xiaomei Ji  
+
+--webkit-visual-word renaming right/leftWordPositionAcrossBoundary
+https://bugs.webkit.org/show_bug.cgi?id=66436
+
+Reviewed by Ryosuke Niwa.
+
+Rename them to right/leftWordPositionIgnoringEditingBoundary.
+
+* editing/visible_units.cpp:
+(WebCore::leftWordPositionIgnoringEditingBoundary):
+(WebCore::rightWordPositionIgnoringEditingBoundary):
+(WebCore::leftWordPosition):
+(WebCore::rightWordPosition):
+
 2011-08-18  Jeff Miller  
 
 Soft link against AVFoundationCF and CoreMedia


Modified: trunk/Source/WebCore/editing/visible_units.cpp (93367 => 93368)

--- trunk/Source/WebCore/editing/visible_units.cpp	2011-08-18 23:05:19 UTC (rev 93367)
+++ trunk/Source/WebCore/editing/visible_units.cpp	2011-08-18 23:05:42 UTC (rev 93368)
@@ -1595,7 +1595,7 @@
 && offsetOfWordBreak != box->caretMaxOffset() && offsetOfWordBreak != box->caretMinOffset();
 }
 
-static VisiblePosition leftWordPositionAcrossBoundary(const VisiblePosition& visiblePosition)
+static VisiblePosition leftWordPositionIgnoringEditingBoundary(const VisiblePosition& visiblePosition)
 {
 InlineBox* box;
 int offset;
@@ -1636,7 +1636,7 @@
 return leftWordBoundary(leftInlineBox(box, blockDirection), invalidOffset, blockDirection);
 }
 
-static VisiblePosition rightWordPositionAcrossBoundary(const VisiblePosition& visiblePosition)
+static VisiblePosition rightWordPositionIgnoringEditingBoundary(const VisiblePosition& visiblePosition)
 {
 InlineBox* box;
 int offset;
@@ -1678,7 +1678,7 @@
 if (visiblePosition.isNull())
 return VisiblePosition();
 
-VisiblePosition leftWordBreak = leftWordPositionAcrossBoundary(visiblePosition);
+VisiblePosition leftWordBreak = leftWordPositionIgnoringEditingBoundary(visiblePosition);
 return visiblePosition.honorEditableBoundaryAtOrBefore(leftWordBreak);
 }
 
@@ -1687,7 +1687,7 @@
 if (visiblePosition.isNull())
 return VisiblePosition();
 
-VisiblePosition rightWordBreak = rightWordPositionAcrossBoundary(visiblePosition);
+VisiblePosition rightWordBreak = rightWordPositionIgnoringEditingBoundary(visiblePosition);
 return visiblePosition.honorEditableBoundaryAtOrBefore(rightWordBreak);
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [91077] trunk

2011-07-15 Thread xji
Title: [91077] trunk








Revision 91077
Author x...@chromium.org
Date 2011-07-15 10:23:54 -0700 (Fri, 15 Jul 2011)


Log Message
--webkit-visual-word crash on mixed editability
https://bugs.webkit.org/show_bug.cgi?id=61978

--webkit-visual-word crashes (VisiblePosition.getInlineBoxAndOffset could return null box)
https://bugs.webkit.org/show_bug.cgi?id=62814

Reviewed by Ryosuke Niwa.

Source/WebCore: 

Replace previousWordPosition/nextWordPosition with previousBoundary/nextBoundary which do
not honor editable bounary. Honor editable boundary as the last stage of leftWordPosition
and rightWordPosition.

Check previousBoundary/nextBoundary against NULL.  Have a static function to encapsulate the
usage of getInlineBoxAndOffset and check the visible position is not NULL before passing to 
getInlineBoxAndOffset. Check the box returned from getInlineBoxAndOffset is not NULL before
accessing.

Test: editing/selection/move-by-word-visually-null-box.html

* editing/visible_units.cpp:
(WebCore::positionIsInBox):
(WebCore::previousWordBreakInBoxInsideBlockWithSameDirectionality):
(WebCore::lastWordBreakInBox):
(WebCore::positionIsVisuallyOrderedInBoxInBlockWithDifferentDirectionality):
(WebCore::nextWordBreakInBoxInsideBlockWithDifferentDirectionality):
(WebCore::positionIsInsideBox):
(WebCore::leftWordPositionAcrossBoundary):
(WebCore::rightWordPositionAcrossBoundary):
(WebCore::leftWordPosition):
(WebCore::rightWordPosition):

LayoutTests: 

Add a standalone test for testing getInlineBoxAndOffset returning null box.

* editing/selection/move-by-word-visually-null-box-expected.txt: Added.
* editing/selection/move-by-word-visually-null-box.html: Added.
* editing/selection/move-by-word-visually-others-expected.txt:
* editing/selection/move-by-word-visually-others.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/editing/selection/move-by-word-visually-others-expected.txt
trunk/LayoutTests/editing/selection/move-by-word-visually-others.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/editing/visible_units.cpp


Added Paths

trunk/LayoutTests/editing/selection/move-by-word-visually-null-box-expected.txt
trunk/LayoutTests/editing/selection/move-by-word-visually-null-box.html




Diff

Modified: trunk/LayoutTests/ChangeLog (91076 => 91077)

--- trunk/LayoutTests/ChangeLog	2011-07-15 17:17:57 UTC (rev 91076)
+++ trunk/LayoutTests/ChangeLog	2011-07-15 17:23:54 UTC (rev 91077)
@@ -1,3 +1,20 @@
+2011-07-15  Xiaomei Ji  
+
+--webkit-visual-word crash on mixed editability
+https://bugs.webkit.org/show_bug.cgi?id=61978
+
+--webkit-visual-word crashes (VisiblePosition.getInlineBoxAndOffset could return null box)
+https://bugs.webkit.org/show_bug.cgi?id=62814
+
+Reviewed by Ryosuke Niwa.
+
+Add a standalone test for testing getInlineBoxAndOffset returning null box.
+
+* editing/selection/move-by-word-visually-null-box-expected.txt: Added.
+* editing/selection/move-by-word-visually-null-box.html: Added.
+* editing/selection/move-by-word-visually-others-expected.txt:
+* editing/selection/move-by-word-visually-others.html:
+
 2011-07-15  Stephen White  
 
 Unreviewed.  Mopping up some more expectations after r91069.


Added: trunk/LayoutTests/editing/selection/move-by-word-visually-null-box-expected.txt (0 => 91077)

--- trunk/LayoutTests/editing/selection/move-by-word-visually-null-box-expected.txt	(rev 0)
+++ trunk/LayoutTests/editing/selection/move-by-word-visually-null-box-expected.txt	2011-07-15 17:23:54 UTC (rev 91077)
@@ -0,0 +1 @@
+Crash test passed


Added: trunk/LayoutTests/editing/selection/move-by-word-visually-null-box.html (0 => 91077)

--- trunk/LayoutTests/editing/selection/move-by-word-visually-null-box.html	(rev 0)
+++ trunk/LayoutTests/editing/selection/move-by-word-visually-null-box.html	2011-07-15 17:23:54 UTC (rev 91077)
@@ -0,0 +1,24 @@
+
+
+_onload_ = function() {
+try {
+runTest();
+
+// Test NULL VisiblePosition.
+var selection = getSelection();
+selection.setPosition(0, 0);
+selection.modify("move", "right", "-webkit-visual-word");
+document.body.innerHTML = "Crash test passed";
+} finally {
+}
+};
+
+if (window.layoutTestController)
+layoutTestController.dumpAsText();
+
+
+
+
+


Modified: trunk/LayoutTests/editing/selection/move-by-word-visually-others-expected.txt (91076 => 91077)

--- trunk/LayoutTests/editing/selection/move-by-word-visually-others-expected.txt	2011-07-15 17:17:57 UTC (rev 91076)
+++ trunk/LayoutTests/editing/selection/move-by-word-visually-others-expected.txt	2011-07-15 17:23:54 UTC (rev 91077)
@@ -221,4 +221,14 @@
 "䤫䡱暘倎厘疂崝烵 abc def"[0, 1, 2, 3, 4, 9, 10, 11, 17, 21]
 Move left by one word
 "䤫䡱暘倎厘疂崝烵 abc def"[24, 21, 17, 11, 10, 9, 4, 3, 2, 1, 0]
+Test 44, LTR:
+Move right by one word
+"abc def "[0, 4]
+Move left by one word
+" hij opq"[8, 5

[webkit-changes] [88359] trunk

2011-06-08 Thread xji
Title: [88359] trunk








Revision 88359
Author x...@chromium.org
Date 2011-06-08 11:03:07 -0700 (Wed, 08 Jun 2011)


Log Message
2011-05-25  Xiaomei Ji  

Reviewed by Ryosuke Niwa.

--webkit-visual-word does not work well in words separated by multiple spaces
https://bugs.webkit.org/show_bug.cgi?id=61324

Remove positionBeforeNextWord and positionAfterPreviousWord short-cuts. They try to find the
right word boundary (before the space or after the space) by using previousWordPosition and
nextWordPosition. But they assume words are separated by single space and are not correct 
for words separated by multiple spaces and words not separated by space.

Consider positionBeforeNextWord() for example, 

First, it checks whether the current position is after the current word by checking current
position's previousWordPosition's nextWordPosition is the same as current position, which is
wrong for words separated by multiple spaces. For example, given words A and B separated by 
3 continuous spaces "A   B", position "A|", "A |", and "A  |" should all be considered as 
position after current word. But for position "A |", its previousWordPosition's 
nextWordPosition is position "A|", which is different from its current position, so the
current position is not considered as a position after current word, consequently,
instead of returning the right position as "A   |B", positionBeforeNextWord returns the
position before next next word, as "A   B |C". Similar happens for position "A  |".

Second, given 3 Chinese words "ABC" that are not segmented by space, when cursor is at 
"A|BC", positionBeforeNextWord() returns the same position after calling current position's
nextWordPosition's previousWordPosition. It should returns position "AB|C".

For those cases, we will have to collect all the word breaks inside the box and look for
the one at left or right of current position.

* editing/visible_units.cpp:
(WebCore::leftWordPosition):
(WebCore::rightWordPosition):
2011-05-25  Xiaomei Ji  

Reviewed by Ryosuke Niwa.

--webkit-visual-word does not work well in words separated by multiple spaces
https://bugs.webkit.org/show_bug.cgi?id=61324

Add test cases for preserving white spaces and test case for words not separated by space.

* editing/selection/move-by-word-visually-expected.txt:
* editing/selection/move-by-word-visually.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/editing/selection/move-by-word-visually-expected.txt
trunk/LayoutTests/editing/selection/move-by-word-visually.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/editing/visible_units.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (88358 => 88359)

--- trunk/LayoutTests/ChangeLog	2011-06-08 17:50:29 UTC (rev 88358)
+++ trunk/LayoutTests/ChangeLog	2011-06-08 18:03:07 UTC (rev 88359)
@@ -1,3 +1,15 @@
+2011-05-25  Xiaomei Ji  
+
+Reviewed by Ryosuke Niwa.
+
+--webkit-visual-word does not work well in words separated by multiple spaces
+https://bugs.webkit.org/show_bug.cgi?id=61324
+
+Add test cases for preserving white spaces and test case for words not separated by space.
+
+* editing/selection/move-by-word-visually-expected.txt:
+* editing/selection/move-by-word-visually.html:
+
 2011-06-08  Greg Simon  
 
 Reviewed by Dimitri Glazkov.


Modified: trunk/LayoutTests/editing/selection/move-by-word-visually-expected.txt (88358 => 88359)

--- trunk/LayoutTests/editing/selection/move-by-word-visually-expected.txt	2011-06-08 17:50:29 UTC (rev 88358)
+++ trunk/LayoutTests/editing/selection/move-by-word-visually-expected.txt	2011-06-08 18:03:07 UTC (rev 88359)
@@ -198,20 +198,125 @@
 "ABWDSUHJHabc   def   jih   FUX  FUXYR[ "[58, 52, 47, 41, 28, 34, 22, 15, 8, 4]
 Test 39, LTR:
 Move right by one word
+"abc defhij opq"[0, 4, 11, 15]
+Move left by one word
+"abc defhij opq"[18, 15, 11, 4, 0]
+Test 40, LTR:
+Move right by one word
+"abcdefhijopq"[0, 4, 11, 18, 25]
+Move left by one word
+"abcdefhijopq"[32, 25, 18, 11, 4, 0]
+Test 41, LTR:
+Move right by one word
+"abcABWdef"[0, 4, 11, 18]
+Move left by one word
+"abcABWdef"[25, 18, 11, 4, 0]
+Test 42, LTR:
+Move right by one word
+"abcdefABWDDUhijopq"[0, 4, 11, 18, 21, 32, 39]
+Move left by one word
+"abcdefABWDDUhijopq"[46, 39, 32, 21, 18, 11, 4, 0]
+Test 43, LTR:
+Move right by one word
+"abcdefhijABWDSUEJHopqrstuvw"[0, 4, 11, 18, 25, 35, 28, 46, 53, 60]
+Move left by one word
+"abcdefhijABWDSUEJHopqrstuvw"[67, 60, 53, 46, 28, 35, 25, 18, 11, 4, 0

[webkit-changes] [86966] trunk

2011-05-20 Thread xji
Title: [86966] trunk








Revision 86966
Author x...@chromium.org
Date 2011-05-20 10:45:18 -0700 (Fri, 20 May 2011)


Log Message
2011-05-20  Xiaomei Ji  

Reviewed by Ryosuke Niwa.

ctrl-arrow does not work on words separated by multiple spaces.
https://bugs.webkit.org/show_bug.cgi?id=57543.

Add the leftmost boundary of a box in RTL block or the rightmost boundary of a box in LTR
block as word break if its inlineBox is the current box and it is a word break.

* editing/visible_units.cpp:
(WebCore::previousWordBreakInBoxInsideBlockWithSameDirectionality): Add the rightmost
boundary of a box in LTR block or leftmost boundary of a box in RTL block as visually
first word break.
(WebCore::nextWordBreakInBoxInsideBlockWithDifferentDirectionality):
(WebCore::collectWordBreaksInBoxInsideBlockWithDifferntDirectionality):
(WebCore::leftWordBoundary): Fix bug change "box" to "adjacentBox".
(WebCore::rightWordBoundary): Fix bug change "box" to "adjacentBox".
2011-05-20  Xiaomei Ji  

Reviewed by Ryosuke Niwa.

ctrl-arrow does not work on words separated by multiple spaces.
https://bugs.webkit.org/show_bug.cgi?id=57543.

Add more test cases for mutiplespaces.

* editing/selection/move-by-word-visually-expected.txt:
* editing/selection/move-by-word-visually.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/editing/selection/move-by-word-visually-expected.txt
trunk/LayoutTests/editing/selection/move-by-word-visually.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/editing/visible_units.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (86965 => 86966)

--- trunk/LayoutTests/ChangeLog	2011-05-20 17:20:53 UTC (rev 86965)
+++ trunk/LayoutTests/ChangeLog	2011-05-20 17:45:18 UTC (rev 86966)
@@ -1,3 +1,15 @@
+2011-05-20  Xiaomei Ji  
+
+Reviewed by Ryosuke Niwa.
+
+ctrl-arrow does not work on words separated by multiple spaces.
+https://bugs.webkit.org/show_bug.cgi?id=57543.
+
+Add more test cases for mutiplespaces.
+
+* editing/selection/move-by-word-visually-expected.txt:
+* editing/selection/move-by-word-visually.html:
+
 2011-05-20  Andrew Scherkus  
 
 Unreviewed, updating media/event-attributes.html as passing for Chromium.


Modified: trunk/LayoutTests/editing/selection/move-by-word-visually-expected.txt (86965 => 86966)

--- trunk/LayoutTests/editing/selection/move-by-word-visually-expected.txt	2011-05-20 17:20:53 UTC (rev 86965)
+++ trunk/LayoutTests/editing/selection/move-by-word-visually-expected.txt	2011-05-20 17:45:18 UTC (rev 86966)
@@ -87,34 +87,131 @@
 "ZQB abc RIG"[11, 8, 4, 0]
 Test 18, LTR:
 Move right by one word
-"abc defhij opq"[0, 4, 15]FAIL expected: [0, 4, 11, 15]
-"abc defhij opq"[4, 15]   FAIL expected 11
-"abc defhij opq"[5, 15]   FAIL expected 11
-"abc defhij opq"[6, 15]   FAIL expected 11
-"abc defhij opq"[7, 15]   FAIL expected 11
-"abc defhij opq"[8, 15]   FAIL expected 11
+"abc defhij opq"[0, 4, 8, 15]
 Move left by one word
-"abc defhij opq"[18, 15, 4, 0]FAIL expected: [18, 15, 11, 4, 0]
-"abc defhij opq"[15, 4]   FAIL expected 11
-"abc defhij opq"[14, 4]   FAIL expected 11
-"abc defhij opq"[13, 4]   FAIL expected 11
-"abc defhij opq"[12, 4]   FAIL expected 11
+"abc defhij opq"[18, 15, 8, 4, 0]
 Test 19, LTR:
 Move right by one word
+"abcdefhijopq"[4, 8, 15, 22]
+Move left by one word
+"abcdefhijopq"[28, 22, 15, 8, 4]
+Test 20, LTR:
+Move right by one word
+"abcABWdef"[4, 8, 15]
+Move left by one word
+"abcABWdef"[21, 15, 8, 4]
+Test 21, LTR:
+Move right by one word
+"abcdefABWDDUhijopq"[4, 8, 15, 21, 29, 36]
+Move left by one word
+"abcdefABWDDUhijopq"[42, 36, 29, 21, 15, 8, 4]
+Test 22, LTR:
+Move right by one word
+"abcdefhijABWDSUEJHopqrstuvw"[4, 8, 15, 22, 35, 28, 43, 50, 57]
+Move left by one word
+"abcdefhijABWDSUEJHopqrstuvw"[63, 57, 50, 43, 28, 35, 22, 15, 8, 4]
+Test 23, LTR:
+Move right by one word
+"ABWDSUHJHFUX"[4, 21, 14, 7]
+Move left by one word
+"ABWDSUHJHFUX"[28, 7, 14, 21, 4]
+Test 24, LTR:
+Move right by one word
+"ABWabcDSU "[4, 8, 15, 21]FAIL expected: [4, 8, 15]
+"ABWabcDSU "[15, 21]   FAIL expected to stay in the same position
+"ABWabcDSU "[20, 21]   FAIL expected to stay in the same position
+"ABWabcDSU "[19, 21]   FAIL expected to stay in the same position
+Move left by one word
+"ABWabcDSU "[21, 15, 8, 4]
+Test 25, LTR:
+Move right by one word
+"ABWDSUabc   def   HJHFUX"[4, 7, 15, 22, 28, 33]
+Move left by one word
+"ABW