<?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>114146</bug_id>
          
          <creation_ts>2013-04-08 00:14:59 -0700</creation_ts>
          <short_desc>[BlackBerry] Replace getRect() with boundingBox()</short_desc>
          <delta_ts>2014-01-09 23:46:17 -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>WebKit BlackBerry</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</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>111729</blocked>
          <everconfirmed>0</everconfirmed>
          <reporter name="Alberto Garcia">berto</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cgarcia</cc>
    
    <cc>mifenton</cc>
    
    <cc>rwlbuis</cc>
    
    <cc>tonikitoo</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>870642</commentid>
    <comment_count>0</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2013-04-08 00:14:59 -0700</bug_when>
    <thetext>This was renamed in r128006:

http://trac.webkit.org/changeset/128006/trunk/Source/WebCore/dom/Node.h</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>870643</commentid>
    <comment_count>1</comment_count>
      <attachid>196833</attachid>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2013-04-08 00:16:16 -0700</bug_when>
    <thetext>Created attachment 196833
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>870650</commentid>
    <comment_count>2</comment_count>
      <attachid>196833</attachid>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2013-04-08 00:44:09 -0700</bug_when>
    <thetext>Comment on attachment 196833
Patch

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

&gt; Source/WebKit/blackberry/Api/WebPage.cpp:2601
&gt; -            return view-&gt;contentsToWindow(node-&gt;getRect());
&gt; +            return view-&gt;contentsToWindow(IntRect(node-&gt;boundingBox()));

Why do you need the IntRect()?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>870653</commentid>
    <comment_count>3</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2013-04-08 00:49:50 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; &gt; Source/WebKit/blackberry/Api/WebPage.cpp:2601
&gt; &gt; -            return view-&gt;contentsToWindow(node-&gt;getRect());
&gt; &gt; +            return view-&gt;contentsToWindow(IntRect(node-&gt;boundingBox()));
&gt; 
&gt; Why do you need the IntRect()?

Node::boundingBox() returns LayoutRect.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>870654</commentid>
    <comment_count>4</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2013-04-08 00:54:06 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #2)
&gt; &gt; &gt; Source/WebKit/blackberry/Api/WebPage.cpp:2601
&gt; &gt; &gt; -            return view-&gt;contentsToWindow(node-&gt;getRect());
&gt; &gt; &gt; +            return view-&gt;contentsToWindow(IntRect(node-&gt;boundingBox()));
&gt; &gt; 
&gt; &gt; Why do you need the IntRect()?
&gt; 
&gt; Node::boundingBox() returns LayoutRect.

I think there&apos;s an explicit constructor for that, note that getRect() also returned a LayoutRect.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>870657</commentid>
    <comment_count>5</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2013-04-08 01:01:11 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; &gt; &gt; Why do you need the IntRect()?
&gt; &gt;
&gt; &gt; Node::boundingBox() returns LayoutRect.
&gt;
&gt; I think there&apos;s an explicit constructor for that

Exactly, _explicit_, that&apos;s why there&apos;s no implicit conversion here:

Source/WebKit/blackberry/Api/WebPage.cpp:2611:62: error: no matching function for call to &apos;WebCore::FrameView::contentsToWindow(WebCore::LayoutRect)&apos;
Source/WebKit/blackberry/Api/WebPage.cpp:2611:62: note: candidates are:
Source/WebCore/platform/ScrollView.h:231:14: note: WebCore::IntPoint WebCore::ScrollView::contentsToWindow(const WebCore::IntPoint&amp;) const
Source/WebCore/platform/ScrollView.h:231:14: note:   no known conversion for argument 1 from &apos;WebCore::LayoutRect&apos; to &apos;const WebCore::IntPoint&amp;&apos;
Source/WebCore/platform/ScrollView.h:233:13: note: WebCore::IntRect WebCore::ScrollView::contentsToWindow(const WebCore::IntRect&amp;) const
Source/WebCore/platform/ScrollView.h:233:13: note:   no known conversion for argument 1 from &apos;WebCore::LayoutRect&apos; to &apos;const WebCore::IntRect&amp;&apos;

&gt; note that getRect() also returned a LayoutRect.

Well, the code was not compiling before either, but I guess it doesn&apos;t
make sense to split this change in two :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>870661</commentid>
    <comment_count>6</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2013-04-08 01:08:14 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #4)
