WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-220970-20210127120836.patch (text/plain), 6.72 KB, created by
Rob Buis
on 2021-01-27 03:08:38 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Rob Buis
Created:
2021-01-27 03:08:38 PST
Size:
6.72 KB
patch
obsolete
>Subversion Revision: 271939 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 564647d749fa4a0641f9b184a0aa37785b2580c3..ee1a428eae0c91d897bb96211a000fd4af7bd7a6 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,20 @@ >+2021-01-27 Rob Buis <rbuis@igalia.com> >+ >+ Handle zero aspect-ratio width/height >+ https://bugs.webkit.org/show_bug.cgi?id=220970 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ WIP. >+ >+ * css/CSSComputedStyleDeclaration.cpp: >+ (WebCore::ComputedStyleExtractor::valueForPropertyInStyle): >+ * rendering/style/RenderStyleConstants.cpp: >+ (WebCore::operator<<): >+ * rendering/style/RenderStyleConstants.h: >+ * style/StyleBuilderCustom.h: >+ (WebCore::Style::BuilderCustom::applyValueAspectRatio): >+ > 2021-01-27 Andy Estes <aestes@apple.com> > > [Mac] MediaSampleCursor::stepInOrderedMap can hang when stepping to the end of a track that hasn't been fully parsed >diff --git a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >index 1bf275330f698ce274e297f8910ff715d751c42e..6c74d3e0b5373eef868b339c13361fa33d6e5aaa 100644 >--- a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >+++ b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >@@ -3472,6 +3472,7 @@ RefPtr<CSSValue> ComputedStyleExtractor::valueForPropertyInStyle(const RenderSty > switch (style.aspectRatioType()) { > case AspectRatioType::Auto: > return cssValuePool.createIdentifierValue(CSSValueAuto); >+ case AspectRatioType::AutoZero: > case AspectRatioType::AutoAndRatio: > case AspectRatioType::Ratio: { > auto ratioList = CSSValueList::createSlashSeparated(); >diff --git a/Source/WebCore/rendering/style/RenderStyleConstants.cpp b/Source/WebCore/rendering/style/RenderStyleConstants.cpp >index f5d0cdb33c66bfed92b93d8f1ffb5e1f3028557f..9e9576d504daaaf3cad2ec9105e5c9122d0e1119 100644 >--- a/Source/WebCore/rendering/style/RenderStyleConstants.cpp >+++ b/Source/WebCore/rendering/style/RenderStyleConstants.cpp >@@ -93,6 +93,7 @@ TextStream& operator<<(TextStream& ts, AspectRatioType aspectRatioType) > case AspectRatioType::Auto: ts << "auto"; break; > case AspectRatioType::Ratio: ts << "ratio"; break; > case AspectRatioType::AutoAndRatio: ts << "autoandratio"; break; >+ case AspectRatioType::AutoZero: ts << "autozero"; break; > } > return ts; > } >diff --git a/Source/WebCore/rendering/style/RenderStyleConstants.h b/Source/WebCore/rendering/style/RenderStyleConstants.h >index ecca385fdd400f82dd01b84cbc1653ab9c7457ad..f1a313f94ed661f4b6127c50affac94b2e2c068d 100644 >--- a/Source/WebCore/rendering/style/RenderStyleConstants.h >+++ b/Source/WebCore/rendering/style/RenderStyleConstants.h >@@ -519,7 +519,8 @@ enum class ObjectFit : uint8_t { > enum class AspectRatioType : uint8_t { > Auto, > Ratio, >- AutoAndRatio >+ AutoAndRatio, >+ AutoZero > }; > > enum class WordBreak : uint8_t { >diff --git a/Source/WebCore/style/StyleBuilderCustom.h b/Source/WebCore/style/StyleBuilderCustom.h >index 290de4535f89579ac39c98de81447dde1613d966..cb2afab3b45c287fca481ddf9cb56aaf549787c8 100644 >--- a/Source/WebCore/style/StyleBuilderCustom.h >+++ b/Source/WebCore/style/StyleBuilderCustom.h >@@ -1179,8 +1179,13 @@ inline void BuilderCustom::applyValueAspectRatio(BuilderState& builderState, CSS > return; > } > >- builderState.style().setAspectRatioType(AspectRatioType::Ratio); > ASSERT(list.length() == 2); >+ auto width = downcast<CSSPrimitiveValue>(list.item(0))->doubleValue(); >+ auto height = downcast<CSSPrimitiveValue>(list.item(1))->doubleValue(); >+ if (!width || !height) >+ builderState.style().setAspectRatioType(AspectRatioType::AutoZero); >+ else >+ builderState.style().setAspectRatioType(AspectRatioType::Ratio); > builderState.style().setAspectRatio(downcast<CSSPrimitiveValue>(list.item(0))->doubleValue(), downcast<CSSPrimitiveValue>(list.item(1))->doubleValue()); > } > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 17856c87fec329b246656aaf49892fbc11643192..c5a843e9f0abcc6554efc981141e2094d5310aca 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,12 @@ >+2021-01-27 Rob Buis <rbuis@igalia.com> >+ >+ Handle zero aspect-ratio width/height >+ https://bugs.webkit.org/show_bug.cgi?id=220970 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * TestExpectations: >+ > 2021-01-27 Andy Estes <aestes@apple.com> > > [Mac] MediaSampleCursor::stepInOrderedMap can hang when stepping to the end of a track that hasn't been fully parsed >diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations >index 72b6c30b6587619022d8a8676df76f1576fd9d67..eee16e627366df77e3ced05b59437d3edbb958c4 100644 >--- a/LayoutTests/TestExpectations >+++ b/LayoutTests/TestExpectations >@@ -4458,14 +4458,6 @@ webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/ > webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/replaced-element-031.html [ ImageOnlyFailure ] > webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/replaced-element-032.html [ ImageOnlyFailure ] > webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/table-element-001.html [ ImageOnlyFailure ] >-webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/zero-or-infinity-001.html [ ImageOnlyFailure ] >-webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/zero-or-infinity-002.html [ ImageOnlyFailure ] >-webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/zero-or-infinity-004.html [ ImageOnlyFailure ] >-webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/zero-or-infinity-006.html [ ImageOnlyFailure ] >-webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/zero-or-infinity-007.html [ ImageOnlyFailure ] >-webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/zero-or-infinity-008.html [ ImageOnlyFailure ] >-webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/zero-or-infinity-009.html [ ImageOnlyFailure ] >-webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/zero-or-infinity-010.html [ ImageOnlyFailure ] > webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-001.html [ ImageOnlyFailure ] > webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-002.html [ ImageOnlyFailure ] > webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-003.html [ ImageOnlyFailure ]
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 220970
:
418389
|
418413
|
418464
|
418520
|
418524
|
418531