Backout 7f4f96dbf94f (bug 827172), 661847c6e48b (bug 827724), 00e357dd1458 (bug 827149) to fix the build on a CLOSED TREE

This commit is contained in:
Ed Morley 2013-01-11 11:13:17 +00:00
parent bf1a11ed5c
commit 3543eadcba
35 changed files with 156 additions and 151 deletions

View File

@ -21,7 +21,6 @@ nsIContentIterator.h \
nsContentPolicyUtils.h \
nsContentUtils.h \
nsIDocument.h \
nsIDocumentInlines.h \
nsDeprecatedOperationList.h \
nsIDocumentObserver.h \
nsIMutationObserver.h \

View File

@ -91,7 +91,6 @@ class DocumentFragment;
class DocumentType;
class DOMImplementation;
class Element;
class HTMLBodyElement;
class Link;
class ProcessingInstruction;
class UndoManager;
@ -581,7 +580,9 @@ public:
Element* GetHtmlChildElement(nsIAtom* aTag);
// Get the canonical <body> element, or return null if there isn't one (e.g.
// if the root isn't <html> or if the <body> isn't there)
mozilla::dom::HTMLBodyElement* GetBodyElement();
Element* GetBodyElement() {
return GetHtmlChildElement(nsGkAtoms::body);
}
// Get the canonical <head> element, or return null if there isn't one (e.g.
// if the root isn't <html> or if the <head> isn't there)
Element* GetHeadElement() {

View File

@ -1,18 +0,0 @@
/* -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 8; -*- */
/* vim: set sw=2 sts=2 ts=8 et tw=80 : */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef nsIDocumentInlines_h
#define nsIDocumentInlines_h
#include "nsIDocument.h"
#include "mozilla/dom/HTMLBodyElement.h"
inline mozilla::dom::HTMLBodyElement*
nsIDocument::GetBodyElement()
{
return static_cast<mozilla::dom::HTMLBodyElement*>(GetHtmlChildElement(nsGkAtoms::body));
}
#endif // nsIDocumentInlines_h

View File

@ -18,7 +18,7 @@
#include "nsDOMAttributeMap.h"
#include "nsIAtom.h"
#include "nsINodeInfo.h"
#include "nsIDocumentInlines.h"
#include "nsIDocument.h"
#include "nsIDOMNodeList.h"
#include "nsIDOMDocument.h"
#include "nsIContentIterator.h"

View File

@ -19,7 +19,7 @@
#include "nsDOMAttributeMap.h"
#include "nsIAtom.h"
#include "nsINodeInfo.h"
#include "nsIDocumentInlines.h"
#include "nsIDocument.h"
#include "nsIDOMNodeList.h"
#include "nsIDOMDocument.h"
#include "nsIContentIterator.h"

View File

@ -183,9 +183,8 @@
#include "nsIAppsService.h"
#include "mozilla/dom/BindingUtils.h"
#include "mozilla/dom/DocumentFragment.h"
#include "mozilla/dom/HTMLBodyElement.h"
#include "mozilla/dom/UndoManager.h"
#include "nsFrame.h"
#include "nsFrame.h"
#include "nsDOMCaretPosition.h"
#include "nsIDOMHTMLTextAreaElement.h"
#include "nsViewportInfo.h"

View File

@ -16,6 +16,7 @@
#include "mozilla/css/StyleRule.h"
#include "nsIDocument.h"
#include "nsIDocumentEncoder.h"
#include "nsIDOMHTMLBodyElement.h"
#include "nsIDOMHTMLDocument.h"
#include "nsIDOMAttr.h"
#include "nsIDOMDocumentFragment.h"
@ -99,7 +100,6 @@
#include "nsHTMLDocument.h"
#include "nsDOMTouchEvent.h"
#include "nsGlobalWindow.h"
#include "mozilla/dom/HTMLBodyElement.h"
using namespace mozilla;
using namespace mozilla::dom;
@ -3025,7 +3025,8 @@ nsGenericHTMLElement::IsCurrentBodyElement()
{
// TODO Bug 698498: Should this handle the case where GetBody returns a
// frameset?
if (!IsHTML(nsGkAtoms::body)) {
nsCOMPtr<nsIDOMHTMLBodyElement> bodyElement = do_QueryInterface(this);
if (!bodyElement) {
return false;
}
@ -3037,7 +3038,7 @@ nsGenericHTMLElement::IsCurrentBodyElement()
nsCOMPtr<nsIDOMHTMLElement> htmlElement;
htmlDocument->GetBody(getter_AddRefs(htmlElement));
return htmlElement == static_cast<HTMLBodyElement*>(this);
return htmlElement == bodyElement;
}
// static

View File

@ -9,7 +9,6 @@
#include "nsIImageDocument.h"
#include "nsIImageLoadingContent.h"
#include "nsGenericHTMLElement.h"
#include "nsIDocumentInlines.h"
#include "nsIDOMHTMLImageElement.h"
#include "nsIDOMEvent.h"
#include "nsIDOMKeyEvent.h"

View File

@ -9,7 +9,6 @@
#include "nsIPresShell.h"
#include "nsIObjectFrame.h"
#include "nsNPAPIPluginInstance.h"
#include "nsIDocumentInlines.h"
#include "nsIDocShellTreeItem.h"
#include "nsNodeInfoManager.h"
#include "nsContentCreatorFunctions.h"

View File

@ -8,7 +8,6 @@
#include "nsNodeInfoManager.h"
#include "nsContentCreatorFunctions.h"
#include "nsHTMLMediaElement.h"
#include "nsIDocumentInlines.h"
#include "nsIDocShellTreeItem.h"
#include "nsContentUtils.h"
#include "mozilla/dom/Element.h"

View File

@ -55,6 +55,7 @@
#include "nsIComponentManager.h"
#include "nsParserCIID.h"
#include "nsIDOMHTMLElement.h"
#include "nsIDOMHTMLBodyElement.h"
#include "nsIDOMHTMLHeadElement.h"
#include "nsINameSpaceManager.h"
#include "nsGenericHTMLElement.h"
@ -67,7 +68,6 @@
#include "nsContentUtils.h"
#include "nsJSUtils.h"
#include "nsIDocumentInlines.h"
#include "nsIDocumentEncoder.h" //for outputting selection
#include "nsICachingChannel.h"
#include "nsIJSContextStack.h"
@ -104,7 +104,6 @@
#include "nsHtml5Parser.h"
#include "nsIDOMJSWindow.h"
#include "nsSandboxFlags.h"
#include "mozilla/dom/HTMLBodyElement.h"
using namespace mozilla;
using namespace mozilla::dom;
@ -2058,7 +2057,7 @@ nsHTMLDocument::GetAlinkColor(nsAString& aAlinkColor)
{
aAlinkColor.Truncate();
HTMLBodyElement* body = GetBodyElement();
nsCOMPtr<nsIDOMHTMLBodyElement> body = do_QueryInterface(GetBodyElement());
if (body) {
body->GetALink(aAlinkColor);
}
@ -2069,7 +2068,7 @@ nsHTMLDocument::GetAlinkColor(nsAString& aAlinkColor)
NS_IMETHODIMP
nsHTMLDocument::SetAlinkColor(const nsAString& aAlinkColor)
{
HTMLBodyElement* body = GetBodyElement();
nsCOMPtr<nsIDOMHTMLBodyElement> body = do_QueryInterface(GetBodyElement());
if (body) {
body->SetALink(aAlinkColor);
}
@ -2082,7 +2081,7 @@ nsHTMLDocument::GetLinkColor(nsAString& aLinkColor)
{
aLinkColor.Truncate();
HTMLBodyElement* body = GetBodyElement();
nsCOMPtr<nsIDOMHTMLBodyElement> body = do_QueryInterface(GetBodyElement());
if (body) {
body->GetLink(aLinkColor);
}
@ -2093,7 +2092,7 @@ nsHTMLDocument::GetLinkColor(nsAString& aLinkColor)
NS_IMETHODIMP
nsHTMLDocument::SetLinkColor(const nsAString& aLinkColor)
{
HTMLBodyElement* body = GetBodyElement();
nsCOMPtr<nsIDOMHTMLBodyElement> body = do_QueryInterface(GetBodyElement());
if (body) {
body->SetLink(aLinkColor);
}
@ -2106,7 +2105,7 @@ nsHTMLDocument::GetVlinkColor(nsAString& aVlinkColor)
{
aVlinkColor.Truncate();
HTMLBodyElement* body = GetBodyElement();
nsCOMPtr<nsIDOMHTMLBodyElement> body = do_QueryInterface(GetBodyElement());
if (body) {
body->GetVLink(aVlinkColor);
}
@ -2117,7 +2116,7 @@ nsHTMLDocument::GetVlinkColor(nsAString& aVlinkColor)
NS_IMETHODIMP
nsHTMLDocument::SetVlinkColor(const nsAString& aVlinkColor)
{
HTMLBodyElement* body = GetBodyElement();
nsCOMPtr<nsIDOMHTMLBodyElement> body = do_QueryInterface(GetBodyElement());
if (body) {
body->SetVLink(aVlinkColor);
}
@ -2130,7 +2129,7 @@ nsHTMLDocument::GetBgColor(nsAString& aBgColor)
{
aBgColor.Truncate();
HTMLBodyElement* body = GetBodyElement();
nsCOMPtr<nsIDOMHTMLBodyElement> body = do_QueryInterface(GetBodyElement());
if (body) {
body->GetBgColor(aBgColor);
}
@ -2141,7 +2140,7 @@ nsHTMLDocument::GetBgColor(nsAString& aBgColor)
NS_IMETHODIMP
nsHTMLDocument::SetBgColor(const nsAString& aBgColor)
{
HTMLBodyElement* body = GetBodyElement();
nsCOMPtr<nsIDOMHTMLBodyElement> body = do_QueryInterface(GetBodyElement());
if (body) {
body->SetBgColor(aBgColor);
}
@ -2154,7 +2153,7 @@ nsHTMLDocument::GetFgColor(nsAString& aFgColor)
{
aFgColor.Truncate();
HTMLBodyElement* body = GetBodyElement();
nsCOMPtr<nsIDOMHTMLBodyElement> body = do_QueryInterface(GetBodyElement());
if (body) {
body->GetText(aFgColor);
}
@ -2165,7 +2164,7 @@ nsHTMLDocument::GetFgColor(nsAString& aFgColor)
NS_IMETHODIMP
nsHTMLDocument::SetFgColor(const nsAString& aFgColor)
{
HTMLBodyElement* body = GetBodyElement();
nsCOMPtr<nsIDOMHTMLBodyElement> body = do_QueryInterface(GetBodyElement());
if (body) {
body->SetText(aFgColor);
}

View File

@ -56,6 +56,7 @@ CPPSRCS = \
nsSVGNumber2.cpp \
nsSVGNumberPair.cpp \
nsSVGPathDataParser.cpp \
nsSVGPathElement.cpp \
nsSVGPathGeometryElement.cpp \
nsSVGPatternElement.cpp \
nsSVGPolyElement.cpp \
@ -108,7 +109,6 @@ CPPSRCS = \
SVGNumberPairSMILType.cpp \
SVGOrientSMILType.cpp \
SVGPathData.cpp \
SVGPathElement.cpp \
SVGPathSegUtils.cpp \
SVGPathSegListSMILType.cpp \
SVGPointList.cpp \
@ -174,7 +174,6 @@ EXPORTS_mozilla/dom = \
SVGLocatableElement.h \
SVGMetadataElement.h \
SVGMPathElement.h \
SVGPathElement.h \
SVGPolygonElement.h \
SVGPolylineElement.h \
SVGRectElement.h \

View File

@ -8,8 +8,8 @@
#include "mozilla/dom/SVGMPathElement.h"
#include "nsAutoPtr.h"
#include "nsDebug.h"
#include "nsSVGPathElement.h"
#include "mozilla/dom/SVGAnimateMotionElement.h"
#include "mozilla/dom/SVGPathElement.h"
#include "nsContentUtils.h"
#include "mozilla/dom/SVGMPathElementBinding.h"
@ -203,7 +203,7 @@ SVGMPathElement::AttributeChanged(nsIDocument* aDocument,
//----------------------------------------------------------------------
// Public helper methods
SVGPathElement*
nsSVGPathElement*
SVGMPathElement::GetReferencedPath()
{
if (!HasAttr(kNameSpaceID_XLink, nsGkAtoms::href)) {
@ -215,7 +215,7 @@ SVGMPathElement::GetReferencedPath()
nsIContent* genericTarget = mHrefTarget.get();
if (genericTarget && genericTarget->IsSVG(nsGkAtoms::path)) {
return static_cast<SVGPathElement*>(genericTarget);
return static_cast<nsSVGPathElement*>(genericTarget);
}
return nullptr;
}

View File

@ -10,6 +10,7 @@
#include "nsIDOMSVGURIReference.h"
#include "nsSVGElement.h"
#include "nsStubMutationObserver.h"
#include "nsSVGPathElement.h"
#include "nsSVGString.h"
#include "nsReferencedElement.h"
@ -20,7 +21,6 @@ typedef nsSVGElement SVGMPathElementBase;
namespace mozilla {
namespace dom {
class SVGPathElement;
class SVGMPathElement MOZ_FINAL : public SVGMPathElementBase,
public nsIDOMSVGMpathElement,
@ -69,7 +69,7 @@ public:
// Public helper method: If our xlink:href attribute links to a <path>
// element, this method returns a pointer to that element. Otherwise,
// this returns nullptr.
SVGPathElement* GetReferencedPath();
nsSVGPathElement* GetReferencedPath();
virtual nsXPCClassInfo* GetClassInfo();

View File

@ -10,8 +10,8 @@
#include "SVGMotionSMILType.h"
#include "SVGMotionSMILPathUtils.h"
#include "nsSVGPathDataParser.h"
#include "mozilla/dom/SVGPathElement.h" // for nsSVGPathList
#include "mozilla/dom/SVGMPathElement.h"
#include "nsSVGPathElement.h" // for nsSVGPathList
#include "SVGMPathElement.h"
#include "nsAttrValueInlines.h"
namespace mozilla {
@ -217,7 +217,7 @@ SVGMotionSMILAnimationFunction::
mPathSourceType = ePathSourceType_Mpath;
// Use the path that's the target of our chosen <mpath> child.
SVGPathElement* pathElem = aMpathElem->GetReferencedPath();
nsSVGPathElement* pathElem = aMpathElem->GetReferencedPath();
if (pathElem) {
const SVGPathData &path = pathElem->GetAnimPathSegList()->GetAnimValue();
// Path data must contain of at least one path segment (if the path data

View File

@ -8,10 +8,8 @@
#include "SVGMotionSMILType.h"
#include "nsSMILValue.h"
#include "nsDebug.h"
#include "nsSVGPathElement.h"
#include "nsMathUtils.h"
#include "nsISupportsUtils.h"
#include "gfxPath.h"
#include "nsTArray.h"
#include <math.h>
namespace mozilla {

View File

@ -5,6 +5,7 @@
#include "nsSVGPathDataParser.h"
#include "nsSVGDataParser.h"
#include "nsSVGPathElement.h"
#include "prdtoa.h"
#include "DOMSVGPathSeg.h"
#include <stdlib.h>

View File

@ -10,59 +10,58 @@
#include "DOMSVGPathSegList.h"
#include "nsCOMPtr.h"
#include "nsContentUtils.h"
#include "mozilla/dom/SVGPathElement.h"
#include "nsSVGPathElement.h"
#include "DOMSVGPoint.h"
#include "gfxContext.h"
DOMCI_NODE_DATA(SVGPathElement, mozilla::dom::SVGPathElement)
using namespace mozilla;
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Path)
namespace mozilla {
namespace dom {
nsSVGElement::NumberInfo SVGPathElement::sNumberInfo =
nsSVGElement::NumberInfo nsSVGPathElement::sNumberInfo =
{ &nsGkAtoms::pathLength, 0, false };
NS_IMPL_NS_NEW_SVG_ELEMENT(Path)
//----------------------------------------------------------------------
// nsISupports methods
NS_IMPL_ADDREF_INHERITED(SVGPathElement,SVGPathElementBase)
NS_IMPL_RELEASE_INHERITED(SVGPathElement,SVGPathElementBase)
NS_IMPL_ADDREF_INHERITED(nsSVGPathElement,nsSVGPathElementBase)
NS_IMPL_RELEASE_INHERITED(nsSVGPathElement,nsSVGPathElementBase)
NS_INTERFACE_TABLE_HEAD(SVGPathElement)
NS_NODE_INTERFACE_TABLE5(SVGPathElement, nsIDOMNode, nsIDOMElement,
DOMCI_NODE_DATA(SVGPathElement, nsSVGPathElement)
NS_INTERFACE_TABLE_HEAD(nsSVGPathElement)
NS_NODE_INTERFACE_TABLE5(nsSVGPathElement, nsIDOMNode, nsIDOMElement,
nsIDOMSVGElement,
nsIDOMSVGPathElement, nsIDOMSVGAnimatedPathData)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGPathElement)
NS_INTERFACE_MAP_END_INHERITING(SVGPathElementBase)
NS_INTERFACE_MAP_END_INHERITING(nsSVGPathElementBase)
//----------------------------------------------------------------------
// Implementation
SVGPathElement::SVGPathElement(already_AddRefed<nsINodeInfo> aNodeInfo)
: SVGPathElementBase(aNodeInfo)
nsSVGPathElement::nsSVGPathElement(already_AddRefed<nsINodeInfo> aNodeInfo)
: nsSVGPathElementBase(aNodeInfo)
{
}
//----------------------------------------------------------------------
// nsIDOMNode methods
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGPathElement)
NS_IMPL_ELEMENT_CLONE_WITH_INIT(nsSVGPathElement)
//----------------------------------------------------------------------
// nsIDOMSVGPathElement methods:
/* readonly attribute nsIDOMSVGAnimatedNumber pathLength; */
NS_IMETHODIMP
SVGPathElement::GetPathLength(nsIDOMSVGAnimatedNumber * *aPathLength)
nsSVGPathElement::GetPathLength(nsIDOMSVGAnimatedNumber * *aPathLength)
{
return mPathLength.ToDOMAnimatedNumber(aPathLength, this);
}
/* float getTotalLength (); */
NS_IMETHODIMP
SVGPathElement::GetTotalLength(float *_retval)
nsSVGPathElement::GetTotalLength(float *_retval)
{
*_retval = 0;
@ -78,7 +77,7 @@ SVGPathElement::GetTotalLength(float *_retval)
/* DOMSVGPoint getPointAtLength (in float distance); */
NS_IMETHODIMP
SVGPathElement::GetPointAtLength(float distance, nsISupports **_retval)
nsSVGPathElement::GetPointAtLength(float distance, nsISupports **_retval)
{
NS_ENSURE_FINITE(distance, NS_ERROR_ILLEGAL_VALUE);
@ -103,7 +102,7 @@ SVGPathElement::GetPointAtLength(float distance, nsISupports **_retval)
/* unsigned long getPathSegAtLength (in float distance); */
NS_IMETHODIMP
SVGPathElement::GetPathSegAtLength(float distance, uint32_t *_retval)
nsSVGPathElement::GetPathSegAtLength(float distance, uint32_t *_retval)
{
NS_ENSURE_FINITE(distance, NS_ERROR_ILLEGAL_VALUE);
*_retval = mD.GetAnimValue().GetPathSegAtLength(distance);
@ -112,7 +111,7 @@ SVGPathElement::GetPathSegAtLength(float distance, uint32_t *_retval)
/* nsISupports createSVGPathSegClosePath (); */
NS_IMETHODIMP
SVGPathElement::CreateSVGPathSegClosePath(nsISupports **_retval)
nsSVGPathElement::CreateSVGPathSegClosePath(nsISupports **_retval)
{
nsISupports* seg = NS_NewSVGPathSegClosePath();
NS_ENSURE_TRUE(seg, NS_ERROR_OUT_OF_MEMORY);
@ -121,7 +120,7 @@ SVGPathElement::CreateSVGPathSegClosePath(nsISupports **_retval)
/* nsISupports createSVGPathSegMovetoAbs (in float x, in float y); */
NS_IMETHODIMP
SVGPathElement::CreateSVGPathSegMovetoAbs(float x, float y, nsISupports **_retval)
nsSVGPathElement::CreateSVGPathSegMovetoAbs(float x, float y, nsISupports **_retval)
{
NS_ENSURE_FINITE2(x, y, NS_ERROR_ILLEGAL_VALUE);
nsISupports* seg = NS_NewSVGPathSegMovetoAbs(x, y);
@ -131,7 +130,7 @@ SVGPathElement::CreateSVGPathSegMovetoAbs(float x, float y, nsISupports **_retva
/* nsISupports createSVGPathSegMovetoRel (in float x, in float y); */
NS_IMETHODIMP
SVGPathElement::CreateSVGPathSegMovetoRel(float x, float y, nsISupports **_retval)
nsSVGPathElement::CreateSVGPathSegMovetoRel(float x, float y, nsISupports **_retval)
{
NS_ENSURE_FINITE2(x, y, NS_ERROR_ILLEGAL_VALUE);
nsISupports* seg = NS_NewSVGPathSegMovetoRel(x, y);
@ -141,7 +140,7 @@ SVGPathElement::CreateSVGPathSegMovetoRel(float x, float y, nsISupports **_retva
/* nsISupports createSVGPathSegLinetoAbs (in float x, in float y); */
NS_IMETHODIMP
SVGPathElement::CreateSVGPathSegLinetoAbs(float x, float y, nsISupports **_retval)
nsSVGPathElement::CreateSVGPathSegLinetoAbs(float x, float y, nsISupports **_retval)
{
NS_ENSURE_FINITE2(x, y, NS_ERROR_ILLEGAL_VALUE);
nsISupports* seg = NS_NewSVGPathSegLinetoAbs(x, y);
@ -151,7 +150,7 @@ SVGPathElement::CreateSVGPathSegLinetoAbs(float x, float y, nsISupports **_retva
/* nsISupports createSVGPathSegLinetoRel (in float x, in float y); */
NS_IMETHODIMP
SVGPathElement::CreateSVGPathSegLinetoRel(float x, float y, nsISupports **_retval)
nsSVGPathElement::CreateSVGPathSegLinetoRel(float x, float y, nsISupports **_retval)
{
NS_ENSURE_FINITE2(x, y, NS_ERROR_ILLEGAL_VALUE);
nsISupports* seg = NS_NewSVGPathSegLinetoRel(x, y);
@ -161,7 +160,7 @@ SVGPathElement::CreateSVGPathSegLinetoRel(float x, float y, nsISupports **_retva
/* nsISupports createSVGPathSegCurvetoCubicAbs (in float x, in float y, in float x1, in float y1, in float x2, in float y2); */
NS_IMETHODIMP
SVGPathElement::CreateSVGPathSegCurvetoCubicAbs(float x, float y, float x1, float y1, float x2, float y2, nsISupports **_retval)
nsSVGPathElement::CreateSVGPathSegCurvetoCubicAbs(float x, float y, float x1, float y1, float x2, float y2, nsISupports **_retval)
{
NS_ENSURE_FINITE6(x, y, x1, y1, x2, y2, NS_ERROR_ILLEGAL_VALUE);
nsISupports* seg = NS_NewSVGPathSegCurvetoCubicAbs(x, y, x1, y1, x2, y2);
@ -171,7 +170,7 @@ SVGPathElement::CreateSVGPathSegCurvetoCubicAbs(float x, float y, float x1, floa
/* nsISupports createSVGPathSegCurvetoCubicRel (in float x, in float y, in float x1, in float y1, in float x2, in float y2); */
NS_IMETHODIMP
SVGPathElement::CreateSVGPathSegCurvetoCubicRel(float x, float y, float x1, float y1, float x2, float y2, nsISupports **_retval)
nsSVGPathElement::CreateSVGPathSegCurvetoCubicRel(float x, float y, float x1, float y1, float x2, float y2, nsISupports **_retval)
{
NS_ENSURE_FINITE6(x, y, x1, y1, x2, y2, NS_ERROR_ILLEGAL_VALUE);
nsISupports* seg = NS_NewSVGPathSegCurvetoCubicRel(x, y, x1, y1, x2, y2);
@ -181,7 +180,7 @@ SVGPathElement::CreateSVGPathSegCurvetoCubicRel(float x, float y, float x1, floa
/* nsISupports createSVGPathSegCurvetoQuadraticAbs (in float x, in float y, in float x1, in float y1); */
NS_IMETHODIMP
SVGPathElement::CreateSVGPathSegCurvetoQuadraticAbs(float x, float y, float x1, float y1, nsISupports **_retval)
nsSVGPathElement::CreateSVGPathSegCurvetoQuadraticAbs(float x, float y, float x1, float y1, nsISupports **_retval)
{
NS_ENSURE_FINITE4(x, y, x1, y1, NS_ERROR_ILLEGAL_VALUE);
nsISupports* seg = NS_NewSVGPathSegCurvetoQuadraticAbs(x, y, x1, y1);
@ -191,7 +190,7 @@ SVGPathElement::CreateSVGPathSegCurvetoQuadraticAbs(float x, float y, float x1,
/* nsISupports createSVGPathSegCurvetoQuadraticRel (in float x, in float y, in float x1, in float y1); */
NS_IMETHODIMP
SVGPathElement::CreateSVGPathSegCurvetoQuadraticRel(float x, float y, float x1, float y1, nsISupports **_retval)
nsSVGPathElement::CreateSVGPathSegCurvetoQuadraticRel(float x, float y, float x1, float y1, nsISupports **_retval)
{
NS_ENSURE_FINITE4(x, y, x1, y1, NS_ERROR_ILLEGAL_VALUE);
nsISupports* seg = NS_NewSVGPathSegCurvetoQuadraticRel(x, y, x1, y1);
@ -201,7 +200,7 @@ SVGPathElement::CreateSVGPathSegCurvetoQuadraticRel(float x, float y, float x1,
/* nsISupports createSVGPathSegArcAbs (in float x, in float y, in float r1, in float r2, in float angle, in boolean largeArcFlag, in boolean sweepFlag); */
NS_IMETHODIMP
SVGPathElement::CreateSVGPathSegArcAbs(float x, float y, float r1, float r2, float angle, bool largeArcFlag, bool sweepFlag, nsISupports **_retval)
nsSVGPathElement::CreateSVGPathSegArcAbs(float x, float y, float r1, float r2, float angle, bool largeArcFlag, bool sweepFlag, nsISupports **_retval)
{
NS_ENSURE_FINITE5(x, y, r1, r2, angle, NS_ERROR_ILLEGAL_VALUE);
nsISupports* seg = NS_NewSVGPathSegArcAbs(x, y, r1, r2, angle,
@ -212,7 +211,7 @@ SVGPathElement::CreateSVGPathSegArcAbs(float x, float y, float r1, float r2, flo
/* nsISupports createSVGPathSegArcRel (in float x, in float y, in float r1, in float r2, in float angle, in boolean largeArcFlag, in boolean sweepFlag); */
NS_IMETHODIMP
SVGPathElement::CreateSVGPathSegArcRel(float x, float y, float r1, float r2, float angle, bool largeArcFlag, bool sweepFlag, nsISupports **_retval)
nsSVGPathElement::CreateSVGPathSegArcRel(float x, float y, float r1, float r2, float angle, bool largeArcFlag, bool sweepFlag, nsISupports **_retval)
{
NS_ENSURE_FINITE5(x, y, r1, r2, angle, NS_ERROR_ILLEGAL_VALUE);
nsISupports* seg = NS_NewSVGPathSegArcRel(x, y, r1, r2, angle,
@ -223,7 +222,7 @@ SVGPathElement::CreateSVGPathSegArcRel(float x, float y, float r1, float r2, flo
/* nsISupports createSVGPathSegLinetoHorizontalAbs (in float x); */
NS_IMETHODIMP
SVGPathElement::CreateSVGPathSegLinetoHorizontalAbs(float x, nsISupports **_retval)
nsSVGPathElement::CreateSVGPathSegLinetoHorizontalAbs(float x, nsISupports **_retval)
{
NS_ENSURE_FINITE(x, NS_ERROR_ILLEGAL_VALUE);
nsISupports* seg = NS_NewSVGPathSegLinetoHorizontalAbs(x);
@ -233,7 +232,7 @@ SVGPathElement::CreateSVGPathSegLinetoHorizontalAbs(float x, nsISupports **_retv
/* nsISupports createSVGPathSegLinetoHorizontalRel (in float x); */
NS_IMETHODIMP
SVGPathElement::CreateSVGPathSegLinetoHorizontalRel(float x, nsISupports **_retval)
nsSVGPathElement::CreateSVGPathSegLinetoHorizontalRel(float x, nsISupports **_retval)
{
NS_ENSURE_FINITE(x, NS_ERROR_ILLEGAL_VALUE);
nsISupports* seg = NS_NewSVGPathSegLinetoHorizontalRel(x);
@ -243,7 +242,7 @@ SVGPathElement::CreateSVGPathSegLinetoHorizontalRel(float x, nsISupports **_retv
/* nsISupports createSVGPathSegLinetoVerticalAbs (in float y); */
NS_IMETHODIMP
SVGPathElement::CreateSVGPathSegLinetoVerticalAbs(float y, nsISupports **_retval)
nsSVGPathElement::CreateSVGPathSegLinetoVerticalAbs(float y, nsISupports **_retval)
{
NS_ENSURE_FINITE(y, NS_ERROR_ILLEGAL_VALUE);
nsISupports* seg = NS_NewSVGPathSegLinetoVerticalAbs(y);
@ -253,7 +252,7 @@ SVGPathElement::CreateSVGPathSegLinetoVerticalAbs(float y, nsISupports **_retval
/* nsISupports createSVGPathSegLinetoVerticalRel (in float y); */
NS_IMETHODIMP
SVGPathElement::CreateSVGPathSegLinetoVerticalRel(float y, nsISupports **_retval)
nsSVGPathElement::CreateSVGPathSegLinetoVerticalRel(float y, nsISupports **_retval)
{
NS_ENSURE_FINITE(y, NS_ERROR_ILLEGAL_VALUE);
nsISupports* seg = NS_NewSVGPathSegLinetoVerticalRel(y);
@ -263,7 +262,7 @@ SVGPathElement::CreateSVGPathSegLinetoVerticalRel(float y, nsISupports **_retval
/* nsISupports createSVGPathSegCurvetoCubicSmoothAbs (in float x, in float y, in float x2, in float y2); */
NS_IMETHODIMP
SVGPathElement::CreateSVGPathSegCurvetoCubicSmoothAbs(float x, float y, float x2, float y2, nsISupports **_retval)
nsSVGPathElement::CreateSVGPathSegCurvetoCubicSmoothAbs(float x, float y, float x2, float y2, nsISupports **_retval)
{
NS_ENSURE_FINITE4(x, y, x2, y2, NS_ERROR_ILLEGAL_VALUE);
nsISupports* seg = NS_NewSVGPathSegCurvetoCubicSmoothAbs(x, y, x2, y2);
@ -273,7 +272,7 @@ SVGPathElement::CreateSVGPathSegCurvetoCubicSmoothAbs(float x, float y, float x2
/* nsISupports createSVGPathSegCurvetoCubicSmoothRel (in float x, in float y, in float x2, in float y2); */
NS_IMETHODIMP
SVGPathElement::CreateSVGPathSegCurvetoCubicSmoothRel(float x, float y, float x2, float y2, nsISupports **_retval)
nsSVGPathElement::CreateSVGPathSegCurvetoCubicSmoothRel(float x, float y, float x2, float y2, nsISupports **_retval)
{
NS_ENSURE_FINITE4(x, y, x2, y2, NS_ERROR_ILLEGAL_VALUE);
nsISupports* seg = NS_NewSVGPathSegCurvetoCubicSmoothRel(x, y, x2, y2);
@ -283,7 +282,7 @@ SVGPathElement::CreateSVGPathSegCurvetoCubicSmoothRel(float x, float y, float x2
/* nsISupports createSVGPathSegCurvetoQuadraticSmoothAbs (in float x, in float y); */
NS_IMETHODIMP
SVGPathElement::CreateSVGPathSegCurvetoQuadraticSmoothAbs(float x, float y, nsISupports **_retval)
nsSVGPathElement::CreateSVGPathSegCurvetoQuadraticSmoothAbs(float x, float y, nsISupports **_retval)
{
NS_ENSURE_FINITE2(x, y, NS_ERROR_ILLEGAL_VALUE);
nsISupports* seg = NS_NewSVGPathSegCurvetoQuadraticSmoothAbs(x, y);
@ -293,7 +292,7 @@ SVGPathElement::CreateSVGPathSegCurvetoQuadraticSmoothAbs(float x, float y, nsIS
/* nsISupports createSVGPathSegCurvetoQuadraticSmoothRel (in float x, in float y); */
NS_IMETHODIMP
SVGPathElement::CreateSVGPathSegCurvetoQuadraticSmoothRel(float x, float y, nsISupports **_retval)
nsSVGPathElement::CreateSVGPathSegCurvetoQuadraticSmoothRel(float x, float y, nsISupports **_retval)
{
NS_ENSURE_FINITE2(x, y, NS_ERROR_ILLEGAL_VALUE);
nsISupports* seg = NS_NewSVGPathSegCurvetoQuadraticSmoothRel(x, y);
@ -305,13 +304,13 @@ SVGPathElement::CreateSVGPathSegCurvetoQuadraticSmoothRel(float x, float y, nsIS
// nsSVGElement methods
/* virtual */ bool
SVGPathElement::HasValidDimensions() const
nsSVGPathElement::HasValidDimensions() const
{
return !mD.GetAnimValue().IsEmpty();
}
nsSVGElement::NumberAttributesInfo
SVGPathElement::GetNumberInfo()
nsSVGPathElement::GetNumberInfo()
{
return NumberAttributesInfo(&mPathLength, &sNumberInfo, 1);
}
@ -320,7 +319,7 @@ SVGPathElement::GetNumberInfo()
// nsIDOMSVGAnimatedPathData methods:
/* readonly attribute DOMSVGPathSegList pathSegList; */
NS_IMETHODIMP SVGPathElement::GetPathSegList(nsISupports * *aPathSegList)
NS_IMETHODIMP nsSVGPathElement::GetPathSegList(nsISupports * *aPathSegList)
{
void *key = mD.GetBaseValKey();
*aPathSegList = DOMSVGPathSegList::GetDOMWrapper(key, this, false).get();
@ -328,7 +327,7 @@ NS_IMETHODIMP SVGPathElement::GetPathSegList(nsISupports * *aPathSegList)
}
/* readonly attribute DOMSVGPathSegList animatedPathSegList; */
NS_IMETHODIMP SVGPathElement::GetAnimatedPathSegList(nsISupports * *aAnimatedPathSegList)
NS_IMETHODIMP nsSVGPathElement::GetAnimatedPathSegList(nsISupports * *aAnimatedPathSegList)
{
void *key = mD.GetAnimValKey();
*aAnimatedPathSegList =
@ -340,18 +339,18 @@ NS_IMETHODIMP SVGPathElement::GetAnimatedPathSegList(nsISupports * *aAnimatedPat
// nsIContent methods
NS_IMETHODIMP_(bool)
SVGPathElement::IsAttributeMapped(const nsIAtom* name) const
nsSVGPathElement::IsAttributeMapped(const nsIAtom* name) const
{
static const MappedAttributeEntry* const map[] = {
sMarkersMap
};
return FindAttributeDependence(name, map) ||
SVGPathElementBase::IsAttributeMapped(name);
nsSVGPathElementBase::IsAttributeMapped(name);
}
already_AddRefed<gfxFlattenedPath>
SVGPathElement::GetFlattenedPath(const gfxMatrix &aMatrix)
nsSVGPathElement::GetFlattenedPath(const gfxMatrix &aMatrix)
{
return mD.GetAnimValue().ToFlattenedPath(aMatrix);
}
@ -360,32 +359,32 @@ SVGPathElement::GetFlattenedPath(const gfxMatrix &aMatrix)
// nsSVGPathGeometryElement methods
bool
SVGPathElement::AttributeDefinesGeometry(const nsIAtom *aName)
nsSVGPathElement::AttributeDefinesGeometry(const nsIAtom *aName)
{
return aName == nsGkAtoms::d ||
aName == nsGkAtoms::pathLength;
}
bool
SVGPathElement::IsMarkable()
nsSVGPathElement::IsMarkable()
{
return true;
}
void
SVGPathElement::GetMarkPoints(nsTArray<nsSVGMark> *aMarks)
nsSVGPathElement::GetMarkPoints(nsTArray<nsSVGMark> *aMarks)
{
mD.GetAnimValue().GetMarkerPositioningData(aMarks);
}
void
SVGPathElement::ConstructPath(gfxContext *aCtx)
nsSVGPathElement::ConstructPath(gfxContext *aCtx)
{
mD.GetAnimValue().ConstructPath(aCtx);
}
gfxFloat
SVGPathElement::GetPathLengthScale(PathLengthScaleForType aFor)
nsSVGPathElement::GetPathLengthScale(PathLengthScaleForType aFor)
{
NS_ABORT_IF_FALSE(aFor == eForTextPath || aFor == eForStroking,
"Unknown enum");
@ -407,6 +406,3 @@ SVGPathElement::GetPathLengthScale(PathLengthScaleForType aFor)
}
return 1.0;
}
} // namespace dom
} // namespace mozilla

View File

@ -3,8 +3,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_dom_SVGPathElement_h
#define mozilla_dom_SVGPathElement_h
#ifndef __NS_SVGPATHELEMENT_H__
#define __NS_SVGPATHELEMENT_H__
#include "nsIDOMSVGAnimatedPathData.h"
#include "nsIDOMSVGPathElement.h"
@ -12,29 +12,23 @@
#include "nsSVGPathGeometryElement.h"
#include "SVGAnimatedPathSegList.h"
nsresult NS_NewSVGPathElement(nsIContent **aResult,
already_AddRefed<nsINodeInfo> aNodeInfo);
class gfxContext;
typedef nsSVGPathGeometryElement SVGPathElementBase;
typedef nsSVGPathGeometryElement nsSVGPathElementBase;
namespace mozilla {
namespace dom {
class SVGPathElement MOZ_FINAL : public SVGPathElementBase,
public nsIDOMSVGPathElement,
public nsIDOMSVGAnimatedPathData
class nsSVGPathElement : public nsSVGPathElementBase,
public nsIDOMSVGPathElement,
public nsIDOMSVGAnimatedPathData
{
friend class nsSVGPathFrame;
protected:
friend nsresult (::NS_NewSVGPathElement(nsIContent **aResult,
already_AddRefed<nsINodeInfo> aNodeInfo));
SVGPathElement(already_AddRefed<nsINodeInfo> aNodeInfo);
friend nsresult NS_NewSVGPathElement(nsIContent **aResult,
already_AddRefed<nsINodeInfo> aNodeInfo);
nsSVGPathElement(already_AddRefed<nsINodeInfo> aNodeInfo);
public:
typedef SVGAnimatedPathSegList SVGAnimatedPathSegList;
typedef mozilla::SVGAnimatedPathSegList SVGAnimatedPathSegList;
// interfaces:
NS_DECL_ISUPPORTS_INHERITED
@ -44,7 +38,7 @@ public:
// xxx I wish we could use virtual inheritance
NS_FORWARD_NSIDOMNODE_TO_NSINODE
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
NS_FORWARD_NSIDOMSVGELEMENT(SVGPathElementBase::)
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGPathElementBase::)
// nsIContent interface
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* name) const;
@ -97,7 +91,4 @@ protected:
static NumberInfo sNumberInfo;
};
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_SVGPathElement_h
#endif

View File

@ -19,6 +19,7 @@ NS_IMPL_ADDREF_INHERITED(nsSVGPolyElement,nsSVGPolyElementBase)
NS_IMPL_RELEASE_INHERITED(nsSVGPolyElement,nsSVGPolyElementBase)
NS_INTERFACE_MAP_BEGIN(nsSVGPolyElement)
NS_INTERFACE_MAP_ENTRY(nsIDOMSVGAnimatedPoints)
NS_INTERFACE_MAP_END_INHERITING(nsSVGPolyElementBase)
//----------------------------------------------------------------------
@ -30,6 +31,17 @@ nsSVGPolyElement::nsSVGPolyElement(already_AddRefed<nsINodeInfo> aNodeInfo)
SetIsDOMBinding();
}
//----------------------------------------------------------------------
// nsIDOMSGAnimatedPoints methods:
/* readonly attribute DOMSVGPointList points; */
NS_IMETHODIMP
nsSVGPolyElement::GetPoints(nsISupports * *aPoints)
{
*aPoints = Points().get();
return NS_OK;
}
already_AddRefed<DOMSVGPointList>
nsSVGPolyElement::Points()
{
@ -38,6 +50,14 @@ nsSVGPolyElement::Points()
return points.forget();
}
/* readonly attribute DOMSVGPointList animatedPoints; */
NS_IMETHODIMP
nsSVGPolyElement::GetAnimatedPoints(nsISupports * *aAnimatedPoints)
{
*aAnimatedPoints = AnimatedPoints().get();
return NS_OK;
}
already_AddRefed<DOMSVGPointList>
nsSVGPolyElement::AnimatedPoints()
{

View File

@ -6,6 +6,7 @@
#ifndef NS_SVGPOLYELEMENT_H_
#define NS_SVGPOLYELEMENT_H_
#include "nsIDOMSVGAnimatedPoints.h"
#include "nsSVGPathGeometryElement.h"
#include "SVGAnimatedPointList.h"
@ -17,15 +18,17 @@ namespace mozilla {
class DOMSVGPointList;
}
class nsSVGPolyElement : public nsSVGPolyElementBase
class nsSVGPolyElement : public nsSVGPolyElementBase,
public nsIDOMSVGAnimatedPoints
{
protected:
nsSVGPolyElement(already_AddRefed<nsINodeInfo> aNodeInfo);
public:
//interfaces
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIDOMSVGANIMATEDPOINTS
// nsIContent interface
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* name) const;

View File

@ -317,6 +317,7 @@
#include "nsIDOMSVGAnimatedLength.h"
#include "nsIDOMSVGAnimatedNumber.h"
#include "nsIDOMSVGAnimatedPathData.h"
#include "nsIDOMSVGAnimatedPoints.h"
#include "nsIDOMSVGAnimatedRect.h"
#include "nsIDOMSVGAnimatedString.h"
#include "nsIDOMSVGAnimateElement.h"
@ -3320,11 +3321,13 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_BEGIN(SVGPolygonElement, nsIDOMSVGPolygonElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPolygonElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedPoints)
DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(SVGPolylineElement, nsIDOMSVGPolylineElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPolylineElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedPoints)
DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
DOM_CLASSINFO_MAP_END

View File

@ -24,6 +24,7 @@ XPIDLSRCS = \
nsIDOMSVGAnimatedLength.idl \
nsIDOMSVGAnimatedNumber.idl \
nsIDOMSVGAnimatedPathData.idl \
nsIDOMSVGAnimatedPoints.idl \
nsIDOMSVGAnimatedRect.idl \
nsIDOMSVGAnimatedString.idl \
nsIDOMSVGAnimateElement.idl \

View File

@ -0,0 +1,14 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "domstubs.idl"
[scriptable, uuid(ebf334b3-86ef-4bf3-8a92-d775c72defa4)]
interface nsIDOMSVGAnimatedPoints : nsISupports
{
readonly attribute nsISupports points;
readonly attribute nsISupports animatedPoints;
};

View File

@ -37,7 +37,6 @@
#include "nsIAppsService.h"
#include "nsIBaseWindow.h"
#include "nsIComponentManager.h"
#include "nsIDocumentInlines.h"
#include "nsIDOMClassInfo.h"
#include "nsIDOMElement.h"
#include "nsIDOMEvent.h"
@ -428,7 +427,7 @@ TabChild::HandlePossibleViewportChange()
float minScale = 1.0f;
nsCOMPtr<nsIDOMElement> htmlDOMElement = do_QueryInterface(document->GetHtmlElement());
HTMLBodyElement* bodyDOMElement = document->GetBodyElement();
nsCOMPtr<nsIDOMElement> bodyDOMElement = do_QueryInterface(document->GetBodyElement());
int32_t htmlWidth = 0, htmlHeight = 0;
if (htmlDOMElement) {
@ -437,8 +436,8 @@ TabChild::HandlePossibleViewportChange()
}
int32_t bodyWidth = 0, bodyHeight = 0;
if (bodyDOMElement) {
bodyWidth = bodyDOMElement->ScrollWidth();
bodyHeight = bodyDOMElement->ScrollHeight();
bodyDOMElement->GetScrollWidth(&bodyWidth);
bodyDOMElement->GetScrollHeight(&bodyHeight);
}
float pageWidth, pageHeight;

View File

@ -69,7 +69,6 @@
#include "nsIParserService.h"
#include "mozilla/Selection.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/HTMLBodyElement.h"
#include "nsTextFragment.h"
using namespace mozilla;

View File

@ -27,7 +27,7 @@
#include "nsCSSAnonBoxes.h"
#include "nsTransform2D.h"
#include "nsIContent.h"
#include "nsIDocumentInlines.h"
#include "nsIDocument.h"
#include "nsIScrollableFrame.h"
#include "imgIRequest.h"
#include "imgIContainer.h"

View File

@ -6028,8 +6028,9 @@ static void ComputeVisualOverflowArea(nsLineList& aLines,
bool
nsBlockFrame::IsVisibleInSelection(nsISelection* aSelection)
{
if (mContent->IsHTML() && (mContent->Tag() == nsGkAtoms::html ||
mContent->Tag() == nsGkAtoms::body))
nsCOMPtr<nsIDOMHTMLHtmlElement> html(do_QueryInterface(mContent));
nsCOMPtr<nsIDOMHTMLBodyElement> body(do_QueryInterface(mContent));
if (html || body)
return true;
nsCOMPtr<nsIDOMNode> node(do_QueryInterface(mContent));

View File

@ -17,7 +17,7 @@
#include "nsGkAtoms.h"
#include "nsINameSpaceManager.h"
#include "nsContentList.h"
#include "nsIDocumentInlines.h"
#include "nsIDocument.h"
#include "nsFontMetrics.h"
#include "nsIDocumentObserver.h"
#include "nsBoxLayoutState.h"

View File

@ -14,7 +14,7 @@
#include "nsStyleSet.h"
#include "nsNetUtil.h"
#include "nsCSSStyleSheet.h"
#include "nsIDocumentInlines.h"
#include "nsIDocument.h"
#include "nsRuleWalker.h"
#include "nsStyleContext.h"
#include "mozilla/css/StyleRule.h"

View File

@ -12,6 +12,7 @@
#include "nsPresContext.h"
#include "nsSVGEffects.h"
#include "nsSVGPaintServerFrame.h"
#include "nsSVGPathElement.h"
#include "nsSVGUtils.h"
NS_IMPL_FRAMEARENA_HELPERS(nsSVGGeometryFrame)

View File

@ -12,6 +12,7 @@
#include "nsISVGGlyphFragmentNode.h"
#include "nsSVGGlyphFrame.h"
#include "nsSVGIntegrationUtils.h"
#include "nsSVGPathElement.h"
#include "nsSVGTextPathFrame.h"
#include "nsSVGUtils.h"
#include "SVGGraphicsElement.h"

View File

@ -10,7 +10,7 @@
#include "nsContentUtils.h"
#include "nsSVGEffects.h"
#include "nsSVGLength2.h"
#include "mozilla/dom/SVGPathElement.h"
#include "nsSVGPathElement.h"
#include "mozilla/dom/SVGTextPathElement.h"
#include "SVGLengthList.h"
@ -144,8 +144,8 @@ nsSVGTextPathFrame::GetOffsetScale()
if (!pathFrame)
return 1.0;
return static_cast<SVGPathElement*>(pathFrame->GetContent())->
GetPathLengthScale(SVGPathElement::eForTextPath);
return static_cast<nsSVGPathElement*>(pathFrame->GetContent())->
GetPathLengthScale(nsSVGPathElement::eForTextPath);
}
//----------------------------------------------------------------------

View File

@ -44,7 +44,7 @@
#include "nsSVGLength2.h"
#include "nsSVGMaskFrame.h"
#include "nsSVGOuterSVGFrame.h"
#include "mozilla/dom/SVGPathElement.h"
#include "nsSVGPathElement.h"
#include "nsSVGPathGeometryElement.h"
#include "nsSVGPathGeometryFrame.h"
#include "nsSVGPaintServerFrame.h"
@ -1733,8 +1733,8 @@ GetStrokeDashData(nsIFrame* aFrame,
gfxFloat pathScale = 1.0;
if (content->Tag() == nsGkAtoms::path) {
pathScale = static_cast<SVGPathElement*>(content)->
GetPathLengthScale(SVGPathElement::eForStroking);
pathScale = static_cast<nsSVGPathElement*>(content)->
GetPathLengthScale(nsSVGPathElement::eForStroking);
if (pathScale <= 0) {
return false;
}

View File

@ -59,7 +59,7 @@ template<class T> class nsReadingIterator;
#include "nsIWebProgressListener.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsIDOMHTMLDocument.h"
#include "mozilla/dom/HTMLBodyElement.h"
#include "nsIDOMHTMLBodyElement.h"
#include "nsIDOMHTMLElement.h"
#include "nsIDOMHTMLInputElement.h"
#include "nsIDOMHTMLTextAreaElement.h"
@ -1575,7 +1575,7 @@ TestApp::Init(void)
// set a background color manually,
// otherwise the window might be transparent
static_cast<HTMLBodyElement*>(htmlBody)->
nsCOMPtr<nsIDOMHTMLBodyElement>(do_QueryInterface(htmlBody))->
SetBgColor(NS_LITERAL_STRING("white"));
widget->Show(true);