<?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>82185</bug_id>
          
          <creation_ts>2012-03-26 03:53:30 -0700</creation_ts>
          <short_desc>LayoutRepainter: Remove unused constructor parameter and update to LayoutUnits</short_desc>
          <delta_ts>2012-03-27 03:40:52 -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>Layout and Rendering</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>60318</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Levi Weintraub">leviw</reporter>
          <assigned_to name="Levi Weintraub">leviw</assigned_to>
          <cc>eae</cc>
    
    <cc>eric</cc>
    
    <cc>jchaffraix</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>587587</commentid>
    <comment_count>0</comment_count>
    <who name="Levi Weintraub">leviw</who>
    <bug_when>2012-03-26 03:53:30 -0700</bug_when>
    <thetext>LayoutRepainter has a parameter for oldBounds that is never used, with the old bounds instead being assigned by default from clippedOverflowRectForRepaint. The patch removes this paramater and stores the old bounds and old outline box as LayoutUnits.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>587591</commentid>
    <comment_count>1</comment_count>
      <attachid>133769</attachid>
    <who name="Levi Weintraub">leviw</who>
    <bug_when>2012-03-26 04:00:04 -0700</bug_when>
    <thetext>Created attachment 133769
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>588058</commentid>
    <comment_count>2</comment_count>
      <attachid>133769</attachid>
    <who name="Julien Chaffraix">jchaffraix</who>
    <bug_when>2012-03-26 13:20:19 -0700</bug_when>
    <thetext>Comment on attachment 133769
Patch

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

&gt; Source/WebCore/ChangeLog:9
&gt; +        Removing an optional parameter for old bounds in LayoutRepainter&apos;s constructor that
&gt; +        was never used. The old bounds were instead always gleaned from the renderer&apos;s

That statement is wrong. The parameter was used by SVG when LayoutRepainter was introduced but got removed over time (at least that&apos;s what git blame is telling me). Please amend this statement to say that it is unused now.

&gt; Source/WebCore/rendering/LayoutRepainter.h:49
&gt; +    LayoutRect m_oldBounds;
&gt; +    LayoutRect m_oldOutlineBox;

It&apos;s weird to store them as LayoutRect even if they correspond to paint information (ie should be device pixels). Your ChangeLog entry seems to mention detecting sub-pixel layout change, could you explain me how you are going to handle those, especially with respect to the repaint logic? (Where will you do the rounding / snapping? Where will you actually use IntRect?...)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>588179</commentid>
    <comment_count>3</comment_count>
      <attachid>133769</attachid>
    <who name="Levi Weintraub">leviw</who>
    <bug_when>2012-03-26 15:12:07 -0700</bug_when>
    <thetext>Comment on attachment 133769
Patch

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

&gt;&gt; Source/WebCore/ChangeLog:9
&gt;&gt; +        was never used. The old bounds were instead always gleaned from the renderer&apos;s
&gt; 
&gt; That statement is wrong. The parameter was used by SVG when LayoutRepainter was introduced but got removed over time (at least that&apos;s what git blame is telling me). Please amend this statement to say that it is unused now.

Sorry, that was the point I intended to make. Incorrect choice of words. Either way, it&apos;s not unnecessary.

&gt;&gt; Source/WebCore/rendering/LayoutRepainter.h:49
&gt;&gt; +    LayoutRect m_oldOutlineBox;
&gt; 
&gt; It&apos;s weird to store them as LayoutRect even if they correspond to paint information (ie should be device pixels). Your ChangeLog entry seems to mention detecting sub-pixel layout change, could you explain me how you are going to handle those, especially with respect to the repaint logic? (Where will you do the rounding / snapping? Where will you actually use IntRect?...)

We currently evaluate whether or not to repaint after layout using sub-pixel bounds. This is the safest possible strategy, as we chose not to try and optimize this early. The rects passed to the embedder to repaint are pixel snapped, if that&apos;s the question you&apos;re asking.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>588206</commentid>
    <comment_count>4</comment_count>
      <attachid>133769</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-03-26 15:40:10 -0700</bug_when>
    <thetext>Comment on attachment 133769
Patch

OK.  Obviously you should update per Julien&apos;s comments.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>588297</commentid>
    <comment_count>5</comment_count>
    <who name="Julien Chaffraix">jchaffraix</who>
    <bug_when>2012-03-26 16:38:13 -0700</bug_when>
    <thetext>&gt; We currently evaluate whether or not to repaint after layout using sub-pixel bounds. This is the safest possible strategy, as we chose not to try and optimize this early.

