Last Comment Bug 753681 - V12.0 seems to ignore padding-bottom and padding-right of scrollable DOM (overflow:auto)
: V12.0 seems to ignore padding-bottom and padding-right of scrollable DOM (ove...
Status: RESOLVED DUPLICATE of bug 748518
:
Product: Core
Classification: Components
Component: Layout (show other bugs)
: 12 Branch
: x86_64 Windows 7
-- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
: Jet Villegas (:jet)
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-10 01:37 PDT by thepiglovesyou
Modified: 2012-05-11 17:11 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
scroll.html (349 bytes, text/html)
2012-05-10 01:37 PDT, thepiglovesyou
no flags Details

Description User image thepiglovesyou 2012-05-10 01:37:42 PDT
Created attachment 622655 [details]
scroll.html

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19

Steps to reproduce:


<style type="text/css">
  #box {
    width: 200px;
    height: 200px; 
    border: 1px gray solid;
    padding: 20px;
    overflow: auto;
    background: pink;
  }
  #inner {
    background: #ccc;
    width: 600px;
    height: 600px;
  }
</style>
<div id="box">
  <div id="inner">
    Scroll to bottom right, ...
  </div>
</div>



Actual results:

Padding-bottom and padding-right don't emerge when scrolling.


Expected results:

Range of padding-bottom and padding-right should be added to scrollHeight of the DOM.
Comment 1 User image Alice0775 White 2012-05-10 06:30:47 PDT
I think this was changed by Bug 665597.
And Firefox handles padding the same as IE10 now.
Comment 2 User image Boris Zbarsky [:bz] (still a bit busy) 2012-05-10 07:16:16 PDT
Yes, as I understand the new behavior is the one the spec requires.  Mats, can you confirm?
Comment 3 User image Robert Marcano 2012-05-10 10:49:31 PDT
And I experienced this "bug" today and someone beat me to report it for a few hours :(

(In reply to Alice0775 White from comment #1)
> And Firefox handles padding the same as IE10 now.

IE 9 ignores the padding too. the current public releases of Opera, Chrome, Safari (Windows) do not ignore the padding, Only IE 9 and now Firefox are ignoring it. If it is the correct behavior dictated by the spec, sounds really weird to me

My test case:

<style>
.box {
  padding: 15px;
  margin-bottom: 10px;
  overflow: auto;
  background-color: red;
}
.box-content {
  background-color: green;
  width: 200px;
  height: 200px;
}
</style>
<div class="box">
  <div class="box-content"></div>
</div>
<div class="box" style="max-height: 100px;">
  <div class="box-content"></div>
</div>
Comment 4 User image Boris Zbarsky [:bz] (still a bit busy) 2012-05-10 10:57:25 PDT
> sounds really weird to me

Please do take this up with the CSS working group?  Found the bug where Mats confirmed that this behavior is what the spec requires once already...

*** This bug has been marked as a duplicate of bug 748518 ***
Comment 5 User image Boris Zbarsky [:bz] (still a bit busy) 2012-05-10 10:58:24 PDT
And note that in general IE9 has a much more spec-compliant CSS 2.1 implementation than Chrome and Safari (pass rates of about 97% and 85% for the test suite respectively, last I looked).  It helps to be implementing after the spec is closer to being finalized... ;)
Comment 6 User image Boris Zbarsky [:bz] (still a bit busy) 2012-05-10 10:58:59 PDT
That is, IE's pass rate was about 97%, while WebKit's (and hence Chrome's and Safari's) was about 85%.
Comment 7 User image Robert Marcano 2012-05-10 11:25:55 PDT
ohh! time to live with it then. Just for the record, nested DIVs with the padding on the inner DIV gives the old behavior
Comment 8 User image thepiglovesyou 2012-05-10 18:58:59 PDT
Thank you for dealing with this ticket.

I saw the comment:https://bugzilla.mozilla.org/show_bug.cgi?id=748518#c6.
Can I ask that this behavior (ignoring padding-bottom) is kept forever in firefox as long as CSS2.1 keeps the spec..?
Comment 9 User image Boris Zbarsky [:bz] (still a bit busy) 2012-05-10 19:16:31 PDT
I'm not sure what you're asking...
Comment 10 User image thepiglovesyou 2012-05-11 02:03:49 PDT
Does Firefox v13.0 ignores padding-bottom as well?
Comment 11 User image Boris Zbarsky [:bz] (still a bit busy) 2012-05-11 07:50:27 PDT
Firefox 12 and all later versions follow the spec here.
Comment 12 User image Mats Palmgren (:mats) 2012-05-11 08:02:27 PDT
(In reply to thepiglovesyou from comment #10)
> Does Firefox v13.0 ignores padding-bottom as well?

We don't ignore padding-bottom.  We just do the layout the same way whether there's
a scrolling mechanism or not -- per the CSS box model.
http://www.w3.org/TR/CSS21/box.html

So for your attached example, from top to bottom inside the #box border, you have
20px top padding, 200px height, 20px bottom padding, then 600px - 220px overflow
from #inner.  The scroll view allows you to view that overflow, there's nothing
below it.
Comment 13 User image thepiglovesyou 2012-05-11 17:11:50 PDT
I appreciate explaining in detail.
I understand that scrollable-range is just overflow-range and makes no reference to padding-bottom, which v11.0 counted.

Still, this change of behavior provides a lot of work to me..

Note You need to log in before you can comment on or make changes to this bug.