<?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>122549</bug_id>
          
          <creation_ts>2013-10-09 06:17:03 -0700</creation_ts>
          <short_desc>[Win] BeginPaint should only be called in response to WM_PAINT.</short_desc>
          <delta_ts>2013-10-09 10:04:12 -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 Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</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</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter>peavo</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>commit-queue</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>937897</commentid>
    <comment_count>0</comment_count>
    <who name="">peavo</who>
    <bug_when>2013-10-09 06:17:03 -0700</bug_when>
    <thetext>According to the documentation (http://msdn.microsoft.com/en-us/library/windows/desktop/dd183362(v=vs.85).aspx), the Win32 api functions BeginPaint and EndPaint should only be called in response to a WM_PAINT message. Currently, the WebView window procedure might call these functions (via WebView::paint(0, 0)) for all types of messages. Also, there is potential double drawing. If some message is dispatched before WM_PAINT, WebView::paint(0, 0) will be called. This call does not validate the area drawn, so later the WM_PAINT will arrive, drawing the same area.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>937901</commentid>
    <comment_count>1</comment_count>
      <attachid>213770</attachid>
    <who name="">peavo</who>
    <bug_when>2013-10-09 06:28:52 -0700</bug_when>
    <thetext>Created attachment 213770
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>937936</commentid>
    <comment_count>2</comment_count>
      <attachid>213770</attachid>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2013-10-09 09:10:10 -0700</bug_when>
    <thetext>Comment on attachment 213770
Patch

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

&gt; Source/WebKit/win/WebView.cpp:2467
&gt; +        ::UpdateWindow(hWnd);

Will this trigger the logic in webView-&gt;performLayeredWIndowUpdate()?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>937951</commentid>
    <comment_count>3</comment_count>
    <who name="">peavo</who>
    <bug_when>2013-10-09 09:36:54 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 213770 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=213770&amp;action=review
&gt; 
&gt; &gt; Source/WebKit/win/WebView.cpp:2467
&gt; &gt; +        ::UpdateWindow(hWnd);
&gt; 
&gt; Will this trigger the logic in webView-&gt;performLayeredWIndowUpdate()?

Yes, UpdateWindow will send the WM_PAINT message (synchronously) if there is an invalid area.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>937953</commentid>
    <comment_count>4</comment_count>
      <attachid>213770</attachid>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2013-10-09 09:40:24 -0700</bug_when>
    <thetext>Comment on attachment 213770
Patch

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>937955</commentid>
    <comment_count>5</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2013-10-09 09:41:06 -0700</bug_when>
    <thetext>&lt;rdar://problem/15187300&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>937960</commentid>
    <comment_count>6</comment_count>
    <who name="">peavo</who>
    <bug_when>2013-10-09 09:44:18 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; (From update of attachment 213770 [details])
&gt; r=me

Thanks for reviewing!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>937972</commentid>
    <comment_count>7</comment_count>
      <attachid>213770</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2013-10-09 10:04:10 -0700</bug_when>
    <thetext>Comment on attachment 213770
Patch

Clearing flags on attachment: 213770

Committed r157174: &lt;http://trac.webkit.org/changeset/157174&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>937973</commentid>
    <comment_count>8</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2013-10-09 10:04:12 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>213770</attachid>
            <date>2013-10-09 06:28:52 -0700</date>
            <delta_ts>2013-10-09 10:04:10 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-122549-20131009152832.patch</filename>
            <type>text/plain</type>
            <size>1937</size>
            <attacher>peavo</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJLaXQvd2luL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2Uv
V2ViS2l0L3dpbi9DaGFuZ2VMb2cJKHJldmlzaW9uIDE1NzE2MykKKysrIFNvdXJjZS9XZWJLaXQv
d2luL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE5IEBACisyMDEzLTEwLTA5
ICBwZWF2b0BvdXRsb29rLmNvbSAgPHBlYXZvQG91dGxvb2suY29tPgorCisgICAgICAgIFtXaW5d
IEJlZ2luUGFpbnQgc2hvdWxkIG9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BhcmFtLCBsUGFyYW0pOwo=
</data>

          </attachment>
      

    </bug>

</bugzilla>