That sounds like a good comment to add to the LayoutRepainter declaration. I would say, repainting AFAICT only makes sense on a device pixel perspective bit it&apos;s better to be conservative here.

&gt; The rects passed to the embedder to repaint are pixel snapped, if that&apos;s the question you&apos;re asking.

OK, I think I see what you mean here. Correct me if I am wrong: WebCore repainting logic will always use LayoutRect, snapped before calling our platform to do the invalidation. That sounds very similar to painting: it will be a lazily (late) conversion. I would love 1 line on the wiki about that :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>588669</commentid>
    <comment_count>6</comment_count>
    <who name="Levi Weintraub">leviw</who>
    <bug_when>2012-03-27 02:16:41 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; &gt; We currently evaluate whether or not to repaint after layout using sub-pixel bounds. This is the safest possible strategy, as we chose not to try and optimize this early.
&gt; 
&gt; That sounds like a good comment to add to the LayoutRepainter declaration. I would say, repainting AFAICT only makes sense on a device pixel perspective bit it&apos;s better to be conservative here.
&gt; 
&gt; &gt; The rects passed to the embedder to repaint are pixel snapped, if that&apos;s the question you&apos;re asking.
&gt; 
&gt; OK, I think I see what you mean here. Correct me if I am wrong: WebCore repainting logic will always use LayoutRect, snapped before calling our platform to do the invalidation. That sounds very similar to painting: it will be a lazily (late) conversion. I would love 1 line on the wiki about that :-)

That&apos;s a fantastic idea as usual :) I&apos;ll update the changelog and Wiki.

Thanks guys!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>588710</commentid>
    <comment_count>7</comment_count>
    <who name="Levi Weintraub">leviw</who>
    <bug_when>2012-03-27 03:07:59 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; &gt; We currently evaluate whether or not to repaint after layout using sub-pixel bounds. This is the safest possible strategy, as we chose not to try and optimize this early.
&gt; 
&gt; That sounds like a good comment to add to the LayoutRepainter declaration. I would say, repainting AFAICT only makes sense on a device pixel perspective bit it&apos;s better to be conservative here.
&gt; 
&gt; &gt; The rects passed to the embedder to repaint are pixel snapped, if that&apos;s the question you&apos;re asking.
&gt; 
&gt; OK, I think I see what you mean here. Correct me if I am wrong: WebCore repainting logic will always use LayoutRect, snapped before calling our platform to do the invalidation. That sounds very similar to painting: it will be a lazily (late) conversion. I would love 1 line on the wiki about that :-)

No correction necessary as you&apos;re absolutely right. I&apos;ll add a comment before landing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>588720</commentid>
    <comment_count>8</comment_count>
      <attachid>133769</attachid>
    <who name="Levi Weintraub">leviw</who>
    <bug_when>2012-03-27 03:40:39 -0700</bug_when>
    <thetext>Comment on attachment 133769
Patch

Landed in http://trac.webkit.org/changeset/112243</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>133769</attachid>
            <date>2012-03-26 04:00:04 -0700</date>
            <delta_ts>2012-03-27 03:40:39 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-82185-20120326120002.patch</filename>
            <type>text/plain</type>
            <size>2930</size>
            <attacher name="Levi Weintraub">leviw</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDExMjA3MykKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDI0IEBACisyMDEyLTAzLTI2ICBMZXZpIFdl
