float SVGTextContentElement::getSubStringLength(unsigned charnum, unsigned nchars, ExceptionCode& ec) { document().updateLayoutIgnorePendingStylesheets(); unsigned numberOfChars = getNumberOfChars(); if (charnum >= numberOfChars) { ec = INDEX_SIZE_ERR; return 0.0f; } return SVGTextQuery(renderer()).subStringLength(charnum, nchars); }
float SVGTextContentElement::getSubStringLength(unsigned charnum, unsigned nchars, ExceptionState& es) { document().updateLayoutIgnorePendingStylesheets(); unsigned numberOfChars = getNumberOfChars(); if (charnum >= numberOfChars) { es.throwUninformativeAndGenericDOMException(IndexSizeError); return 0.0f; } if (nchars > numberOfChars - charnum) nchars = numberOfChars - charnum; return SVGTextQuery(renderer()).subStringLength(charnum, nchars); }
int SVGTextContentElement::getCharNumAtPosition(const FloatPoint& point) { document()->updateLayoutIgnorePendingStylesheets(); return SVGTextQuery(renderer()).characterNumberAtPosition(point); }
float SVGTextContentElement::getComputedTextLength() { document()->updateLayoutIgnorePendingStylesheets(); return SVGTextQuery(renderer()).textLength(); }
unsigned SVGTextContentElement::getNumberOfChars() { document()->updateLayoutIgnorePendingStylesheets(); return SVGTextQuery(renderer()).numberOfCharacters(); }