blacklist all globals in each browser

Before we weren't being comprehensive about this and just blacklisting
names we got from Closure and other places. Instead, let's use a script
to get all the globals in a browser and blacklist them whether we think
they're likely to be used or not.

This only includes Firefox and Chrome to start; please run globals.html
in whatever browsers you have and contribute more globals files.

(We probably need to do something else to make it less likely that there
will be a conflict with a browser or extension we don't know about at
the time of release, but that's out of scope for this patch.)

Change-Id: Ib526b006a30990a4f29c19b1011472278813ed18
Review-Link: https://gwt-review.googlesource.com/#/c/5241/
diff --git a/dev/BUILD b/dev/BUILD
index 548e972..de261f0 100644
--- a/dev/BUILD
+++ b/dev/BUILD
@@ -164,8 +164,12 @@
             "core/src/**/*.proto",
             "core/src/**/*.properties",
             "core/src/**/*.xsd",
+            "core/src/**/*.txt",
         ],
-        exclude = ["**/package-info.java"],
+        exclude = [
+            "**/package-info.java",
+            "README.txt",
+        ],
     ),
     root = "core/src",
 )
diff --git a/dev/core/src/com/google/gwt/dev/js/JsProtectedNames.java b/dev/core/src/com/google/gwt/dev/js/JsProtectedNames.java
index f7a7c72..63c3694 100644
--- a/dev/core/src/com/google/gwt/dev/js/JsProtectedNames.java
+++ b/dev/core/src/com/google/gwt/dev/js/JsProtectedNames.java
@@ -15,8 +15,13 @@
  */
 package com.google.gwt.dev.js;
 
+import com.google.gwt.thirdparty.guava.common.base.Charsets;
 import com.google.gwt.thirdparty.guava.common.collect.Sets;
+import com.google.gwt.thirdparty.guava.common.io.Resources;
 
