mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
Bug 664708 - GetCharNumAtPosition should only accept native points. r=longsonr.
This commit is contained in:
parent
d7d0fe1369
commit
8980cf02fc
@ -37,6 +37,9 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsSVGTextContentElement.h"
|
||||
#include "DOMSVGPoint.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
/* readonly attribute nsIDOMSVGAnimatedLength textLength; */
|
||||
NS_IMETHODIMP nsSVGTextContentElement::GetTextLength(nsIDOMSVGAnimatedLength * *aTextLength)
|
||||
@ -143,8 +146,8 @@ NS_IMETHODIMP nsSVGTextContentElement::GetRotationOfChar(PRUint32 charnum, float
|
||||
/* long getCharNumAtPosition (in nsIDOMSVGPoint point); */
|
||||
NS_IMETHODIMP nsSVGTextContentElement::GetCharNumAtPosition(nsIDOMSVGPoint *point, PRInt32 *_retval)
|
||||
{
|
||||
// null check when implementing - this method can be used by scripts!
|
||||
if (!point)
|
||||
nsCOMPtr<DOMSVGPoint> p = do_QueryInterface(point);
|
||||
if (!p)
|
||||
return NS_ERROR_DOM_SVG_WRONG_TYPE_ERR;
|
||||
|
||||
*_retval = -1;
|
||||
|
@ -50,6 +50,7 @@
|
||||
#include "SVGNumberList.h"
|
||||
#include "SVGAnimatedNumberList.h"
|
||||
#include "DOMSVGAnimatedNumberList.h"
|
||||
#include "DOMSVGPoint.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
@ -323,7 +324,8 @@ nsSVGTextElement::GetRotationOfChar(PRUint32 charnum, float *_retval)
|
||||
NS_IMETHODIMP
|
||||
nsSVGTextElement::GetCharNumAtPosition(nsIDOMSVGPoint *point, PRInt32 *_retval)
|
||||
{
|
||||
if (!point)
|
||||
nsCOMPtr<DOMSVGPoint> p = do_QueryInterface(point);
|
||||
if (!p)
|
||||
return NS_ERROR_DOM_SVG_WRONG_TYPE_ERR;
|
||||
|
||||
*_retval = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user