WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
96031
Fix RenderBox::availableHeight to subtract scrollbars in the right places
https://bugs.webkit.org/show_bug.cgi?id=96031
Summary
Fix RenderBox::availableHeight to subtract scrollbars in the right places
Ojan Vafai
Reported
2012-09-06 15:09:32 PDT
Fix RenderBox::availableHeight to subtract scrollbars in the right places
Attachments
Patch
(12.62 KB, patch)
2012-09-06 15:13 PDT
,
Ojan Vafai
no flags
Details
Formatted Diff
Diff
Patch
(16.71 KB, patch)
2012-09-07 11:26 PDT
,
Ojan Vafai
no flags
Details
Formatted Diff
Diff
Patch
(16.76 KB, patch)
2012-09-07 11:27 PDT
,
Ojan Vafai
tony
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Ojan Vafai
Comment 1
2012-09-06 15:13:47 PDT
Created
attachment 162599
[details]
Patch
Tony Chang
Comment 2
2012-09-06 16:07:29 PDT
Comment on
attachment 162599
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=162599&action=review
> Source/WebCore/ChangeLog:9 > + Tests: fast/block/positioning/percent-top-left-on-relative-position.html > + fast/css/nested-percent-height-on-replaced.html
Can you verify that Firefox and IE agree with this? I think this change is correct, but it would be nice to corroborate.
> LayoutTests/ChangeLog:13 > + * platform/chromium-linux/fast/css/percent-top-value-with-relative-position-expected.png: > + * platform/chromium-win/fast/css/percent-top-value-with-relative-position-expected.txt:
Can you explain why this changed in the ChangeLog? Is there a Win result that will also need rebaseline? Should we mark it as such in TestExpectations?
Elliott Sprehn
Comment 3
2012-09-06 16:17:52 PDT
Comment on
attachment 162599
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=162599&action=review
> Source/WebCore/rendering/RenderBox.cpp:-2345 > - // the percentage is calculated with respect to the height of the padding box of that element
Why is this explicit bug fix not needed anymore? The new code doesn't seem to check containingBlock()->availableLogicalHeight()
> Source/WebCore/rendering/RenderBox.cpp:2344 > + return std::max(LayoutUnit(0), computeContentBoxLogicalHeight(heightIncludingScrollbar) - scrollbarLogicalHeight());
Would be nice to be consistent and use std::max<LayoutUnit>(...) or std::max(LayoutUnit(0). You've done it both ways in this patch.
> LayoutTests/platform/chromium-win/fast/css/percent-top-value-with-relative-position-expected.txt:7 > +layer at (8,300) size 784x20
That's cute, 8px is half the 16px scrollbar track size. :)
Ojan Vafai
Comment 4
2012-09-07 11:26:14 PDT
Created
attachment 162828
[details]
Patch
Ojan Vafai
Comment 5
2012-09-07 11:27:53 PDT
Created
attachment 162830
[details]
Patch
Ojan Vafai
Comment 6
2012-09-07 13:21:49 PDT
Comment on
attachment 162599
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=162599&action=review
>> Source/WebCore/ChangeLog:9 >> + fast/css/nested-percent-height-on-replaced.html > > Can you verify that Firefox and IE agree with this? I think this change is correct, but it would be nice to corroborate.
Yup. Added to the ChangeLog.
>> Source/WebCore/rendering/RenderBox.cpp:-2345 >> - // the percentage is calculated with respect to the height of the padding box of that element > > Why is this explicit bug fix not needed anymore? The new code doesn't seem to check containingBlock()->availableLogicalHeight()
This comment is confusing. The fix for the bug was adding the containingBlockLogicalHeightForPositioned call.
>> Source/WebCore/rendering/RenderBox.cpp:2344 >> + return std::max(LayoutUnit(0), computeContentBoxLogicalHeight(heightIncludingScrollbar) - scrollbarLogicalHeight()); > > Would be nice to be consistent and use std::max<LayoutUnit>(...) or std::max(LayoutUnit(0). You've done it both ways in this patch.
Lol. I copy-pasted from two different places. :) Will fix both to std::max<LayoutUnit>(...).
>> LayoutTests/ChangeLog:13 >> + * platform/chromium-win/fast/css/percent-top-value-with-relative-position-expected.txt: > > Can you explain why this changed in the ChangeLog? > > Is there a Win result that will also need rebaseline? Should we mark it as such in TestExpectations?
Good point.
Ojan Vafai
Comment 7
2012-09-07 13:54:29 PDT
Committed
r127915
: <
http://trac.webkit.org/changeset/127915
>
Roger Fong
Comment 8
2012-09-07 16:10:53 PDT
> Can you explain why this changed in the ChangeLog? > > Is there a Win result that will also need rebaseline? Should we mark it as such in TestExpectations?
Also curious as to why there is a difference between Mac and Win.
Ojan Vafai
Comment 9
2012-09-07 16:21:34 PDT
(In reply to
comment #8
)
> > Can you explain why this changed in the ChangeLog? > > > > Is there a Win result that will also need rebaseline? Should we mark it as such in TestExpectations? > > Also curious as to why there is a difference between Mac and Win.
Platform text layout differences.
Ojan Vafai
Comment 10
2012-09-07 16:27:07 PDT
Rebaselines landed in
http://trac.webkit.org/changeset/127935
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug