зеркало из https://github.com/mozilla/pjs.git
Bug 664708 - GetCharNumAtPosition should only accept native points. r=longsonr.
--HG-- extra : rebase_source : f6baa2c0d4f4d79d626aaebc272604d79edb1db3
This commit is contained in:
Родитель
41fa0f3a66
Коммит
8899e0053b
|
@ -37,6 +37,9 @@
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
#include "nsSVGTextContentElement.h"
|
#include "nsSVGTextContentElement.h"
|
||||||
|
#include "DOMSVGPoint.h"
|
||||||
|
|
||||||
|
using namespace mozilla;
|
||||||
|
|
||||||
/* readonly attribute nsIDOMSVGAnimatedLength textLength; */
|
/* readonly attribute nsIDOMSVGAnimatedLength textLength; */
|
||||||
NS_IMETHODIMP nsSVGTextContentElement::GetTextLength(nsIDOMSVGAnimatedLength * *aTextLength)
|
NS_IMETHODIMP nsSVGTextContentElement::GetTextLength(nsIDOMSVGAnimatedLength * *aTextLength)
|
||||||
|
@ -143,8 +146,8 @@ NS_IMETHODIMP nsSVGTextContentElement::GetRotationOfChar(PRUint32 charnum, float
|
||||||
/* long getCharNumAtPosition (in nsIDOMSVGPoint point); */
|
/* long getCharNumAtPosition (in nsIDOMSVGPoint point); */
|
||||||
NS_IMETHODIMP nsSVGTextContentElement::GetCharNumAtPosition(nsIDOMSVGPoint *point, PRInt32 *_retval)
|
NS_IMETHODIMP nsSVGTextContentElement::GetCharNumAtPosition(nsIDOMSVGPoint *point, PRInt32 *_retval)
|
||||||
{
|
{
|
||||||
// null check when implementing - this method can be used by scripts!
|
nsCOMPtr<DOMSVGPoint> p = do_QueryInterface(point);
|
||||||
if (!point)
|
if (!p)
|
||||||
return NS_ERROR_DOM_SVG_WRONG_TYPE_ERR;
|
return NS_ERROR_DOM_SVG_WRONG_TYPE_ERR;
|
||||||
|
|
||||||
*_retval = -1;
|
*_retval = -1;
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
#include "SVGNumberList.h"
|
#include "SVGNumberList.h"
|
||||||
#include "SVGAnimatedNumberList.h"
|
#include "SVGAnimatedNumberList.h"
|
||||||
#include "DOMSVGAnimatedNumberList.h"
|
#include "DOMSVGAnimatedNumberList.h"
|
||||||
|
#include "DOMSVGPoint.h"
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
|
|
||||||
|
@ -323,7 +324,8 @@ nsSVGTextElement::GetRotationOfChar(PRUint32 charnum, float *_retval)
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsSVGTextElement::GetCharNumAtPosition(nsIDOMSVGPoint *point, PRInt32 *_retval)
|
nsSVGTextElement::GetCharNumAtPosition(nsIDOMSVGPoint *point, PRInt32 *_retval)
|
||||||
{
|
{
|
||||||
if (!point)
|
nsCOMPtr<DOMSVGPoint> p = do_QueryInterface(point);
|
||||||
|
if (!p)
|
||||||
return NS_ERROR_DOM_SVG_WRONG_TYPE_ERR;
|
return NS_ERROR_DOM_SVG_WRONG_TYPE_ERR;
|
||||||
|
|
||||||
*_retval = -1;
|
*_retval = -1;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче