<?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>148409</bug_id>
          
          <creation_ts>2015-08-24 18:22:49 -0700</creation_ts>
          <short_desc>Layout Test platform/mac/fast/events/content-inset-hit-testing-in-frame.html is flaky</short_desc>
          <delta_ts>2015-08-26 11:18:43 -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>Tools / Tests</component>
          <version>WebKit 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="Tim Horton">thorton</reporter>
          <assigned_to name="Tim Horton">thorton</assigned_to>
          <cc>ap</cc>
    
    <cc>bdakin</cc>
    
    <cc>mitz</cc>
    
    <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1120480</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2015-08-24 18:22:49 -0700</bug_when>
    <thetext>The following layout test is flaky on Mac WK1

platform/mac/fast/events/content-inset-hit-testing-in-frame.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1120481</commentid>
    <comment_count>1</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2015-08-24 18:23:40 -0700</bug_when>
    <thetext>I&apos;m looking at this.

In the bad case, we hit the iframe, but not the div inside it (we hit the body instead).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1120487</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2015-08-24 18:38:57 -0700</bug_when>
    <thetext>Hmm. Render tree dumps for each hit test are exactly the same, we just hit a different node...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1120488</commentid>
    <comment_count>3</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2015-08-24 18:41:16 -0700</bug_when>
    <thetext>Reproduces if you reduce your machine to 1 core, load it (with some while(1)s), and &quot;run-webkit-tests -1 --repeat-each=100000 platform/mac/fast/events/content-inset-hit-testing-in-frame.html&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1120489</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2015-08-24 18:44:49 -0700</bug_when>
    <thetext>The hit test *request* point is different (off by the topContentInset):

bad case: 20 120
good case: 20 20

why is that racy, though?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1120490</commentid>
    <comment_count>5</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2015-08-24 18:47:29 -0700</bug_when>
    <thetext>setTopContentInset does a layout, and the layout isn&apos;t wrong (as evidenced by the render tree dumps being identical)... it&apos;s the point mapping that&apos;s wrong. I&apos;m not sure where topContentInset gets applied to incoming points, though. Will have to find that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1120495</commentid>
    <comment_count>6</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2015-08-24 18:55:51 -0700</bug_when>
    <thetext>We do a view-&gt;windowToContents() (in EventHandler&apos;s documentPointForWindowPoint) and are returned a lie.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1120658</commentid>
    <comment_count>7</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2015-08-25 11:20:24 -0700</bug_when>
    <thetext>OK! In the bad case, the scrollOffset.y() = 100 (the top content inset). In the good case it&apos;s 0 (as it should be). Not sure why it takes time for the scrollOffset to adjust to the TCI change. Will continue investigating.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1120661</commentid>
    <comment_count>8</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2015-08-25 11:31:49 -0700</bug_when>
    <thetext>scrollPositionChangedViaPlatformWidgetImpl is happening too late in the bad case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1120666</commentid>
    <comment_count>9</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2015-08-25 11:40:57 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; scrollPositionChangedViaPlatformWidgetImpl is happening too late in the bad
&gt; case.

In the good case, we get it underneath the layout that setTopContentInset does (like you&apos;d expect). In the bad case, we get it much later, under [NSView viewWillDraw] stuff...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1120704</commentid>
    <comment_count>10</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2015-08-25 13:39:20 -0700</bug_when>
    <thetext>And it looks like this is happening because we have scrollbars forced off until after the test runs (when they should be enabled as soon as we set a top content inset)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1120736</commentid>
    <comment_count>11</comment_count>
      <attachid>259890</attachid>
    <who name="Tim Horton">thorton</who>
    <bug_when>2015-08-25 15:23:22 -0700</bug_when>
    <thetext>Created attachment 259890
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1120739</commentid>
    <comment_count>12</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2015-08-25 15:25:02 -0700</bug_when>
    <thetext>This is admittedly pretty icky, and I haven&apos;t managed to make a test app to demonstrate the underlying problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1120750</commentid>
    <comment_count>13</comment_count>
      <attachid>259890</attachid>
    <who name="Tim Horton">thorton</who>
    <bug_when>2015-08-25 15:52:54 -0700</bug_when>
    <thetext>Comment on attachment 259890
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=259890&amp;action=review

&gt; Source/WebKit/mac/WebView/WebDynamicScrollBarsView.mm:629
&gt; +    [super setContentInsets:edgeInsets];

Mavericks doesn&apos;t have this, need an ifdef.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1120993</commentid>
    <comment_count>14</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2015-08-26 11:18:43 -0700</bug_when>
    <thetext>http://trac.webkit.org/changeset/188971</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>259890</attachid>
            <date>2015-08-25 15:23:22 -0700</date>
            <delta_ts>2015-08-26 11:14:22 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-148409-20150825152312.patch</filename>
            <type>text/plain</type>
            <size>3713</size>
            <attacher name="Tim Horton">thorton</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTg4ODkyCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0L21h
Yy9DaGFuZ2VMb2cgYi9Tb3VyY2UvV2ViS2l0L21hYy9DaGFuZ2VMb2cKaW5kZXggZGJlNzJiNjNi
ZGUwMmMxYjMyMzUwN2ZkNmY3OWUzZjhkYjlkMDYwZS4uNjJiMTYyMmM0ZTE4NWQ4YTQxY2ViY2I4
YjIyOGRlNTcwMGI0OWJkZCAxMDA2NDQKLS0tIGEvU291cmNlL1dlYktpdC9tYWMvQ2hhbmdlTG9n
CisrKyBiL1NvdXJjZS9XZWJLaXQvbWFjL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE4IEBACisyMDE1
LTA4LTI1ICBUaW0gSG9ydG9uICA8dGltb3RoeV9ob3J0b25AYXBwbGUuY29tPgorCisgICAgICAg
IExheW91dCBUZXN0IHBsYXRmb3JtL21hYy9mYXN0L2V2ZW50cy9jb250ZW50LWluc2V0LWhpdC10
ZXN0aW5nLWluLWZyYW1lLmh0bWwgaXMgZmxha3kKKyAgICAg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VhZD4KIDxib2R5PgotICAgIDxkaXYgaWQ9InRhcmdldCIgb25jbGljaz0i
Y2xpY2tlZCgpIj48L2Rpdj4KKyAgICA8ZGl2IGlkPSJ0YXJnZXQiPjwvZGl2PgogPC9ib2R5Pgog
PC9odG1sPgo=
</data>
<flag name="review"
          id="285088"
          type_id="1"
          status="+"
          setter="bdakin"
    />
          </attachment>
      

    </bug>

</bugzilla>