Bug 265894 - Part 6. Create symbol frame in nsCSSFrameConstructor.
MozReview-Commit-ID: LgO1WKo46Pu
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -152,16 +152,18 @@ nsIFrame*
NS_NewSVGGenericContainerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsContainerFrame*
NS_NewSVGForeignObjectFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
NS_NewSVGAFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
NS_NewSVGSwitchFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
+NS_NewSVGSymbolFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
+nsIFrame*
NS_NewSVGTextFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
NS_NewSVGContainerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
NS_NewSVGUseFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
NS_NewSVGViewFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
extern nsIFrame*
@@ -5573,16 +5575,17 @@ nsCSSFrameConstructor::FindSVGData(Eleme
aTag == nsGkAtoms::textPath) {
return &sSuppressData;
}
static const FrameConstructionDataByTag sSVGData[] = {
SIMPLE_SVG_CREATE(svg, NS_NewSVGInnerSVGFrame),
SIMPLE_SVG_CREATE(g, NS_NewSVGGFrame),
SIMPLE_SVG_CREATE(svgSwitch, NS_NewSVGSwitchFrame),
+ SIMPLE_SVG_CREATE(symbol, NS_NewSVGSymbolFrame),
SIMPLE_SVG_CREATE(polygon, NS_NewSVGGeometryFrame),
SIMPLE_SVG_CREATE(polyline, NS_NewSVGGeometryFrame),
SIMPLE_SVG_CREATE(circle, NS_NewSVGGeometryFrame),
SIMPLE_SVG_CREATE(ellipse, NS_NewSVGGeometryFrame),
SIMPLE_SVG_CREATE(line, NS_NewSVGGeometryFrame),
SIMPLE_SVG_CREATE(rect, NS_NewSVGGeometryFrame),
SIMPLE_SVG_CREATE(path, NS_NewSVGGeometryFrame),
SIMPLE_SVG_CREATE(defs, NS_NewSVGContainerFrame),
--- a/layout/generic/nsFrame.h
+++ b/layout/generic/nsFrame.h
@@ -641,16 +641,17 @@ public:
aDisp->mOverflowY == NS_STYLE_OVERFLOW_HIDDEN) {
// REVIEW: these are the frame types that set up clipping.
mozilla::LayoutFrameType type = aFrame->Type();
if (type == mozilla::LayoutFrameType::Table ||
type == mozilla::LayoutFrameType::TableCell ||
type == mozilla::LayoutFrameType::BCTableCell ||
type == mozilla::LayoutFrameType::SVGOuterSVG ||
type == mozilla::LayoutFrameType::SVGInnerSVG ||
+ type == mozilla::LayoutFrameType::SVGSymbol ||
type == mozilla::LayoutFrameType::SVGForeignObject) {
return true;
}
if (aFrame->IsFrameOfType(nsIFrame::eReplacedContainsBlock)) {
if (type == mozilla::LayoutFrameType::TextInput) {
// It always has an anonymous scroll frame that handles any overflow.
return false;
}