<?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>73592</bug_id>
          
          <creation_ts>2011-12-01 14:54:57 -0800</creation_ts>
          <short_desc>REGRESSION (r100483): Can’t drag out of background window</short_desc>
          <delta_ts>2011-12-01 15:33:01 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>UI Events</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>InRadar, Regression</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Beth Dakin">bdakin</reporter>
          <assigned_to name="Beth Dakin">bdakin</assigned_to>
          <cc>bdakin</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>513156</commentid>
    <comment_count>0</comment_count>
    <who name="Beth Dakin">bdakin</who>
    <bug_when>2011-12-01 14:54:57 -0800</bug_when>
    <thetext>* SUMMARY
In recent builds trying to Command-drag a link or selected text from a background window fails.

* STEPS TO REPRODUCE
1. Navigate to a webpage with links
2. Move Safari to the background
3. Command-drag a link out of the Safari window

* RESULTS
The link gets into the active state while being dragged, but isn’t dragged out. Similarly, selected text cannot be command-dragged.

This is a regression from revision 100483.

&lt;rdar://problem/10508870&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>513158</commentid>
    <comment_count>1</comment_count>
      <attachid>117496</attachid>
    <who name="Beth Dakin">bdakin</who>
    <bug_when>2011-12-01 14:58:28 -0800</bug_when>
    <thetext>Created attachment 117496
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>513163</commentid>
    <comment_count>2</comment_count>
      <attachid>117496</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2011-12-01 15:04:23 -0800</bug_when>
    <thetext>Comment on attachment 117496
Patch 

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

Is there a good way to regression-test this?

&gt; Source/WebKit2/ChangeLog:4
&gt; +        REGRESSION (r100483): Canât drag out of background window

Character encoding trouble here with the ’ character.

&gt; Source/WebKit2/WebProcess/WebPage/WebPage.cpp:1188
&gt; +        // We need to do a full, normal hit test during this mouse event if the page is active or if a mouse
&gt; +        // button is currently pressed. It is possible that neither of those things will be true since on 
&gt; +        // Lion when legacy scrollbars are enabled, WebKit receives mouse events all the time. If it is one 
&gt; +        // of those cases where the page is not active and the mouse is not pressed, then we can fire a more
&gt; +        // efficient scrollbars-only version of the event.
&gt; +        bool mouseIsPressed = mouseEvent.button() != WebMouseEvent::NoButton;
&gt; +        handled = handleMouseEvent(mouseEvent, m_page.get(), !(m_page-&gt;focusController()-&gt;isActive() || mouseIsPressed));

To make the code match the comment it would be better if the third argument was a named local variable called something like &quot;useMoreEfficientScrollbarsOnlyVersion&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>513196</commentid>
    <comment_count>3</comment_count>
    <who name="Beth Dakin">bdakin</who>
    <bug_when>2011-12-01 15:29:14 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 117496 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=117496&amp;action=review
&gt; 
&gt; Is there a good way to regression-test this?
&gt; 

I&apos;m not sure there is. Our testing tools typically claim to be &quot;key&quot; windows all the time, so just getting a window to be inactive is not something we can replicate in a test (as far as I know) without enhancing the testing tool. Maybe that is worth doing actually, but then as far as I know there is also not a good way to test link dragging (but I am double-checking with Enrica on that). There are a number of unfortunate stumbling blocks here.

&gt; &gt; Source/WebKit2/ChangeLog:4
&gt; &gt; +        REGRESSION (r100483): Canât drag out of background window
&gt; 
&gt; Character encoding trouble here with the ’ character.
&gt; 

Oops! Will fix.

&gt; &gt; Source/WebKit2/WebProcess/WebPage/WebPage.cpp:1188
&gt; &gt; +        // We need to do a full, normal hit test during this mouse event if the page is active or if a mouse
&gt; &gt; +        // button is currently pressed. It is possible that neither of those things will be true since on 
&gt; &gt; +        // Lion when legacy scrollbars are enabled, WebKit receives mouse events all the time. If it is one 
&gt; &gt; +        // of those cases where the page is not active and the mouse is not pressed, then we can fire a more
&gt; &gt; +        // efficient scrollbars-only version of the event.
&gt; &gt; +        bool mouseIsPressed = mouseEvent.button() != WebMouseEvent::NoButton;
&gt; &gt; +        handled = handleMouseEvent(mouseEvent, m_page.get(), !(m_page-&gt;focusController()-&gt;isActive() || mouseIsPressed));
&gt; 
&gt; To make the code match the comment it would be better if the third argument was a named local variable called something like &quot;useMoreEfficientScrollbarsOnlyVersion&quot;.

Sounds good.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>513199</commentid>
    <comment_count>4</comment_count>
    <who name="Beth Dakin">bdakin</who>
    <bug_when>2011-12-01 15:33:01 -0800</bug_when>
    <thetext>Committed change with revision 101719.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>117496</attachid>
            <date>2011-12-01 14:58:28 -0800</date>
            <delta_ts>2011-12-01 15:04:22 -0800</delta_ts>
            <desc>Patch </desc>
            <filename>for-review.txt</filename>
            <type>text/plain</type>
            <size>3124</size>
            <attacher name="Beth Dakin">bdakin</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2U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cyBhY3RpdmUg
b3IgaWYgYSBtb3VzZQorICAgICAgICAvLyBidXR0b24gaXMgY3VycmVudGx5IHByZXNzZWQuIEl0
IGlzIHBvc3NpYmxlIHRoYXQgbmVpdGhlciBvZiB0aG9zZSB0aGluZ3Mgd2lsbCBiZSB0cnVlIHNp
bmNlIG9uIAorICAgICAgICAvLyBMaW9uIHdoZW4gbGVnYWN5IHNjcm9sbGJhcnMgYXJlIGVuYWJs
ZWQsIFdlYktpdCByZWNlaXZlcyBtb3VzZSBldmVudHMgYWxsIHRoZSB0aW1lLiBJZiBpdCBpcyBv
bmUgCisgICAgICAgIC8vIG9mIHRob3NlIGNhc2VzIHdoZXJlIHRoZSBwYWdlIGlzIG5vdCBhY3Rp
dmUgYW5kIHRoZSBtb3VzZSBpcyBub3QgcHJlc3NlZCwgdGhlbiB3ZSBjYW4gZmlyZSBhIG1vcmUK
KyAgICAgICAgLy8gZWZmaWNpZW50IHNjcm9sbGJhcnMtb25seSB2ZXJzaW9uIG9mIHRoZSBldmVu
dC4KKyAgICAgICAgYm9vbCBtb3VzZUlzUHJlc3NlZCA9IG1vdXNlRXZlbnQuYnV0dG9uKCkgIT0g
V2ViTW91c2VFdmVudDo6Tm9CdXR0b247CisgICAgICAgIGhhbmRsZWQgPSBoYW5kbGVNb3VzZUV2
ZW50KG1vdXNlRXZlbnQsIG1fcGFnZS5nZXQoKSwgIShtX3BhZ2UtPmZvY3VzQ29udHJvbGxlcigp
LT5pc0FjdGl2ZSgpIHx8IG1vdXNlSXNQcmVzc2VkKSk7CiAgICAgfQogfQogCg==
</data>
<flag name="review"
          id="116944"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>