Changeset 19149 in webkit
- Timestamp:
- Jan 26, 2007 3:40:01 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r19148 r19149 1 2007-01-26 Mitz Pettel <mitz@webkit.org> 2 3 Reviewed by Darin. 4 5 - test and updated tests and results for 6 http://bugs.webkit.org/show_bug.cgi?id=11109 7 REGRESSION (r15471): menus are offset on eink.com 8 <rdar://problem/4824760> 9 10 * editing/execCommand/findString-2.html: 11 * editing/pasteboard/4947130.html: 12 * editing/pasteboard/drop-text-without-selection.html: 13 * editing/selection/anchor-focus1-expected.txt: 14 * editing/selection/click-before-and-after-table.html: 15 * editing/selection/drag-select-1.html: 16 * editing/selection/editable-links-expected.txt: 17 * editing/selection/mixed-editability-1.html: 18 * editing/selection/paragraph-granularity.html: 19 * editing/selection/selection-actions.html: 20 * editing/selection/word-granularity.html: 21 * fast/dom/Element/offsetLeft-offsetTop-body-quirk-expected.txt: Added. 22 * fast/dom/Element/offsetLeft-offsetTop-body-quirk.html: Added. 23 * fast/forms/drag-into-textarea.html: 24 * fast/forms/listbox-selection-2.html: 25 * fast/forms/listbox-selection.html: 26 * fast/table/click-near-anonymous-table-expected.txt: 27 * fast/table/click-near-anonymous-table.html: 28 1 29 2007-01-26 Mitz Pettel <mitz@webkit.org> 2 30 -
trunk/LayoutTests/editing/execCommand/findString-2.html
r17562 r19149 10 10 if (window.layoutTestController) { 11 11 var e = document.getElementById("selectme"); 12 // The 8 here is the default margin on the body element. 13 var x = 8 + e.offsetLeft + e.offsetWidth / 2; 14 var y = 8 + e.offsetTop + e.offsetHeight / 2; 12 var x = e.offsetLeft + e.offsetWidth / 2; 13 var y = e.offsetTop + e.offsetHeight / 2; 15 14 eventSender.mouseMoveTo(x, y); 16 15 eventSender.mouseDown(); -
trunk/LayoutTests/editing/pasteboard/4947130.html
r19061 r19149 18 18 19 19 var img = document.getElementById("img"); 20 var left = img.offset Parent.offsetLeft + img.offsetLeft;21 var top = img.offset Parent.offsetTop + img.offsetTop;20 var left = img.offsetLeft; 21 var top = img.offsetTop; 22 22 var x = left + img.offsetWidth / 2; 23 23 var y = top + img.offsetHeight / 2; … … 27 27 eventSender.leapForward(1300); 28 28 29 eventSender.mouseMoveTo(left - 2 0, y);29 eventSender.mouseMoveTo(left - 28, y); 30 30 eventSender.mouseUp(); 31 31 -
trunk/LayoutTests/editing/pasteboard/drop-text-without-selection.html
r17562 r19149 26 26 var link = document.getElementById("link"); 27 27 28 // The 8 here is the default margin on the body element. 29 var xOff = 8; 30 var yOff = 8; 31 32 var x = xOff + link.offsetLeft + link.offsetWidth / 2; 33 var y = yOff + link.offsetTop + link.offsetHeight / 2; 28 var x = link.offsetLeft + link.offsetWidth / 2; 29 var y = link.offsetTop + link.offsetHeight / 2; 34 30 35 31 eventSender.mouseMoveTo(x, y); … … 39 35 var field = document.getElementById("field"); 40 36 41 x = xOff +field.offsetLeft + field.offsetWidth / 2;42 y = yOff +field.offsetTop + field.offsetHeight / 2;37 x = field.offsetLeft + field.offsetWidth / 2; 38 y = field.offsetTop + field.offsetHeight / 2; 43 39 44 40 eventSender.mouseMoveTo(x, y); -
trunk/LayoutTests/editing/selection/anchor-focus1-expected.txt
r16011 r19149 1 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 1 of #text > SPAN > DIV > BODY > HTML > #document to 1of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE1 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 2 of #text > SPAN > DIV > BODY > HTML > #document to 2 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 2 2 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 3 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > SPAN > DIV > BODY > HTML > #document to 1of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > SPAN > DIV > BODY > HTML > #document to 4 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE3 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > SPAN > DIV > BODY > HTML > #document to 2 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > SPAN > DIV > BODY > HTML > #document to 4 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 4 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 5 This tests the anchorNode, anchorOffset, focusNode and focusOffset properties of the Selection object. These properties are part of Mozilla's Selection object API, and so their values should be consistent in both browsers. -
trunk/LayoutTests/editing/selection/click-before-and-after-table.html
r17562 r19149 29 29 var s, x, y, e, top, bottom, left, right; 30 30 table = document.getElementById("table"); 31 // The 8 here is the default margin on the body element. 32 top = 8 +table.offsetTop;33 left = 8 +table.offsetLeft;31 32 top = table.offsetTop; 33 left = table.offsetLeft; 34 34 bottom = top + table.offsetHeight; 35 35 right = left + table.offsetWidth; -
trunk/LayoutTests/editing/selection/drag-select-1.html
r17753 r19149 24 24 25 25 var start = document.getElementById("start"); 26 var startx = start.offsetParent.offsetLeft+ start.offsetLeft + start.offsetWidth / 2;27 var starty = start.offset Parent.offsetTop + start.offsetTop + start.offsetHeight / 2;26 var startx = -8 + start.offsetLeft + start.offsetWidth / 2; 27 var starty = start.offsetTop + start.offsetHeight / 2; 28 28 eventSender.mouseMoveTo(startx, starty); 29 29 eventSender.mouseDown(); 30 30 31 31 var end = document.getElementById("end"); 32 endx = end.offsetParent.offsetLeft+ end.offsetLeft + end.offsetWidth / 2;33 endy = end.offset Parent.offsetTop + end.offsetTop + end.offsetHeight / 2;32 endx = -8 + end.offsetLeft + end.offsetWidth / 2; 33 endy = end.offsetTop + end.offsetHeight / 2; 34 34 35 35 var steps = 20; -
trunk/LayoutTests/editing/selection/editable-links-expected.txt
r17562 r19149 1 1 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of HTML > #document to 2 of HTML > #document 2 2 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification 3 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 5 of #text > A > BODY > HTML > #document to 5of #text > A > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE3 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 6 of #text > A > BODY > HTML > #document to 6 of #text > A > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 4 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 5 layer at (0,0) size 800x600 … … 15 15 RenderText {#text} at (142,0) size 4x18 16 16 text run at (142,0) width 4: "." 17 caret: position 5of child 0 {#text} of child 3 {A} of child 1 {BODY} of child 0 {HTML} of document17 caret: position 6 of child 0 {#text} of child 3 {A} of child 1 {BODY} of child 0 {HTML} of document -
trunk/LayoutTests/editing/selection/mixed-editability-1.html
r17562 r19149 14 14 var x, y; 15 15 16 // The 8 here is the default margin on the body element. 17 x = 8 + start.offsetLeft + start.offsetWidth / 2; 18 y = 8 + start.offsetTop + start.offsetHeight / 2; 16 x = start.offsetLeft + start.offsetWidth / 2; 17 y = start.offsetTop + start.offsetHeight / 2; 19 18 20 19 eventSender.mouseMoveTo(x, y); -
trunk/LayoutTests/editing/selection/paragraph-granularity.html
r17562 r19149 12 12 var start = document.getElementById("start"); 13 13 14 x = start.offsetLeft + 10;14 x = start.offsetLeft + 2; 15 15 y = start.offsetTop + 10; 16 16 … … 24 24 var end = document.getElementById("end"); 25 25 26 x = end.offsetLeft + end.offsetWidth + 10;26 x = end.offsetLeft + end.offsetWidth + 2; 27 27 y = end.offsetTop + 10; 28 28 -
trunk/LayoutTests/editing/selection/selection-actions.html
r17562 r19149 12 12 var start = document.getElementById("start"); 13 13 14 x = start.offsetLeft + 10;15 y = start.offsetTop + 10;14 x = start.offsetLeft + 2; 15 y = start.offsetTop + 2; 16 16 17 17 eventSender.mouseMoveTo(x, y); -
trunk/LayoutTests/editing/selection/word-granularity.html
r17562 r19149 12 12 var start = document.getElementById("start"); 13 13 14 x = start.offsetLeft + 10;14 x = start.offsetLeft + 2; 15 15 y = start.offsetTop + 10; 16 16 … … 22 22 var end = document.getElementById("end"); 23 23 24 x = end.offsetLeft + end.offsetWidth + 10;24 x = end.offsetLeft + end.offsetWidth + 2; 25 25 y = end.offsetTop + 10; 26 26 -
trunk/LayoutTests/fast/forms/drag-into-textarea.html
r16026 r19149 3 3 function runTest() { 4 4 var input = document.getElementById("input"); 5 var x = 8 +input.offsetLeft + input.offsetWidth / 2;6 var y = 8 +input.offsetTop + input.offsetHeight / 2;5 var x = input.offsetLeft + input.offsetWidth / 2; 6 var y = input.offsetTop + input.offsetHeight / 2; 7 7 8 8 var textarea = document.getElementById("textarea"); 9 var tx = 8 +textarea.offsetLeft + textarea.offsetWidth / 2;10 var ty = 8 +textarea.offsetTop + textarea.offsetHeight / 2;9 var tx = textarea.offsetLeft + textarea.offsetWidth / 2; 10 var ty = textarea.offsetTop + textarea.offsetHeight / 2; 11 11 12 12 input.select(); -
trunk/LayoutTests/fast/forms/listbox-selection-2.html
r19037 r19149 58 58 var borderPaddingTop = 15; 59 59 var borderPaddingLeft = 15; 60 var y = 8 +index * itemHeight - window.pageYOffset + borderPaddingTop;60 var y = index * itemHeight - window.pageYOffset + borderPaddingTop; 61 61 var event = document.createEvent("MouseEvent"); 62 event.initMouseEvent("mousedown", true, true, document.defaultView, 1, sl.offsetLeft + 8 + borderPaddingLeft, sl.offsetTop + y, sl.offsetLeft + 8+ borderPaddingLeft, sl.offsetTop + y, false, false, shift, meta, 0, document);62 event.initMouseEvent("mousedown", true, true, document.defaultView, 1, sl.offsetLeft + borderPaddingLeft, sl.offsetTop + y, sl.offsetLeft + borderPaddingLeft, sl.offsetTop + y, false, false, shift, meta, 0, document); 63 63 sl.dispatchEvent(event); 64 64 } -
trunk/LayoutTests/fast/forms/listbox-selection.html
r17498 r19149 112 112 function mouseDownOnSelect(selId, index, shift, meta) { 113 113 var sl = document.getElementById(selId); 114 var itemHeight = 15; 115 var y = 10 + index * itemHeight - window.pageYOffset; 114 var itemHeight = 14; 115 var border = 1; 116 var y = border + index * itemHeight - window.pageYOffset; 116 117 var event = document.createEvent("MouseEvent"); 117 event.initMouseEvent("mousedown", true, true, document.defaultView, 1, sl.offsetLeft + 10, sl.offsetTop + y, sl.offsetLeft + 10, sl.offsetTop + y, false, false, shift, meta, 0, document);118 event.initMouseEvent("mousedown", true, true, document.defaultView, 1, sl.offsetLeft + border, sl.offsetTop + y, sl.offsetLeft + border, sl.offsetTop + y, false, false, shift, meta, 0, document); 118 119 sl.dispatchEvent(event); 119 120 } -
trunk/LayoutTests/fast/table/click-near-anonymous-table-expected.txt
r17562 r19149 40 40 RenderText {#text} at (0,0) size 176x18 41 41 text run at (0,0) width 176: "Click to the right of this text" 42 caret: position 40of child 0 {#text} of child 7 {DIV} of child 7 {DIV} of child 1 {BODY} of child 0 {HTML} of document42 caret: position 9 of child 0 {#text} of child 7 {DIV} of child 7 {DIV} of child 1 {BODY} of child 0 {HTML} of document -
trunk/LayoutTests/fast/table/click-near-anonymous-table.html
r15471 r19149 8 8 return; 9 9 var target = document.getElementById("target"); 10 // The 8 here is the default margin on the body element. 11 var baseX = 8 + target.offsetLeft; 12 var baseY = 8 + target.offsetTop; 10 13 11 for (i = 0; i < target.children.length; i++) { 14 12 var div = target.children[i]; 15 var clickX = baseX + target.offsetLeft + target.offsetWidth + 5;16 var clickY = baseY + target.offsetTop + target.offsetHeight+ 5;13 var clickX = div.offsetLeft + div.offsetWidth + 5; 14 var clickY = div.offsetTop + 5; 17 15 eventSender.mouseMoveTo(clickX, clickY); 18 16 eventSender.mouseDown(); -
trunk/WebCore/ChangeLog
r19148 r19149 1 1 2007-01-26 Mitz Pettel <mitz@webkit.org> 2 2 3 Reviewed by Reviewed by Darin and Maciej. 3 Reviewed by Darin. 4 5 - fix http://bugs.webkit.org/show_bug.cgi?id=11109 6 REGRESSION (r15471): menus are offset on eink.com 7 <rdar://problem/4824760> 8 9 Changed offset{Left,Top} to match Firefox. If the body element is statically 10 positioned, it is still returned as the offsetParent of elements whose containing 11 block is the initial containing block (the root), but their offset{Left,Top} are 12 relative to the root. If the body element is positioned, then offsets are relative 13 to it. The body's own offset{Left,Top} are always 0. 14 15 Test: fast/dom/Element/offsetLeft-offsetTop-body-quirk.html 16 17 * rendering/RenderObject.cpp: 18 (WebCore::RenderObject::offsetLeft): 19 (WebCore::RenderObject::offsetTop): 20 21 2007-01-26 Mitz Pettel <mitz@webkit.org> 22 23 Reviewed by Darin and Maciej. 4 24 5 25 - fix http://bugs.webkit.org/show_bug.cgi?id=10983 -
trunk/WebCore/rendering/RenderObject.cpp
r19148 r19149 517 517 curr = curr->parent(); 518 518 } 519 if (offsetPar->isBody() && !offsetPar->isRelPositioned() && !offsetPar->isPositioned()) 520 x += offsetPar->xPos(); 519 521 } 520 522 return x; … … 536 538 curr = curr->parent(); 537 539 } 540 if (offsetPar->isBody() && !offsetPar->isRelPositioned() && !offsetPar->isPositioned()) 541 y += offsetPar->yPos(); 538 542 } 539 543 return y;
Note: See TracChangeset
for help on using the changeset viewer.