<?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>89392</bug_id>
          
          <creation_ts>2012-06-18 15:28:41 -0700</creation_ts>
          <short_desc>[Chromium] Notify the embedder when the page scale changes</short_desc>
          <delta_ts>2012-09-12 16:42:26 -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>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>LATER</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>66687</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Adam Barth">abarth</reporter>
          <assigned_to name="Adam Barth">abarth</assigned_to>
          <cc>aelias</cc>
    
    <cc>dglazkov</cc>
    
    <cc>fishd</cc>
    
    <cc>jamesr</cc>
    
    <cc>japhet</cc>
    
    <cc>klobag</cc>
    
    <cc>tkent+wkapi</cc>
    
    <cc>trchen</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>651805</commentid>
    <comment_count>0</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-06-18 15:28:41 -0700</bug_when>
    <thetext>[Chromium] Notify the embedder when the page scale changes</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>651811</commentid>
    <comment_count>1</comment_count>
      <attachid>148188</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-06-18 15:32:45 -0700</bug_when>
    <thetext>Created attachment 148188
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>651812</commentid>
    <comment_count>2</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-06-18 15:33:52 -0700</bug_when>
    <thetext>I&apos;m not really sure what this is used for, but it&apos;s in the chromium-android branch.  trchen might know.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>651813</commentid>
    <comment_count>3</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-06-18 15:37:28 -0700</bug_when>
    <thetext>Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>651862</commentid>
    <comment_count>4</comment_count>
      <attachid>148188</attachid>
    <who name="James Robinson">jamesr</who>
    <bug_when>2012-06-18 16:28:22 -0700</bug_when>
    <thetext>Comment on attachment 148188
Patch

What&apos;s this for?  I wouldn&apos;t expect that the embedder needs to know about the page scale factor, generally speaking.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>651877</commentid>
    <comment_count>5</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-06-18 16:54:01 -0700</bug_when>
    <thetext>If trchen doesn&apos;t know off-hand, I can do some more digging in the chromium-android branch to try to find out.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>651881</commentid>
    <comment_count>6</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2012-06-18 16:56:55 -0700</bug_when>
    <thetext>If you can search for callers on the chromium and figure out what they are doing that would be super useful.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>651883</commentid>
    <comment_count>7</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-06-18 17:04:04 -0700</bug_when>
    <thetext>&gt; If you can search for callers on the chromium and figure out what they are doing that would be super useful.

I gets routed up to the browser process and then out to Java.  Once in Java, it looks like it&apos;s used to update some UI controls for zooming.  Maybe there&apos;s a scale (like on a map) that shows you how zoomed in you are, possibly relative to what min and max zooms are available?  I don&apos;t read Java UI code very well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>651885</commentid>
    <comment_count>8</comment_count>
      <attachid>148188</attachid>
    <who name="James Robinson">jamesr</who>
    <bug_when>2012-06-18 17:07:07 -0700</bug_when>
    <thetext>Comment on attachment 148188
Patch

That sounds like a UI that was abandoned a while ago for page zoom - let&apos;s get some confirmation about whether this code is still alive or not before adding it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>651886</commentid>
    <comment_count>9</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-06-18 17:08:20 -0700</bug_when>
    <thetext>@trchen: Do we still need these notifications?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>656187</commentid>
    <comment_count>10</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-06-24 01:53:41 -0700</bug_when>
    <thetext>I will attempt to remove this notification from the chromium-android branch to see if folks are still using it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>659794</commentid>
    <comment_count>11</comment_count>
      <attachid>148188</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-06-28 13:58:10 -0700</bug_when>
    <thetext>Comment on attachment 148188
Patch

I put on my Java thinking cap and figure out what this actually does.  It lets the UI keep track of how much page scaling is possible so that it can properly react to various pinch-like gestures.  It&apos;s also used by the browser UI to adjust the size of various overly elements to scale them commensurate with the page.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>661732</commentid>
    <comment_count>12</comment_count>
      <attachid>148188</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-07-02 14:43:12 -0700</bug_when>
    <thetext>Comment on attachment 148188
Patch

jamesr and I spoke about this patch at length.  The approach in this patch isn&apos;t great because this patch essentially creates to notification paths for the page scale information to reach the browser&apos;s UI thread:

1) These callbacks.
2) The images drawn by the compositor.

Having two asynchronous notification paths is problematic because the messages arriving on these two paths will be inconsistent and lead to janky UI.  At a better approach is to send this information along the compositor&apos;s notification path so that it is synchronized with the images actually being displayed by the compositor.

James recommends looking at WebCompositorInputHandler and WebCompositorInputHandlerClient to see how we might follow that approach.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>661783</commentid>
    <comment_count>13</comment_count>
    <who name="Tien-Ren Chen">trchen</who>
    <bug_when>2012-07-02 15:49:23 -0700</bug_when>
    <thetext>(In reply to comment #12)
&gt; (From update of attachment 148188 [details])
&gt; jamesr and I spoke about this patch at length.  The approach in this patch isn&apos;t great because this patch essentially creates to notification paths for the page scale information to reach the browser&apos;s UI thread:
&gt; 
&gt; 1) These callbacks.
&gt; 2) The images drawn by the compositor.
&gt; 
&gt; Having two asynchronous notification paths is problematic because the messages arriving on these two paths will be inconsistent and lead to janky UI.  At a better approach is to send this information along the compositor&apos;s notification path so that it is synchronized with the images actually being displayed by the compositor.
&gt; 
&gt; James recommends looking at WebCompositorInputHandler and WebCompositorInputHandlerClient to see how we might follow that approach.

