<?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>93040</bug_id>
          
          <creation_ts>2012-08-02 16:16:10 -0700</creation_ts>
          <short_desc>[BlackBerry] Upstream GraphicsLayerClient::contentsVisible()</short_desc>
          <delta_ts>2012-08-03 06:21:24 -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 BlackBerry</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>
          
          <blocked>93036</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Arvid Nilsson">anilsson</reporter>
          <assigned_to name="Arvid Nilsson">anilsson</assigned_to>
          <cc>anilsson</cc>
    
    <cc>eric</cc>
    
    <cc>manyoso</cc>
    
    <cc>rwlbuis</cc>
    
    <cc>tonikitoo</cc>
    
    <cc>webkit.review.bot</cc>
    
    <cc>yong.li.webkit</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>685956</commentid>
    <comment_count>0</comment_count>
    <who name="Arvid Nilsson">anilsson</who>
    <bug_when>2012-08-02 16:16:10 -0700</bug_when>
    <thetext>Our LayerTiler uses both proactive and reactive rendering to populate tiles. If contentsVisible() is accurate, it will cause the right tiles to be rendered. Failing that, when a dirty tile is found to be visible on the compositing thread, a render job is scheduled.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>685976</commentid>
    <comment_count>1</comment_count>
      <attachid>156199</attachid>
    <who name="Arvid Nilsson">anilsson</who>
    <bug_when>2012-08-02 16:36:10 -0700</bug_when>
    <thetext>Created attachment 156199
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686074</commentid>
    <comment_count>2</comment_count>
      <attachid>156199</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-08-02 18:15:15 -0700</bug_when>
    <thetext>Comment on attachment 156199
Patch

Clearing flags on attachment: 156199

Committed r124544: &lt;http://trac.webkit.org/changeset/124544&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686075</commentid>
    <comment_count>3</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-08-02 18:15:18 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686608</commentid>
    <comment_count>4</comment_count>
      <attachid>156199</attachid>
    <who name="Antonio Gomes">tonikitoo</who>
    <bug_when>2012-08-03 05:48:34 -0700</bug_when>
    <thetext>Comment on attachment 156199
Patch

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

Post-land comments:

&gt; Source/WebCore/platform/graphics/GraphicsLayerClient.h:89
&gt; +    virtual bool contentsVisible(const GraphicsLayer*, const IntRect&amp; contentRect) const = 0;

but it would be preferable to add a default blank implementation here, instead of a pure virtual method, and get rid of the #if platform(bb)?

&gt; Source/WebCore/rendering/RenderLayerBacking.cpp:1632
&gt; +    IntRect visibleContentRect(view-&gt;visibleContentRect());
&gt; +    FloatQuad absoluteContentQuad = renderer()-&gt;localToAbsoluteQuad(FloatRect(localContentRect));
&gt; +    return absoluteContentQuad.enclosingBoundingBox().intersects(visibleContentRect);

does this work for subframes?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686615</commentid>
    <comment_count>5</comment_count>
    <who name="Arvid Nilsson">anilsson</who>
    <bug_when>2012-08-03 05:57:36 -0700</bug_when>
    <thetext>Gnnh, I forgot to add the declaration to RenderLayerBacking.h</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686620</commentid>
    <comment_count>6</comment_count>
      <attachid>156199</attachid>
    <who name="Arvid Nilsson">anilsson</who>
    <bug_when>2012-08-03 06:04:09 -0700</bug_when>
    <thetext>Comment on attachment 156199
Patch

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

&gt;&gt; Source/WebCore/platform/graphics/GraphicsLayerClient.h:89
&gt;&gt; +    virtual bool contentsVisible(const GraphicsLayer*, const IntRect&amp; contentRect) const = 0;
&gt; 
&gt; but it would be preferable to add a default blank implementation here, instead of a pure virtual method, and get rid of the #if platform(bb)?

There&apos;s a default implementation coming in https://bugs.webkit.org/show_bug.cgi?id=93036, however it&apos;s still not enabling it for all platforms.

&gt;&gt; Source/WebCore/rendering/RenderLayerBacking.cpp:1632
&gt;&gt; +    return absoluteContentQuad.enclosingBoundingBox().intersects(visibleContentRect);
&gt; 
&gt; does this work for subframes?

I think this is actually returns true too often, which is better than too seldom - if my thinking is correct, this will return true if the layer is visible in the subframe&apos;s viewport, even if the whole viewport is scrolled off screen.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686624</commentid>
    <comment_count>7</comment_count>
    <who name="Antonio Gomes">tonikitoo</who>
    <bug_when>2012-08-03 06:09:24 -0700</bug_when>
    <thetext>
&gt; &gt; does this work for subframes?
&gt; 
&gt; I think this is actually returns true too often, which is better than too seldom - if my thinking is correct, this will return true if the layer is visible in the subframe&apos;s viewport, even if the whole viewport is scrolled off screen.

I do not think it clips against its parent viewport.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686632</commentid>
    <comment_count>8</comment_count>
    <who name="Arvid Nilsson">anilsson</who>
    <bug_when>2012-08-03 06:21:24 -0700</bug_when>
    <thetext>(In reply to comment #7)
&gt; &gt; &gt; does this work for subframes?
&gt; &gt; 
&gt; &gt; I think this is actually returns true too often, which is better than too seldom - if my thinking is correct, this will return true if the layer is visible in the subframe&apos;s viewport, even if the whole viewport is scrolled off screen.
&gt; 
&gt; I do not think it clips against its parent viewport.

Exactly, I guess that was what I was trying to say. So it will return true too often (false positive) but that&apos;s ok considering the use case - when to populate tiles. ,maybe there is benefit from making it more accurate, though.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>156199</attachid>
            <date>2012-08-02 16:36:10 -0700</date>
            <delta_ts>2012-08-03 06:04:09 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-93040-20120803013550.patch</filename>
            <type>text/plain</type>
            <size>2906</size>
            <attacher name="Arvid Nilsson">anilsson</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTI0NTIzCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggY2Y3MTVlNTQ0ZTVhMDIx
Mzk3NTYzMjRmYTE3Y2RiMTY4YTM1MDAyOS4uNTJmMmJjY2Y3MzA2ZTU2ODMyMzU3NTc2OGIyYzg4
NjUxMmJjMGQyZCAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDIzIEBACisyMDEyLTA4LTAyICBBcnZp
ZCBOaWxzc29uICA8YW5pbHNzb25AcmltLmNvbT4KKworICAgICAgICBbQmxhY2tCZXJyeV0gVXBz
dHJlYW0gR3JhcGhpY3NMYXllckNsaWVudDo6Y29udGVudHNWaXNpYmxlKCkKKyAgICAgICAgaHR0
cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTkzMDQwCisKKyAgICAgICAgUmV2
aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICA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HKQo=
</data>

          </attachment>
      

    </bug>

</bugzilla>