+import java.io.IOException;
+import java.net.URL;
+import java.util.List;
 import java.util.Set;
 
 /**
@@ -76,6 +81,24 @@
         "Path", "self");
 
     illegalNames.addAll(javaScriptKeywords);
+    illegalNames.addAll(loadGlobals("chrome30"));
+    illegalNames.addAll(loadGlobals("firefox25"));
+  }
+
+  /**
+   * Loads globals from a resource file in the "globals" subdirectory.
+   */
+  private static List<String> loadGlobals(String basename) {
+    String path = "globals/" + basename + ".txt";
+    URL resource = JsProtectedNames.class.getResource(path);
+    if (resource == null) {
+      throw new RuntimeException("JsProtectedNames can't find resource: " + path);
+    }
+    try {
+      return Resources.readLines(resource, Charsets.UTF_8);
+    } catch (IOException e) {
+      throw new RuntimeException("JsProtectedNames can't read resource: " + path, e);
+    }
   }
 
   public static boolean isKeyword(String s) {
diff --git a/dev/core/src/com/google/gwt/dev/js/globals/README.txt b/dev/core/src/com/google/gwt/dev/js/globals/README.txt
new file mode 100644
index 0000000..2d8ec20
--- /dev/null
+++ b/dev/core/src/com/google/gwt/dev/js/globals/README.txt
@@ -0,0 +1,5 @@
+This directory contains dumps of the globals from various browsers.
+The GWT compiler will not use any symbols listed here.
+
+If your browser isn't listed, please run globals.html and submit a patch adding
+a new file here and another call to loadGlobals in ../JsProtectedNames.java.
diff --git a/dev/core/src/com/google/gwt/dev/js/globals/chrome30.txt b/dev/core/src/com/google/gwt/dev/js/globals/chrome30.txt
new file mode 100644
index 0000000..2505f8d
--- /dev/null
+++ b/dev/core/src/com/google/gwt/dev/js/globals/chrome30.txt
@@ -0,0 +1,542 @@
+AnalyserNode
+Array
+ArrayBuffer
+Attr
+Audio
+AudioBuffer
+AudioBufferSourceNode
+AudioDestinationNode
+AudioListener
+AudioNode
+AudioParam
+AudioProcessingEvent
+AutocompleteErrorEvent
+BarProp
+BeforeLoadEvent
+BiquadFilterNode
+Blob
+Boolean
+CDATASection
+CSS
+CSSCharsetRule
+CSSFontFaceRule
+CSSHostRule
+CSSImportRule
+CSSMediaRule
+CSSPageRule
+CSSPrimitiveValue
+CSSRule
+CSSRuleList
+CSSStyleDeclaration
+CSSStyleRule
+CSSStyleSheet
+CSSValue
+CSSValueList
+CSSVariablesMap
+CSSViewportRule
+CanvasGradient
+CanvasPattern
+CanvasRenderingContext2D
+ChannelMergerNode
+ChannelSplitterNode
+CharacterData
+ClientRect
+ClientRectList
+Clipboard
+CloseEvent
+Comment
+CompositionEvent
+ConvolverNode
+Counter
+CustomEvent
+DOMException
+DOMImplementation
+DOMParser
+DOMSettableTokenList
+DOMStringList
+DOMStringMap
+DOMTokenList
+DataView
+Date
+DelayNode
+DeviceOrientationEvent
+Document
+DocumentFragment
+DocumentType
+DynamicsCompressorNode
+Element
+Entity
+Error
+ErrorEvent
+EvalError
+Event
+EventSource
+EventTarget
+File
+FileError
+FileList
+FileReader
+Float32Array
+Float64Array
+FocusEvent
+FormData
+Function
+GainNode
+HTMLAllCollection
+HTMLAnchorElement
+HTMLAppletElement
+HTMLAreaElement
+HTMLAudioElement
+HTMLBRElement
+HTMLBaseElement
+HTMLBodyElement
+HTMLButtonElement
+HTMLCanvasElement
+HTMLCollection
+HTMLContentElement
+HTMLDListElement
+HTMLDataListElement
+HTMLDirectoryElement
+HTMLDivElement
+HTMLDocument
+HTMLElement
+HTMLEmbedElement
+HTMLFieldSetElement
+HTMLFontElement
+HTMLFormControlsCollection
+HTMLFormElement
+HTMLFrameElement
+HTMLFrameSetElement
+HTMLHRElement
+HTMLHeadElement
+HTMLHeadingElement
+HTMLHtmlElement
+HTMLIFrameElement
+HTMLImageElement
+HTMLInputElement
+HTMLKeygenElement
+HTMLLIElement
+HTMLLabelElement
+HTMLLegendElement
+HTMLLinkElement
+HTMLMapElement
+HTMLMarqueeElement
+HTMLMediaElement
+HTMLMenuElement
+HTMLMetaElement
+HTMLMeterElement
+HTMLModElement
+HTMLOListElement
+HTMLObjectElement
+HTMLOptGroupElement
+HTMLOptionElement
+HTMLOptionsCollection
+HTMLOutputElement
+HTMLParagraphElement
+HTMLParamElement
+HTMLPreElement
+HTMLProgressElement
+HTMLQuoteElement
+HTMLScriptElement
+HTMLSelectElement
+HTMLShadowElement
+HTMLSourceElement
+HTMLSpanElement
+HTMLStyleElement
+HTMLTableCaptionElement
+HTMLTableCellElement
+HTMLTableColElement
+HTMLTableElement
+HTMLTableRowElement
+HTMLTableSectionElement
+HTMLTemplateElement
+HTMLTextAreaElement
+HTMLTitleElement
+HTMLTrackElement
+HTMLUListElement
+HTMLUnknownElement
+HTMLVideoElement
+HashChangeEvent
+History
+IDBCursor
+IDBCursorWithValue
+IDBDatabase
+IDBFactory
+IDBIndex
+IDBKeyRange
+IDBObjectStore
+IDBOpenDBRequest
+IDBRequest
+IDBTransaction
+IDBVersionChangeEvent
+Image
+ImageBitmap
+ImageData
+Infinity
+InputMethodContext
+Int16Array
+Int32Array
+Int8Array
+Intl
+JSON
+KeyboardEvent
+Location
+Math
+MediaController
+MediaElementAudioSourceNode
+MediaError
+MediaKeyError
+MediaKeyEvent
+MediaList
+MediaStreamAudioDestinationNode
+MediaStreamAudioSourceNode
+MediaStreamEvent
+MediaStreamTrack
+MessageChannel
+MessageEvent
+MessagePort
+MimeType
+MimeTypeArray
+MouseEvent
+MutationEvent
+MutationObserver
+MutationRecord
+NaN
+NamedNodeMap
+Navigator
+Node
+NodeFilter
+NodeIterator
+NodeList
+Notation
+Notification
+Number
+Object
+OfflineAudioCompletionEvent
+Option
+OscillatorNode
+OverflowEvent
+PageTransitionEvent
+Performance
+PerformanceEntry
+PerformanceMark
+PerformanceMeasure
+PerformanceNavigation
+PerformanceResourceTiming
+PerformanceTiming
+PeriodicWave
+Plugin
+PluginArray
+PopStateEvent
+ProcessingInstruction
+ProgressEvent
+RGBColor
+RTCIceCandidate
+RTCSessionDescription
+Range
+RangeError
+Rect
+ReferenceError
+RegExp
+SVGAElement
+SVGAltGlyphDefElement
+SVGAltGlyphElement
+SVGAltGlyphItemElement
+SVGAngle
+SVGAnimateColorElement
+SVGAnimateElement
+SVGAnimateMotionElement
+SVGAnimateTransformElement
+SVGAnimatedAngle
+SVGAnimatedBoolean
+SVGAnimatedEnumeration
+SVGAnimatedInteger
+SVGAnimatedLength
+SVGAnimatedLengthList
+SVGAnimatedNumber
+SVGAnimatedNumberList
+SVGAnimatedPreserveAspectRatio
+SVGAnimatedRect
+SVGAnimatedString
+SVGAnimatedTransformList
+SVGAnimationElement
+SVGCircleElement
+SVGClipPathElement
+SVGColor
+SVGComponentTransferFunctionElement
+SVGCursorElement
+SVGDefsElement
+SVGDescElement
+SVGDocument
+SVGElement
+SVGElementInstance
+SVGElementInstanceList
+SVGEllipseElement
+SVGFEBlendElement
+SVGFEColorMatrixElement
+SVGFEComponentTransferElement
+SVGFECompositeElement
+SVGFEConvolveMatrixElement
+SVGFEDiffuseLightingElement
+SVGFEDisplacementMapElement
+SVGFEDistantLightElement
+SVGFEDropShadowElement
+SVGFEFloodElement
+SVGFEFuncAElement
+SVGFEFuncBElement
+SVGFEFuncGElement
+SVGFEFuncRElement
+SVGFEGaussianBlurElement
+SVGFEImageElement
+SVGFEMergeElement
+SVGFEMergeNodeElement
+SVGFEMorphologyElement
+SVGFEOffsetElement
+SVGFEPointLightElement
+SVGFESpecularLightingElement
+SVGFESpotLightElement
+SVGFETileElement
+SVGFETurbulenceElement
+SVGFilterElement
+SVGFontElement
+SVGFontFaceElement
+SVGFontFaceFormatElement
+SVGFontFaceNameElement
+SVGFontFaceSrcElement
+SVGFontFaceUriElement
+SVGForeignObjectElement
+SVGGElement
+SVGGlyphElement
+SVGGlyphRefElement
+SVGGradientElement
+SVGGraphicsElement
+SVGHKernElement
+SVGImageElement
+SVGLength
+SVGLengthList
+SVGLineElement
+SVGLinearGradientElement
+SVGMPathElement
+SVGMarkerElement
+SVGMaskElement
+SVGMatrix
+SVGMetadataElement
+SVGMissingGlyphElement
+SVGNumber
+SVGNumberList
+SVGPaint
+SVGPathElement
+SVGPathSeg
+SVGPathSegArcAbs
+SVGPathSegArcRel
+SVGPathSegClosePath
+SVGPathSegCurvetoCubicAbs
+SVGPathSegCurvetoCubicRel
+SVGPathSegCurvetoCubicSmoothAbs
+SVGPathSegCurvetoCubicSmoothRel
+SVGPathSegCurvetoQuadraticAbs
+SVGPathSegCurvetoQuadraticRel
+SVGPathSegCurvetoQuadraticSmoothAbs
+SVGPathSegCurvetoQuadraticSmoothRel
+SVGPathSegLinetoAbs
+SVGPathSegLinetoHorizontalAbs
+SVGPathSegLinetoHorizontalRel
+SVGPathSegLinetoRel
+SVGPathSegLinetoVerticalAbs
+SVGPathSegLinetoVerticalRel
+SVGPathSegList
+SVGPathSegMovetoAbs
+SVGPathSegMovetoRel
+SVGPatternElement
+SVGPoint
+SVGPointList
+SVGPolygonElement
+SVGPolylineElement
+SVGPreserveAspectRatio
+SVGRadialGradientElement
+SVGRect
+SVGRectElement
+SVGRenderingIntent
+SVGSVGElement
+SVGScriptElement
+SVGSetElement
+SVGStopElement
+SVGStringList
+SVGStyleElement
+SVGSwitchElement
+SVGSymbolElement
+SVGTRefElement
+SVGTSpanElement
+SVGTextContentElement
+SVGTextElement
+SVGTextPathElement
+SVGTextPositioningElement
+SVGTitleElement
+SVGTransform
+SVGTransformList
+SVGUnitTypes
+SVGUseElement
+SVGVKernElement
+SVGViewElement
+SVGViewSpec
+SVGZoomEvent
+Screen
+ScriptProcessorNode
+SecurityPolicy
+Selection
+SharedWorker
+SpeechInputEvent
+Storage
+StorageEvent
+String
+StyleSheet
+StyleSheetList
+SyntaxError
+Text
+TextEvent
+TextMetrics
+TextTrack
+TextTrackCue
+TextTrackCueList
+TextTrackList
+TimeRanges
+Touch
+TouchEvent
+TouchList
+TrackEvent
+TransitionEvent
+TreeWalker
+TypeError
+UIEvent
+URIError
+URL
+Uint16Array
+Uint32Array
+Uint8Array
+Uint8ClampedArray
+ValidityState
+WaveShaperNode
+WebGLActiveInfo
+WebGLBuffer
+WebGLContextEvent
+WebGLFramebuffer
+WebGLProgram
+WebGLRenderbuffer
+WebGLRenderingContext
+WebGLShader
+WebGLShaderPrecisionFormat
+WebGLTexture
+WebGLUniformLocation
+WebKitAnimationEvent
+WebKitCSSFilterRule
+WebKitCSSFilterValue
+WebKitCSSKeyframeRule
+WebKitCSSKeyframesRule
+WebKitCSSMatrix
+WebKitCSSMixFunctionValue
+WebKitCSSTransformValue
+WebKitMediaSource
+WebKitMutationObserver
+WebKitPoint
+WebKitShadowRoot
+WebKitSourceBuffer
+WebKitSourceBufferList
+WebKitTransitionEvent
+WebSocket
+WheelEvent
+Window
+Worker
+XMLDocument
+XMLHttpRequest
+XMLHttpRequestProgressEvent
+XMLHttpRequestUpload
+XMLSerializer
+XPathEvaluator
+XPathExpression
+XPathResult
+XSLTProcessor
+applicationCache
+chrome
+clientInformation
+closed
+console
+crypto
+decodeURI
+decodeURIComponent
+defaultStatus
+defaultstatus
+devicePixelRatio
+document
+document
+encodeURI
+encodeURIComponent
+escape
+eval
+event
+external
+frameElement
+frames
+history
+indexedDB
+innerHeight
+innerWidth
+isFinite
+isNaN
+length
+localStorage
+location
+locationbar
+menubar
+name
+navigator
+offscreenBuffering
+opener
+outerHeight
+outerWidth
+pageXOffset
+pageYOffset
+parent
+parseFloat
+parseInt
+performance
+personalbar
+screen
+screenLeft
+screenTop
+screenX
+screenY
+scrollX
+scrollY
+scrollbars
+self
+sessionStorage
+status
+statusbar
+styleMedia
+toolbar
+top
+undefined
+unescape
+webkitAudioContext
+webkitAudioPannerNode
+webkitIDBCursor
+webkitIDBDatabase
+webkitIDBFactory
+webkitIDBIndex
+webkitIDBKeyRange
+webkitIDBObjectStore
+webkitIDBRequest
+webkitIDBTransaction
+webkitIndexedDB
+webkitMediaStream
+webkitNotifications
+webkitOfflineAudioContext
+webkitRTCPeerConnection
+webkitSpeechGrammar
+webkitSpeechGrammarList
+webkitSpeechRecognition
+webkitSpeechRecognitionError
+webkitSpeechRecognitionEvent
+webkitStorageInfo
+webkitURL
+window
diff --git a/dev/core/src/com/google/gwt/dev/js/globals/firefox25.txt b/dev/core/src/com/google/gwt/dev/js/globals/firefox25.txt
new file mode 100644
index 0000000..caaa300
--- /dev/null
+++ b/dev/core/src/com/google/gwt/dev/js/globals/firefox25.txt
@@ -0,0 +1,527 @@
+AnalyserNode
+AnimationEvent
+ArchiveRequest
+Array
+ArrayBuffer
+AsyncScrollEventDetail
+Attr
+Audio
+AudioBuffer
+AudioBufferSourceNode
+AudioContext
+AudioDestinationNode
+AudioListener
+AudioNode
+AudioParam
+AudioProcessingEvent
+AudioStreamTrack
+BarProp
+BatteryManager
+BeforeUnloadEvent
+BiquadFilterNode
+Blob
+BlobEvent
+Boolean
+BrowserFeedWriter
+CDATASection
+CRMFObject
+CSS
+CSS2Properties
+CSSCharsetRule
+CSSConditionRule
+CSSFontFaceRule
+CSSGroupRuleRuleList
+CSSGroupingRule
+CSSImportRule
+CSSMediaRule
+CSSMozDocumentRule
+CSSNameSpaceRule
+CSSPageRule
+CSSPrimitiveValue
+CSSRule
+CSSRuleList
+CSSStyleDeclaration
+CSSStyleRule
+CSSStyleSheet
+CSSSupportsRule
+CSSValue
+CSSValueList
+CameraCapabilities
+CameraControl
+CameraManager
+CanvasGradient
+CanvasPattern
+CanvasRenderingContext2D
+CaretPosition
+ChannelMergerNode
+ChannelSplitterNode
+CharacterData
+ChromeWindow
+ClientRect
+ClientRectList
+ClipboardEvent
+CloseEvent
+CommandEvent
+Comment
+CompositionEvent
+Controllers
+ConvolverNode
+Crypto
+CustomEvent
+DOMCursor
+DOMError
+DOMException
+DOMImplementation
+DOMMMIError
+DOMParser
+DOMRequest
+DOMSettableTokenList
+DOMStringList
+DOMStringMap
+DOMTokenList
+DOMTransactionEvent
+DataChannel
+DataContainerEvent
+DataTransfer
+DataView
+Date
+DelayNode
+DesktopNotification
+DesktopNotificationCenter
+DeviceAcceleration
+DeviceLightEvent
+DeviceMotionEvent
+DeviceOrientationEvent
+DeviceProximityEvent
+DeviceRotationRate
+DeviceStorage
+DeviceStorageChangeEvent
+Document
+DocumentFragment
+DocumentType
+DragEvent
+DynamicsCompressorNode
+Element
+ElementReplaceEvent
+Error
+EvalError
+Event
+EventListenerInfo
+EventSource
+EventTarget
+File
+FileHandle
+FileList
+FileReader
+FileRequest
+Float32Array
+Float64Array
+FocusEvent
+FormData
+Function
+GainNode
+GeoPositionError
+HTMLAnchorElement
+HTMLAppletElement
+HTMLAreaElement
+HTMLAudioElement
+HTMLBRElement
+HTMLBaseElement
+HTMLBodyElement
+HTMLButtonElement
+HTMLCanvasElement
+HTMLCollection
+HTMLDListElement
+HTMLDataElement
+HTMLDataListElement
+HTMLDirectoryElement
+HTMLDivElement
+HTMLDocument
+HTMLElement
+HTMLEmbedElement
+HTMLFieldSetElement
+HTMLFontElement
+HTMLFormElement
+HTMLFrameElement
+HTMLFrameSetElement
+HTMLHRElement
+HTMLHeadElement
+HTMLHeadingElement
+HTMLHtmlElement
+HTMLIFrameElement
+HTMLImageElement
+HTMLInputElement
+HTMLLIElement
+HTMLLabelElement
+HTMLLegendElement
+HTMLLinkElement
+HTMLMapElement
+HTMLMediaElement
+HTMLMenuElement
+HTMLMenuItemElement
+HTMLMetaElement
+HTMLMeterElement
+HTMLModElement
+HTMLOListElement
+HTMLObjectElement
+HTMLOptGroupElement
+HTMLOptionElement
+HTMLOptionsCollection
+HTMLOutputElement
+HTMLParagraphElement
+HTMLParamElement
+HTMLPreElement
+HTMLProgressElement
+HTMLPropertiesCollection
+HTMLQuoteElement
+HTMLScriptElement
+HTMLSelectElement
+HTMLSourceElement
+HTMLSpanElement
+HTMLStyleElement
+HTMLTableCaptionElement
+HTMLTableCellElement
+HTMLTableColElement
+HTMLTableElement
+HTMLTableRowElement
+HTMLTableSectionElement
+HTMLTemplateElement
+HTMLTextAreaElement
+HTMLTimeElement
+HTMLTitleElement
+HTMLUListElement
+HTMLUnknownElement
+HTMLVideoElement
+HashChangeEvent
+History
+IDBCursor
+IDBCursorWithValue
+IDBDatabase
+IDBFactory
+IDBFileHandle
+IDBIndex
+IDBKeyRange
+IDBObjectStore
+IDBOpenDBRequest
+IDBRequest
+IDBTransaction
+IDBVersionChangeEvent
+Image
+ImageData
+Infinity
+InstallTrigger
+Int16Array
+Int32Array
+Int8Array
+InternalError
+Iterator
+JSON
+KeyEvent
+KeyboardEvent
+LoadStatus
+LocalMediaStream
+Location
+LockedFile
+Map
+Math
+MediaElementAudioSourceNode
+MediaError
+MediaList
+MediaQueryList
+MediaRecorder
+MediaStream
+MediaStreamAudioDestinationNode
+MediaStreamAudioSourceNode
+MediaStreamEvent
+MediaStreamTrack
+MessageEvent
+MimeType
+MimeTypeArray
+ModalContentWindow
+MouseEvent
+MouseScrollEvent
+MozApplicationEvent
+MozCSSKeyframeRule
+MozCSSKeyframesRule
+MozCanvasPrintState
+MozConnection
+MozContactChangeEvent
+MozMmsEvent
+MozMmsMessage
+MozMobileMessageManager
+MozMobileMessageThread
+MozNamedAttrMap
+MozPowerManager
+MozSettingsEvent
+MozSmsEvent
+MozSmsFilter
+MozSmsMessage
+MozSmsSegmentInfo
+MozWakeLock
+MutationEvent
+MutationObserver
+MutationRecord
+NaN
+Navigator
+Node
+NodeFilter
+NodeIterator
+NodeList
+Notification
+NotifyAudioAvailableEvent
+NotifyPaintEvent
+Number
+Object
+OfflineAudioCompletionEvent
+OfflineAudioContext
+OfflineResourceList
+OpenWindowEventDetail
+Option
+OscillatorNode
+PageTransitionEvent
+PaintRequest
+PaintRequestList
+PannerNode
+Performance
+PerformanceNavigation
+PerformanceTiming
+PeriodicWave
+Plugin
+PluginArray
+PopStateEvent
+PopupBlockedEvent
+ProcessingInstruction
+ProgressEvent
+PromiseResolver
+PropertyNodeList
+Proxy
+RGBColor
+RTCDataChannelEvent
+RTCPeerConnectionIceEvent
+Range
+RangeError
+RecordErrorEvent
+Rect
+ReferenceError
+RegExp
+SVGAElement
+SVGAltGlyphElement
+SVGAngle
+SVGAnimateElement
+SVGAnimateMotionElement
+SVGAnimateTransformElement
+SVGAnimatedAngle
+SVGAnimatedBoolean
+SVGAnimatedEnumeration
+SVGAnimatedInteger
+SVGAnimatedLength
+SVGAnimatedLengthList
+SVGAnimatedNumber
+SVGAnimatedNumberList
+SVGAnimatedPreserveAspectRatio
+SVGAnimatedRect
+SVGAnimatedString
+SVGAnimatedTransformList
+SVGAnimationElement
+SVGCircleElement
+SVGClipPathElement
+SVGComponentTransferFunctionElement
+SVGDefsElement
+SVGDescElement
+SVGDocument
+SVGElement
+SVGEllipseElement
+SVGFEBlendElement
+SVGFEColorMatrixElement
+SVGFEComponentTransferElement
+SVGFECompositeElement
+SVGFEConvolveMatrixElement
+SVGFEDiffuseLightingElement
+SVGFEDisplacementMapElement
+SVGFEDistantLightElement
+SVGFEFloodElement
+SVGFEFuncAElement
+SVGFEFuncBElement
+SVGFEFuncGElement
+SVGFEFuncRElement
+SVGFEGaussianBlurElement
+SVGFEImageElement
+SVGFEMergeElement
+SVGFEMergeNodeElement
+SVGFEMorphologyElement
+SVGFEOffsetElement
+SVGFEPointLightElement
+SVGFESpecularLightingElement
+SVGFESpotLightElement
+SVGFETileElement
+SVGFETurbulenceElement
+SVGFilterElement
+SVGForeignObjectElement
+SVGGElement
+SVGGradientElement
+SVGGraphicsElement
+SVGImageElement
+SVGLength
+SVGLengthList
+SVGLineElement
+SVGLinearGradientElement
+SVGMPathElement
+SVGMarkerElement
+SVGMaskElement
+SVGMatrix
+SVGMetadataElement
+SVGNumber
+SVGNumberList
+SVGPathElement
+SVGPathSeg
+SVGPathSegArcAbs
+SVGPathSegArcRel
+SVGPathSegClosePath
+SVGPathSegCurvetoCubicAbs
+SVGPathSegCurvetoCubicRel
+SVGPathSegCurvetoCubicSmoothAbs
+SVGPathSegCurvetoCubicSmoothRel
+SVGPathSegCurvetoQuadraticAbs
+SVGPathSegCurvetoQuadraticRel
+SVGPathSegCurvetoQuadraticSmoothAbs
+SVGPathSegCurvetoQuadraticSmoothRel
+SVGPathSegLinetoAbs
+SVGPathSegLinetoHorizontalAbs
+SVGPathSegLinetoHorizontalRel
+SVGPathSegLinetoRel
+SVGPathSegLinetoVerticalAbs
+SVGPathSegLinetoVerticalRel
+SVGPathSegList
+SVGPathSegMovetoAbs
+SVGPathSegMovetoRel
+SVGPatternElement
+SVGPoint
+SVGPointList
+SVGPolygonElement
+SVGPolylineElement
+SVGPreserveAspectRatio
+SVGRadialGradientElement
+SVGRect
+SVGRectElement
+SVGSVGElement
+SVGScriptElement
+SVGSetElement
+SVGStopElement
+SVGStringList
+SVGStyleElement
+SVGSwitchElement
+SVGSymbolElement
+SVGTSpanElement
+SVGTextContentElement
+SVGTextElement
+SVGTextPathElement
+SVGTextPositioningElement
+SVGTitleElement
+SVGTransform
+SVGTransformList
+SVGUnitTypes
+SVGUseElement
+SVGViewElement
+SVGZoomAndPan
+SVGZoomEvent
+Screen
+ScriptProcessorNode
+ScrollAreaEvent
+Selection
+Set
+SimpleGestureEvent
+SmartCardEvent
+SpeechRecognitionError
+SpeechRecognitionEvent
+SpeechSynthesisEvent
+StopIteration
+Storage
+StorageEvent
+String
+StyleRuleChangeEvent
+StyleSheet
+StyleSheetApplicableStateChangeEvent
+StyleSheetChangeEvent
+StyleSheetList
+SyntaxError
+Text
+TextDecoder
+TextEncoder
+TextMetrics
+TimeEvent
+TimeRanges
+TransitionEvent
+TreeWalker
+TypeError
+UIEvent
+URIError
+URL
+Uint16Array
+Uint32Array
+Uint8Array
+Uint8ClampedArray
+UserDataHandler
+UserProximityEvent
+ValidityState
+VideoStreamTrack
+WaveShaperNode
+WeakMap
+WebGLActiveInfo
+WebGLBuffer
+WebGLFramebuffer
+WebGLProgram
+WebGLRenderbuffer
+WebGLRenderingContext
+WebGLShader
+WebGLShaderPrecisionFormat
+WebGLTexture
+WebGLUniformLocation
+WebGLVertexArray
+WebSocket
+WheelEvent
+Window
+WindowUtils
+XMLDocument
+XMLHttpRequest
+XMLHttpRequestUpload
+XMLSerializer
+XMLStylesheetProcessingInstruction
+XPathEvaluator
+XPathExpression
+XPathNSResolver
+XPathNamespace
+XPathResult
+XSLTProcessor
+XULButtonElement
+XULCheckboxElement
+XULCommandDispatcher
+XULCommandEvent
+XULControlElement
+XULDocument
+XULElement
+XULLabeledControlElement
+XULPopupElement
+__gwt_HostedModePlugin
+console
+decodeURI
+decodeURIComponent
+document
+encodeURI
+encodeURIComponent
+escape
+eval
+external
+getInterface
+isFinite
+isNaN
+mozRTCIceCandidate
+mozRTCPeerConnection
+mozRTCSessionDescription
+netscape
+parseFloat
+parseInt
+sidebar
+undefined
+unescape
+uneval
+window
diff --git a/dev/core/src/com/google/gwt/dev/js/globals/globals.html b/dev/core/src/com/google/gwt/dev/js/globals/globals.html
new file mode 100644
index 0000000..d8f7b49
--- /dev/null
+++ b/dev/core/src/com/google/gwt/dev/js/globals/globals.html
@@ -0,0 +1,19 @@
+<html>
+<head>
+  <title>Globals defined by your browser</title>
+</head>
+<body>
+
+<pre id="globals">
+</pre>
+
+<script>
+(function () {
+  var list = Object.getOwnPropertyNames(window);
+  list.sort()
+  document.getElementById("globals").textContent = list.join("\n");
+})();
+</script>
+
+</body>
+</html>
diff --git a/dev/core/test/com/google/gwt/dev/js/JsProtectedNamesTest.java b/dev/core/test/com/google/gwt/dev/js/JsProtectedNamesTest.java
new file mode 100644
index 0000000..6e73eee
--- /dev/null
+++ b/dev/core/test/com/google/gwt/dev/js/JsProtectedNamesTest.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2013 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.google.gwt.dev.js;
+
+import junit.framework.TestCase;
+
+/**
+ * Verifies that we don't use symbols defined by browsers.
+ */
+public class JsProtectedNamesTest extends TestCase {
+
+  public void testChrome30Symbol() throws Exception {
+    checkNotLegal("webkitAudioContext");
+  }
+
+  public void testFirefox25Symbol() throws Exception {
+    checkNotLegal("uneval");
+  }
+
+  private void checkNotLegal(String global) {
+    assertFalse(global + " shouldn't be legal", JsProtectedNames.isLegalName(global));
+  }
+}