<?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>111532</bug_id>
          
          <creation_ts>2013-03-06 00:03:47 -0800</creation_ts>
          <short_desc>Clarify the size of a document view that causes FrameView to emit the resize event.</short_desc>
          <delta_ts>2013-07-09 15:52:59 -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>UI Events</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></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>
          <dependson>80242</dependson>
    
    <dependson>107424</dependson>
          <blocked>81209</blocked>
    
    <blocked>111408</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Dongseong Hwang">dongseong.hwang</reporter>
          <assigned_to name="Dongseong Hwang">dongseong.hwang</assigned_to>
          <cc>aelias</cc>
    
    <cc>allan.jensen</cc>
    
    <cc>bdakin</cc>
    
    <cc>jturcotte</cc>
    
    <cc>kenneth</cc>
    
    <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>848533</commentid>
    <comment_count>0</comment_count>
    <who name="Dongseong Hwang">dongseong.hwang</who>
    <bug_when>2013-03-06 00:03:47 -0800</bug_when>
    <thetext>The spec DOM Level 2 Events states that the resize event occurs when a document
view is resized.

After r141053, FrameView::unscaledVisibleContentSize stands for a document view
size. When turning on fixed layout, fixed layout size stands for a document view
size. This patch applies the term of the spec to FrameView exactly.

In addition, this removes delegatesScrolling check because delegatesScrolling is
not related to the size of a document view.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>848536</commentid>
    <comment_count>1</comment_count>
      <attachid>191665</attachid>
    <who name="Dongseong Hwang">dongseong.hwang</who>
    <bug_when>2013-03-06 00:07:03 -0800</bug_when>
    <thetext>Created attachment 191665
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>848539</commentid>
    <comment_count>2</comment_count>
    <who name="Dongseong Hwang">dongseong.hwang</who>
    <bug_when>2013-03-06 00:09:01 -0800</bug_when>
    <thetext>This patch is the follow-up patch of Bug 80242.
r141053 that the changelog refers to is Bug 107424.

I tested only Qt and EFL ports, so I need various feedback.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>848564</commentid>
    <comment_count>3</comment_count>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2013-03-06 00:41:05 -0800</bug_when>
    <thetext>Why isnt this tested?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>848570</commentid>
    <comment_count>4</comment_count>
      <attachid>191665</attachid>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2013-03-06 00:43:17 -0800</bug_when>
    <thetext>Comment on attachment 191665
Patch

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

&gt; Source/WebCore/ChangeLog:13
&gt; +        After r141053, FrameView::unscaledVisibleContentSize stands for a document view
&gt; +        size. When turning on fixed layout, fixed layout size stands for a document view
&gt; +        size. This patch applies the term of the spec to FrameView exactly.

view? Not viewport? 

I don&apos;t get this.

With fixed layout, the fixed layout size is the size of the document, not the viewport

&gt; Source/WebCore/ChangeLog:19
&gt; +
&gt; +        Covered by existing tests: fast/events/resize-events.html
&gt; +

Sorry, it must be early yet. I missed this one! :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>848651</commentid>
    <comment_count>5</comment_count>
    <who name="Allan Sandfeld Jensen">allan.jensen</who>
    <bug_when>2013-03-06 02:10:54 -0800</bug_when>
    <thetext>This is great, but can the subtle difference be tested. I guess it makes a difference on with fixedLayoutSize but disabled delegatedScrolling?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>849134</commentid>
    <comment_count>6</comment_count>
    <who name="Alexandre Elias">aelias</who>
    <bug_when>2013-03-06 11:34:28 -0800</bug_when>
    <thetext>I think there&apos;s a bit of an open question about whether, in the presence of page scale, we should report to Javascript (1) the true user-visible scaled viewport, or (2) the fixed layout size (and a scroll offset properly clamped to go with it).  The specs are ambiguous about this since page scale didn&apos;t exist back then.

I&apos;m inclined to favor (2) since that&apos;s more backwards compatible, and it looks like this patch is moving in that direction, so it&apos;s okay with me.  Though in that case, to be more consistent, it seems like the viewport size sent to Javascript should also changed be unscaledVisibleContentSize.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>855707</commentid>
    <comment_count>7</comment_count>
    <who name="Dongseong Hwang">dongseong.hwang</who>
    <bug_when>2013-03-14 22:36:16 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; This is great, but can the subtle difference be tested. I guess it makes a difference on with fixedLayoutSize but disabled delegatedScrolling?

Thank you for review!
Yes, you&apos;re right: the port with fixedLayoutSize but disabled delegatedScrolling now keeps fixedLayoutSize() as a m_lastViewportSize. the port can be tested using fast/events/resize-events.html also.

I think this change goes to right direction. I think a document view is layout viewport that http://www.quirksmode.org/mobile/viewports2.html said, and when enabling fixed layout, layout viewport would be fixed layout size.

