<?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>44180</bug_id>
          
          <creation_ts>2010-08-18 09:03:41 -0700</creation_ts>
          <short_desc>WebView::paint fails to paint a child WebView of a Layered Window</short_desc>
          <delta_ts>2010-08-18 11:18:38 -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>Windows 7</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="Jessie Berlin">jberlin</reporter>
          <assigned_to name="Jessie Berlin">jberlin</assigned_to>
          <cc>aroben</cc>
    
    <cc>jberlin</cc>
    
    <cc>jhoneycutt</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>266139</commentid>
    <comment_count>0</comment_count>
    <who name="Jessie Berlin">jberlin</who>
    <bug_when>2010-08-18 09:03:41 -0700</bug_when>
    <thetext>Even though GetUpdateRect and GetUpdateRgn for a child WebView of a Layered Window report that the region that should be painted as non-empty in WebView::paint before the call to BeginPaint (http://msdn.microsoft.com/en-us/library/aa922023.aspx), BeginPaint still fills the rcPaint field of the PAINTSTRUCT with an empty RECT.

This means http://trac.webkit.org/changeset/58900 causes WebView::paint to end the paint early, before painting the contents of child WebView of a Layered Window.

A fix would be to check if the m_backingStoreBitmap is null after the call to ensureBackingStore (which will notice that the WebView isn&apos;t zero-sized in the case of the child WebView of a Layered Window that isn&apos;t zero-sized) instead of checking if the rcPaint rect is empty in order to determine whether to continue on with the paint or not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>266194</commentid>
    <comment_count>1</comment_count>
      <attachid>64724</attachid>
    <who name="Jessie Berlin">jberlin</who>
    <bug_when>2010-08-18 10:14:39 -0700</bug_when>
    <thetext>Created attachment 64724
Check if m_backingStoreBitmap is null instead of whether rcPaint is empty</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>266214</commentid>
    <comment_count>2</comment_count>
      <attachid>64724</attachid>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2010-08-18 10:36:11 -0700</bug_when>
    <thetext>Comment on attachment 64724
Check if m_backingStoreBitmap is null instead of whether rcPaint is empty

&gt; +    bool backingStoreCompletelyDirty = ensureBackingStore();
&gt; +    if (!m_backingStoreBitmap) {
&gt; +        EndPaint(m_viewWindow, &amp;ps);
&gt;          return;
&gt;      }

We should only call EndPaint if a dc was passed to this function. Otherwise we won&apos;t have called BeginPaint.

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>266260</commentid>
    <comment_count>3</comment_count>
    <who name="Jessie Berlin">jberlin</who>
    <bug_when>2010-08-18 11:13:14 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 64724 [details])
&gt; &gt; +    bool backingStoreCompletelyDirty = ensureBackingStore();
&gt; &gt; +    if (!m_backingStoreBitmap) {
&gt; &gt; +        EndPaint(m_viewWindow, &amp;ps);
&gt; &gt;          return;
&gt; &gt;      }
&gt; 
&gt; We should only call EndPaint if a dc was passed to this function. Otherwise we won&apos;t have called BeginPaint.

Added in the check for whether there was a dc passed in.

&gt; 
&gt; r=me

Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>266264</commentid>
    <comment_count>4</comment_count>
      <attachid>64724</attachid>
    <who name="Jessie Berlin">jberlin</who>
    <bug_when>2010-08-18 11:18:30 -0700</bug_when>
    <thetext>Comment on attachment 64724
Check if m_backingStoreBitmap is null instead of whether rcPaint is empty

Committed in r65618

http://trac.webkit.org/changeset/65618</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>64724</attachid>
            <date>2010-08-18 10:14:39 -0700</date>
            <delta_ts>2010-08-18 11:18:30 -0700</delta_ts>
            <desc>Check if m_backingStoreBitmap is null instead of whether rcPaint is empty</desc>
            <filename>makeWebViewPaintWorkWithLayeredWindows.patch</filename>
            <type>text/plain</type>
            <size>1789</size>
            <attacher name="Jessie Berlin">jberlin</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYktpdC93aW4vQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYktpdC93aW4vQ2hh
bmdlTG9nCShyZXZpc2lvbiA2NTYxMSkKKysrIFdlYktpdC93aW4vQ2hhbmdlTG9nCSh3b3JraW5n
IGNvcHkpCkBAIC0xLDMgKzEsMTkgQEAKKzIwMTAtMDgtMDkgIEplc3NpZSBCZXJsaW4gIDxqYmVy
bGluQGFwcGxlLmNvbT4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKwor
ICAgICAgICBCdWcgNDQxODAgLSBXZWJWaWV3OjpwYWludCBmYWlscyB0byBwYWludCBhIGNoaWxk
IFdlYlZpZXcgb2YgYSBMYXllcmVkIFdpbmRvdy4KKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtp
dC5vcmcvc2hvd19idWcuY2dpP2lkPTQ0MTgwCisgICAgICAgIAorICAgICAgICBEZWNpZGUgdG8g
ZW5kIHBhaW50aW5nIGlmIHRoZSBtX2JhY2tpbmdTdG9yZUJpdG1hcCBpcyBudWxsIGFmdGVyIHRo
ZSBjYWxsIHRvCisgICAgICAgIGVuc3Vy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Qo
bV92aWV3V2luZG93LCAmcHMpOworICAgIGJvb2wgYmFja2luZ1N0b3JlQ29tcGxldGVseURpcnR5
ID0gZW5zdXJlQmFja2luZ1N0b3JlKCk7CisgICAgaWYgKCFtX2JhY2tpbmdTdG9yZUJpdG1hcCkg
eworICAgICAgICBFbmRQYWludChtX3ZpZXdXaW5kb3csICZwcyk7CiAgICAgICAgIHJldHVybjsK
ICAgICB9CiAKICAgICBtX3BhaW50Q291bnQrKzsKIAogICAgIEhEQyBiaXRtYXBEQyA9IDo6Q3Jl
YXRlQ29tcGF0aWJsZURDKGhkYyk7Ci0gICAgYm9vbCBiYWNraW5nU3RvcmVDb21wbGV0ZWx5RGly
dHkgPSBlbnN1cmVCYWNraW5nU3RvcmUoKTsKICAgICA6OlNlbGVjdE9iamVjdChiaXRtYXBEQywg
bV9iYWNraW5nU3RvcmVCaXRtYXAtPmhhbmRsZSgpKTsKIAogICAgIC8vIFVwZGF0ZSBvdXIgYmFj
a2luZyBzdG9yZSBpZiBuZWVkZWQuCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>