зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1479859 patch 3 - Add an nsIFrame::IsFrameOfType bit to say whether frames support contain:layout and contain:paint. r=dholbert
This is needed for patch 4. This is based both on the wording in the spec and the discussion in https://github.com/w3c/csswg-drafts/issues/2987, and also doesn't support them for nsMathMLContainerFrame, which is similar to inlines and ruby. Differential Revision: https://phabricator.services.mozilla.com/D2815 --HG-- extra : rebase_source : b7e23fb248fa34957ca2d539134e872f5a03f5a8
This commit is contained in:
Родитель
552f835723
Коммит
aad8d26078
|
@ -84,7 +84,7 @@ public:
|
|||
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const override
|
||||
{
|
||||
if (aFlags & eSupportsCSSTransforms) {
|
||||
if (aFlags & (eSupportsCSSTransforms | eSupportsContainLayoutAndPaint)) {
|
||||
return false;
|
||||
}
|
||||
return nsFrame::IsFrameOfType(aFlags);
|
||||
|
|
|
@ -2862,6 +2862,11 @@ public:
|
|||
// inline-block sizing characteristics (like form controls).
|
||||
eReplacedSizing = 1 << 16,
|
||||
|
||||
// Does this frame class support 'contain: layout' and
|
||||
// 'contain:paint' (supporting one is equivalent to supporting the
|
||||
// other).
|
||||
eSupportsContainLayoutAndPaint = 1 << 17,
|
||||
|
||||
// These are to allow nsFrame::Init to assert that IsFrameOfType
|
||||
// implementations all call the base class method. They are only
|
||||
// meaningful in DEBUG builds.
|
||||
|
@ -2878,11 +2883,13 @@ public:
|
|||
*/
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const
|
||||
{
|
||||
return !(aFlags & ~(
|
||||
#ifdef DEBUG
|
||||
return !(aFlags & ~(nsIFrame::eDEBUGAllFrames | nsIFrame::eSupportsCSSTransforms));
|
||||
#else
|
||||
return !(aFlags & ~nsIFrame::eSupportsCSSTransforms);
|
||||
nsIFrame::eDEBUGAllFrames |
|
||||
#endif
|
||||
nsIFrame::eSupportsCSSTransforms |
|
||||
nsIFrame::eSupportsContainLayoutAndPaint
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const override
|
||||
{
|
||||
if (aFlags & eSupportsCSSTransforms) {
|
||||
if (aFlags & (eSupportsCSSTransforms | eSupportsContainLayoutAndPaint)) {
|
||||
return false;
|
||||
}
|
||||
return nsContainerFrame::IsFrameOfType(aFlags &
|
||||
|
|
|
@ -250,7 +250,7 @@ nsRubyBaseContainerFrame::AddInlinePrefISize(
|
|||
/* virtual */ bool
|
||||
nsRubyBaseContainerFrame::IsFrameOfType(uint32_t aFlags) const
|
||||
{
|
||||
if (aFlags & eSupportsCSSTransforms) {
|
||||
if (aFlags & (eSupportsCSSTransforms | eSupportsContainLayoutAndPaint)) {
|
||||
return false;
|
||||
}
|
||||
return nsContainerFrame::IsFrameOfType(aFlags &
|
||||
|
|
|
@ -51,7 +51,7 @@ nsRubyTextContainerFrame::GetFrameName(nsAString& aResult) const
|
|||
/* virtual */ bool
|
||||
nsRubyTextContainerFrame::IsFrameOfType(uint32_t aFlags) const
|
||||
{
|
||||
if (aFlags & eSupportsCSSTransforms) {
|
||||
if (aFlags & (eSupportsCSSTransforms | eSupportsContainLayoutAndPaint)) {
|
||||
return false;
|
||||
}
|
||||
return nsContainerFrame::IsFrameOfType(aFlags);
|
||||
|
|
|
@ -68,9 +68,11 @@ public:
|
|||
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const override
|
||||
{
|
||||
return !(aFlags & nsIFrame::eLineParticipant) &&
|
||||
nsContainerFrame::IsFrameOfType(aFlags &
|
||||
~(nsIFrame::eMathML | nsIFrame::eExcludesIgnorableWhitespace));
|
||||
if (aFlags & (eLineParticipant | eSupportsContainLayoutAndPaint)) {
|
||||
return false;
|
||||
}
|
||||
return nsContainerFrame::IsFrameOfType(aFlags &
|
||||
~(eMathML | eExcludesIgnorableWhitespace));
|
||||
}
|
||||
|
||||
virtual void
|
||||
|
|
|
@ -34,6 +34,10 @@ public:
|
|||
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const override
|
||||
{
|
||||
if (aFlags & eSupportsContainLayoutAndPaint) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return nsContainerFrame::IsFrameOfType(
|
||||
aFlags & ~(nsIFrame::eSVG | nsIFrame::eSVGContainer));
|
||||
}
|
||||
|
|
|
@ -45,6 +45,10 @@ public:
|
|||
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const override
|
||||
{
|
||||
if (aFlags & eSupportsContainLayoutAndPaint) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return nsFrame::IsFrameOfType(aFlags & ~(nsIFrame::eSVG));
|
||||
}
|
||||
|
||||
|
|
|
@ -37,6 +37,10 @@ public:
|
|||
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const override
|
||||
{
|
||||
if (aFlags & eSupportsContainLayoutAndPaint) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return nsFrame::IsFrameOfType(aFlags & ~(nsIFrame::eSVG));
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,10 @@ public:
|
|||
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const override
|
||||
{
|
||||
if (aFlags & eSupportsContainLayoutAndPaint) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return nsFrame::IsFrameOfType(aFlags & ~(nsIFrame::eSVG));
|
||||
}
|
||||
|
||||
|
|
|
@ -70,6 +70,10 @@ public:
|
|||
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const override
|
||||
{
|
||||
if (aFlags & eSupportsContainLayoutAndPaint) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return nsFrame::IsFrameOfType(aFlags & ~(nsIFrame::eSVG | nsIFrame::eSVGGeometry));
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,10 @@ public:
|
|||
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const override
|
||||
{
|
||||
if (aFlags & eSupportsContainLayoutAndPaint) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return nsFrame::IsFrameOfType(aFlags & ~(nsIFrame::eSVG));
|
||||
}
|
||||
|
||||
|
|
|
@ -77,6 +77,10 @@ public:
|
|||
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const override
|
||||
{
|
||||
if (aFlags & eSupportsContainLayoutAndPaint) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return nsContainerFrame::IsFrameOfType(
|
||||
aFlags & ~(nsIFrame::eSVG | nsIFrame::eSVGContainer));
|
||||
}
|
||||
|
|
|
@ -52,6 +52,10 @@ public:
|
|||
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const override
|
||||
{
|
||||
if (aFlags & eSupportsContainLayoutAndPaint) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return nsContainerFrame::IsFrameOfType(aFlags &
|
||||
~(nsIFrame::eSVG | nsIFrame::eSVGForeignObject));
|
||||
}
|
||||
|
|
|
@ -74,6 +74,12 @@ public:
|
|||
nsContainerFrame* aParent,
|
||||
nsIFrame* aPrevInFlow) override;
|
||||
|
||||
bool IsFrameOfType(uint32_t aFlags) const override
|
||||
{
|
||||
return nsSVGDisplayContainerFrame::IsFrameOfType(
|
||||
aFlags & ~eSupportsContainLayoutAndPaint);
|
||||
}
|
||||
|
||||
virtual nsSplittableType GetSplittableType() const override;
|
||||
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
|
|
|
@ -45,6 +45,10 @@ public:
|
|||
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const override
|
||||
{
|
||||
if (aFlags & eSupportsContainLayoutAndPaint) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return nsFrame::IsFrameOfType(aFlags & ~(nsIFrame::eSVG));
|
||||
}
|
||||
|
||||
|
|
|
@ -274,6 +274,10 @@ public:
|
|||
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const override
|
||||
{
|
||||
if (aFlags & eSupportsContainLayoutAndPaint) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return nsSplittableFrame::IsFrameOfType(aFlags & ~(nsIFrame::eTablePart));
|
||||
}
|
||||
|
||||
|
|
|
@ -195,6 +195,10 @@ public:
|
|||
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const override
|
||||
{
|
||||
if (aFlags & eSupportsContainLayoutAndPaint) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return nsContainerFrame::IsFrameOfType(aFlags & ~(nsIFrame::eTablePart));
|
||||
}
|
||||
|
||||
|
|
|
@ -239,6 +239,10 @@ public:
|
|||
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const override
|
||||
{
|
||||
if (aFlags & eSupportsContainLayoutAndPaint) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return nsContainerFrame::IsFrameOfType(aFlags & ~(nsIFrame::eTablePart));
|
||||
}
|
||||
|
||||
|
|
|
@ -325,6 +325,10 @@ public:
|
|||
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const override
|
||||
{
|
||||
if (aFlags & eSupportsContainLayoutAndPaint) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return nsContainerFrame::IsFrameOfType(aFlags & ~(nsIFrame::eTablePart));
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче