<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>100010</bug_id>
          
          <creation_ts>2012-10-22 09:43:17 -0700</creation_ts>
          <short_desc>[EFL][WK2] fast/repaint/delete-into-nested-block.html and fast/repaint/4776765.html are flaky</short_desc>
          <delta_ts>2012-10-29 02:39:25 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit EFL</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Raphael Kubo da Costa (:rakuco)">rakuco</reporter>
          <assigned_to name="Raphael Kubo da Costa (:rakuco)">rakuco</assigned_to>
          <cc>d-r</cc>
    
    <cc>kenneth</cc>
    
    <cc>lucas.de.marchi</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>747627</commentid>
    <comment_count>0</comment_count>
    <who name="Raphael Kubo da Costa (:rakuco)">rakuco</who>
    <bug_when>2012-10-22 09:43:17 -0700</bug_when>
    <thetext>It looks like there&apos;s some problem with the focus code in WTR: when fast/repaint/4774354.html (which calls focus() in an iframe) is run before those tests, it looks like the view itself (or the main frame, I don&apos;t know) is not considered focused anymore, and the focus ring is not drawn around the &lt;div&gt;s.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>748671</commentid>
    <comment_count>1</comment_count>
    <who name="Raphael Kubo da Costa (:rakuco)">rakuco</who>
    <bug_when>2012-10-23 08:33:06 -0700</bug_when>
    <thetext>So this is how things are working so far:

 o TestController::resetStateToConsistentValues() calls PlatformWebView::focus(), which calls evas_object_focus_set(..., true) before every test is run.

 o Before running the first test (fast/repaint/4774354.html), this call to evas_object_focus_set() makes the main view receive focus, and WebPageProxy::viewStateDidChange() ends up making the web process call WebPage::setFocused(true), which is the normal flow anyway.

 o This test then focuses an iframe it has via `window.frames[0].focus&apos;. This makes WebCore::FrameSelection::setFocused(false) be called for the main frame&apos;s frame selection, and WebCore::FrameSelection::setFocused(true) be called for the iframe&apos;s frame selection.

 o When the test finishes, the main frame&apos;s frame selection is still internally in an unfocused state, however Evas considers the main view to still be focused.

 o fast/repaint/delete-into-nested-block.html is then run, and when WebCore then queries the main frame&apos;s FrameSelection to see it is focused in order to decide whether to draw the focus ring around the &lt;div&gt;, that query returns false and the focus ring is not drawn.

 o WebCore::FrameSelection::setFocused(true) is not called despite TestController::resetStateToConsistentValues() and thus PlatformWebView::focus() being called before each test because evas_object_focus_set(..., true) becomes a no-op since Evas thinks the main view (an Evas_Object) is still visible, as we had already called evas_object_focus_set(..., true) before. WebPageProxy::viewStateDidChange() is then not called, and the main frame&apos;s frame selection state is never reset to true.

That problem does not affect DRT because we call ewk_frame_feed_focus_in() there, whose sole responsibility is to manually call WebCore::FocusController::setFocusedFrame() on the main frame, and this triggers a call to WebCore::FrameSelection::setFocused(true).

The next step is thinking of a solution :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>749539</commentid>
    <comment_count>2</comment_count>
      <attachid>170362</attachid>
    <who name="Raphael Kubo da Costa (:rakuco)">rakuco</who>
    <bug_when>2012-10-24 04:39:56 -0700</bug_when>
    <thetext>Created attachment 170362
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>749586</commentid>
    <comment_count>3</comment_count>
      <attachid>170362</attachid>
    <who name="Raphael Kubo da Costa (:rakuco)">rakuco</who>
    <bug_when>2012-10-24 05:38:14 -0700</bug_when>
    <thetext>Comment on attachment 170362
Patch

Clearing flags on attachment: 170362

Committed r132342: &lt;http://trac.webkit.org/changeset/132342&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>749587</commentid>
    <comment_count>4</comment_count>
    <who name="Raphael Kubo da Costa (:rakuco)">rakuco</who>
    <bug_when>2012-10-24 05:38:22 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>749642</commentid>
    <comment_count>5</comment_count>
    <who name="Dominik Röttsches (drott)">d-r</who>
    <bug_when>2012-10-24 07:21:59 -0700</bug_when>
    <thetext>This causes some extra output in frame-tab-focus.html - shouldn&apos;t we fix this in a way that does not require a platform specific result for this test? Going to skip for now.

--- /home/buildslave-1/webkit-buildslave/efl-linux-64-debug-wk2/build/layout-test-results/fast/events/frame-tab-focus-expected.txt
+++ /home/buildslave-1/webkit-buildslave/efl-linux-64-debug-wk2/build/layout-test-results/fast/events/frame-tab-focus-actual.txt
@@ -1,6 +1,8 @@
 This page tests tabbing between subframes. To test, click on this text to focus the main window. Then press Tab 7 times, then Shift-Tab 7 times, which should move focus forward and backward through all inputs and frames. Then press Option-Tab 11 times and Shift-Option-Tab 11 times, which should move focus forward and backward through all inputs, frames, and links.
 
            [tabindex of one] [tabindex of three] [tabindex of two] [tabindex of three]
+main window: window blurred
+main window: window focused
 Tabbing forward...
 
 main window: INPUT #2 (tabindex=2) focused</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>753200</commentid>
    <comment_count>6</comment_count>
    <who name="Raphael Kubo da Costa (:rakuco)">rakuco</who>
    <bug_when>2012-10-29 02:39:25 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; This causes some extra output in frame-tab-focus.html

I&apos;ve filed bug 100646 to track this.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>170362</attachid>
            <date>2012-10-24 04:39:56 -0700</date>
            <delta_ts>2012-10-24 05:38:14 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-100010-20121024143830.patch</filename>
            <type>text/plain</type>
            <size>1914</size>
            <attacher name="Raphael Kubo da Costa (:rakuco)">rakuco</attacher>
            
              <data encoding="base64">SW5kZXg6IFRvb2xzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBUb29scy9DaGFuZ2VMb2cJKHJl
dmlzaW9uIDEzMjMzNCkKKysrIFRvb2xzL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwz
ICsxLDIyIEBACisyMDEyLTEwLTI0ICBSYXBoYWVsIEt1Ym8gZGEgQ29zdGEgIDxyYXBoYWVsLmt1
Ym8uZGEuY29zdGFAaW50ZWwuY29tPgorCisgICAgICAgIFtFRkxdW1dLMl0gZmFzdC9yZXBhaW50
L2RlbGV0ZS1pbnRvLW5lc3RlZC1ibG9jay5odG1sIGFuZCBmYXN0L3JlcGFpbnQvNDc3Njc2NS5o
dG1sIGFyZSBmbGFreQorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5j
Z2k/aWQ9MTAwMDEwCisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAg
ICAgICAgRm9yY2UgdGhlIG1haW4gdmlldyB0byByZWNlaXZlIGZvY3VzIGV2ZW4gaWYgRXZhcyBh
bHJlYWR5CisgICAgICAgIGNvbnNpZGVycyBpdCB0byBiZSBmb2N1c2VkLgorCisgICAgICAgIEl0
IG1pZ2h0IGhhcHBlbiB0aGF0IGEgZGlmZmVyZW50IGZyYW1lIGlzIGZvY3VzZWQgYnkgYSBwYWdl
IGFuZAorICAgICAgICB0aGUgZm9jdXMgY2hhbmdlIG5vdGlmaWNhdGlvbi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