&gt; &gt; &gt; &gt; Why do you need the IntRect()?
&gt; &gt; &gt;
&gt; &gt; &gt; Node::boundingBox() returns LayoutRect.
&gt; &gt;
&gt; &gt; I think there&apos;s an explicit constructor for that
&gt; 
&gt; Exactly, _explicit_, that&apos;s why there&apos;s no implicit conversion here:
&gt; 
&gt; Source/WebKit/blackberry/Api/WebPage.cpp:2611:62: error: no matching function for call to &apos;WebCore::FrameView::contentsToWindow(WebCore::LayoutRect)&apos;
&gt; Source/WebKit/blackberry/Api/WebPage.cpp:2611:62: note: candidates are:
&gt; Source/WebCore/platform/ScrollView.h:231:14: note: WebCore::IntPoint WebCore::ScrollView::contentsToWindow(const WebCore::IntPoint&amp;) const
&gt; Source/WebCore/platform/ScrollView.h:231:14: note:   no known conversion for argument 1 from &apos;WebCore::LayoutRect&apos; to &apos;const WebCore::IntPoint&amp;&apos;
&gt; Source/WebCore/platform/ScrollView.h:233:13: note: WebCore::IntRect WebCore::ScrollView::contentsToWindow(const WebCore::IntRect&amp;) const
&gt; Source/WebCore/platform/ScrollView.h:233:13: note:   no known conversion for argument 1 from &apos;WebCore::LayoutRect&apos; to &apos;const WebCore::IntRect&amp;&apos;
&gt; 
&gt; &gt; note that getRect() also returned a LayoutRect.
&gt; 
&gt; Well, the code was not compiling before either, but I guess it doesn&apos;t
&gt; make sense to split this change in two :)

No, it&apos;s just that I was assuming the code compiled before :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>870665</commentid>
    <comment_count>7</comment_count>
      <attachid>196833</attachid>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2013-04-08 01:25:31 -0700</bug_when>
    <thetext>Comment on attachment 196833
Patch

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

&gt;&gt; Source/WebKit/blackberry/Api/WebPage.cpp:2601
&gt;&gt; +            return view-&gt;contentsToWindow(IntRect(node-&gt;boundingBox()));
&gt; 
&gt; Why do you need the IntRect()?

I wonder if what we really want here is pixelSnappedBoundingBox() here.

&gt; Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp:1957
&gt; -    WebCore::IntRect elementRectInRootView = select-&gt;document()-&gt;view()-&gt;contentsToRootView(enclosingIntRect(select-&gt;getRect()));
&gt; +    WebCore::IntRect elementRectInRootView = select-&gt;document()-&gt;view()-&gt;contentsToRootView(enclosingIntRect(select-&gt;boundingBox()));

And same here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>873627</commentid>
    <comment_count>8</comment_count>
      <attachid>196833</attachid>
    <who name="Xan Lopez">xan.lopez</who>
    <bug_when>2013-04-11 02:08:53 -0700</bug_when>
    <thetext>Comment on attachment 196833
Patch

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

r- because we should use different APIs and I think some of the code we are changing is dead.

&gt;&gt;&gt; Source/WebKit/blackberry/Api/WebPage.cpp:2601
&gt;&gt;&gt; +            return view-&gt;contentsToWindow(IntRect(node-&gt;boundingBox()));
&gt;&gt; 
&gt;&gt; Why do you need the IntRect()?
&gt; 
&gt; I wonder if what we really want here is pixelSnappedBoundingBox() here.

If you read the code this seems to be used to check whether the bounding box intersects with the visible rectangle of another node in ::contextNode. Since the second rectangle is not using a snapped version, I think we should not use it here.

&gt; Source/WebKit/blackberry/Api/WebPage.cpp:5013
&gt;      }

I cannot even find where this code is used. Seems to be dead? If that&apos;s so let&apos;s just remove it.

&gt;&gt; Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp:1957
&gt;&gt; +    WebCore::IntRect elementRectInRootView = select-&gt;document()-&gt;view()-&gt;contentsToRootView(enclosingIntRect(select-&gt;boundingBox()));
&gt; 
&gt; And same here.

Here we should use a pixel snapped version, since it is what Chromium does when calling this API.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>896926</commentid>
    <comment_count>9</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2013-06-04 09:37:16 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; &gt; Source/WebKit/blackberry/Api/WebPage.cpp:5013
&gt; &gt;      }
&gt;
&gt; I cannot even find where this code is used. Seems to be dead? If
&gt; that&apos;s so let&apos;s just remove it.

