-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tighten RenderObject's type specific flags
https://bugs.webkit.org/show_bug.cgi?id=266673 Reviewed by Alan Baradlay. This PR introduces TypeSpecificFlags to wrap type specific flags in RenderObject. It can be instantiated by the default constructor as well as with an OptionSet of LineBreakFlag, ReplacedFlag, or SVGModelObjectFlag. The object also remembers the kind of flags stored as a security hardening measure (i.e. to prevent type confusion even when m_type / m_typeFlags and m_typeSpecificFlags get out of sync). Finally, this PR also makes RenderObject::m_typeSpecificFlags const so that it may not get mutated once the render object is initialized. * Source/WebCore/rendering/RenderBox.cpp: (WebCore::RenderBox::RenderBox): * Source/WebCore/rendering/RenderBox.h: (WebCore::RenderBox::RenderBox): * Source/WebCore/rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::RenderBoxModelObject): * Source/WebCore/rendering/RenderBoxModelObject.h: * Source/WebCore/rendering/RenderElement.cpp: (WebCore::RenderElement::RenderElement): * Source/WebCore/rendering/RenderElement.h: * Source/WebCore/rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::RenderFrameSet): (WebCore::m_isResizing): Deleted. * Source/WebCore/rendering/RenderInline.cpp: (WebCore::RenderInline::RenderInline): * Source/WebCore/rendering/RenderLayerModelObject.cpp: (WebCore::RenderLayerModelObject::RenderLayerModelObject): * Source/WebCore/rendering/RenderLayerModelObject.h: * Source/WebCore/rendering/RenderLineBreak.cpp: (WebCore::RenderLineBreak::RenderLineBreak): (WebCore::m_cachedLineHeight): * Source/WebCore/rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::RenderListMarker): (WebCore::m_listItem): Deleted. * Source/WebCore/rendering/RenderObject.cpp: (WebCore::RenderObject::RenderObject): * Source/WebCore/rendering/RenderObject.h: (WebCore::RenderObject::TypeSpecificFlags::TypeSpecificFlags): (WebCore::RenderObject::TypeSpecificFlags::lineBreakFlags const): (WebCore::RenderObject::TypeSpecificFlags::replacedFlags const): (WebCore::RenderObject::TypeSpecificFlags::svgFlags const): (WebCore::RenderObject::TypeSpecificFlags::valueForKind const): (WebCore::RenderObject::isRenderMedia const): (WebCore::RenderObject::isRenderImage const): (WebCore::RenderObject::isRenderWidget const): (WebCore::RenderObject::isLegacyRenderSVGModelObject const): (WebCore::RenderObject::isRenderSVGModelObject const): (WebCore::RenderObject::isRenderSVGContainer const): (WebCore::RenderObject::isLegacyRenderSVGContainer const): (WebCore::RenderObject::isRenderSVGShape const): (WebCore::RenderObject::isLegacyRenderSVGShape const): (WebCore::RenderObject::isLegacyRenderSVGResourceContainer const): (WebCore::RenderObject::isRenderSVGResourceContainer const): (WebCore::RenderObject::isWBR const): (WebCore::RenderObject::lineBreakFlags const): Deleted. (WebCore::RenderObject::setLineBreakFlags): Deleted. (WebCore::RenderObject::replacedFlags const): Deleted. (WebCore::RenderObject::setReplacedFlags): Deleted. (WebCore::RenderObject::svgFlags const): Deleted. (WebCore::RenderObject::setSVGFlags): Deleted. * Source/WebCore/rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::RenderReplaced): * Source/WebCore/rendering/RenderReplica.cpp: (WebCore::RenderReplica::RenderReplica): * Source/WebCore/rendering/RenderTableCol.cpp: (WebCore::RenderTableCol::RenderTableCol): * Source/WebCore/rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::RenderTableRow): (WebCore::m_rowIndex): Deleted. * Source/WebCore/rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::RenderTableSection): * Source/WebCore/rendering/RenderText.cpp: (WebCore::RenderText::RenderText): * Source/WebCore/rendering/svg/RenderSVGGradientStop.cpp: (WebCore::RenderSVGGradientStop::RenderSVGGradientStop): * Source/WebCore/rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::RenderSVGModelObject): * Source/WebCore/rendering/svg/legacy/LegacyRenderSVGModelObject.cpp: (WebCore::LegacyRenderSVGModelObject::LegacyRenderSVGModelObject): Canonical link: https://commits.webkit.org/272324@main
- Loading branch information
Showing
23 changed files
with
113 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.