[webkit-dev] setWindowIsKey and WK2 issue

RoguskiPiotr p.roguski at samsung.com
Fri Jun 22 09:17:01 PDT 2012



I'm working on adding setWindowIsKey  to LayoutTestController for WK2. Lack
of this function prevents from passing few layout tests  (eg.

New implementation posts synchronic message to UIProcess. After reciving
message, UIProcess sets focus to WebView (which I bilive is proper
implementation of setWindowIsKey in WK2 EFL port). This leads to
WebPageProxy::viewStateDidChange call which then sends asynchronously
SetFocus message back to WebProcess. This causes some issues - let's look in
to fast/events/blur-focus-window-should-blur-focus-element.html


This test sets event handlers:

divElement.onfocus = divElement.onblur = window.onfocus = window.onblur =

    innerDiv.onfocus = innerDiv.onblur = iframe.onfocus = iframe.onblur =







Then setWindowIsKey is called and focus is set to some elements:


if (window.layoutTestController) {

    window.layoutTestController.setWindowIsKey(false); //this will be

    window.layoutTestController.setWindowIsKey(true); //this will be


    innerDiv.focus(); // synchronic

    divElement.focus(); // synchronic



Then test checks event handlers triggering order:


testNextEvent('divElement', 'blur');

testNextEvent('window', 'blur');

testNextEvent('window', 'focus');

testNextEvent('divElement', 'focus');


testNextEvent('divElement', 'blur');

testNextEvent('window', 'blur');

testNextEvent('iframe', 'focus');

testNextEvent('innerDiv', 'focus');


testNextEvent('innerDiv', 'blur');

testNextEvent('iframe', 'blur');

testNextEvent('window', 'focus');

testNextEvent('divElement', 'focus');


This of course fails - some of event handlers are not even called before
test ends.

Do you have any suggestions on how fix this issue? Maybe test like this

should be adapted for use with WK2?


Thanks in advance and best regards,

Piotr Roguski

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120622/062c6660/attachment.html>

More information about the webkit-dev mailing list