diff --git a/layout/base/LayoutConstants.h b/layout/base/LayoutConstants.h index bf86171d71bc..ac3714cf9a81 100644 --- a/layout/base/LayoutConstants.h +++ b/layout/base/LayoutConstants.h @@ -28,4 +28,10 @@ #define NS_INTRINSIC_ISIZE_UNKNOWN nscoord_MIN +// The fallback size of width is 300px and the aspect-ratio is 2:1, based on the +// spec definition in CSS2 section 10.3.2: +// https://drafts.csswg.org/css2/visudet.html#inline-replaced-width +#define REPLACED_ELEM_FALLBACK_PX_WIDTH 300 +#define REPLACED_ELEM_FALLBACK_PX_HEIGHT 150 + #endif // LayoutConstants_h___ diff --git a/layout/generic/nsSubDocumentFrame.cpp b/layout/generic/nsSubDocumentFrame.cpp index 15108afbb4d0..b18e8c42ef42 100644 --- a/layout/generic/nsSubDocumentFrame.cpp +++ b/layout/generic/nsSubDocumentFrame.cpp @@ -624,9 +624,11 @@ IntrinsicSize nsSubDocumentFrame::GetIntrinsicSize() { return {}; // XUL