aW50cmF1YiAgPGxldml3QGNocm9taXVtLm9yZz4KKworICAgICAgICBMYXlvdXRSZXBhaW50ZXI6
IFJlbW92ZSB1bnVzZWQgY29uc3RydWN0b3IgcGFyYW1ldGVyIGFuZCB1cGRhdGUgdG8gTGF5b3V0
VW5pdHMKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTgy
MTg1CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAgUmVt
b3ZpbmcgYW4gb3B0aW9uYWwgcGFyYW1ldGVyIGZvciBvbGQgYm91bmRzIGluIExheW91dFJlcGFp
bnRlcidzIGNvbnN0cnVjdG9yIHRoYXQKKyAgICAgICAgd2FzIG5ldmVyIHVzZWQuIFRoZSBvbGQg
Ym91bmRzIHdlcmUgaW5zdGVhZCBhbHdheXMgZ2xlYW5lZCBmcm9tIHRoZSByZW5kZXJlcidzCisg
ICAgICAgIGNsaXBwZWRPdmVyZmxvd1JlY3RGb3JSZXBhaW50LgorCisgICAgICAgIFRoZSByZW5k
ZXJlcidzIGJvdW5kcyBhbmQgb3V0bGluZSByZWN0IGFsc28gc2hvdWxkIGJlIHN0b3JlZCBpbiBM
YXlvdXRVbml0cyB0byBwcm9wZXJseQorICAgICAgICBkZXRlY3Qgc3ViLXBpeG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jdCYgb2JqZWN0LCBib29sIGNoZWNrRm9yUmVwYWludCkKICAg
ICA6IG1fb2JqZWN0KG9iamVjdCkKICAgICAsIG1fcmVwYWludENvbnRhaW5lcigwKQogICAgICwg
bV9jaGVja0ZvclJlcGFpbnQoY2hlY2tGb3JSZXBhaW50KQogewogICAgIGlmIChtX2NoZWNrRm9y
UmVwYWludCkgewogICAgICAgICBtX3JlcGFpbnRDb250YWluZXIgPSBtX29iamVjdC5jb250YWlu
ZXJGb3JSZXBhaW50KCk7Ci0gICAgICAgIG1fb2xkQm91bmRzID0gb2xkQm91bmRzID8gKm9sZEJv
dW5kcyA6IG1fb2JqZWN0LmNsaXBwZWRPdmVyZmxvd1JlY3RGb3JSZXBhaW50KG1fcmVwYWludENv
bnRhaW5lcik7CisgICAgICAgIG1fb2xkQm91bmRzID0gbV9vYmplY3QuY2xpcHBlZE92ZXJmbG93
UmVjdEZvclJlcGFpbnQobV9yZXBhaW50Q29udGFpbmVyKTsKICAgICAgICAgbV9vbGRPdXRsaW5l
Qm94ID0gbV9vYmplY3Qub3V0bGluZUJvdW5kc0ZvclJlcGFpbnQobV9yZXBhaW50Q29udGFpbmVy
KTsKICAgICB9CiB9CkluZGV4OiBTb3VyY2UvV2ViQ29yZS9yZW5kZXJpbmcvTGF5b3V0UmVwYWlu
dGVyLmgKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PQotLS0gU291cmNlL1dlYkNvcmUvcmVuZGVyaW5nL0xheW91dFJlcGFp
bnRlci5oCShyZXZpc2lvbiAxMTIwNjIpCisrKyBTb3VyY2UvV2ViQ29yZS9yZW5kZXJpbmcvTGF5
b3V0UmVwYWludGVyLmgJKHdvcmtpbmcgY29weSkKQEAgLTM1LDcgKzM1LDcgQEAgY2xhc3MgUmVu
ZGVyQm94TW9kZWxPYmplY3Q7CiAKIGNsYXNzIExheW91dFJlcGFpbnRlciB7CiBwdWJsaWM6Ci0g
ICAgTGF5b3V0UmVwYWludGVyKFJlbmRlck9iamVjdCYsIGJvb2wgY2hlY2tGb3JSZXBhaW50LCBj
b25zdCBJbnRSZWN0KiBvbGRCb3VuZHMgPSAwKTsKKyAgICBMYXlvdXRSZXBhaW50ZXIoUmVuZGVy
T2JqZWN0JiwgYm9vbCBjaGVja0ZvclJlcGFpbnQpOwogCiAgICAgYm9vbCBjaGVja0ZvclJlcGFp
bnQoKSBjb25zdCB7IHJldHVybiBtX2NoZWNrRm9yUmVwYWludDsgfQogCkBAIC00NSw4ICs0NSw4
IEBAIHB1YmxpYzoKIHByaXZhdGU6CiAgICAgUmVuZGVyT2JqZWN0JiBtX29iamVjdDsKICAgICBS
ZW5kZXJCb3hNb2RlbE9iamVjdCogbV9yZXBhaW50Q29udGFpbmVyOwotICAgIEludFJlY3QgbV9v
bGRCb3VuZHM7Ci0gICAgSW50UmVjdCBtX29sZE91dGxpbmVCb3g7CisgICAgTGF5b3V0UmVjdCBt
X29sZEJvdW5kczsKKyAgICBMYXlvdXRSZWN0IG1fb2xkT3V0bGluZUJveDsKICAgICBib29sIG1f
Y2hlY2tGb3JSZXBhaW50OwogfTsKIAo=
</data>

          </attachment>
      

    </bug>

</bugzilla>