Bug 147795 - Error handling padding in box-sizing calculations
Summary: Error handling padding in box-sizing calculations
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: BlinkMergeCandidate, InRadar
Depends on:
Blocks:
 
Reported: 2015-08-07 15:26 PDT by Brent Fulgham
Modified: 2022-12-21 13:49 PST (History)
6 users (show)

See Also:


Attachments
Test case showing the improper behavior (657 bytes, text/html)
2015-08-07 15:26 PDT, Brent Fulgham
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2015-08-07 15:26:01 PDT
Created attachment 258534 [details]
Test case showing the improper behavior

WebKit seems to be taking padding into account when performing height calculations, even when in standards mode using "box-sizing: content-box".
Comment 1 zalan 2015-08-13 10:54:42 PDT
Blink changed available logical height behavior about a year ago. It returns content box height now (vs. border box height)

https://src.chromium.org/viewvc/blink?revision=178693&view=revision

@@ -3085,7 +3061,7 @@ LayoutUnit RenderBox::computeReplacedLogicalHeightUsing(Length logicalHeight) co
 
 LayoutUnit RenderBox::availableLogicalHeight(AvailableLogicalHeightType heightType) const
 {
-    return constrainLogicalHeightByMinMax(availableLogicalHeightUsing(style().logicalHeight(), heightType), -1);
+    return constrainContentBoxLogicalHeightByMinMax(availableLogicalHeightUsing(style().logicalHeight(), heightType), -1);
 }
Comment 2 Radar WebKit Bug Importer 2016-09-08 14:06:46 PDT
<rdar://problem/28213830>
Comment 3 Ahmad Saleem 2022-10-31 06:23:51 PDT
I am not able to reproduce this bug using Safari 16.1 and the "red" square is center similar to Chrome Canary 109 and Firefox Nightly 108.

Do we need to anything else? Thanks!
Comment 4 Ahmad Saleem 2022-12-17 03:33:51 PST
Also we are passing the test (in STP160) from the Chromium patch of Comment 01:

Test Case - https://jsfiddle.net/0ytgLhwn/

Do we need to do anything else?
Comment 5 zalan 2022-12-21 13:49:08 PST
(In reply to Ahmad Saleem from comment #4)
> Also we are passing the test (in STP160) from the Chromium patch of Comment
> 01:
> 
> Test Case - https://jsfiddle.net/0ytgLhwn/
> 
> Do we need to do anything else?
Nope, this looks to have progressed. Thanks!