Changeset 19879 in webkit
- Timestamp:
- Feb 27, 2007 12:44:40 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r19878 r19879 1 2007-02-27 Adele Peterson <adele@apple.com> 2 3 Reviewed by Lars. 4 5 Updated test for http://bugs.webkit.org/show_bug.cgi?id=12902 6 <rdar://problem/5012679> REGRESSION: Pressing return key doesn't 7 move caret to next line after applying a font color in GMail 8 9 * fast/frames/iframe-window-focus-expected.txt: 10 * fast/frames/iframe-window-focus.html: Updated test to include insertion of newlines. 11 1 12 2007-02-26 Maciej Stachowiak <mjs@apple.com> 2 13 -
trunk/LayoutTests/fast/frames/iframe-window-focus-expected.txt
r19522 r19879 1 This tests that focusing an editable iframe's window works correctly .1 This tests that focusing an editable iframe's window works correctly and allows text and newlines to be entered. 2 2 3 TEST 3 4 PASS 4 5 -
trunk/LayoutTests/fast/frames/iframe-window-focus.html
r19522 r19879 1 <html><head> 2 <script> 3 if (window.layoutTestController) 4 layoutTestController.dumpAsText(); 1 <html> 2 <head> 3 <script> 4 if (window.layoutTestController) 5 layoutTestController.dumpAsText(); 5 6 6 function init() { 7 var iframe = document.getElementById("rte"); 8 iframe.contentDocument.designMode = "on"; 9 iframe.contentWindow.focus(); 10 11 if (window.layoutTestController) { 12 eventSender.keyDown("P"); 13 eventSender.keyDown("A"); 14 eventSender.keyDown("S"); 15 eventSender.keyDown("S"); 16 } 17 document.getElementById('res').innerHTML = iframe.contentDocument.body.innerText; 18 } 7 function moveFocus() { 8 var ifrm = document.getElementById("rte"); 9 ifrm.contentWindow.focus(); 10 } 11 12 function init() { 13 var ifrm = document.getElementById("rte"); 14 ifrm.contentDocument.designMode = "on"; 15 ifrm.contentWindow.focus(); 16 17 if (window.layoutTestController) { 18 eventSender.keyDown('T'); 19 eventSender.keyDown('E'); 20 eventSender.keyDown('S'); 21 eventSender.keyDown('T'); 22 23 // Click elsewhere to move the focus, and then move the focus back 24 eventSender.mouseMoveTo(10, 10); 25 eventSender.mouseDown(); 26 eventSender.mouseUp(); 27 28 // Newline character 29 eventSender.keyDown(String.fromCharCode(0x000a)); 30 31 eventSender.keyDown('P'); 32 eventSender.keyDown('A'); 33 eventSender.keyDown('S'); 34 eventSender.keyDown('S'); 35 } 36 document.getElementById('res').innerHTML = ifrm.contentDocument.body.innerHTML; 37 } 38 </script> 39 </head> 40 <body onload="init()"> 41 <div id="dv" onclick="moveFocus()">This tests that focusing an editable iframe's window works correctly and allows text and newlines to be entered.<div> 42 <iframe id="rte" style="border: 1px solid black"></iframe> 43 <div id="res"></div> 44 </body> 45 </html> 19 46 20 21 </script>22 </head>23 <body onload="init()">24 This tests that focusing an editable iframe's window works correctly.<br>25 <iframe id="rte" style="border: 1px solid black"></iframe>26 <div id="res"></div>27 </body>28 </html> -
trunk/WebCore/ChangeLog
r19878 r19879 1 2007-02-26 Adele Peterson <adele@apple.com> 2 3 Reviewed by Lars. 4 5 Fix for http://bugs.webkit.org/show_bug.cgi?id=12902 6 <rdar://problem/5012679> REGRESSION: Pressing return key doesn't 7 move caret to next line after applying a font color in GMail 8 9 Test: fast/frames/iframe-window-focus-2.html 10 11 * page/EventHandler.h: Make focusDocumentView public. 12 * page/Frame.cpp: (WebCore::Frame::focusWindow): Instead of just setting the focused frame, 13 we should set also focus the document view. The bug here was that since the subframe view 14 wasn't the first responder, the key down event was going to the wrong frame. 15 1 16 2007-02-26 Maciej Stachowiak <mjs@apple.com> 2 17 -
trunk/WebCore/page/EventHandler.h
r19702 r19879 142 142 void dragSourceEndedAt(const PlatformMouseEvent&, DragOperation); 143 143 144 void focusDocumentView(); 145 144 146 #if PLATFORM(MAC) 145 147 PassRefPtr<KeyboardEvent> currentKeyboardEvent() const; … … 209 211 void freeClipboard(); 210 212 211 void focusDocumentView();212 213 213 bool handleDrag(const MouseEventWithHitTestResults&); 214 214 bool handleMouseUp(const MouseEventWithHitTestResults&); -
trunk/WebCore/page/Frame.cpp
r19866 r19879 1748 1748 page()->chrome()->focus(); 1749 1749 1750 page()->focusController()->setFocusedFrame(this);1750 eventHandler()->focusDocumentView(); 1751 1751 } 1752 1752
Note: See TracChangeset
for help on using the changeset viewer.