Reviewed by Justin.
- fix http://bugs.webkit.org/show_bug.cgi?id=14792
<rdar://problem/
5367763> REGRESSION: Copy inserts carriage return in middle of selection
Test: editing/pasteboard/newlines-around-floating-or-positioned.html
* editing/TextIterator.cpp:
(WebCore::shouldEmitNewlinesBeforeAndAfterNode): Do not emit newlines around
floating or positioned blocks. This behavior seems to match WinIE's.
2007-08-25 Mitz Pettel <mitz@webkit.org>
Reviewed by Justin.
- test and updated results for http://bugs.webkit.org/show_bug.cgi?id=14792
<rdar://problem/
5367763> REGRESSION: Copy inserts carriage return in middle of selection
* editing/pasteboard/newlines-around-floating-or-positioned-expected.txt: Added.
* editing/pasteboard/newlines-around-floating-or-positioned.html: Added.
* fast/events/capture-on-target-expected.txt:
* fast/events/mouseclick-target-and-positioning-expected.txt:
* fast/events/mouseover-mouseout-expected.txt:
* fast/events/mouseover-mouseout2-expected.txt:
* fast/events/window-events-bubble-expected.txt:
* fast/events/window-events-bubble2-expected.txt:
* fast/events/window-events-capture-expected.txt:
* fast/forms/input-appearance-elementFromPoint-expected.txt:
* fast/forms/onselect-textarea-expected.txt:
* fast/forms/onselect-textfield-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25234
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-08-25 Mitz Pettel <mitz@webkit.org>
+
+ Reviewed by Justin.
+
+ - test and updated results for http://bugs.webkit.org/show_bug.cgi?id=14792
+ <rdar://problem/5367763> REGRESSION: Copy inserts carriage return in middle of selection
+
+ * editing/pasteboard/newlines-around-floating-or-positioned-expected.txt: Added.
+ * editing/pasteboard/newlines-around-floating-or-positioned.html: Added.
+ * fast/events/capture-on-target-expected.txt:
+ * fast/events/mouseclick-target-and-positioning-expected.txt:
+ * fast/events/mouseover-mouseout-expected.txt:
+ * fast/events/mouseover-mouseout2-expected.txt:
+ * fast/events/window-events-bubble-expected.txt:
+ * fast/events/window-events-bubble2-expected.txt:
+ * fast/events/window-events-capture-expected.txt:
+ * fast/forms/input-appearance-elementFromPoint-expected.txt:
+ * fast/forms/onselect-textarea-expected.txt:
+ * fast/forms/onselect-textfield-expected.txt:
+
2007-08-24 Justin Garcia <justin.garcia@apple.com>
Reviewed by Darin.
--- /dev/null
+test1 PASS: innerText is Lorem-ipsum as expected
+test2 PASS: innerText is Loremipsum as expected
+test3 PASS: innerText is Lorem-ipsum as expected
+test4 PASS: innerText is Loremipsum as expected
+Lorem-ipsum
+Loremipsum
+Lorem-ipsum
+Loremipsum
--- /dev/null
+<pre id="console"></pre>
+<div id="test1">Lorem<span style="float: left;">-</span>ipsum</div>
+<div id="test2">Lorem<span style="float: left;"></span>ipsum</div>
+<div id="test3">Lorem<div style="position: absolute;">-</div>ipsum</div>
+<div id="test4">Lorem<div style="position: absolute;"></div>ipsum</div>
+<script>
+ function log(message)
+ {
+ var console = document.getElementById("console");
+ console.appendChild(document.createTextNode(message + "\n"));
+ }
+
+ function test(id, expected)
+ {
+ var actual = document.getElementById(id).innerText;
+ if (actual == expected)
+ log(id + " PASS: innerText is " + actual + " as expected");
+ else
+ log(id + " FAIL: innerText is " + actual + " instead of " + expected);
+ }
+
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+ test("test1", "Lorem-ipsum");
+ test("test2", "Loremipsum");
+ test("test3", "Lorem-ipsum");
+ test("test4", "Loremipsum");
+</script>
This tests checks that capturing event handlers trigger on the node that is the target of the event, and that stopPropagation in such a handler prevents further bubble handlers from triggering.
Click here
-
targetClickFired: true
containerClickFired: false
test passed
This page tests whether a click event propogates with the correct target and positioning. See rdar://problem/4477126.
-click inside the red box:
-[]
+click inside the red box:[]
PASS: event target should be [object HTMLElement] and is
PASS: event.pageX should be 175 and is
PASS: event.pageY should be 105 and is
Move the mouse pointer from left to right:
-1
-1
-2
-3
-4
-5
-
+1 1 2345
Log Expected results
mouseover on t1_1
mouseout on t1_1
Move the mouse pointer from left to right:
-
-3
-4
-
-5
-6
+3456
Log Expected results
mouseover on frame1
mouseover on t1
-Test that stopPropagation() will not allow window events to bubble.
-Clicking on this should not fire window.onclick. This matches our old behavior and Firefox behavior.
-stopPropagation called. Test Passed.
-
+Test that stopPropagation() will not allow window events to bubble. Clicking on this should not fire window.onclick. This matches our old behavior and Firefox behavior. stopPropagation called. Test Passed.
-Tests that preventDefault() will still allow window events to bubble.
-Clicking here should fire window.onclick. This will match Firefox behavior.
-Window.onClick fired. Test Passed.
-
+Tests that preventDefault() will still allow window events to bubble. Clicking here should fire window.onclick. This will match Firefox behavior. Window.onClick fired. Test Passed.
-This tests that window events will fire in the capture phase.
-Click here
-
+This tests that window events will fire in the capture phase. Click here
Capture: Window.onClick is called
stopPropagation called.
Default behavior for link
-This tests that elementFromPoint will get the input element.
-Test Passed
-
+This tests that elementFromPoint will get the input element. Test Passed
This tests onSelect for textareas.
This also makes sure that the correct selection is restored when the element regains focus.
-
Calling focus on textarea
After focus: textarea selection start: 0 end: 0
This tests onSelect for text fields.
-
Calling focus on text field
After focus: text field selection start: 0 end: 10
+2007-08-25 Mitz Pettel <mitz@webkit.org>
+
+ Reviewed by Justin.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=14792
+ <rdar://problem/5367763> REGRESSION: Copy inserts carriage return in middle of selection
+
+ Test: editing/pasteboard/newlines-around-floating-or-positioned.html
+
+ * editing/TextIterator.cpp:
+ (WebCore::shouldEmitNewlinesBeforeAndAfterNode): Do not emit newlines around
+ floating or positioned blocks. This behavior seems to match WinIE's.
+
2007-08-23 Justin Garcia <justin.garcia@apple.com>
Reviewed by Darin.
return true;
}
- return !r->isInline() && r->isRenderBlock() && !r->isBody();
+ return !r->isInline() && r->isRenderBlock() && !r->isFloatingOrPositioned() && !r->isBody();
}
static bool shouldEmitNewlineAfterNode(Node* node)