<?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>64290</bug_id>
          
          <creation_ts>2011-07-11 09:42:23 -0700</creation_ts>
          <short_desc>The layout of RenderBox should be calculated using fixedLayoutSize instead of viewport when the fixedLayoutSize is set.</short_desc>
          <delta_ts>2011-12-01 13:41:50 -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>Layout and Rendering</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>UNCONFIRMED</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>
          
          <blocked>70559</blocked>
          <everconfirmed>0</everconfirmed>
          <reporter name="Young Han Lee">joybro201</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahf</cc>
    
    <cc>eric</cc>
    
    <cc>fsamuel</cc>
    
    <cc>hyatt</cc>
    
    <cc>kenneth</cc>
    
    <cc>manyoso</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>tonikitoo</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>434937</commentid>
    <comment_count>0</comment_count>
    <who name="Young Han Lee">joybro201</who>
    <bug_when>2011-07-11 09:42:23 -0700</bug_when>
    <thetext>The layout of an RenderBox should be calculated using fixedLayoutSize instead of viewport when the fixedLayoutSize is set.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>434942</commentid>
    <comment_count>1</comment_count>
      <attachid>100314</attachid>
    <who name="Young Han Lee">joybro201</who>
    <bug_when>2011-07-11 09:51:56 -0700</bug_when>
    <thetext>Created attachment 100314
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>452417</commentid>
    <comment_count>2</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-08-17 11:35:04 -0700</bug_when>
    <thetext>This would be a simple patch for simon or hyatt to review.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>452419</commentid>
    <comment_count>3</comment_count>
      <attachid>100314</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-08-17 11:36:09 -0700</bug_when>
    <thetext>Comment on attachment 100314
Patch

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

&gt; Source/WebCore/ChangeLog:18
&gt; +        No tests because this change affects only when fixedLayoutSize is set. Since our dumpRenderTree doesn&apos;t set it, we can&apos;t test this.

DumpRenderTree has a layoutConstroller.overridePreference() which can be used to toggle a setting for a single test.  Seems if your DRT supports that (which ideally it should), it would be easy to write a test for this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>452421</commentid>
    <comment_count>4</comment_count>
      <attachid>100314</attachid>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2011-08-17 11:36:52 -0700</bug_when>
    <thetext>Comment on attachment 100314
Patch