You&apos;re right about this, I&apos;ll double check and file a separate bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>966257</commentid>
    <comment_count>10</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2014-01-09 23:46:17 -0800</bug_when>
    <thetext>This bug is obsolete, closing.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>196833</attachid>
            <date>2013-04-08 00:16:16 -0700</date>
            <delta_ts>2013-04-11 02:08:53 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>114146.diff</filename>
            <type>text/plain</type>
            <size>2750</size>
            <attacher name="Alberto Garcia">berto</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQvYmxhY2tiZXJyeS9BcGkvV2ViUGFnZS5jcHAgYi9T
b3VyY2UvV2ViS2l0L2JsYWNrYmVycnkvQXBpL1dlYlBhZ2UuY3BwCmluZGV4IGVhMzU1MDUuLjU1
YThhN2YgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9XZWJLaXQvYmxhY2tiZXJyeS9BcGkvV2ViUGFnZS5j
cHAKKysrIGIvU291cmNlL1dlYktpdC9ibGFja2JlcnJ5L0FwaS9XZWJQYWdlLmNwcApAQCAtMjU5
OCw3ICsyNTk4LDcgQEAgc3RhdGljIEludFJlY3QgZ2V0Tm9kZVdpbmRvd1JlY3QoTm9kZSogbm9k
ZSkKIHsKICAgICBpZiAoRnJhbWUqIGZyYW1lID0gZnJhbWVGb3JOb2RlKG5vZGUpKSB7CiAgICAg
ICAgIGlmIChGcmFtZVZpZXcqIHZpZXcgPSBmcmFtZS0+dmlldygpKQotICAgICAgICAgICAgcmV0
dXJuIHZpZXctPmNvbnRlbnRzVG9XaW5kb3cobm9kZS0+Z2V0UmVjdCgpKTsKKyAgICAgICAgICAg
IHJldHVybiB2aWV3LT5jb250ZW50c1RvV2luZG93KEludFJlY3Qobm9kZS0+Ym91bmRpbmdCb3go
KSkpOwogICAgIH0KICAgICBBU1NFUlRfTk9UX1JFQUNIRUQoKTsKICAgICByZXR1cm4gSW50UmVj
dCgpOwpAQCAtNTAwOCw3ICs1MDA4LDcgQEAgYm9vbCBXZWJQYWdlOjpnZXROb2RlUmVjd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0ZWRzLCBtX3dlYlBhZ2UsIHNl
bGVjdCk7Ci0gICAgV2ViQ29yZTo6SW50UmVjdCBlbGVtZW50UmVjdEluUm9vdFZpZXcgPSBzZWxl
Y3QtPmRvY3VtZW50KCktPnZpZXcoKS0+Y29udGVudHNUb1Jvb3RWaWV3KGVuY2xvc2luZ0ludFJl
Y3Qoc2VsZWN0LT5nZXRSZWN0KCkpKTsKKyAgICBXZWJDb3JlOjpJbnRSZWN0IGVsZW1lbnRSZWN0
SW5Sb290VmlldyA9IHNlbGVjdC0+ZG9jdW1lbnQoKS0+dmlldygpLT5jb250ZW50c1RvUm9vdFZp
ZXcoZW5jbG9zaW5nSW50UmVjdChzZWxlY3QtPmJvdW5kaW5nQm94KCkpKTsKICAgICAvLyBGYWls
IHRvIGNyZWF0ZSBIVE1MIHBvcHVwLCB1c2UgdGhlIG9sZCBwYXRoCiAgICAgaWYgKCFtX3dlYlBh
Z2UtPm1fcGFnZS0+Y2hyb21lKCktPmNsaWVudCgpLT5vcGVuUGFnZVBvcHVwKHNlbGVjdENsaWVu
dCwgZWxlbWVudFJlY3RJblJvb3RWaWV3KSkKICAgICAgICAgbV93ZWJQYWdlLT5tX2NsaWVudC0+
b3BlblBvcHVwTGlzdChtdWx0aXBsZSwgc2l6ZSwgbGFiZWxzLCBlbmFibGVkcywgaXRlbVR5cGVz
LCBzZWxlY3RlZHMpOwo=
</data>
<flag name="review"
          id="218995"
          type_id="1"
          status="-"
          setter="xan.lopez"
    />
    <flag name="commit-queue"
          id="218996"
          type_id="3"
          status="-"
          setter="xan.lopez"
    />
          </attachment>
      

    </bug>

</bugzilla>