content/base/src/nsScriptElement.h

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 #ifndef nsScriptElement_h
michael@0 6 #define nsScriptElement_h
michael@0 7
michael@0 8 #include "mozilla/Attributes.h"
michael@0 9 #include "nsIScriptLoaderObserver.h"
michael@0 10 #include "nsIScriptElement.h"
michael@0 11 #include "nsStubMutationObserver.h"
michael@0 12
michael@0 13 /**
michael@0 14 * Baseclass useful for script elements (such as <xhtml:script> and
michael@0 15 * <svg:script>). Currently the class assumes that only the 'src'
michael@0 16 * attribute and the children of the class affect what script to execute.
michael@0 17 */
michael@0 18
michael@0 19 class nsScriptElement : public nsIScriptElement,
michael@0 20 public nsStubMutationObserver
michael@0 21 {
michael@0 22 public:
michael@0 23 // nsIScriptLoaderObserver
michael@0 24 NS_DECL_NSISCRIPTLOADEROBSERVER
michael@0 25
michael@0 26 // nsIMutationObserver
michael@0 27 NS_DECL_NSIMUTATIONOBSERVER_CHARACTERDATACHANGED
michael@0 28 NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED
michael@0 29 NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED
michael@0 30 NS_DECL_NSIMUTATIONOBSERVER_CONTENTINSERTED
michael@0 31
michael@0 32 nsScriptElement(mozilla::dom::FromParser aFromParser)
michael@0 33 : nsIScriptElement(aFromParser)
michael@0 34 {
michael@0 35 }
michael@0 36
michael@0 37 virtual nsresult FireErrorEvent() MOZ_OVERRIDE;
michael@0 38
michael@0 39 protected:
michael@0 40 // Internal methods
michael@0 41
michael@0 42 /**
michael@0 43 * Check if this element contains any script, linked or inline
michael@0 44 */
michael@0 45 virtual bool HasScriptContent() = 0;
michael@0 46
michael@0 47 virtual bool MaybeProcessScript() MOZ_OVERRIDE;
michael@0 48 };
michael@0 49
michael@0 50 #endif // nsScriptElement_h

mercurial