(In reply to comment #6)
&gt; I think there&apos;s a bit of an open question about whether, in the presence of page scale, we should report to Javascript (1) the true user-visible scaled viewport, or (2) the fixed layout size (and a scroll offset properly clamped to go with it).  The specs are ambiguous about this since page scale didn&apos;t exist back then.

Thank you for good open questions! In my understanding based on http://www.quirksmode.org/mobile/viewports2.html

1. If a user uses window.innerWidth/Height, WebKit should return user-visible scaled viewport, which is visibleContentRect(IncludeScrollbars).size().
2. If a user uses document.documentElement.clientWidth/Height, WebKit should return unscaledVisibleContentSize. And if enabling fixed layout, WebKit should return fixed layout size.

&gt; I&apos;m inclined to favor (2) since that&apos;s more backwards compatible, and it looks like this patch is moving in that direction, so it&apos;s okay with me.  Though in that case, to be more consistent, it seems like the viewport size sent to Javascript should also changed be unscaledVisibleContentSize.

I manually test http://www.quirksmode.org/m/tests/widthtest.html on Qt WK2, both window.innerWidth and document.documentElement.clientWidth work well. If do you think we should change anything, could you explain more?</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>191665</attachid>
            <date>2013-03-06 00:07:03 -0800</date>
            <delta_ts>2013-07-09 07:00:59 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-111532-20130306170233.patch</filename>
            <type>text/plain</type>
            <size>3085</size>
            <attacher name="Dongseong Hwang">dongseong.hwang</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTQ0ODQxCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggODlhN2MwODliYWNlZTRm
ZDFlZDg4NWFlNjdmZGQ3MTM3ZDI3OTkwNS4uZjEzOGMwYjAyNTczNDhhMWEyNzBmZTE3OTZmODVl
NDRmZjg3YzBmMyAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDI2IEBACisyMDEzLTAzLTA2ICBIdWFu
ZyBEb25nc3VuZyAgPGx1eHRlbGxhQGNvbXBhbnkxMDAubmV0PgorCisgICAgICAgIENsYXJpZnkg
dGhlIHNpemUgb2YgYSBkb2N1bWVudCB2aWV3IHRoYXQgY2F1c2VzIEZyYW1lVmlldyB0byBlbWl0
IHRoZSByZXNpemUgZXZlbnQuCisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3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HZpc2libGVDb250ZW50UmVjdChJbmNsdWRlU2Nyb2xs
YmFycykuc2l6ZSgpOworICAgICAgICAgICAgICAgICAgICAgICAgbV9sYXN0Vmlld3BvcnRTaXpl
ID0gdW5zY2FsZWRWaXNpYmxlQ29udGVudFNpemUoSW5jbHVkZVNjcm9sbGJhcnMpOwogICAgICAg
ICAgICAgICAgICAgICBtX2xhc3Rab29tRmFjdG9yID0gcm9vdC0+c3R5bGUoKS0+em9vbSgpOwog
CiAgICAgICAgICAgICAgICAgICAgIC8vIFNldCB0aGUgaW5pdGlhbCB2TW9kZSB0byBBbHdheXNP
biBpZiB3ZSdyZSBhdXRvLgpAQCAtMjY0NSwxMCArMjY0NSwxMCBAQCB2b2lkIEZyYW1lVmlldzo6
cGVyZm9ybVBvc3RMYXlvdXRUYXNrcygpCiAKICAgICBpZiAocmVuZGVyVmlldyAmJiAhcmVuZGVy
Vmlldy0+cHJpbnRpbmcoKSkgewogICAgICAgICBJbnRTaXplIGN1cnJlbnRTaXplOwotICAgICAg
ICBpZiAodXNlRml4ZWRMYXlvdXQoKSAmJiAhZml4ZWRMYXlvdXRTaXplKCkuaXNFbXB0eSgpICYm
IGRlbGVnYXRlc1Njcm9sbGluZygpKQorICAgICAgICBpZiAodXNlRml4ZWRMYXlvdXQoKSAmJiAh
Zml4ZWRMYXlvdXRTaXplKCkuaXNFbXB0eSgpKQogICAgICAgICAgICAgY3VycmVudFNpemUgPSBm
aXhlZExheW91dFNpemUoKTsKICAgICAgICAgZWxzZQotICAgICAgICAgICAgY3VycmVudFNpemUg
PSB2aXNpYmxlQ29udGVudFJlY3QoSW5jbHVkZVNjcm9sbGJhcnMpLnNpemUoKTsKKyAgICAgICAg
ICAgIGN1cnJlbnRTaXplID0gdW5zY2FsZWRWaXNpYmxlQ29udGVudFNpemUoSW5jbHVkZVNjcm9s
bGJhcnMpOwogICAgICAgICBmbG9hdCBjdXJyZW50Wm9vbUZhY3RvciA9IHJlbmRlclZpZXctPnN0
eWxlKCktPnpvb20oKTsKICAgICAgICAgYm9vbCByZXNpemVkID0gIW1fZmlyc3RMYXlvdXQgJiYg
KGN1cnJlbnRTaXplICE9IG1fbGFzdFZpZXdwb3J0U2l6ZSB8fCBjdXJyZW50Wm9vbUZhY3RvciAh
PSBtX2xhc3Rab29tRmFjdG9yKTsKICAgICAgICAgbV9sYXN0Vmlld3BvcnRTaXplID0gY3VycmVu
dFNpemU7Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>