Closed Bug 753681 Opened 12 years ago Closed 12 years ago

V12.0 seems to ignore padding-bottom and padding-right of scrollable DOM (overflow:auto)

Categories

(Core :: Layout, defect)

12 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 748518

People

(Reporter: thepiglovesyou, Unassigned)

Details

Attachments

(1 file)

Attached file 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.
Attachment #622655 - Attachment mime type: text/plain → text/html
I think this was changed by Bug 665597.
And Firefox handles padding the same as IE10 now.
Component: Untriaged → Layout
Product: Firefox → Core
QA Contact: untriaged → layout
Yes, as I understand the new behavior is the one the spec requires.  Mats, can you confirm?
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>
> 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...
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
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... ;)
That is, IE's pass rate was about 97%, while WebKit's (and hence Chrome's and Safari's) was about 85%.
ohh! time to live with it then. Just for the record, nested DIVs with the padding on the inner DIV gives the old behavior
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..?
I'm not sure what you're asking...
Does Firefox v13.0 ignores padding-bottom as well?
Firefox 12 and all later versions follow the spec here.
(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.
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..
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: