Changeset 66879 in webkit
- Timestamp:
- Sep 7, 2010 6:27:54 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r66878 r66879 1 2010-09-07 Satish Sampath <satish@chromium.org> 2 3 Reviewed by Steve Block. 4 5 Fix speech button's hit test logic for RTL rendering. 6 https://bugs.webkit.org/show_bug.cgi?id=45288 7 8 * fast/speech/input-text-speechbutton.html: Added RTL test case and merged JS code. 9 * fast/speech/script-tests/input-text-speechbutton.js: Removed. 10 1 11 2010-09-07 Satish Sampath <satish@chromium.org> 2 12 -
trunk/LayoutTests/fast/speech/input-text-speechbutton.html
r64749 r66879 8 8 <p id="description"></p> 9 9 <div id="console"></div> 10 <script src="script-tests/input-text-speechbutton.js"></script> 10 <script type="text/javascript"> 11 description('Tests for speech button click with <input type="text" speech>.'); 12 13 function onChange() { 14 shouldBeEqualToString('document.getElementById("speechInput").value', 'Pictures of the moon'); 15 setTimeout(function() { 16 var input = document.getElementById('speechInput'); 17 input.dir = 'rtl'; 18 input.value = ''; 19 input.onchange = function() { 20 shouldBeEqualToString('document.getElementById("speechInput").value', 21 'Pictures of the moon'); 22 finishJSTest(); 23 }; 24 25 var x = input.offsetLeft + 4; 26 var y = input.offsetTop + input.offsetHeight / 2; 27 eventSender.mouseMoveTo(x, y); 28 eventSender.mouseDown(); 29 eventSender.mouseUp(); 30 }, 50); 31 } 32 33 function run() { 34 var input = document.createElement('input'); 35 input.id = 'speechInput'; 36 input.speech = 'speech'; 37 input.onchange = onChange; 38 document.body.appendChild(input); 39 40 if (window.layoutTestController && window.eventSender) { 41 layoutTestController.setMockSpeechInputResult('Pictures of the moon'); 42 43 // Clicking the speech button should fill in mock speech-recognized text. 44 var x = input.offsetLeft + input.offsetWidth - 4; 45 var y = input.offsetTop + input.offsetHeight / 2; 46 eventSender.mouseMoveTo(x, y); 47 eventSender.mouseDown(); 48 eventSender.mouseUp(); 49 } 50 } 51 52 window.onload = run; 53 window.jsTestIsAsync = true; 54 window.successfullyParsed = true; 55 </script> 11 56 <script src="../js/resources/js-test-post.js"></script> 12 57 </body> -
trunk/WebCore/ChangeLog
r66878 r66879 1 2010-09-07 Satish Sampath <satish@chromium.org> 2 3 Reviewed by Steve Block. 4 5 Fix speech button's hit test logic for RTL rendering. 6 https://bugs.webkit.org/show_bug.cgi?id=45288 7 8 * rendering/RenderTextControlSingleLine.cpp: 9 (WebCore::RenderTextControlSingleLine::forwardEvent): 10 1 11 2010-09-07 Satish Sampath <satish@chromium.org> 2 12 -
trunk/WebCore/rendering/RenderTextControlSingleLine.cpp
r65856 r66879 375 375 } 376 376 377 FloatPoint localPoint = innerTextRenderer->absoluteToLocal(static_cast<MouseEvent*>(event)->absoluteLocation(), false, true);378 int textRight = innerTextRenderer->borderBoxRect().right();379 380 377 #if ENABLE(INPUT_SPEECH) 381 378 if (RenderBox* speechBox = m_speechButton ? m_speechButton->renderBox() : 0) { 382 if (localPoint.x() >= speechBox->x() && localPoint.x() < speechBox->x() + speechBox->width()) { 379 FloatPoint pointInTextControlCoords = absoluteToLocal(static_cast<MouseEvent*>(event)->absoluteLocation(), false, true); 380 if (speechBox->frameRect().contains(roundedIntPoint(pointInTextControlCoords))) { 383 381 m_speechButton->defaultEventHandler(event); 384 382 return; … … 386 384 } 387 385 #endif 386 387 FloatPoint localPoint = innerTextRenderer->absoluteToLocal(static_cast<MouseEvent*>(event)->absoluteLocation(), false, true); 388 int textRight = innerTextRenderer->borderBoxRect().right(); 388 389 389 390 if (m_resultsButton && localPoint.x() < innerTextRenderer->borderBoxRect().x())
Note: See TracChangeset
for help on using the changeset viewer.