DescriptionAvoid calling SVGFontFaceElement::rebuildFontFace() for non font-face specific attributes
When enabling warnings at compile time, the compiler complains that the
cssPropertyIdForSVGAttributeName() function in SVGFontFaceElement.cpp is unused, even
though SVGFontFaceElement.cpp is referring to this function. The reason is that
a function with the same name exists in the parent SVGElement class and this one ends
up getting called instead.
The proposed solution is to rename the function to cssPropertyIdForFontFaceAttributeName()
instead in SVGFontFaceElement.cpp to avoid the name clash and make sure
SVGFontFaceElement::parseAttribute() calls the right function.
cssPropertyIdForFontFaceAttributeName() returns the CSSPropertyID only for attribute
names specific to the FontFace element, while cssPropertyIdForSVGAttributeName() in
SVGElement was returning the CSSPropertyID for ALL styling attributes. As a consequence,
we avoid unnecessary calls to SVGFontFaceElement::rebuildFontFace() for non font-face
specific attributes.
BUG=312287
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=160963
Patch Set 1 #
Messages
Total messages: 4 (0 generated)
|