Summary: | Support aspect-ratio on positioned elements | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Rob Buis <rbuis> | ||||||||||||||
Component: | CSS | Assignee: | Rob Buis <rbuis> | ||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||
Severity: | Normal | CC: | changseok, esprehn+autocc, ews-watchlist, glenn, kondapallykalyan, pdr, simon.fraser, webkit-bug-importer, zalan | ||||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||
OS: | Unspecified | ||||||||||||||||
Bug Depends on: | |||||||||||||||||
Bug Blocks: | 47738 | ||||||||||||||||
Attachments: |
|
Description
Rob Buis
2020-12-10 07:15:42 PST
Created attachment 415872 [details]
Patch
Created attachment 415893 [details]
Patch
Created attachment 415994 [details]
Patch
Created attachment 416024 [details]
Patch
Created attachment 416038 [details]
Patch
Comment on attachment 416038 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=416038&action=review > Source/WebCore/rendering/RenderBox.cpp:5011 > + if (style().width().isAuto() && style().height().isAuto() && !style().top().isAuto() && !style().bottom().isAuto() && (style().left().isAuto() || style().right().isAuto())) Maybe all these could become a helper on RenderStyle. > Source/WebCore/rendering/RenderBox.cpp:5024 > + LayoutUnit containerWidthIninlineDirection = std::max<LayoutUnit>(0, containingBlockLogicalWidthForContentInFragment(fragment)); containerWidthInIInlineDirection Created attachment 416678 [details]
Patch
Committed r271061: <https://trac.webkit.org/changeset/271061> All reviewed patches have been landed. Closing bug and clearing flags on attachment 416678 [details]. Comment on attachment 416678 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=416678&action=review > Source/WebCore/rendering/RenderBox.cpp:5013 > +bool RenderBox::shouldComputeLogicalWidthFromAspectRatio() const What does inset mean in this context and how would a caller know if shouldComputeLogicalHeightFromAspectRatio() or shouldComputeLogicalWidthFromAspectRatioAndInsets() is the right function to call. Comment on attachment 416678 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=416678&action=review >> Source/WebCore/rendering/RenderBox.cpp:5013 >> +bool RenderBox::shouldComputeLogicalWidthFromAspectRatio() const > > What does inset mean in this context and how would a caller know if shouldComputeLogicalHeightFromAspectRatio() or shouldComputeLogicalWidthFromAspectRatioAndInsets() is the right function to call. Inset as defined here https://drafts.csswg.org/css-logical/#inset-properties. shouldComputeLogicalWidthFromAspectRatioAndInsets is more an implementation detail of shouldComputeLogicalWidthFromAspectRatio/shouldComputeLogicalHeightFromAspectRatio, so maybe it would have been better to keep it private. (In reply to Rob Buis from comment #11) > Comment on attachment 416678 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=416678&action=review > > >> Source/WebCore/rendering/RenderBox.cpp:5013 > >> +bool RenderBox::shouldComputeLogicalWidthFromAspectRatio() const > > > > What does inset mean in this context and how would a caller know if shouldComputeLogicalHeightFromAspectRatio() or shouldComputeLogicalWidthFromAspectRatioAndInsets() is the right function to call. > > Inset as defined here https://drafts.csswg.org/css-logical/#inset-properties. Awesome! Thanks, apparently I am super behind on css-logical. :( |