In the case of Android, even if we send all these notification from the compositor thread it still won&apos;t be synchronous with the rendered images, as the GL commands go through the command buffer pipeline... In our downstream code we used to add a GL extension to pass frame information along with swap buffers, which was essential for glitch-free mixed-mode scrolling. It was later removed with the deprecation of mixed-mode. We deemed that async message is good enough for our use (and synchronous message is expensive).

For the long term I think we want to move all the rendering logic of extra decorations (mainly text selection handles) to the compositor so we don&apos;t have to deal with scale factor mess from the browser side.

Do we still need these IPCs? I&apos;m not very sure. They might still be useful to handle WebView properties from 3rd-party WebView users, but don&apos;t quote me on that. Let me add aelias@ and klobag@ to the thread for more inputs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>661831</commentid>
    <comment_count>14</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-07-02 17:22:29 -0700</bug_when>
    <thetext>I believe they&apos;re needed for some of the WebView APIs, such as canZoomIn().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>661879</commentid>
    <comment_count>15</comment_count>
    <who name="Alexandre Elias">aelias</who>
    <bug_when>2012-07-02 19:02:14 -0700</bug_when>
    <thetext>The latest plan is to bundle this data with ubercompositor frames.  Clank is moving to ubercompositor and we recently figured out that to support WebView child views in particular, we&apos;ll need accurate, frame-synchronized scroll offset and page scale information for the root layer.  So we can delete these lines.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>148188</attachid>
            <date>2012-06-18 15:32:45 -0700</date>
            <delta_ts>2012-07-02 14:43:11 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-89392-20120618153245.patch</filename>
            <type>text/plain</type>
            <size>3626</size>
            <attacher name="Adam Barth">abarth</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJLaXQvY2hyb21pdW0vQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFNv
dXJjZS9XZWJLaXQvY2hyb21pdW0vQ2hhbmdlTG9nCShyZXZpc2lvbiAxMjA2MzUpCisrKyBTb3Vy
Y2UvV2ViS2l0L2Nocm9taXVtL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDIw
IEBACisyMDEyLTA2LTE4ICBBZGFtIEJhcnRoICA8YWJhcnRoQHdlYmtpdC5vcmc+CisKKyAgICAg
ICAgW0Nocm9taXVtXSBOb3RpZnkgdGhlIGVtYmVkZGVyIHdoZW4gdGhlIHBhZ2Ugc2NhbGUgY2hh
bmdlcworICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9ODkz
OTIKKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICAqIHB1
YmxpYy9XZWJGcmFtZ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G8KICAgICBXZWJQ
b2ludCBjbGFtcGVkT3JpZ2luID0gY2xhbXBPZmZzZXRBdFNjYWxlKG9yaWdpbiwgc2NhbGVGYWN0
b3IpOwogICAgIHBhZ2UoKS0+c2V0UGFnZVNjYWxlRmFjdG9yKHNjYWxlRmFjdG9yLCBjbGFtcGVk
T3JpZ2luKTsKICAgICBtX3BhZ2VTY2FsZUZhY3RvcklzU2V0ID0gdHJ1ZTsKKyAgICBtYWluRnJh
bWVJbXBsKCktPmNsaWVudCgpLT5kaWRDaGFuZ2VQYWdlU2NhbGUobWFpbkZyYW1lSW1wbCgpKTsK
IH0KIAogZmxvYXQgV2ViVmlld0ltcGw6OmRldmljZVNjYWxlRmFjdG9yKCkgY29uc3QKQEAgLTI1
NjQsNiArMjU2Niw3IEBAIGJvb2wgV2ViVmlld0ltcGw6OmNvbXB1dGVQYWdlU2NhbGVGYWN0b3IK
ICAgICAgICAgbV9tYXhpbXVtUGFnZVNjYWxlRmFjdG9yID0gbWF4KG1fbWluaW11bVBhZ2VTY2Fs
ZUZhY3RvciwgbV9tYXhpbXVtUGFnZVNjYWxlRmFjdG9yKTsKICAgICB9CiAgICAgQVNTRVJUKG1f
bWluaW11bVBhZ2VTY2FsZUZhY3RvciA8PSBtX21heGltdW1QYWdlU2NhbGVGYWN0b3IpOworICAg
IG1fY2xpZW50LT5kaWRDaGFuZ2VQYWdlU2NhbGVGYWN0b3JMaW1pdHMobV9taW5pbXVtUGFnZVNj
YWxlRmFjdG9yLCBtX21heGltdW1QYWdlU2NhbGVGYWN0b3IpOwogCiAgICAgZmxvYXQgY2xhbXBl
ZFNjYWxlID0gY2xhbXBQYWdlU2NhbGVGYWN0b3JUb0xpbWl0cyhwYWdlU2NhbGVGYWN0b3IoKSk7
CiAjaWYgVVNFKEFDQ0VMRVJBVEVEX0NPTVBPU0lUSU5HKQo=
</data>
<flag name="review"
          id="155843"
          type_id="1"
          status="-"
          setter="abarth"
    />
          </attachment>
      

    </bug>

</bugzilla>