--- a/layout/build/nsLayoutModule.cpp
+++ b/layout/build/nsLayoutModule.cpp
@@ -184,17 +184,16 @@ class nsIDocumentLoaderFactory;
#include "nsIBoxObject.h"
#ifdef MOZ_XUL
#include "inDOMView.h"
#endif /* MOZ_XUL */
#include "inDeepTreeWalker.h"
-#include "inFlasher.h"
#include "inCSSValueSearch.h"
#include "inDOMUtils.h"
#ifdef MOZ_XUL
#include "nsIXULDocument.h"
#include "nsIXULSortService.h"
nsresult
@@ -520,17 +519,16 @@ MAKE_CTOR(CreateNewScrollBoxObject,
MAKE_CTOR(CreateNewTreeBoxObject, nsIBoxObject, NS_NewTreeBoxObject)
MAKE_CTOR(CreateNewContainerBoxObject, nsIBoxObject, NS_NewContainerBoxObject)
#endif // MOZ_XUL
#ifdef MOZ_XUL
NS_GENERIC_FACTORY_CONSTRUCTOR(inDOMView)
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(inDeepTreeWalker)
-NS_GENERIC_FACTORY_CONSTRUCTOR(inFlasher)
NS_GENERIC_FACTORY_CONSTRUCTOR(inCSSValueSearch)
NS_GENERIC_FACTORY_CONSTRUCTOR(inDOMUtils)
MAKE_CTOR2(CreateContentViewer, nsIContentViewer, NS_NewContentViewer)
MAKE_CTOR(CreateHTMLDocument, nsIDocument, NS_NewHTMLDocument)
MAKE_CTOR(CreateXMLDocument, nsIDocument, NS_NewXMLDocument)
MAKE_CTOR(CreateSVGDocument, nsIDocument, NS_NewSVGDocument)
MAKE_CTOR(CreateImageDocument, nsIDocument, NS_NewImageDocument)
@@ -674,17 +672,16 @@ NS_DEFINE_NAMED_CID(NS_POPUPBOXOBJECT_CI
NS_DEFINE_NAMED_CID(NS_CONTAINERBOXOBJECT_CID);
NS_DEFINE_NAMED_CID(NS_SCROLLBOXOBJECT_CID);
NS_DEFINE_NAMED_CID(NS_TREEBOXOBJECT_CID);
#endif // MOZ_XUL
#ifdef MOZ_XUL
NS_DEFINE_NAMED_CID(IN_DOMVIEW_CID);
#endif
NS_DEFINE_NAMED_CID(IN_DEEPTREEWALKER_CID);
-NS_DEFINE_NAMED_CID(IN_FLASHER_CID);
NS_DEFINE_NAMED_CID(IN_CSSVALUESEARCH_CID);
NS_DEFINE_NAMED_CID(IN_DOMUTILS_CID);
NS_DEFINE_NAMED_CID(NS_CONTENT_VIEWER_CID);
NS_DEFINE_NAMED_CID(NS_HTMLDOCUMENT_CID);
NS_DEFINE_NAMED_CID(NS_XMLDOCUMENT_CID);
NS_DEFINE_NAMED_CID(NS_SVGDOCUMENT_CID);
NS_DEFINE_NAMED_CID(NS_IMAGEDOCUMENT_CID);
NS_DEFINE_NAMED_CID(NS_DOMSELECTION_CID);
@@ -972,17 +969,16 @@ static const mozilla::Module::CIDEntry k
{ &kNS_CONTAINERBOXOBJECT_CID, false, nullptr, CreateNewContainerBoxObject },
{ &kNS_SCROLLBOXOBJECT_CID, false, nullptr, CreateNewScrollBoxObject },
{ &kNS_TREEBOXOBJECT_CID, false, nullptr, CreateNewTreeBoxObject },
#endif // MOZ_XUL
#ifdef MOZ_XUL
{ &kIN_DOMVIEW_CID, false, nullptr, inDOMViewConstructor },
#endif
{ &kIN_DEEPTREEWALKER_CID, false, nullptr, inDeepTreeWalkerConstructor },
- { &kIN_FLASHER_CID, false, nullptr, inFlasherConstructor },
{ &kIN_CSSVALUESEARCH_CID, false, nullptr, inCSSValueSearchConstructor },
{ &kIN_DOMUTILS_CID, false, nullptr, inDOMUtilsConstructor },
{ &kNS_CONTENT_VIEWER_CID, false, nullptr, CreateContentViewer },
{ &kNS_HTMLDOCUMENT_CID, false, nullptr, CreateHTMLDocument },
{ &kNS_XMLDOCUMENT_CID, false, nullptr, CreateXMLDocument },
{ &kNS_SVGDOCUMENT_CID, false, nullptr, CreateSVGDocument },
{ &kNS_IMAGEDOCUMENT_CID, false, nullptr, CreateImageDocument },
{ &kNS_DOMSELECTION_CID, false, nullptr, CreateDOMSelection },
@@ -1132,17 +1128,16 @@ static const mozilla::Module::ContractID
{ "@mozilla.org/layout/xul-boxobject-container;1", &kNS_CONTAINERBOXOBJECT_CID },
{ "@mozilla.org/layout/xul-boxobject-scrollbox;1", &kNS_SCROLLBOXOBJECT_CID },
{ "@mozilla.org/layout/xul-boxobject-tree;1", &kNS_TREEBOXOBJECT_CID },
#endif // MOZ_XUL
#ifdef MOZ_XUL
{ "@mozilla.org/inspector/dom-view;1", &kIN_DOMVIEW_CID },
#endif
{ "@mozilla.org/inspector/deep-tree-walker;1", &kIN_DEEPTREEWALKER_CID },
- { "@mozilla.org/inspector/flasher;1", &kIN_FLASHER_CID },
{ "@mozilla.org/inspector/search;1?type=cssvalue", &kIN_CSSVALUESEARCH_CID },
{ IN_DOMUTILS_CONTRACTID, &kIN_DOMUTILS_CID },
{ "@mozilla.org/xml/xml-document;1", &kNS_XMLDOCUMENT_CID },
{ "@mozilla.org/svg/svg-document;1", &kNS_SVGDOCUMENT_CID },
{ "@mozilla.org/content/dom-selection;1", &kNS_DOMSELECTION_CID },
{ "@mozilla.org/content/post-content-iterator;1", &kNS_CONTENTITERATOR_CID },
{ "@mozilla.org/content/pre-content-iterator;1", &kNS_PRECONTENTITERATOR_CID },
{ "@mozilla.org/content/subtree-content-iterator;1", &kNS_SUBTREEITERATOR_CID },
deleted file mode 100644
--- a/layout/inspector/inFlasher.cpp
+++ /dev/null
@@ -1,135 +0,0 @@
-/* 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 "inFlasher.h"
-#include "inLayoutUtils.h"
-
-#include "nsIDOMElement.h"
-#include "nsIServiceManager.h"
-#include "nsIPresShell.h"
-#include "nsIFrame.h"
-#include "nsIWidget.h"
-#include "nsReadableUtils.h"
-#include "nsIDOMWindow.h"
-#include "nsIContent.h"
-
-#include "prprf.h"
-
-///////////////////////////////////////////////////////////////////////////////
-
-inFlasher::inFlasher() :
- mColor(NS_RGB(0,0,0)),
- mThickness(0),
- mInvert(false)
-{
-}
-
-inFlasher::~inFlasher()
-{
-}
-
-NS_IMPL_ISUPPORTS(inFlasher, inIFlasher)
-
-///////////////////////////////////////////////////////////////////////////////
-// inIFlasher
-
-NS_IMETHODIMP
-inFlasher::GetColor(nsAString& aColor)
-{
- // Copied from nsGenericHTMLElement::ColorToString()
- char buf[10];
- PR_snprintf(buf, sizeof(buf), "#%02x%02x%02x",
- NS_GET_R(mColor), NS_GET_G(mColor), NS_GET_B(mColor));
- CopyASCIItoUTF16(buf, aColor);
-
- return NS_OK;
-}
-
-NS_IMETHODIMP
-inFlasher::SetColor(const nsAString& aColor)
-{
- NS_ENSURE_FALSE(aColor.IsEmpty(), NS_ERROR_ILLEGAL_VALUE);
-
- nsAutoString colorStr;
- colorStr.Assign(aColor);
-
- if (colorStr.CharAt(0) != '#') {
- if (NS_ColorNameToRGB(colorStr, &mColor)) {
- return NS_OK;
- }
- }
- else {
- colorStr.Cut(0, 1);
- if (NS_HexToRGB(colorStr, &mColor)) {
- return NS_OK;
- }
- }
-
- return NS_ERROR_ILLEGAL_VALUE;
-}
-
-NS_IMETHODIMP
-inFlasher::GetThickness(uint16_t *aThickness)
-{
- NS_PRECONDITION(aThickness, "Null pointer");
- *aThickness = mThickness;
- return NS_OK;
-}
-
-NS_IMETHODIMP
-inFlasher::SetThickness(uint16_t aThickness)
-{
- mThickness = aThickness;
- return NS_OK;
-}
-
-NS_IMETHODIMP
-inFlasher::GetInvert(bool *aInvert)
-{
- NS_PRECONDITION(aInvert, "Null pointer");
- *aInvert = mInvert;
- return NS_OK;
-}
-
-NS_IMETHODIMP
-inFlasher::SetInvert(bool aInvert)
-{
- mInvert = aInvert;
- return NS_OK;
-}
-
-NS_IMETHODIMP
-inFlasher::RepaintElement(nsIDOMElement* aElement)
-{
- return NS_OK;
-}
-
-NS_IMETHODIMP
-inFlasher::DrawElementOutline(nsIDOMElement* aElement)
-{
- return NS_OK;
-}
-
-NS_IMETHODIMP
-inFlasher::ScrollElementIntoView(nsIDOMElement *aElement)
-{
- NS_ENSURE_ARG_POINTER(aElement);
- nsCOMPtr<nsIDOMWindow> window = inLayoutUtils::GetWindowFor(aElement);
- if (!window) {
- return NS_OK;
- }
-
- nsCOMPtr<nsIPresShell> presShell = inLayoutUtils::GetPresShellFor(window);
- if (!presShell) {
- return NS_OK;
- }
-
- nsCOMPtr<nsIContent> content = do_QueryInterface(aElement);
- presShell->ScrollContentIntoView(content,
- nsIPresShell::ScrollAxis(),
- nsIPresShell::ScrollAxis(),
- nsIPresShell::SCROLL_OVERFLOW_HIDDEN);
-
- return NS_OK;
-}
deleted file mode 100644
--- a/layout/inspector/inFlasher.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* 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 __inFlasher_h__
-#define __inFlasher_h__
-
-#include "inIFlasher.h"
-#include "nsCoord.h"
-#include "nsColor.h"
-
-#define BOUND_INNER 0
-#define BOUND_OUTER 1
-
-#define DIR_VERTICAL 0
-#define DIR_HORIZONTAL 1
-
-class inFlasher MOZ_FINAL : public inIFlasher
-{
-public:
- NS_DECL_ISUPPORTS
- NS_DECL_INIFLASHER
-
- inFlasher();
-
-protected:
- virtual ~inFlasher();
-
- nscolor mColor;
-
- uint16_t mThickness;
- bool mInvert;
-};
-
-// {9286E71A-621A-4b91-851E-9984C1A2E81A}
-#define IN_FLASHER_CID \
-{ 0x9286e71a, 0x621a, 0x4b91, { 0x85, 0x1e, 0x99, 0x84, 0xc1, 0xa2, 0xe8, 0x1a } }
-
-#endif // __inFlasher_h__
deleted file mode 100644
--- a/layout/inspector/inIFlasher.idl
+++ /dev/null
@@ -1,46 +0,0 @@
-/* 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 "nsISupports.idl"
-
-interface nsIDOMElement;
-
-/**
- * This class will be removed in gecko v33. See comments below for alternatives.
- *
- * @status DEPRECATED - see comments below.
- */
-[scriptable, uuid(7B4A099F-6F6E-4565-977B-FB622ADBFF49)]
-interface inIFlasher : nsISupports
-{
- attribute DOMString color;
- attribute boolean invert;
- attribute unsigned short thickness;
-
- /**
- * This function now does nothing at all. Use the :-moz-devtools-highlighted
- * pseudo-class instead. For example, see the "HIGHLIGHTED_PSEUDO_CLASS" and
- * "INVERT" lines in:
- * https://hg.mozilla.org/dom-inspector/file/tip/resources/content/Flasher.js
- *
- * @status DEPRECATED
- */
- void drawElementOutline(in nsIDOMElement aElement);
-
- /**
- * This function now does nothing at all.
- *
- * @status DEPRECATED
- */
- void repaintElement(in nsIDOMElement aElement);
-
- /**
- * As of gecko v33 you should use inIDOMUtils::scrollElementIntoView instead
- * of this function.
- *
- * @status DEPRECATED
- */
- void scrollElementIntoView(in nsIDOMElement aElement);
-};
-
--- a/layout/inspector/inLayoutUtils.cpp
+++ b/layout/inspector/inLayoutUtils.cpp
@@ -15,48 +15,16 @@
#include "nsPresContext.h"
#include "mozilla/EventStateManager.h"
#include "mozilla/dom/Element.h"
using namespace mozilla;
///////////////////////////////////////////////////////////////////////////////
-nsIDOMWindow*
-inLayoutUtils::GetWindowFor(nsIDOMNode* aNode)
-{
- nsCOMPtr<nsIDOMDocument> doc1;
- aNode->GetOwnerDocument(getter_AddRefs(doc1));
- return GetWindowFor(doc1.get());
-}
-
-nsIDOMWindow*
-inLayoutUtils::GetWindowFor(nsIDOMDocument* aDoc)
-{
- nsCOMPtr<nsIDOMWindow> window;
- aDoc->GetDefaultView(getter_AddRefs(window));
- return window;
-}
-
-nsIPresShell*
-inLayoutUtils::GetPresShellFor(nsISupports* aThing)
-{
- nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aThing);
-
- return window->GetDocShell()->GetPresShell();
-}
-
-/*static*/
-nsIFrame*
-inLayoutUtils::GetFrameFor(nsIDOMElement* aElement)
-{
- nsCOMPtr<nsIContent> content = do_QueryInterface(aElement);
- return content->GetPrimaryFrame();
-}
-
EventStateManager*
inLayoutUtils::GetEventStateManagerFor(nsIDOMElement *aElement)
{
NS_PRECONDITION(aElement, "Passing in a null element is bad");
nsCOMPtr<nsIDOMDocument> domDoc;
aElement->GetOwnerDocument(getter_AddRefs(domDoc));
nsCOMPtr<nsIDocument> doc = do_QueryInterface(domDoc);
--- a/layout/inspector/inLayoutUtils.h
+++ b/layout/inspector/inLayoutUtils.h
@@ -17,19 +17,15 @@ class nsISupports;
namespace mozilla {
class EventStateManager;
}
class inLayoutUtils
{
public:
- static nsIDOMWindow* GetWindowFor(nsIDOMNode* aNode);
- static nsIDOMWindow* GetWindowFor(nsIDOMDocument* aDoc);
- static nsIPresShell* GetPresShellFor(nsISupports* aThing);
- static nsIFrame* GetFrameFor(nsIDOMElement* aElement);
static mozilla::EventStateManager*
GetEventStateManagerFor(nsIDOMElement *aElement);
static nsIDOMDocument* GetSubDocumentFor(nsIDOMNode* aNode);
static nsIDOMNode* GetContainerFor(const nsIDocument& aDoc);
};
#endif // __inLayoutUtils_h__
--- a/layout/inspector/moz.build
+++ b/layout/inspector/moz.build
@@ -8,17 +8,16 @@ if CONFIG['ENABLE_TESTS']:
MOCHITEST_CHROME_MANIFESTS += ['tests/chrome/chrome.ini']
MOCHITEST_MANIFESTS += ['tests/mochitest.ini']
XPIDL_SOURCES += [
'inICSSValueSearch.idl',
'inIDeepTreeWalker.idl',
'inIDOMUtils.idl',
'inIDOMView.idl',
- 'inIFlasher.idl',
'inISearchObserver.idl',
'inISearchProcess.idl',
'nsIDOMFontFace.idl',
'nsIDOMFontFaceList.idl',
]
XPIDL_MODULE = 'inspector'
@@ -26,17 +25,16 @@ EXPORTS += [
'nsFontFace.h',
'nsFontFaceList.h',
]
UNIFIED_SOURCES += [
'inCSSValueSearch.cpp',
'inDeepTreeWalker.cpp',
'inDOMUtils.cpp',
- 'inFlasher.cpp',
'inLayoutUtils.cpp',
'inSearchLoop.cpp',
'nsFontFace.cpp',
'nsFontFaceList.cpp',
]
if CONFIG['MOZ_XUL']:
UNIFIED_SOURCES += [