r- for lack of test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>454403</commentid>
    <comment_count>5</comment_count>
    <who name="Young Han Lee">joybro201</who>
    <bug_when>2011-08-21 08:30:05 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; (From update of attachment 100314 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=100314&amp;action=review
&gt; 
&gt; &gt; Source/WebCore/ChangeLog:18
&gt; &gt; +        No tests because this change affects only when fixedLayoutSize is set. Since our dumpRenderTree doesn&apos;t set it, we can&apos;t test this.
&gt; 
&gt; DumpRenderTree has a layoutConstroller.overridePreference() which can be used to toggle a setting for a single test.  Seems if your DRT supports that (which ideally it should), it would be easy to write a test for this.

No. layoutController.overridePreference() is not helpful because it toggles only settings of WebSettings.

To turn on the fixedLayoutSize feature, to test this patch, FrameView::setUseFixedLayout(true) have to be called.

I think there is no easy way to turn on this feature for a single test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>454406</commentid>
    <comment_count>6</comment_count>
    <who name="Antonio Gomes">tonikitoo</who>
    <bug_when>2011-08-21 08:55:53 -0700</bug_when>
    <thetext>
&gt; No. layoutController.overridePreference() is not helpful because it toggles only settings of WebSettings.
&gt; 
&gt; To turn on the fixedLayoutSize feature, to test this patch, FrameView::setUseFixedLayout(true) have to be called.
&gt; 
&gt; I think there is no easy way to turn on this feature for a single test.

It raises an interesting point. I do not think it should be necessary to set the fixedLayoutSize and set useFixedLayoutSize to TRUE.

Maybe once it is set to something different than 0x0, it should be used.

There could be a logicalLayoutSize in ScrollView that abstracts this for the call sites.

IntSize ScrollView::logicalLayoutSize() const
{
  if (m_fixedLayoutSize.isValid()) // != 0x0, and has non zero values
    return m_fixedLayoutSize;

  return viewportSize;
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>455451</commentid>
    <comment_count>7</comment_count>
    <who name="Young Han Lee">joybro201</who>
    <bug_when>2011-08-23 09:34:26 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; &gt; No. layoutController.overridePreference() is not helpful because it toggles only settings of WebSettings.
&gt; &gt; 
&gt; &gt; To turn on the fixedLayoutSize feature, to test this patch, FrameView::setUseFixedLayout(true) have to be called.
&gt; &gt; 
&gt; &gt; I think there is no easy way to turn on this feature for a single test.
&gt; 
&gt; It raises an interesting point. I do not think it should be necessary to set the fixedLayoutSize and set useFixedLayoutSize to TRUE.
&gt; 
&gt; Maybe once it is set to something different than 0x0, it should be used.
&gt; 
&gt; There could be a logicalLayoutSize in ScrollView that abstracts this for the call sites.
&gt; 
&gt; IntSize ScrollView::logicalLayoutSize() const
&gt; {
&gt;   if (m_fixedLayoutSize.isValid()) // != 0x0, and has non zero values
&gt;     return m_fixedLayoutSize;
&gt; 
&gt;   return viewportSize;
&gt; }

Here is the implementation of the layoutWidth().

int ScrollView::layoutWidth() const
{
    return m_fixedLayoutSize.isEmpty() || !m_useFixedLayout ? visibleWidth() : m_fixedLayoutSize.width();
}

As you can see, m_fixedLayoutSize is not returned, even if it isn&apos;t empty, when m_useFixedLayout is not TRUE.

Unfortunately there is also no function like you said in ScrollView. For now, we have to set both fixedLayoutSize and useFixedLayoutSize.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>455480</commentid>
    <comment_count>8</comment_count>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2011-08-23 10:29:38 -0700</bug_when>
    <thetext>
&gt; It raises an interesting point. I do not think it should be necessary to set the fixedLayoutSize and set useFixedLayoutSize to TRUE.

Alex Faeroy has a patch up for review that removes the need for useFixedLayoutSize.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>456019</commentid>
    <comment_count>9</comment_count>
    <who name="Young Han Lee">joybro201</who>
    <bug_when>2011-08-24 01:56:33 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; &gt; It raises an interesting point. I do not think it should be necessary to set the fixedLayoutSize and set useFixedLayoutSize to TRUE.
&gt; 
&gt; Alex Faeroy has a patch up for review that removes the need for useFixedLayoutSize.

Good. Can you point me to the patch?

If it is true, I should wait for the patch to land.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>467322</commentid>
    <comment_count>10</comment_count>
    <who name="Antonio Gomes">tonikitoo</who>
    <bug_when>2011-09-14 14:05:36 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; &gt; It raises an interesting point. I do not think it should be necessary to set the fixedLayoutSize and set useFixedLayoutSize to TRUE.
&gt; 
&gt; Alex Faeroy has a patch up for review that removes the need for useFixedLayoutSize.

Kenneth, Alex, will this patch be submitted? Otherwise I can submit it myself?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>467366</commentid>
    <comment_count>11</comment_count>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2011-09-14 14:56:05 -0700</bug_when>
    <thetext>(In reply to comment #10)
&gt; (In reply to comment #8)
&gt; &gt; &gt; It raises an interesting point. I do not think it should be necessary to set the fixedLayoutSize and set useFixedLayoutSize to TRUE.
&gt; &gt; 
&gt; &gt; Alex Faeroy has a patch up for review that removes the need for useFixedLayoutSize.
&gt; 
&gt; Kenneth, Alex, will this patch be submitted? Otherwise I can submit it myself?

I can talk to Alex tomorrow; he is ahf on the #qtwebkit channel. I&apos;m afraid that he is winded up in something pretty critical though. Did you have the bug id for the patch he was working on?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>513058</commentid>
    <comment_count>12</comment_count>
      <attachid>100314</attachid>
    <who name="Fady Samuel">fsamuel</who>
    <bug_when>2011-12-01 13:41:50 -0800</bug_when>
    <thetext>Comment on attachment 100314
Patch

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

&gt;&gt;&gt; Source/WebCore/ChangeLog:18
&gt;&gt;&gt; +        No tests because this change affects only when fixedLayoutSize is set. Since our dumpRenderTree doesn&apos;t set it, we can&apos;t test this.
&gt;&gt; 
&gt;&gt; DumpRenderTree has a layoutConstroller.overridePreference() which can be used to toggle a setting for a single test.  Seems if your DRT supports that (which ideally it should), it would be easy to write a test for this.
&gt; 
&gt; No. layoutController.overridePreference() is not helpful because it toggles only settings of WebSettings.
&gt; 
&gt; To turn on the fixedLayoutSize feature, to test this patch, FrameView::setUseFixedLayout(true) have to be called.
&gt; 
&gt; I think there is no easy way to turn on this feature for a single test.

It just so happens that I have two layout tests that address precisely this problem and I added fixedLayout to the chromium DRT (I&apos;m not sure if it&apos;s in other DRTs at the moment). I will move this to window.internals, I guess.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>100314</attachid>
            <date>2011-07-11 09:51:56 -0700</date>
            <delta_ts>2011-12-01 13:41:50 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-64290-20110712015156.patch</filename>
            <type>text/plain</type>
            <size>3200</size>
            <attacher name="Young Han Lee">joybro201</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogOTA1NjAKZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL0No
YW5nZUxvZyBiL1NvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwppbmRleCA2YWY5OTFjNTMwNjczNWYw
NGZhMTJiOTM3MDM3YTkyZGQyZjc0ZmI5Li4yMTEyMmIxYjg3YmU1MmMyOGE3ODBjMGRkNTZhYmYw
Mjk0YWM1NGM3IDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKKysrIGIvU291
cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMjYgQEAKKzIwMTEtMDctMTEgIFlvdW5n
IEhhbiBMZWUgIDxqb3licm9AY29tcGFueTEwMC5uZXQ+CisKKyAgICAgICAgVGhlIGxheW91dCBv
ZiBSZW5kZXJCb3ggc2hvdWxkIGJlIGNhbGN1bGF0ZWQgdXNpbmcgZml4ZWRMYXlvdXRTaXplIGlu
c3RlYWQgb2Ygdmlld3BvcnQgd2hlbiB0aGUgZml4ZWRMYXlvdXRTaXplIGlzIHNldC4KKyAgICAg
ICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTY0MjkwCisKKyAgICAg
ICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAgSW4gY2hhbmdlc2V0IDM5
NTgwLCBhbGwgdmlzaWJsZVdpZHRoIGFuZCB2aXNpYmxlSGVpZ2h0IGluIHJlbmRlcmluZyByb3V0
aW5lIGFyZSByZXBsYWNlZAorICAgICAgICB3aXRoIGxheW91dFdpZHRoIGFuZCBsYXlvdXRIZWln
aHQgcmVzcGVjdGl2Z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HRhYmxlCiAgICAgLy8gYXJ0aWZpY2lhbGx5
LiAgV2UncmUgZ29pbmcgdG8gcmVseSBvbiB0aGlzIGNlbGwgZ2V0dGluZyBleHBhbmRlZCB0byBz
b21lIG5ldwo=
</data>
<flag name="review"
          id="94978"
          type_id="1"
          status="-"
          setter="simon.fraser"
    />
          </attachment>
      

    </bug>

</bugzilla>