summaryrefslogtreecommitdiff
path: root/chromium/third_party
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party')
-rw-r--r--chromium/third_party/WebKit/Source/bindings/OWNERS1
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/IDLAttributes.txt1
-rw-r--r--chromium/third_party/WebKit/Source/bindings/scripts/deprecated_code_generator_v8.pm38
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/CustomElementConstructorBuilder.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/CustomElementConstructorBuilder.h7
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptProfiler.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptProfiler.h1
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/ScriptSourceCode.h4
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8ErrorHandler.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8ErrorHandler.h5
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8Initializer.cpp26
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/V8ScriptRunner.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/WorkerScriptController.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/WorkerScriptController.h1
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8WorkerGlobalScopeCustom.cpp20
-rw-r--r--chromium/third_party/WebKit/Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableTransform.cpp54
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/AnimatableValue.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/DocumentTimeline.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/DocumentTimeline.h5
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/DocumentTimelineTest.cpp62
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/Player.cpp1
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/PlayerTest.cpp1
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/animation/css/CSSAnimations.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/core.gyp61
-rw-r--r--chromium/third_party/WebKit/Source/core/core.gypi121
-rw-r--r--chromium/third_party/WebKit/Source/core/core_derived_sources.gyp2
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSArrayFunctionValue.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSCanvasValue.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp51
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSCrossfadeValue.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSCrossfadeValue.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSCursorImageValue.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFilterValue.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFontFaceSource.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFontFaceSource.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFontSelector.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSFontSelector.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSGradientValue.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSImageGeneratorValue.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSImageSetValue.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSImageValue.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSImageValue.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSInitialValue.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSKeyframeRule.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSKeyframeRule.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSKeyframesRule.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSLineBoxContainValue.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSParser-in.cpp42
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSParser.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSProperty.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSProperty.h58
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSPropertyNames.in9
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSSVGDocumentValue.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSSVGDocumentValue.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSShaderValue.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSShorthands.in1
-rw-r--r--chromium/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/css/StyleInvalidationAnalysis.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/core/css/StylePropertyShorthandCustom.cpp39
-rw-r--r--chromium/third_party/WebKit/Source/core/css/StyleRuleImport.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/css/StyleRuleImport.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/css/StyleSheetContents.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.cpp120
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp33
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/StyleResolver.h14
-rw-r--r--chromium/third_party/WebKit/Source/core/css/resolver/StyleResourceLoader.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Clipboard.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Clipboard.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ContainerNode.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/CustomElement.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/CustomElementException.cpp99
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/CustomElementException.h68
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/CustomElementObserver.cpp62
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/CustomElementObserver.h64
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/CustomElementRegistry.cpp26
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/CustomElementUpgradeCandidateMap.cpp44
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/CustomElementUpgradeCandidateMap.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DataTransferItemList.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DataTransferItemList.idl12
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Document.cpp128
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Document.h22
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Document.idl16
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentStyleSheetCollection.cpp217
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentStyleSheetCollection.h24
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/DocumentType.idl6
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Element.cpp26
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Element.h1
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Element.idl10
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Node.cpp46
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Node.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/Node.idl10
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/PendingScript.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/PendingScript.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ProcessingInstruction.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ScriptLoader.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ScriptLoader.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ScriptRunner.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ScriptRunner.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ShadowTreeStyleSheetCollection.cpp132
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/ShadowTreeStyleSheetCollection.h55
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/StyleElement.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/StyleSheetCollection.cpp210
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/StyleSheetCollection.h34
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/shadow/ContentDistributor.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp42
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp3
-rw-r--r--chromium/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.h11
-rw-r--r--chromium/third_party/WebKit/Source/core/editing/Editor.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/features.gypi2
-rw-r--r--chromium/third_party/WebKit/Source/core/history/BackForwardClient.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/history/BackForwardController.cpp75
-rw-r--r--chromium/third_party/WebKit/Source/core/history/BackForwardController.h21
-rw-r--r--chromium/third_party/WebKit/Source/core/history/HistoryItem.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/history/HistoryItem.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/BaseMultipleFieldsDateAndTimeInputType.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/html/DOMURL.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/FormAssociatedElement.cpp3
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLCollection.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLDocument.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLElement.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLEmbedElement.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLFieldSetElement.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLImageElement.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLImageLoader.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLImportLoader.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLImportLoader.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLImportsController.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLImportsController.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLLinkElement.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLNameCollection.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLObjectElement.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLObjectElement.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/ImageDocument.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/ImageInputType.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/LinkResource.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/RadioNodeList.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/SearchInputType.cpp3
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext2D.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLRenderingContext.cpp155
-rw-r--r--chromium/third_party/WebKit/Source/core/html/canvas/WebGLRenderingContext.h41
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/DateTimeFieldElements.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/PasswordGeneratorButtonElement.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/html/shadow/PasswordGeneratorButtonElement.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InjectedScriptCanvasModuleSource.js849
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InjectedScriptSource.js20
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorController.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorController.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp19
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorDebuggerAgent.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorFrontendHost.cpp3
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorOverlay.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorOverlay.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp18
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorProfilerAgent.cpp3
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorState.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/InspectorState.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/NetworkResourcesData.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/ScriptProfile.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/CrossOriginAccessControl.cpp17
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/CrossOriginAccessControl.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/CrossOriginPreflightResultCache.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/DocumentLoader.cpp17
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/DocumentLoader.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/EmptyClients.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/FrameLoader.cpp137
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/FrameLoader.h27
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/FrameLoaderClient.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/FrameLoaderStateMachine.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/FrameLoaderTypes.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/HistoryController.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/ImageLoader.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/ImageLoader.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/LinkLoader.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/LinkLoader.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/NavigationScheduler.cpp3
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/PingLoader.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/ResourceLoadNotifier.cpp (renamed from chromium/third_party/WebKit/Source/core/fetch/ResourceLoadNotifier.cpp)2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/ResourceLoadNotifier.h (renamed from chromium/third_party/WebKit/Source/core/fetch/ResourceLoadNotifier.h)2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/ResourceLoader.cpp (renamed from chromium/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp)8
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/ResourceLoader.h (renamed from chromium/third_party/WebKit/Source/core/fetch/ResourceLoader.h)2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/ResourceLoaderHost.h (renamed from chromium/third_party/WebKit/Source/core/fetch/ResourceLoaderHost.h)0
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/ResourceLoaderOptions.h (renamed from chromium/third_party/WebKit/Source/core/fetch/ResourceLoaderOptions.h)2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/TextTrackLoader.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/TextTrackLoader.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/ThreadableLoader.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/CSSStyleSheetResource.cpp (renamed from chromium/third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp)6
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/CSSStyleSheetResource.h (renamed from chromium/third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.h)2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/CachePolicy.h (renamed from chromium/third_party/WebKit/Source/core/fetch/CachePolicy.h)14
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/DocumentResource.cpp (renamed from chromium/third_party/WebKit/Source/core/fetch/DocumentResource.cpp)6
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/DocumentResource.h (renamed from chromium/third_party/WebKit/Source/core/fetch/DocumentResource.h)6
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/DocumentResourceReference.h (renamed from chromium/third_party/WebKit/Source/core/fetch/DocumentResourceReference.h)4
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/FetchInitiatorInfo.h (renamed from chromium/third_party/WebKit/Source/core/fetch/FetchInitiatorInfo.h)0
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/FetchInitiatorTypeNames.in (renamed from chromium/third_party/WebKit/Source/core/fetch/FetchInitiatorTypeNames.in)0
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/FetchRequest.cpp (renamed from chromium/third_party/WebKit/Source/core/fetch/FetchRequest.cpp)6
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/FetchRequest.h (renamed from chromium/third_party/WebKit/Source/core/fetch/FetchRequest.h)4
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/FontResource.cpp (renamed from chromium/third_party/WebKit/Source/core/fetch/FontResource.cpp)6
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/FontResource.h (renamed from chromium/third_party/WebKit/Source/core/fetch/FontResource.h)4
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/ImageResource.cpp (renamed from chromium/third_party/WebKit/Source/core/fetch/ImageResource.cpp)12
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/ImageResource.h (renamed from chromium/third_party/WebKit/Source/core/fetch/ImageResource.h)2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/ImageResourceClient.h (renamed from chromium/third_party/WebKit/Source/core/fetch/ImageResourceClient.h)2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/ImageResourceTest.cpp (renamed from chromium/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp)12
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/MemoryCache.cpp (renamed from chromium/third_party/WebKit/Source/core/fetch/MemoryCache.cpp)20
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/MemoryCache.h (renamed from chromium/third_party/WebKit/Source/core/fetch/MemoryCache.h)8
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/MemoryCacheTest.cpp (renamed from chromium/third_party/WebKit/Source/core/fetch/MemoryCacheTest.cpp)8
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/MockImageResourceClient.h (renamed from chromium/third_party/WebKit/Source/core/fetch/MockImageResourceClient.h)2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/RawResource.cpp (renamed from chromium/third_party/WebKit/Source/core/fetch/RawResource.cpp)10
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/RawResource.h (renamed from chromium/third_party/WebKit/Source/core/fetch/RawResource.h)4
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/Resource.cpp (renamed from chromium/third_party/WebKit/Source/core/fetch/Resource.cpp)16
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/Resource.h (renamed from chromium/third_party/WebKit/Source/core/fetch/Resource.h)4
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/ResourceClient.h (renamed from chromium/third_party/WebKit/Source/core/fetch/ResourceClient.h)0
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/ResourceClientWalker.h (renamed from chromium/third_party/WebKit/Source/core/fetch/ResourceClientWalker.h)2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/ResourceFetcher.cpp (renamed from chromium/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp)26
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/ResourceFetcher.h (renamed from chromium/third_party/WebKit/Source/core/fetch/ResourceFetcher.h)12
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/ResourceFetcherTest.cpp (renamed from chromium/third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp)10
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/ResourcePtr.cpp (renamed from chromium/third_party/WebKit/Source/core/fetch/ResourcePtr.cpp)2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/ResourcePtr.h (renamed from chromium/third_party/WebKit/Source/core/fetch/ResourcePtr.h)2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/ScriptResource.cpp (renamed from chromium/third_party/WebKit/Source/core/fetch/ScriptResource.cpp)2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/ScriptResource.h (renamed from chromium/third_party/WebKit/Source/core/fetch/ScriptResource.h)2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/ShaderResource.cpp (renamed from chromium/third_party/WebKit/Source/core/fetch/ShaderResource.cpp)2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/ShaderResource.h (renamed from chromium/third_party/WebKit/Source/core/fetch/ShaderResource.h)2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/StyleSheetResourceClient.h (renamed from chromium/third_party/WebKit/Source/core/fetch/StyleSheetResourceClient.h)2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/TextTrackResource.cpp (renamed from chromium/third_party/WebKit/Source/core/fetch/TextTrackResource.cpp)6
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/TextTrackResource.h (renamed from chromium/third_party/WebKit/Source/core/fetch/TextTrackResource.h)2
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/XSLStyleSheetResource.cpp (renamed from chromium/third_party/WebKit/Source/core/fetch/XSLStyleSheetResource.cpp)6
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/cache/XSLStyleSheetResource.h (renamed from chromium/third_party/WebKit/Source/core/fetch/XSLStyleSheetResource.h)2
-rw-r--r--chromium/third_party/WebKit/Source/core/page/AutoscrollController.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/core/page/Chrome.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/page/ChromeClient.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/page/ContextMenuClient.h1
-rw-r--r--chromium/third_party/WebKit/Source/core/page/ContextMenuController.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/core/page/ContextMenuController.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/page/DOMWindow.cpp46
-rw-r--r--chromium/third_party/WebKit/Source/core/page/DOMWindow.h9
-rw-r--r--chromium/third_party/WebKit/Source/core/page/DOMWindowBase64.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/page/DOMWindowLifecycleNotifier.cpp57
-rw-r--r--chromium/third_party/WebKit/Source/core/page/DOMWindowLifecycleNotifier.h68
-rw-r--r--chromium/third_party/WebKit/Source/core/page/DOMWindowLifecycleObserver.cpp49
-rw-r--r--chromium/third_party/WebKit/Source/core/page/DOMWindowLifecycleObserver.h48
-rw-r--r--chromium/third_party/WebKit/Source/core/page/DragController.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/page/EventHandler.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/page/Frame.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/core/page/Frame.h1
-rw-r--r--chromium/third_party/WebKit/Source/core/page/FrameView.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/page/ImageBitmap.cpp32
-rw-r--r--chromium/third_party/WebKit/Source/core/page/ImageBitmap.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/page/ImageBitmapFactories.cpp223
-rw-r--r--chromium/third_party/WebKit/Source/core/page/ImageBitmapFactories.h65
-rw-r--r--chromium/third_party/WebKit/Source/core/page/ImageBitmapFactories.idl (renamed from chromium/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapFactories.idl)2
-rw-r--r--chromium/third_party/WebKit/Source/core/page/ImageBitmapTest.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/page/Page.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/core/page/Page.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/page/PageSerializer.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in2
-rw-r--r--chromium/third_party/WebKit/Source/core/page/Settings.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/page/UseCounter.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/core/page/UseCounter.h18
-rw-r--r--chromium/third_party/WebKit/Source/core/page/animation/CSSPropertyAnimation.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/page/animation/KeyframeAnimation.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/AsyncFileSystem.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/DEPS2
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/LifecycleNotifier.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/LifecycleObserver.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/animation/CSSAnimationData.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/animation/CSSAnimationDataList.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/ChromiumDataObject.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/ChromiumDataObject.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/ClipboardChromium.cpp24
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/ClipboardChromium.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/PasteboardChromium.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/ScrollbarThemeChromium.cpp (renamed from chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeNonMacCommon.cpp)25
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/ScrollbarThemeChromium.h (renamed from chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeNonMacCommon.h)8
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/ScrollbarThemeChromiumAndroid.cpp (renamed from chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeAndroid.cpp)5
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/ScrollbarThemeChromiumDefault.cpp (renamed from chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeAuraOrGtk.cpp)24
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/ScrollbarThemeChromiumDefault.h (renamed from chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeAuraOrGtk.h)8
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/ScrollbarThemeChromiumOverlay.cpp (renamed from chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeOverlay.cpp)20
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/ScrollbarThemeChromiumOverlay.h (renamed from chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeOverlay.h)6
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/ScrollbarThemeChromiumWin.cpp (renamed from chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeWin.cpp)37
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/chromium/ScrollbarThemeChromiumWin.h (renamed from chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeWin.h)8
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/graphics/GraphicsLayer.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/graphics/filters/FilterOperation.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/graphics/transforms/TransformOperations.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/graphics/transforms/TransformOperations.h1
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/mac/ScrollAnimatorMac.mm4
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/mac/ScrollbarThemeMac.h (renamed from chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeMacCommon.h)6
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/mac/ScrollbarThemeMac.mm (renamed from chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeMacCommon.mm)8
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/mac/ScrollbarThemeMacNonOverlayAPI.h (renamed from chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeMacNonOverlayAPI.h)2
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/mac/ScrollbarThemeMacNonOverlayAPI.mm (renamed from chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeMacNonOverlayAPI.mm)2
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/mac/ScrollbarThemeMacOverlayAPI.h (renamed from chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeMacOverlayAPI.h)2
-rw-r--r--chromium/third_party/WebKit/Source/core/platform/mac/ScrollbarThemeMacOverlayAPI.mm (renamed from chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeMacOverlayAPI.mm)2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/FilterEffectRenderer.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/HitTestLocation.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/HitTestResult.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/PaintInfo.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderBlock.cpp256
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderBlock.h153
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderBlockLineLayout.cpp44
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderBox.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderGrid.cpp3
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderImage.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderImageResource.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderImageResource.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderImageResourceStyleImage.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderLayerBacking.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderLayerFilterInfo.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderLayerFilterInfo.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderListMarker.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderObject.cpp29
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderObject.h25
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderSearchField.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTable.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTableCell.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTableCell.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTableCol.cpp1
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTableRow.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/RenderTableSection.cpp49
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/SubtreeLayoutScope.cpp79
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/SubtreeLayoutScope.h73
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/shapes/RasterShape.cpp154
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/shapes/RasterShape.h80
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/shapes/Shape.cpp44
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/shapes/Shape.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeInfo.cpp22
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeInsideInfo.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeOutsideInfo.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/KeyframeList.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/KeyframeList.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/SVGRenderStyle.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/ShapeValue.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleCustomFilterProgram.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedImage.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedImage.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedImageSet.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedImageSet.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedShader.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedShader.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/ReferenceFilterBuilder.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourceClipper.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourceClipper.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGTextPath.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.h.tmpl5
-rw-r--r--chromium/third_party/WebKit/Source/core/storage/Storage.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/storage/Storage.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/storage/StorageArea.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/storage/StorageEvent.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGAnimationElement.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGClipPathElement.h7
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEImageElement.cpp9
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFEImageElement.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFontFaceUriElement.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGFontFaceUriElement.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGImageLoader.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTextContentElement.cpp3
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTextContentElement.idl16
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGTextPathElement.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGUseElement.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGUseElement.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/graphics/SVGImageCache.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/InspectorFrontendClientLocal.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/InspectorFrontendClientLocal.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/Internals.cpp159
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/Internals.h17
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/Internals.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/LayerRect.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/LayerRect.idl1
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/LayerRectList.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/LayerRectList.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/MallocStatistics.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/MockPagePopupDriver.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/testing/TypeConversions.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/AbstractWorker.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/AbstractWorker.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/DefaultSharedWorkerRepository.h16
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/SharedWorker.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/SharedWorkerRepository.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/Worker.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/Worker.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerEventQueue.h8
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerGlobalScope.idl2
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerLoaderProxy.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerLocation.cpp3
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerMessagingProxy.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerMessagingProxy.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerObjectProxy.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerReportingProxy.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerRunLoop.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerRunLoop.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/DOMParser.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/NativeXPathNSResolver.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/NativeXPathNSResolver.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XMLErrors.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XMLErrors.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XMLHttpRequest.cpp15
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XMLHttpRequest.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XMLHttpRequestUpload.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XMLSerializer.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathExpression.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathExpressionNode.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathExpressionNode.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathFunctions.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathGrammar.y2
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathNodeSet.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathParser.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathPredicate.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathUtil.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathUtil.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathValue.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XPathValue.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XSLImportRule.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XSLImportRule.h6
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XSLStyleSheet.h2
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XSLTProcessor.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XSLTProcessorLibxslt.cpp21
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/XSLTUnicodeSort.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp22
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.h12
-rw-r--r--chromium/third_party/WebKit/Source/core/xml/parser/XMLDocumentParserScope.h3
-rw-r--r--chromium/third_party/WebKit/Source/devtools/devtools.gyp30
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/AuditLauncherView.js30
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/CPUProfileView.js36
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/CanvasProfileView.js9
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/CodeMirrorTextEditor.js11
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/DebuggerModel.js60
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/JavaScriptSourceFrame.js236
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/KeyboardShortcut.js5
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/LayerTree.js131
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/LayerTreeModel.js278
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Layers3DView.js173
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/LayersPanel.js73
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/LayersPanelDescriptor.js40
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/OverridesView.js45
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ScriptsPanel.js74
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ScriptsPanelDescriptor.js6
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/Settings.js1
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/helpScreen.css29
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/inspector.css10
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/inspector.html1
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/inspector.js4
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/layersPanel.css99
-rw-r--r--chromium/third_party/WebKit/Source/devtools/protocol.json9
-rwxr-xr-xchromium/third_party/WebKit/Source/devtools/scripts/compile_frontend.py10
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceMotionController.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/modules/device_orientation/DeviceMotionController.h6
-rw-r--r--chromium/third_party/WebKit/Source/modules/encoding/OWNERS2
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapFactories.cpp344
-rw-r--r--chromium/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapFactories.h119
-rw-r--r--chromium/third_party/WebKit/Source/modules/imagebitmap/OWNERS2
-rw-r--r--chromium/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/modules/modules.gypi3
-rw-r--r--chromium/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/web/AssociatedURLLoader.cpp1
-rw-r--r--chromium/third_party/WebKit/Source/web/AsyncFileSystemChromium.cpp31
-rw-r--r--chromium/third_party/WebKit/Source/web/AsyncFileSystemChromium.h5
-rw-r--r--chromium/third_party/WebKit/Source/web/BackForwardClientImpl.cpp55
-rw-r--r--chromium/third_party/WebKit/Source/web/BackForwardClientImpl.h14
-rw-r--r--chromium/third_party/WebKit/Source/web/ChromeClientImpl.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/web/ChromeClientImpl.h2
-rw-r--r--chromium/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/web/ContextMenuClientImpl.h1
-rw-r--r--chromium/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp28
-rw-r--r--chromium/third_party/WebKit/Source/web/FrameLoaderClientImpl.h3
-rw-r--r--chromium/third_party/WebKit/Source/web/PageOverlay.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/web/WebCache.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/web/WebCachedURLRequest.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/web/WebDataSourceImpl.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp10
-rw-r--r--chromium/third_party/WebKit/Source/web/WebFileSystemCallbacksImpl.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/web/WebFileSystemCallbacksImpl.h7
-rw-r--r--chromium/third_party/WebKit/Source/web/WebFrameImpl.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/web/WebFrameImpl.h1
-rw-r--r--chromium/third_party/WebKit/Source/web/WebHelperPluginImpl.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/web/WebPagePopupImpl.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/web/WebViewImpl.cpp22
-rw-r--r--chromium/third_party/WebKit/Source/web/WorkerAsyncFileSystemChromium.cpp194
-rw-r--r--chromium/third_party/WebKit/Source/web/WorkerAsyncFileSystemChromium.h92
-rw-r--r--chromium/third_party/WebKit/Source/web/WorkerAsyncFileWriterChromium.cpp84
-rw-r--r--chromium/third_party/WebKit/Source/web/WorkerAsyncFileWriterChromium.h (renamed from chromium/third_party/WebKit/Source/core/animation/AnimatableTransform.h)70
-rw-r--r--chromium/third_party/WebKit/Source/web/WorkerFileSystemClient.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/web/WorkerFileWriterCallbacksBridge.cpp228
-rw-r--r--chromium/third_party/WebKit/Source/web/WorkerFileWriterCallbacksBridge.h165
-rw-r--r--chromium/third_party/WebKit/Source/web/web.gypi6
-rw-r--r--chromium/third_party/WebKit/Source/wtf/Assertions.cpp1
-rw-r--r--chromium/third_party/WebKit/Source/wtf/Platform.h1
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/Base64.cpp44
-rw-r--r--chromium/third_party/WebKit/Source/wtf/text/Base64.h20
-rw-r--r--chromium/third_party/WebKit/Tools/RebaselineLogServer/app.yaml9
-rw-r--r--chromium/third_party/WebKit/Tools/RebaselineLogServer/logs.html43
-rw-r--r--chromium/third_party/WebKit/Tools/RebaselineLogServer/main.py143
-rw-r--r--chromium/third_party/WebKit/Tools/RebaselineLogServer/main_unittest.py122
-rw-r--r--chromium/third_party/WebKit/Tools/RebaselineLogServer/uploadform.html25
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/common/net/layouttestresults.py3
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/builders.py3
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py5
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/style/checker.py139
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/style/checker_unittest.py51
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cmake.py150
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cmake_unittest.py90
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py127
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py21
-rw-r--r--chromium/third_party/WebKit/WATCHLISTS3
-rw-r--r--chromium/third_party/WebKit/public/platform/WebCompositorSupport.h3
-rw-r--r--chromium/third_party/WebKit/public/platform/WebFileSystem.h3
-rw-r--r--chromium/third_party/WebKit/public/platform/WebNinePatchLayer.h51
-rw-r--r--chromium/third_party/WebKit/public/web/WebFrame.h2
-rw-r--r--chromium/third_party/WebKit/public/web/WebViewClient.h7
-rw-r--r--chromium/third_party/angle_dx11/src/libEGL/libEGL.rc204
-rw-r--r--chromium/third_party/angle_dx11/src/libGLESv2/libGLESv2.rc204
-rw-r--r--chromium/third_party/cacheinvalidation/cacheinvalidation.gyp1
-rw-r--r--chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/build_constants.h2
-rw-r--r--chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/client-protocol-namespace-fix.h4
-rw-r--r--chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/repeated-field-namespace-fix.h30
-rw-r--r--chromium/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/common/BuildConstants.java2
-rw-r--r--chromium/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/InvalidationClientTestHelper.java47
-rw-r--r--chromium/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android2/AndroidTiclManifest.java120
-rw-r--r--chromium/third_party/cros_system_api/dbus/service_constants.h4
-rw-r--r--chromium/third_party/cros_system_api/system_api.gyp11
-rw-r--r--chromium/third_party/flot/LICENSE.txt2
-rw-r--r--chromium/third_party/flot/README.chromium4
-rw-r--r--chromium/third_party/flot/excanvas.min.js1
-rw-r--r--chromium/third_party/flot/jquery.colorhelpers.min.js22
-rw-r--r--chromium/third_party/flot/jquery.flot.canvas.min.js28
-rw-r--r--chromium/third_party/flot/jquery.flot.categories.min.js44
-rw-r--r--chromium/third_party/flot/jquery.flot.crosshair.min.js60
-rw-r--r--chromium/third_party/flot/jquery.flot.errorbars.min.js63
-rw-r--r--chromium/third_party/flot/jquery.flot.fillbetween.min.js31
-rw-r--r--chromium/third_party/flot/jquery.flot.image.min.js54
-rw-r--r--chromium/third_party/flot/jquery.flot.min.js31
-rw-r--r--chromium/third_party/flot/jquery.flot.navigate.min.js87
-rw-r--r--chromium/third_party/flot/jquery.flot.pie.min.js57
-rw-r--r--chromium/third_party/flot/jquery.flot.resize.min.js20
-rw-r--r--chromium/third_party/flot/jquery.flot.selection.min.js80
-rw-r--r--chromium/third_party/flot/jquery.flot.stack.min.js37
-rw-r--r--chromium/third_party/flot/jquery.flot.symbol.min.js15
-rw-r--r--chromium/third_party/flot/jquery.flot.threshold.min.js44
-rw-r--r--chromium/third_party/flot/jquery.flot.time.min.js9
-rw-r--r--chromium/third_party/flot/jquery.min.js25
-rw-r--r--chromium/third_party/guava/guava.gyp2
-rw-r--r--chromium/third_party/guava/proguard.flags33
-rw-r--r--chromium/third_party/libusb/README.chromium1
-rw-r--r--chromium/third_party/libusb/darwin-sigfpe.patch22
-rw-r--r--chromium/third_party/libusb/src/libusb/os/darwin_usb.c10
-rw-r--r--chromium/third_party/libxml/chromium/libxml_utils.h6
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_access.sobin0 -> 13464 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_accesslog.sobin0 -> 22812 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_alias.sobin0 -> 13588 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_auth.sobin0 -> 32576 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_cgi.sobin0 -> 28760 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_cml.sobin0 -> 14260 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_compress.sobin0 -> 23480 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_dirlisting.sobin0 -> 23456 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_evasive.sobin0 -> 13404 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_evhost.sobin0 -> 13936 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_expire.sobin0 -> 18000 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_extforward.sobin0 -> 18604 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_fastcgi.sobin0 -> 56612 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_flv_streaming.sobin0 -> 14060 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_indexfile.sobin0 -> 13720 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_magnet.sobin0 -> 8628 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_mysql_vhost.sobin0 -> 12788 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_proxy.sobin0 -> 28648 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_redirect.sobin0 -> 14016 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_rewrite.sobin0 -> 18696 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_rrdtool.sobin0 -> 18380 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_scgi.sobin0 -> 43572 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_secdownload.sobin0 -> 14104 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_setenv.sobin0 -> 13672 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_simple_vhost.sobin0 -> 13996 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_ssi.sobin0 -> 34836 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_staticfile.sobin0 -> 18476 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_status.sobin0 -> 27336 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_trigger_b4_dl.sobin0 -> 13780 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_userdir.sobin0 -> 14068 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_usertrack.sobin0 -> 14124 bytes
-rwxr-xr-xchromium/third_party/lighttpd/mac/lib/mod_webdav.sobin0 -> 28692 bytes
-rw-r--r--chromium/third_party/protobuf/README.chromium4
-rw-r--r--chromium/third_party/protobuf/README.txt2
-rw-r--r--chromium/third_party/protobuf/java/pom.xml14
-rw-r--r--chromium/third_party/protobuf/java/src/main/java/com/google/protobuf/ByteString.java14
-rw-r--r--chromium/third_party/protobuf/java/src/main/java/com/google/protobuf/LazyField.java6
-rw-r--r--chromium/third_party/protobuf/java/src/main/java/com/google/protobuf/LazyStringArrayList.java1
-rw-r--r--chromium/third_party/protobuf/java/src/main/java/com/google/protobuf/RopeByteString.java10
-rw-r--r--chromium/third_party/protobuf/java/src/main/java/com/google/protobuf/UnmodifiableLazyStringList.java1
-rw-r--r--chromium/third_party/protobuf/protobuf_lite.gypi1
-rw-r--r--chromium/third_party/protobuf/python/google/protobuf/pyext/python-proto2.cc6
-rwxr-xr-xchromium/third_party/protobuf/python/setup.py7
-rw-r--r--chromium/third_party/protobuf/src/Makefile.am100
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_unittest.cc16
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc4
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.h4
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/compiler/plugin.proto2
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/compiler/subprocess.cc10
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/descriptor.cc28
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/descriptor.h18
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/descriptor.pb.h4
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/descriptor_unittest.cc12
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/dynamic_message.cc8
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/extension_set_unittest.cc8
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/generated_message_reflection.h12
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/generated_message_reflection_unittest.cc4
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/io/gzip_stream.h2
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/io/printer_unittest.cc4
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/io/tokenizer_unittest.cc12
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/message.h21
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/message_unittest.cc4
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/reflection_ops_unittest.cc4
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/repeated_field.h10
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/repeated_field_reflection_unittest.cc6
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/repeated_field_unittest.cc8
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops.h8
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_arm_qnx.h146
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_atomicword_compat.h4
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_macosx.h13
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_pnacl.h73
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc4
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/stubs/common.cc10
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/stubs/common.h29
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/stubs/common_unittest.cc6
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/stubs/once.h4
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/stubs/platform_macros.h6
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/stubs/stl_util-inl.h121
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/stubs/stringprintf.h12
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/stubs/type_traits.h10
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/stubs/type_traits_unittest.cc23
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/test_util.cc80
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/testing/googletest.h5
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/text_format.cc6
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/text_format.h21
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/text_format_unittest.cc19
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/unittest.proto1
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/wire_format.h3
-rw-r--r--chromium/third_party/protobuf/src/google/protobuf/wire_format_lite_inl.h12
-rwxr-xr-xchromium/third_party/protobuf/vsprojects/extract_includes.bat2
-rw-r--r--chromium/third_party/skia/gyp/gmslides.gypi1
-rw-r--r--chromium/third_party/skia/include/core/SkCanvas.h6
-rw-r--r--chromium/third_party/skia/src/core/SkPictureRecord.cpp13
-rw-r--r--chromium/third_party/skia/src/core/SkTypefaceCache.cpp15
-rw-r--r--chromium/third_party/skia/src/core/SkTypefaceCache.h36
-rwxr-xr-xchromium/third_party/skia/src/ports/SkFontHost_win.cpp9
-rw-r--r--chromium/third_party/skia/src/ports/SkFontHost_win_dw.cpp3
667 files changed, 4772 insertions, 9032 deletions
diff --git a/chromium/third_party/WebKit/Source/bindings/OWNERS b/chromium/third_party/WebKit/Source/bindings/OWNERS
index 53d82fa65a9..04eb6bc41ea 100644
--- a/chromium/third_party/WebKit/Source/bindings/OWNERS
+++ b/chromium/third_party/WebKit/Source/bindings/OWNERS
@@ -1,6 +1,5 @@
abarth@chromium.org
adamk@chromium.org
-arv@chromium.org
ch.dumez@sisa.samsung.com
dcarney@chromium.org
dglazkov@chromium.org
diff --git a/chromium/third_party/WebKit/Source/bindings/scripts/IDLAttributes.txt b/chromium/third_party/WebKit/Source/bindings/scripts/IDLAttributes.txt
index bec45e791f4..f3768392a09 100644
--- a/chromium/third_party/WebKit/Source/bindings/scripts/IDLAttributes.txt
+++ b/chromium/third_party/WebKit/Source/bindings/scripts/IDLAttributes.txt
@@ -59,6 +59,7 @@ GlobalContext=Window|WorkerGlobalScope|SharedWorkerGlobalScope|DedicatedWorkerGl
Immutable
ImplementedAs=*
InitializedByEventConstructor
+IsIndex
# FIXME: We should remove this extended attribute once the needed refactoring is complete.
LegacyImplementedInBaseClass
MasqueradesAsUndefined
diff --git a/chromium/third_party/WebKit/Source/bindings/scripts/deprecated_code_generator_v8.pm b/chromium/third_party/WebKit/Source/bindings/scripts/deprecated_code_generator_v8.pm
index 39c5394140f..c327e692186 100644
--- a/chromium/third_party/WebKit/Source/bindings/scripts/deprecated_code_generator_v8.pm
+++ b/chromium/third_party/WebKit/Source/bindings/scripts/deprecated_code_generator_v8.pm
@@ -2191,6 +2191,14 @@ END
}
my $raisesExceptions = $function->extendedAttributes->{"RaisesException"};
+ if (!$raisesExceptions) {
+ foreach my $parameter (@{$function->parameters}) {
+ if ($parameter->extendedAttributes->{"IsIndex"}) {
+ $raisesExceptions = 1;
+ }
+ }
+ }
+
if ($raisesExceptions) {
AddToImplIncludes("bindings/v8/ExceptionState.h");
$code .= " ExceptionState es(args.GetIsolate());\n";
@@ -2409,6 +2417,14 @@ sub GenerateParametersCheck
}
}
+ if ($parameter->extendedAttributes->{"IsIndex"}) {
+ AddToImplIncludes("core/dom/ExceptionCode.h");
+ $parameterCheckString .= " if (UNLIKELY($parameterName < 0)) {\n";
+ $parameterCheckString .= " setDOMException(IndexSizeError, args.GetIsolate());\n";
+ $parameterCheckString .= " return;\n";
+ $parameterCheckString .= " }\n";
+ }
+
$paramIndex++;
}
return ($parameterCheckString, $paramIndex, %replacements);
@@ -2464,6 +2480,13 @@ sub GenerateSingleConstructorCallback
if ($interface->extendedAttributes->{"ConstructorRaisesException"}) {
$raisesExceptions = 1;
}
+ if (!$raisesExceptions) {
+ foreach my $parameter (@{$function->parameters}) {
+ if ($parameter->extendedAttributes->{"IsIndex"}) {
+ $raisesExceptions = 1;
+ }
+ }
+ }
my @beforeArgumentList;
my @afterArgumentList;
@@ -2723,6 +2746,13 @@ sub GenerateNamedConstructor
if ($interface->extendedAttributes->{"ConstructorRaisesException"}) {
$raisesExceptions = 1;
}
+ if (!$raisesExceptions) {
+ foreach my $parameter (@{$function->parameters}) {
+ if ($parameter->extendedAttributes->{"IsIndex"}) {
+ $raisesExceptions = 1;
+ }
+ }
+ }
my $maybeObserveFeature = GenerateFeatureObservation($function->extendedAttributes->{"MeasureAs"});
my $maybeDeprecateFeature = GenerateDeprecationNotification($function->extendedAttributes->{"DeprecateAs"});
@@ -4952,6 +4982,10 @@ sub GetNativeType
return "double" if $type eq "double";
return "int" if $type eq "long" or $type eq "int" or $type eq "short" or $type eq "byte";
if ($type eq "unsigned long" or $type eq "unsigned int" or $type eq "unsigned short" or $type eq "octet") {
+ if ($extendedAttributes->{"IsIndex"}) {
+ # Special-case index arguments because we need to check that they aren't < 0.
+ return "int";
+ }
return "unsigned";
}
return "long long" if $type eq "long long";
@@ -5031,6 +5065,10 @@ sub JSValueToNativeStatement
my $getIsolate = shift;
my $nativeType = GetNativeType($type, $extendedAttributes, "parameter");
+ if ($type eq "unsigned long" and $extendedAttributes->{"IsIndex"}) {
+ # Special-case index arguments because we need to check that they aren't < 0.
+ $nativeType = "int";
+ }
my $native_value = JSValueToNative($type, $extendedAttributes, $jsValue, $getIsolate);
my $code = "";
if ($type eq "DOMString" || IsEnumType($type)) {
diff --git a/chromium/third_party/WebKit/Source/bindings/v8/CustomElementConstructorBuilder.cpp b/chromium/third_party/WebKit/Source/bindings/v8/CustomElementConstructorBuilder.cpp
index b808512b8a9..02fd9273e7a 100644
--- a/chromium/third_party/WebKit/Source/bindings/v8/CustomElementConstructorBuilder.cpp
+++ b/chromium/third_party/WebKit/Source/bindings/v8/CustomElementConstructorBuilder.cpp
@@ -47,7 +47,6 @@
#include "core/dom/CustomElementCallbackDispatcher.h"
#include "core/dom/CustomElementDefinition.h"
#include "core/dom/CustomElementDescriptor.h"
-#include "core/dom/CustomElementException.h"
#include "core/dom/Document.h"
#include "wtf/Assertions.h"
@@ -69,7 +68,7 @@ bool CustomElementConstructorBuilder::isFeatureAllowed() const
return !DOMWrapperWorld::isolatedWorld(m_context);
}
-bool CustomElementConstructorBuilder::validateOptions(const AtomicString& type, ExceptionState& es)
+bool CustomElementConstructorBuilder::validateOptions()
{
ASSERT(m_prototype.IsEmpty());
@@ -80,21 +79,17 @@ bool CustomElementConstructorBuilder::validateOptions(const AtomicString& type,
// is HTMLSpanElement.prototype, has an ambiguity about its
// behavior. The spec should be fixed before WebKit implements
// it. https://www.w3.org/Bugs/Public/show_bug.cgi?id=20801
- CustomElementException::throwException(CustomElementException::NotYetImplemented, type, es);
return false;
}
v8::Handle<v8::Value> prototypeValue = prototypeScriptValue.v8Value();
- if (prototypeValue.IsEmpty() || !prototypeValue->IsObject()) {
- CustomElementException::throwException(CustomElementException::PrototypeNotAnObject, type, es);
+ if (prototypeValue.IsEmpty() || !prototypeValue->IsObject())
return false;
- }
m_prototype = prototypeValue.As<v8::Object>();
V8PerContextData* perContextData;
if (!(perContextData = V8PerContextData::from(m_context))) {
// FIXME: This should generate an InvalidContext exception at a later point.
- CustomElementException::throwException(CustomElementException::ContextDestroyedCheckingPrototype, type, es);
return false;
}
@@ -114,7 +109,6 @@ bool CustomElementConstructorBuilder::validateOptions(const AtomicString& type,
return true;
}
- CustomElementException::throwException(CustomElementException::PrototypeDoesNotExtendHTMLElementSVGElementPrototype, type, es);
return false;
}
@@ -176,7 +170,7 @@ v8::Handle<v8::Function> CustomElementConstructorBuilder::retrieveCallback(v8::I
return value.As<v8::Function>();
}
-bool CustomElementConstructorBuilder::createConstructor(Document* document, CustomElementDefinition* definition, ExceptionState& es)
+bool CustomElementConstructorBuilder::createConstructor(Document* document, CustomElementDefinition* definition)
{
ASSERT(!m_prototype.IsEmpty());
ASSERT(m_constructor.IsEmpty());
@@ -184,16 +178,14 @@ bool CustomElementConstructorBuilder::createConstructor(Document* document, Cust
v8::Isolate* isolate = m_context->GetIsolate();
- if (!prototypeIsValid(definition->descriptor().type(), es))
+ if (!prototypeIsValid())
return false;
v8::Local<v8::FunctionTemplate> constructorTemplate = v8::FunctionTemplate::New();
constructorTemplate->SetCallHandler(constructCustomElement);
m_constructor = constructorTemplate->GetFunction();
- if (m_constructor.IsEmpty()) {
- CustomElementException::throwException(CustomElementException::ContextDestroyedRegisteringDefinition, definition->descriptor().type(), es);
+ if (m_constructor.IsEmpty())
return false;
- }
const CustomElementDescriptor& descriptor = definition->descriptor();
@@ -228,15 +220,15 @@ bool CustomElementConstructorBuilder::createConstructor(Document* document, Cust
return true;
}
-bool CustomElementConstructorBuilder::prototypeIsValid(const AtomicString& type, ExceptionState& es) const
+bool CustomElementConstructorBuilder::prototypeIsValid() const
{
if (m_prototype->InternalFieldCount() || !m_prototype->GetHiddenValue(V8HiddenPropertyName::customElementIsInterfacePrototypeObject()).IsEmpty()) {
- CustomElementException::throwException(CustomElementException::PrototypeInUse, type, es);
+ // Alcreated an interface prototype object.
return false;
}
if (m_prototype->GetPropertyAttributes(v8String("constructor", m_context->GetIsolate())) & v8::DontDelete) {
- CustomElementException::throwException(CustomElementException::ConstructorPropertyNotConfigurable, type, es);
+ // "constructor" is not configurable.
return false;
}
diff --git a/chromium/third_party/WebKit/Source/bindings/v8/CustomElementConstructorBuilder.h b/chromium/third_party/WebKit/Source/bindings/v8/CustomElementConstructorBuilder.h
index 84e46bb568a..354fd12aff9 100644
--- a/chromium/third_party/WebKit/Source/bindings/v8/CustomElementConstructorBuilder.h
+++ b/chromium/third_party/WebKit/Source/bindings/v8/CustomElementConstructorBuilder.h
@@ -47,7 +47,6 @@ class CustomElementDefinition;
class Dictionary;
class Document;
class Element;
-class ExceptionState;
class QualifiedName;
class ScriptState;
class V8PerContextData;
@@ -67,10 +66,10 @@ public:
// (returns false), the calls must stop.
bool isFeatureAllowed() const;
- bool validateOptions(const AtomicString& type, ExceptionState&);
+ bool validateOptions();
bool findTagName(const AtomicString& customElementType, QualifiedName& tagName);
PassRefPtr<CustomElementLifecycleCallbacks> createCallbacks();
- bool createConstructor(Document*, CustomElementDefinition*, ExceptionState&);
+ bool createConstructor(Document*, CustomElementDefinition*);
bool didRegisterDefinition(CustomElementDefinition*) const;
// This method collects a return value for the bindings. It is
@@ -81,7 +80,7 @@ public:
private:
static WrapperTypeInfo* findWrapperType(v8::Handle<v8::Value> chain);
bool hasValidPrototypeChainFor(V8PerContextData*, WrapperTypeInfo*) const;
- bool prototypeIsValid(const AtomicString& type, ExceptionState&) const;
+ bool prototypeIsValid() const;
v8::Handle<v8::Function> retrieveCallback(v8::Isolate*, const char* name);
v8::Handle<v8::Context> m_context;
diff --git a/chromium/third_party/WebKit/Source/bindings/v8/ScriptProfiler.cpp b/chromium/third_party/WebKit/Source/bindings/v8/ScriptProfiler.cpp
index f9f5604fd51..f2856c68bc5 100644
--- a/chromium/third_party/WebKit/Source/bindings/v8/ScriptProfiler.cpp
+++ b/chromium/third_party/WebKit/Source/bindings/v8/ScriptProfiler.cpp
@@ -303,11 +303,4 @@ ProfileNameIdleTimeMap* ScriptProfiler::currentProfileNameIdleTimeMap()
return *map;
}
-void ScriptProfiler::setIdle(bool isIdle)
-{
- v8::Isolate* isolate = v8::Isolate::GetCurrent();
- if (v8::CpuProfiler* profiler = isolate->GetCpuProfiler())
- profiler->SetIdle(isIdle);
-}
-
} // namespace WebCore
diff --git a/chromium/third_party/WebKit/Source/bindings/v8/ScriptProfiler.h b/chromium/third_party/WebKit/Source/bindings/v8/ScriptProfiler.h
index 93f25bcb86c..e11979c02de 100644
--- a/chromium/third_party/WebKit/Source/bindings/v8/ScriptProfiler.h
+++ b/chromium/third_party/WebKit/Source/bindings/v8/ScriptProfiler.h
@@ -79,7 +79,6 @@ public:
static void initialize();
static void visitNodeWrappers(WrappedNodeVisitor*);
static HashMap<String, double>* currentProfileNameIdleTimeMap();
- static void setIdle(bool isIdle);
};
} // namespace WebCore
diff --git a/chromium/third_party/WebKit/Source/bindings/v8/ScriptSourceCode.h b/chromium/third_party/WebKit/Source/bindings/v8/ScriptSourceCode.h
index 5bacd8bb116..97046ef4024 100644
--- a/chromium/third_party/WebKit/Source/bindings/v8/ScriptSourceCode.h
+++ b/chromium/third_party/WebKit/Source/bindings/v8/ScriptSourceCode.h
@@ -31,8 +31,8 @@
#ifndef ScriptSourceCode_h
#define ScriptSourceCode_h
-#include "core/fetch/ResourcePtr.h"
-#include "core/fetch/ScriptResource.h"
+#include "core/loader/cache/ResourcePtr.h"
+#include "core/loader/cache/ScriptResource.h"
#include "weborigin/KURL.h"
#include "wtf/PassOwnPtr.h"
#include "wtf/text/TextPosition.h"
diff --git a/chromium/third_party/WebKit/Source/bindings/v8/V8ErrorHandler.cpp b/chromium/third_party/WebKit/Source/bindings/v8/V8ErrorHandler.cpp
index f7b9681e8d6..8f8b7c2cde5 100644
--- a/chromium/third_party/WebKit/Source/bindings/v8/V8ErrorHandler.cpp
+++ b/chromium/third_party/WebKit/Source/bindings/v8/V8ErrorHandler.cpp
@@ -31,16 +31,12 @@
#include "config.h"
#include "bindings/v8/V8ErrorHandler.h"
-#include "V8ErrorEvent.h"
#include "bindings/v8/ScriptController.h"
#include "bindings/v8/V8Binding.h"
#include "bindings/v8/V8HiddenPropertyName.h"
#include "bindings/v8/V8ScriptRunner.h"
-#include "core/dom/Document.h"
#include "core/dom/ErrorEvent.h"
#include "core/dom/EventNames.h"
-#include "core/dom/ScriptExecutionContext.h"
-#include "core/page/Frame.h"
namespace WebCore {
@@ -77,16 +73,6 @@ v8::Local<v8::Value> V8ErrorHandler::callListenerFunction(ScriptExecutionContext
return returnValue;
}
-// static
-void V8ErrorHandler::storeExceptionOnErrorEventWrapper(ErrorEvent* event, v8::Handle<v8::Value> data, v8::Isolate* isolate)
-{
- v8::Local<v8::Value> wrappedEvent = toV8(event, v8::Handle<v8::Object>(), isolate);
- if (!wrappedEvent.IsEmpty()) {
- ASSERT(wrappedEvent->IsObject());
- v8::Local<v8::Object>::Cast(wrappedEvent)->SetHiddenValue(V8HiddenPropertyName::error(), data);
- }
-}
-
bool V8ErrorHandler::shouldPreventDefault(v8::Local<v8::Value> returnValue)
{
return returnValue->IsBoolean() && returnValue->BooleanValue();
diff --git a/chromium/third_party/WebKit/Source/bindings/v8/V8ErrorHandler.h b/chromium/third_party/WebKit/Source/bindings/v8/V8ErrorHandler.h
index 92246d3f136..90fdf5f81a0 100644
--- a/chromium/third_party/WebKit/Source/bindings/v8/V8ErrorHandler.h
+++ b/chromium/third_party/WebKit/Source/bindings/v8/V8ErrorHandler.h
@@ -37,9 +37,6 @@
namespace WebCore {
-class ErrorEvent;
-class Frame;
-
class V8ErrorHandler : public V8EventListener {
public:
static PassRefPtr<V8ErrorHandler> create(v8::Local<v8::Object> listener, bool isInline)
@@ -47,8 +44,6 @@ public:
return adoptRef(new V8ErrorHandler(listener, isInline));
}
- static void storeExceptionOnErrorEventWrapper(ErrorEvent*, v8::Handle<v8::Value>, v8::Isolate*);
-
private:
V8ErrorHandler(v8::Local<v8::Object> listener, bool isInline);
diff --git a/chromium/third_party/WebKit/Source/bindings/v8/V8Initializer.cpp b/chromium/third_party/WebKit/Source/bindings/v8/V8Initializer.cpp
index d2e2d9c26a1..fa8be8f0948 100644
--- a/chromium/third_party/WebKit/Source/bindings/v8/V8Initializer.cpp
+++ b/chromium/third_party/WebKit/Source/bindings/v8/V8Initializer.cpp
@@ -35,7 +35,6 @@
#include "bindings/v8/ScriptController.h"
#include "bindings/v8/ScriptProfiler.h"
#include "bindings/v8/V8Binding.h"
-#include "bindings/v8/V8ErrorHandler.h"
#include "bindings/v8/V8GCController.h"
#include "bindings/v8/V8HiddenPropertyName.h"
#include "bindings/v8/V8PerContextData.h"
@@ -47,9 +46,9 @@
#include "core/page/DOMWindow.h"
#include "core/page/Frame.h"
#include "core/platform/MemoryUsageSupport.h"
+#include <v8-debug.h>
#include "wtf/RefPtr.h"
#include "wtf/text/WTFString.h"
-#include <v8-debug.h>
namespace WebCore {
@@ -100,14 +99,20 @@ static void messageHandlerInMainThread(v8::Handle<v8::Message> message, v8::Hand
bool shouldUseDocumentURL = resourceName.IsEmpty() || !resourceName->IsString();
String resource = shouldUseDocumentURL ? firstWindow->document()->url() : toWebCoreString(resourceName);
RefPtr<ErrorEvent> event = ErrorEvent::create(errorMessage, resource, message->GetLineNumber(), message->GetStartColumn());
- AccessControlStatus corsStatus = message->IsSharedCrossOrigin() ? SharableCrossOrigin : NotSharableCrossOrigin;
- // This method might be called while we're creating a new context. In this case, we
- // avoid storing the exception object, as we can't create a wrapper during context creation.
+ // messageHandlerInMainThread can be called while we're creating a new context.
+ // Since we cannot create a wrapper in the intermediate timing, we need to skip
+ // creating a wrapper for |event|.
DOMWrapperWorld* world = DOMWrapperWorld::current();
Frame* frame = firstWindow->document()->frame();
- if (world && frame && frame->script()->existingWindowShell(world))
- V8ErrorHandler::storeExceptionOnErrorEventWrapper(event.get(), data, v8::Isolate::GetCurrent());
+ if (world && frame && frame->script()->existingWindowShell(world)) {
+ v8::Local<v8::Value> wrappedEvent = toV8(event.get(), v8::Handle<v8::Object>(), v8::Isolate::GetCurrent());
+ if (!wrappedEvent.IsEmpty()) {
+ ASSERT(wrappedEvent->IsObject());
+ v8::Local<v8::Object>::Cast(wrappedEvent)->SetHiddenValue(V8HiddenPropertyName::error(), data);
+ }
+ }
+ AccessControlStatus corsStatus = message->IsSharedCrossOrigin() ? SharableCrossOrigin : NotSharableCrossOrigin;
firstWindow->document()->reportException(event.release(), callStack, corsStatus);
}
@@ -178,9 +183,12 @@ static void messageHandlerInWorker(v8::Handle<v8::Message> message, v8::Handle<v
String errorMessage = toWebCoreString(message->Get());
String sourceURL = toWebCoreString(message->GetScriptResourceName());
RefPtr<ErrorEvent> event = ErrorEvent::create(errorMessage, sourceURL, message->GetLineNumber(), message->GetStartColumn());
+ v8::Local<v8::Value> wrappedEvent = toV8(event.get(), v8::Handle<v8::Object>(), v8::Isolate::GetCurrent());
+ if (!wrappedEvent.IsEmpty()) {
+ ASSERT(wrappedEvent->IsObject());
+ v8::Local<v8::Object>::Cast(wrappedEvent)->SetHiddenValue(V8HiddenPropertyName::error(), data);
+ }
AccessControlStatus corsStatus = message->IsSharedCrossOrigin() ? SharableCrossOrigin : NotSharableCrossOrigin;
-
- V8ErrorHandler::storeExceptionOnErrorEventWrapper(event.get(), data, v8::Isolate::GetCurrent());
context->reportException(event.release(), 0, corsStatus);
}
diff --git a/chromium/third_party/WebKit/Source/bindings/v8/V8ScriptRunner.cpp b/chromium/third_party/WebKit/Source/bindings/v8/V8ScriptRunner.cpp
index cab312f6445..700441650cc 100644
--- a/chromium/third_party/WebKit/Source/bindings/v8/V8ScriptRunner.cpp
+++ b/chromium/third_party/WebKit/Source/bindings/v8/V8ScriptRunner.cpp
@@ -30,8 +30,8 @@
#include "bindings/v8/V8GCController.h"
#include "bindings/v8/V8RecursionScope.h"
#include "core/dom/ScriptExecutionContext.h"
-#include "core/fetch/ScriptResource.h"
#include "core/loader/CachedMetadata.h"
+#include "core/loader/cache/ScriptResource.h"
#include "core/platform/chromium/TraceEvent.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/bindings/v8/WorkerScriptController.cpp b/chromium/third_party/WebKit/Source/bindings/v8/WorkerScriptController.cpp
index cbbf758d16d..a0d3b2f5b1e 100644
--- a/chromium/third_party/WebKit/Source/bindings/v8/WorkerScriptController.cpp
+++ b/chromium/third_party/WebKit/Source/bindings/v8/WorkerScriptController.cpp
@@ -37,7 +37,6 @@
#include "V8WorkerGlobalScope.h"
#include "bindings/v8/ScriptSourceCode.h"
#include "bindings/v8/ScriptValue.h"
-#include "bindings/v8/V8ErrorHandler.h"
#include "bindings/v8/V8GCController.h"
#include "bindings/v8/V8Initializer.h"
#include "bindings/v8/V8ObjectConstructor.h"
@@ -168,7 +167,6 @@ ScriptValue WorkerScriptController::evaluate(const String& script, const String&
state->lineNumber = message->GetLineNumber();
state->columnNumber = message->GetStartColumn();
state->sourceURL = toWebCoreString(message->GetScriptResourceName());
- state->exception = ScriptValue(block.Exception());
block.Reset();
} else
state->hadException = false;
@@ -190,10 +188,10 @@ void WorkerScriptController::evaluate(const ScriptSourceCode& sourceCode, RefPtr
if (errorEvent) {
*errorEvent = m_workerGlobalScope->shouldSanitizeScriptError(state.sourceURL, NotSharableCrossOrigin) ?
ErrorEvent::createSanitizedError() : ErrorEvent::create(state.errorMessage, state.sourceURL, state.lineNumber, state.columnNumber);
- V8ErrorHandler::storeExceptionOnErrorEventWrapper(errorEvent->get(), state.exception.v8Value(), m_isolate);
} else {
ASSERT(!m_workerGlobalScope->shouldSanitizeScriptError(state.sourceURL, NotSharableCrossOrigin));
RefPtr<ErrorEvent> event = m_errorEventFromImportedScript ? m_errorEventFromImportedScript.release() : ErrorEvent::create(state.errorMessage, state.sourceURL, state.lineNumber, state.columnNumber);
+ m_errorEventFromImportedScript.clear();
m_workerGlobalScope->reportException(event, 0, NotSharableCrossOrigin);
}
}
diff --git a/chromium/third_party/WebKit/Source/bindings/v8/WorkerScriptController.h b/chromium/third_party/WebKit/Source/bindings/v8/WorkerScriptController.h
index 0697da0b0a6..dd0e5745106 100644
--- a/chromium/third_party/WebKit/Source/bindings/v8/WorkerScriptController.h
+++ b/chromium/third_party/WebKit/Source/bindings/v8/WorkerScriptController.h
@@ -58,7 +58,6 @@ namespace WebCore {
int lineNumber;
int columnNumber;
String sourceURL;
- ScriptValue exception;
};
class WorkerScriptController {
diff --git a/chromium/third_party/WebKit/Source/bindings/v8/custom/V8WorkerGlobalScopeCustom.cpp b/chromium/third_party/WebKit/Source/bindings/v8/custom/V8WorkerGlobalScopeCustom.cpp
index b2e35d93b49..87d751da456 100644
--- a/chromium/third_party/WebKit/Source/bindings/v8/custom/V8WorkerGlobalScopeCustom.cpp
+++ b/chromium/third_party/WebKit/Source/bindings/v8/custom/V8WorkerGlobalScopeCustom.cpp
@@ -94,6 +94,26 @@ void SetTimeoutOrInterval(const v8::FunctionCallbackInfo<v8::Value>& args, bool
v8SetReturnValue(args, timerId);
}
+void V8WorkerGlobalScope::importScriptsMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& args)
+{
+ if (!args.Length())
+ return;
+
+ Vector<String> urls;
+ for (int i = 0; i < args.Length(); i++) {
+ V8TRYCATCH_VOID(v8::Handle<v8::String>, scriptUrl, args[i]->ToString());
+ if (scriptUrl.IsEmpty())
+ return;
+ urls.append(toWebCoreString(scriptUrl));
+ }
+
+ WorkerGlobalScope* workerGlobalScope = V8WorkerGlobalScope::toNative(args.Holder());
+
+ ExceptionState es(args.GetIsolate());
+ workerGlobalScope->importScripts(urls, es);
+ es.throwIfNeeded();
+}
+
void V8WorkerGlobalScope::setTimeoutMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& args)
{
return SetTimeoutOrInterval(args, true);
diff --git a/chromium/third_party/WebKit/Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp b/chromium/third_party/WebKit/Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
index 9d734b6b26d..e9eabc2f481 100644
--- a/chromium/third_party/WebKit/Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
+++ b/chromium/third_party/WebKit/Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
@@ -102,14 +102,20 @@ void V8XMLHttpRequest::responseAttrGetterCustom(v8::Local<v8::String> name, cons
case XMLHttpRequest::ResponseTypeBlob:
{
- Blob* blob = xmlHttpRequest->responseBlob();
+ ExceptionState es(info.GetIsolate());
+ Blob* blob = xmlHttpRequest->responseBlob(es);
+ if (es.throwIfNeeded())
+ return;
v8SetReturnValue(info, toV8Fast(blob, info, xmlHttpRequest));
return;
}
case XMLHttpRequest::ResponseTypeArrayBuffer:
{
- ArrayBuffer* arrayBuffer = xmlHttpRequest->responseArrayBuffer();
+ ExceptionState es(info.GetIsolate());
+ ArrayBuffer* arrayBuffer = xmlHttpRequest->responseArrayBuffer(es);
+ if (es.throwIfNeeded())
+ return;
if (arrayBuffer && !arrayBuffer->hasDeallocationObserver()) {
arrayBuffer->setDeallocationObserver(V8ArrayBufferDeallocationObserver::instance());
v8::V8::AdjustAmountOfExternalAllocatedMemory(arrayBuffer->byteLength());
diff --git a/chromium/third_party/WebKit/Source/core/animation/AnimatableTransform.cpp b/chromium/third_party/WebKit/Source/core/animation/AnimatableTransform.cpp
deleted file mode 100644
index 8606a25a179..00000000000
--- a/chromium/third_party/WebKit/Source/core/animation/AnimatableTransform.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "core/animation/AnimatableTransform.h"
-
-namespace WebCore {
-
-PassRefPtr<AnimatableTransform> AnimatableTransform::create(const TransformOperations& transform)
-{
- return adoptRef(new AnimatableTransform(transform));
-}
-
-PassRefPtr<AnimatableValue> AnimatableTransform::interpolateTo(const AnimatableValue* value, double fraction) const
-{
- const AnimatableTransform* transform = toAnimatableTransform(value);
- return AnimatableTransform::create(transform->m_transform.blend(m_transform, fraction));
-}
-
-PassRefPtr<AnimatableValue> AnimatableTransform::addWith(const AnimatableValue* value) const
-{
- const AnimatableTransform* transform = toAnimatableTransform(value);
- return AnimatableTransform::create(m_transform.add(transform->m_transform));
-}
-
-} // namespace WebCore
-
diff --git a/chromium/third_party/WebKit/Source/core/animation/AnimatableValue.h b/chromium/third_party/WebKit/Source/core/animation/AnimatableValue.h
index 94a65d1caef..3145e0a7621 100644
--- a/chromium/third_party/WebKit/Source/core/animation/AnimatableValue.h
+++ b/chromium/third_party/WebKit/Source/core/animation/AnimatableValue.h
@@ -50,14 +50,12 @@ public:
bool isNumber() const { return m_type == TypeNumber; }
bool isNeutral() const { return m_type == TypeNeutral; }
- bool isTransform() const { return m_type == TypeTransform; }
bool isUnknown() const { return m_type == TypeUnknown; }
protected:
enum AnimatableType {
TypeNeutral,
TypeNumber,
- TypeTransform,
TypeUnknown,
};
diff --git a/chromium/third_party/WebKit/Source/core/animation/DocumentTimeline.cpp b/chromium/third_party/WebKit/Source/core/animation/DocumentTimeline.cpp
index 6a023d2a7d2..63ce0b325db 100644
--- a/chromium/third_party/WebKit/Source/core/animation/DocumentTimeline.cpp
+++ b/chromium/third_party/WebKit/Source/core/animation/DocumentTimeline.cpp
@@ -45,7 +45,6 @@ PassRefPtr<DocumentTimeline> DocumentTimeline::create(Document* document)
DocumentTimeline::DocumentTimeline(Document* document)
: m_currentTime(nullValue())
, m_document(document)
- , m_zeroTimeAsPerfTime(nullValue())
{
ASSERT(document);
}
@@ -63,10 +62,7 @@ PassRefPtr<Player> DocumentTimeline::play(TimedItem* child)
void DocumentTimeline::serviceAnimations(double monotonicAnimationStartTime)
{
- if (!isNull(m_zeroTimeAsPerfTime)) {
- ASSERT((isNull(m_currentTime)) || (m_currentTime + m_zeroTimeAsPerfTime <= monotonicAnimationStartTime));
- m_currentTime = monotonicAnimationStartTime - m_zeroTimeAsPerfTime;
- }
+ m_currentTime = monotonicAnimationStartTime;
for (int i = m_players.size() - 1; i >= 0; --i) {
if (!m_players[i]->update())
@@ -79,12 +75,6 @@ void DocumentTimeline::serviceAnimations(double monotonicAnimationStartTime)
dispatchEvents();
}
-void DocumentTimeline::setZeroTimeAsPerfTime(double zeroTime)
-{
- ASSERT(isNull(m_zeroTimeAsPerfTime));
- m_zeroTimeAsPerfTime = zeroTime;
-}
-
void DocumentTimeline::pauseAnimationsForTesting(double pauseTime)
{
for (size_t i = 0; i < m_players.size(); i++) {
@@ -95,17 +85,9 @@ void DocumentTimeline::pauseAnimationsForTesting(double pauseTime)
void DocumentTimeline::dispatchEvents()
{
- Vector<EventToDispatch> events = m_events;
+ for (size_t i = 0; i < m_events.size(); i++)
+ m_events[i].target->dispatchEvent(m_events[i].event.release());
m_events.clear();
- for (size_t i = 0; i < events.size(); i++)
- events[i].target->dispatchEvent(events[i].event.release());
-}
-
-size_t DocumentTimeline::numberOfActiveAnimationsForTesting() const
-{
- // Includes all players whose directly associated timed items
- // are current or in effect.
- return isNull(m_currentTime) ? 0 : m_players.size();
}
} // namespace
diff --git a/chromium/third_party/WebKit/Source/core/animation/DocumentTimeline.h b/chromium/third_party/WebKit/Source/core/animation/DocumentTimeline.h
index 56c4c388028..f5e438fd7db 100644
--- a/chromium/third_party/WebKit/Source/core/animation/DocumentTimeline.h
+++ b/chromium/third_party/WebKit/Source/core/animation/DocumentTimeline.h
@@ -51,12 +51,8 @@ public:
static PassRefPtr<DocumentTimeline> create(Document*);
void serviceAnimations(double);
PassRefPtr<Player> play(TimedItem*);
- // Called from setReadyState() in Document.cpp to set m_zeroTimeAsPerfTime to
- // performance.timing.domInteractive.
- void setZeroTimeAsPerfTime(double);
double currentTime() { return m_currentTime; }
void pauseAnimationsForTesting(double);
- size_t numberOfActiveAnimationsForTesting() const;
AnimationStack* animationStack(const Element* element) const
{
if (ActiveAnimations* animations = element->activeAnimations())
@@ -72,7 +68,6 @@ private:
DocumentTimeline(Document*);
void dispatchEvents();
double m_currentTime;
- double m_zeroTimeAsPerfTime;
Document* m_document;
Vector<RefPtr<Player> > m_players;
diff --git a/chromium/third_party/WebKit/Source/core/animation/DocumentTimelineTest.cpp b/chromium/third_party/WebKit/Source/core/animation/DocumentTimelineTest.cpp
index e7d0e435c1d..ca515be0a69 100644
--- a/chromium/third_party/WebKit/Source/core/animation/DocumentTimelineTest.cpp
+++ b/chromium/third_party/WebKit/Source/core/animation/DocumentTimelineTest.cpp
@@ -51,7 +51,6 @@ protected:
document = Document::create();
element = Element::create(nullQName() , document.get());
timeline = DocumentTimeline::create(document.get());
- timeline->setZeroTimeAsPerfTime(0);
}
RefPtr<Document> document;
@@ -78,24 +77,6 @@ TEST_F(DocumentTimelineTest, EmptyKeyframeAnimation)
EXPECT_FLOAT_EQ(100, timeline->currentTime());
}
-TEST_F(DocumentTimelineTest, ZeroTimeAsPerfTime)
-{
- timeline = DocumentTimeline::create(document.get());
-
- timeline->serviceAnimations(100);
- EXPECT_TRUE(isNull(timeline->currentTime()));
-
- timeline->serviceAnimations(200);
- EXPECT_TRUE(isNull(timeline->currentTime()));
-
- timeline->setZeroTimeAsPerfTime(300);
- timeline->serviceAnimations(300);
- EXPECT_EQ(0, timeline->currentTime());
-
- timeline->serviceAnimations(400);
- EXPECT_EQ(100, timeline->currentTime());
-}
-
TEST_F(DocumentTimelineTest, PauseForTesting)
{
float seekTime = 1;
@@ -109,47 +90,4 @@ TEST_F(DocumentTimelineTest, PauseForTesting)
EXPECT_FLOAT_EQ(seekTime, player2->currentTime());
}
-TEST_F(DocumentTimelineTest, NumberOfActiveAnimations)
-{
- Timing timingForwardFill;
- timingForwardFill.hasIterationDuration = true;
- timingForwardFill.iterationDuration = 2;
-
- Timing timingNoFill;
- timingNoFill.hasIterationDuration = true;
- timingNoFill.iterationDuration = 2;
- timingNoFill.fillMode = Timing::FillModeNone;
-
- Timing timingBackwardFillDelay;
- timingBackwardFillDelay.hasIterationDuration = true;
- timingBackwardFillDelay.iterationDuration = 1;
- timingBackwardFillDelay.fillMode = Timing::FillModeBackwards;
- timingBackwardFillDelay.startDelay = 1;
-
- Timing timingNoFillDelay;
- timingNoFillDelay.hasIterationDuration = true;
- timingNoFillDelay.iterationDuration = 1;
- timingNoFillDelay.fillMode = Timing::FillModeNone;
- timingNoFillDelay.startDelay = 1;
-
- RefPtr<Animation> anim1 = Animation::create(element.get(), KeyframeAnimationEffect::create(KeyframeAnimationEffect::KeyframeVector()), timingForwardFill);
- RefPtr<Animation> anim2 = Animation::create(element.get(), KeyframeAnimationEffect::create(KeyframeAnimationEffect::KeyframeVector()), timingNoFill);
- RefPtr<Animation> anim3 = Animation::create(element.get(), KeyframeAnimationEffect::create(KeyframeAnimationEffect::KeyframeVector()), timingBackwardFillDelay);
- RefPtr<Animation> anim4 = Animation::create(element.get(), KeyframeAnimationEffect::create(KeyframeAnimationEffect::KeyframeVector()), timingNoFillDelay);
-
- RefPtr<Player> player1 = timeline->play(anim1.get());
- RefPtr<Player> player2 = timeline->play(anim2.get());
- RefPtr<Player> player3 = timeline->play(anim3.get());
- RefPtr<Player> player4 = timeline->play(anim4.get());
-
- timeline->serviceAnimations(0);
- EXPECT_EQ(4U, timeline->numberOfActiveAnimationsForTesting());
- timeline->serviceAnimations(0.5);
- EXPECT_EQ(4U, timeline->numberOfActiveAnimationsForTesting());
- timeline->serviceAnimations(1.5);
- EXPECT_EQ(4U, timeline->numberOfActiveAnimationsForTesting());
- timeline->serviceAnimations(3);
- EXPECT_EQ(1U, timeline->numberOfActiveAnimationsForTesting());
-}
-
}
diff --git a/chromium/third_party/WebKit/Source/core/animation/Player.cpp b/chromium/third_party/WebKit/Source/core/animation/Player.cpp
index 0d44da78a69..7af07e2d49d 100644
--- a/chromium/third_party/WebKit/Source/core/animation/Player.cpp
+++ b/chromium/third_party/WebKit/Source/core/animation/Player.cpp
@@ -99,7 +99,6 @@ void Player::cancel()
if (!m_content)
return;
- ASSERT(m_content->player() == this);
m_content->detach();
m_content = 0;
}
diff --git a/chromium/third_party/WebKit/Source/core/animation/PlayerTest.cpp b/chromium/third_party/WebKit/Source/core/animation/PlayerTest.cpp
index 744f2189b76..26970a998b5 100644
--- a/chromium/third_party/WebKit/Source/core/animation/PlayerTest.cpp
+++ b/chromium/third_party/WebKit/Source/core/animation/PlayerTest.cpp
@@ -48,7 +48,6 @@ protected:
document = Document::create();
timeline = DocumentTimeline::create(document.get());
player = Player::create(timeline.get(), 0);
- timeline->setZeroTimeAsPerfTime(0);
}
bool updateTimeline(double time)
diff --git a/chromium/third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp b/chromium/third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp
index 59381639cba..3d97ec3fff2 100644
--- a/chromium/third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp
+++ b/chromium/third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp
@@ -33,7 +33,6 @@
#include "CSSValueKeywords.h"
#include "core/animation/AnimatableNumber.h"
-#include "core/animation/AnimatableTransform.h"
#include "core/animation/AnimatableUnknown.h"
#include "core/platform/Length.h"
#include "core/rendering/style/RenderStyle.h"
@@ -113,6 +112,7 @@ namespace WebCore {
// CSSPropertyWebkitShapeInside
// CSSPropertyWebkitTextFillColor
// CSSPropertyWebkitTextStrokeColor
+// CSSPropertyWebkitTransform
// CSSPropertyWebkitTransformOriginZ
// CSSPropertyWidows
// CSSPropertyWordSpacing
@@ -207,8 +207,6 @@ PassRefPtr<AnimatableValue> CSSAnimatableValueFactory::create(CSSPropertyID prop
return createFromLength(style->perspectiveOriginX(), style);
case CSSPropertyWebkitPerspectiveOriginY:
return createFromLength(style->perspectiveOriginY(), style);
- case CSSPropertyWebkitTransform:
- return AnimatableTransform::create(style->transform());
case CSSPropertyWebkitTransformOriginX:
return createFromLength(style->transformOriginX(), style);
case CSSPropertyWebkitTransformOriginY:
diff --git a/chromium/third_party/WebKit/Source/core/animation/css/CSSAnimations.h b/chromium/third_party/WebKit/Source/core/animation/css/CSSAnimations.h
index bd3c4e9517c..45dcf84b59e 100644
--- a/chromium/third_party/WebKit/Source/core/animation/css/CSSAnimations.h
+++ b/chromium/third_party/WebKit/Source/core/animation/css/CSSAnimations.h
@@ -78,7 +78,7 @@ public:
bool isEmpty() const { return m_animations.isEmpty(); }
void cancel();
private:
- typedef HashMap<StringImpl*, RefPtr<Player> > AnimationMap;
+ typedef HashMap<StringImpl*, Player*> AnimationMap;
AnimationMap m_animations;
class EventDelegate FINAL : public TimedItemEventDelegate {
public:
diff --git a/chromium/third_party/WebKit/Source/core/core.gyp b/chromium/third_party/WebKit/Source/core/core.gyp
index 106900d4266..7bf2ad20d6f 100644
--- a/chromium/third_party/WebKit/Source/core/core.gyp
+++ b/chromium/third_party/WebKit/Source/core/core.gyp
@@ -623,6 +623,27 @@
['exclude', 'platform/graphics/cpu/arm/filters/.*NEON\\.(cpp|h)'],
],
'conditions': [
+ ['use_default_render_theme==1', {
+ 'sources/': [
+ ['exclude', 'platform/chromium/PlatformThemeChromiumWin.h'],
+ ['exclude', 'platform/chromium/PlatformThemeChromiumWin.cpp'],
+ ['exclude', 'platform/chromium/ScrollbarThemeChromiumWin.cpp'],
+ ['exclude', 'platform/chromium/ScrollbarThemeChromiumWin.h'],
+ ],
+ }, { # use_default_render_theme==0
+ 'sources/': [
+ ['exclude', 'platform/chromium/PlatformThemeChromiumDefault.cpp'],
+ ['exclude', 'platform/chromium/PlatformThemeChromiumDefault.h'],
+ ['exclude', 'platform/chromium/ScrollbarThemeChromiumDefault.cpp'],
+ ['exclude', 'platform/chromium/ScrollbarThemeChromiumDefault.h'],
+ ],
+ }],
+ ['use_default_render_theme==0 and OS!="android"', {
+ 'sources/': [
+ ['exclude', 'platform/chromium/ScrollbarThemeChromiumOverlay.cpp'],
+ ['exclude', 'platform/chromium/ScrollbarThemeChromiumOverlay.h'],
+ ]
+ }],
['OS=="linux" or OS=="android"', {
'sources/': [
# Cherry-pick files excluded by the broader regular expressions above.
@@ -649,9 +670,14 @@
['exclude', 'Linux\\.cpp$'],
],
}],
- ['toolkit_uses_gtk == 0', {
+ ['toolkit_uses_gtk == 1', {
+ 'sources/': [
+ # Cherry-pick files excluded by the broader regular expressions above.
+ ['include', 'platform/chromium/KeyCodeConversionGtk\\.cpp$'],
+ ],
+ }, { # toolkit_uses_gtk==0
'sources/': [
- ['exclude', 'platform/chromium/KeyCodeConversionGtk\\.cpp$'],
+ ['exclude', 'Gtk\\.cpp$'],
],
}],
['OS=="mac"', {
@@ -690,6 +716,9 @@
['include', 'platform/mac/KillRingMac\\.mm$'],
['include', 'platform/mac/LocalCurrentGraphicsContext\\.mm$'],
['include', 'platform/mac/NSScrollerImpDetails\\.mm$'],
+ ['include', 'platform/mac/ScrollbarThemeMac\\.mm$'],
+ ['include', 'platform/mac/ScrollbarThemeMacNonOverlayAPI\\.mm$'],
+ ['include', 'platform/mac/ScrollbarThemeMacOverlayAPI\\.mm$'],
['include', 'platform/mac/ScrollAnimatorMac\\.mm$'],
['include', 'platform/mac/ScrollElasticityController\\.mm$'],
['include', 'platform/mac/ThemeMac\\.h$'],
@@ -715,7 +744,9 @@
# included by regex above, instead.
['exclude', 'platform/graphics/skia/FontCustomPlatformDataSkia\\.cpp$'],
- ['exclude', 'platform/ScrollbarThemeNonMacCommon\\.(cpp|h)$'],
+ # The Mac currently uses ScrollbarThemeChromiumMac.mm, which is not
+ # related to ScrollbarThemeChromium.cpp.
+ ['exclude', 'platform/chromium/ScrollbarThemeChromium\\.cpp$'],
# Mac uses only ScrollAnimatorMac.
['exclude', 'platform/ScrollAnimatorNone\\.cpp$'],
@@ -740,7 +771,6 @@
},{ # OS!="mac"
'sources/': [
['exclude', 'Mac\\.(cpp|mm?)$'],
- ['exclude', 'ScrollbarThemeMac'],
# FIXME: We will eventually compile this too, but for now it's
# only used on mac.
@@ -756,10 +786,9 @@
'sources/': [
['exclude', 'Posix\\.cpp$'],
- ['include', 'platform/ScrollbarThemeWin\\.(cpp|h)$'],
- ['include', 'platform/graphics/chromium/TransparencyWin\\.(cpp|h)$'],
- ['include', 'platform/graphics/opentype/'],
- ['include', 'platform/graphics/skia/SkiaFontWin\\.(cpp|h)$'],
+ ['include', '/opentype/'],
+ ['include', '/SkiaFontWin\\.cpp$'],
+ ['include', '/TransparencyWin\\.cpp$'],
['exclude', 'platform/graphics/skia/FontCacheSkia\\.cpp$'],
@@ -815,22 +844,6 @@
['exclude', 'Android\\.cpp$'],
],
}],
- ['use_default_render_theme==1', {
- 'sources/': [
- ['exclude', 'platform/ScrollbarThemeWin\\.(cpp|h)'],
- ['exclude', 'platform/chromium/PlatformThemeChromiumWin\\.(cpp|h)'],
- ],
- }, { # use_default_render_theme==0
- 'sources/': [
- ['exclude', 'platform/ScrollbarThemeAuraOrGtk\\.(cpp|h)'],
- ['exclude', 'platform/chromium/PlatformThemeChromiumDefault\\.(cpp|h)'],
- ],
- }],
- ['use_default_render_theme==0 and OS!="android"', {
- 'sources/': [
- ['exclude', 'platform/ScrollbarThemeOverlay\\.(cpp|h)'],
- ]
- }],
],
},
{
diff --git a/chromium/third_party/WebKit/Source/core/core.gypi b/chromium/third_party/WebKit/Source/core/core.gypi
index 8d42702f791..fba11faa789 100644
--- a/chromium/third_party/WebKit/Source/core/core.gypi
+++ b/chromium/third_party/WebKit/Source/core/core.gypi
@@ -241,6 +241,7 @@
'page/EventSource.idl',
'page/History.idl',
'page/ImageBitmap.idl',
+ 'page/ImageBitmapFactories.idl',
'page/Location.idl',
'page/MemoryInfo.idl',
'page/Navigator.idl',
@@ -524,8 +525,6 @@
'animation/AnimatableNeutral.h',
'animation/AnimatableNumber.cpp',
'animation/AnimatableNumber.h',
- 'animation/AnimatableTransform.cpp',
- 'animation/AnimatableTransform.h',
'animation/AnimatableUnknown.h',
'animation/AnimatableValue.cpp',
'animation/AnimatableValue.h',
@@ -875,42 +874,6 @@
'editing/chromium/EditorChromium.cpp',
'editing/htmlediting.cpp',
'editing/markup.cpp',
- 'fetch/CSSStyleSheetResource.cpp',
- 'fetch/CSSStyleSheetResource.h',
- 'fetch/DocumentResource.cpp',
- 'fetch/DocumentResource.h',
- 'fetch/FontResource.cpp',
- 'fetch/FontResource.h',
- 'fetch/ImageResource.cpp',
- 'fetch/ImageResource.h',
- 'fetch/RawResource.cpp',
- 'fetch/RawResource.h',
- 'fetch/Resource.cpp',
- 'fetch/Resource.h',
- 'fetch/ResourceClientWalker.h',
- 'fetch/ResourceFetcher.cpp',
- 'fetch/ResourceFetcher.h',
- 'fetch/ResourceLoadNotifier.cpp',
- 'fetch/ResourceLoadNotifier.h',
- 'fetch/ResourceLoader.cpp',
- 'fetch/ResourceLoader.h',
- 'fetch/ResourceLoaderOptions.h',
- 'fetch/ResourcePtr.cpp',
- 'fetch/ResourcePtr.h',
- 'fetch/FetchRequest.cpp',
- 'fetch/FetchRequest.h',
- 'fetch/FetchInitiatorInfo.h',
- 'fetch/ScriptResource.cpp',
- 'fetch/ScriptResource.h',
- 'fetch/ShaderResource.cpp',
- 'fetch/ShaderResource.h',
- 'fetch/DocumentResourceReference.h',
- 'fetch/TextTrackResource.cpp',
- 'fetch/TextTrackResource.h',
- 'fetch/XSLStyleSheetResource.cpp',
- 'fetch/XSLStyleSheetResource.h',
- 'fetch/MemoryCache.cpp',
- 'fetch/MemoryCache.h',
'fileapi/Blob.cpp',
'fileapi/Blob.h',
'fileapi/BlobBuilder.cpp',
@@ -1107,6 +1070,9 @@
'loader/PrerendererClient.cpp',
'loader/PrerendererClient.h',
'loader/ProgressTracker.cpp',
+ 'loader/ResourceLoadNotifier.cpp',
+ 'loader/ResourceLoader.cpp',
+ 'loader/ResourceLoaderOptions.h',
'loader/SinkDocument.cpp',
'loader/SinkDocument.h',
'loader/SubstituteData.h',
@@ -1132,6 +1098,30 @@
'loader/archive/MHTMLArchive.h',
'loader/archive/MHTMLParser.cpp',
'loader/archive/MHTMLParser.h',
+ 'loader/cache/CSSStyleSheetResource.cpp',
+ 'loader/cache/CSSStyleSheetResource.h',
+ 'loader/cache/DocumentResource.cpp',
+ 'loader/cache/DocumentResource.h',
+ 'loader/cache/FontResource.cpp',
+ 'loader/cache/FontResource.h',
+ 'loader/cache/ImageResource.cpp',
+ 'loader/cache/RawResource.cpp',
+ 'loader/cache/Resource.cpp',
+ 'loader/cache/ResourceClientWalker.h',
+ 'loader/cache/ResourcePtr.cpp',
+ 'loader/cache/ResourceFetcher.cpp',
+ 'loader/cache/FetchRequest.cpp',
+ 'loader/cache/FetchInitiatorInfo.h',
+ 'loader/cache/ScriptResource.cpp',
+ 'loader/cache/ScriptResource.h',
+ 'loader/cache/ShaderResource.cpp',
+ 'loader/cache/ShaderResource.h',
+ 'loader/cache/DocumentResourceReference.h',
+ 'loader/cache/TextTrackResource.cpp',
+ 'loader/cache/TextTrackResource.h',
+ 'loader/cache/XSLStyleSheetResource.cpp',
+ 'loader/cache/XSLStyleSheetResource.h',
+ 'loader/cache/MemoryCache.cpp',
'page/AutoscrollController.cpp',
'page/AutoscrollController.h',
'page/BarProp.cpp',
@@ -1159,10 +1149,6 @@
'page/DOMWindow.h',
'page/DOMWindowBase64.cpp',
'page/DOMWindowBase64.h',
- 'page/DOMWindowLifecycleNotifier.cpp',
- 'page/DOMWindowLifecycleNotifier.h',
- 'page/DOMWindowLifecycleObserver.cpp',
- 'page/DOMWindowLifecycleObserver.h',
'page/DOMWindowTimers.cpp',
'page/DOMWindowTimers.h',
'page/DOMWindowPagePopup.cpp',
@@ -1185,6 +1171,8 @@
'page/History.h',
'page/ImageBitmap.cpp',
'page/ImageBitmap.h',
+ 'page/ImageBitmapFactories.cpp',
+ 'page/ImageBitmapFactories.h',
'page/LayoutMilestones.h',
'page/Location.cpp',
'page/Location.h',
@@ -1494,8 +1482,6 @@
'rendering/RenderWordBreak.h',
'rendering/RootInlineBox.cpp',
'rendering/ScrollBehavior.cpp',
- 'rendering/SubtreeLayoutScope.cpp',
- 'rendering/SubtreeLayoutScope.h',
'rendering/TableLayout.h',
'rendering/TrailingFloatsRootInlineBox.h',
'rendering/VerticalPositionCache.h',
@@ -1503,8 +1489,6 @@
'rendering/break_lines.h',
'rendering/shapes/PolygonShape.cpp',
'rendering/shapes/PolygonShape.h',
- 'rendering/shapes/RasterShape.cpp',
- 'rendering/shapes/RasterShape.h',
'rendering/shapes/RectangleShape.cpp',
'rendering/shapes/RectangleShape.h',
'rendering/shapes/Shape.cpp',
@@ -1764,11 +1748,7 @@
'dom/CustomElementDefinition.h',
'dom/CustomElementDescriptor.h',
'dom/CustomElementDescriptorHash.h',
- 'dom/CustomElementException.cpp',
- 'dom/CustomElementException.h',
'dom/CustomElementLifecycleCallbacks.h',
- 'dom/CustomElementObserver.cpp',
- 'dom/CustomElementObserver.h',
'dom/CustomElementRegistrationContext.cpp',
'dom/CustomElementRegistrationContext.h',
'dom/CustomElementRegistry.cpp',
@@ -1946,8 +1926,6 @@
'dom/SecurityPolicyViolationEvent.h',
'dom/SelectorQuery.cpp',
'dom/SelectorQuery.h',
- 'dom/ShadowTreeStyleSheetCollection.cpp',
- 'dom/ShadowTreeStyleSheetCollection.h',
'dom/SimulatedClickOptions.h',
'dom/SpaceSplitString.cpp',
'dom/StaticNodeList.cpp',
@@ -2605,25 +2583,7 @@
'platform/ScrollView.cpp',
'platform/ScrollableArea.cpp',
'platform/Scrollbar.cpp',
- 'platform/Scrollbar.h',
'platform/ScrollbarTheme.cpp',
- 'platform/ScrollbarTheme.h',
- 'platform/ScrollbarThemeAndroid.cpp',
- 'platform/ScrollbarThemeAuraOrGtk.cpp',
- 'platform/ScrollbarThemeAuraOrGtk.h',
- 'platform/ScrollbarThemeClient.h',
- 'platform/ScrollbarThemeMacCommon.h',
- 'platform/ScrollbarThemeMacCommon.mm',
- 'platform/ScrollbarThemeMacNonOverlayAPI.h',
- 'platform/ScrollbarThemeMacNonOverlayAPI.mm',
- 'platform/ScrollbarThemeMacOverlayAPI.h',
- 'platform/ScrollbarThemeMacOverlayAPI.mm',
- 'platform/ScrollbarThemeNonMacCommon.cpp',
- 'platform/ScrollbarThemeNonMacCommon.h',
- 'platform/ScrollbarThemeOverlay.cpp',
- 'platform/ScrollbarThemeOverlay.h',
- 'platform/ScrollbarThemeWin.cpp',
- 'platform/ScrollbarThemeWin.h',
'platform/SecureTextInput.cpp',
'platform/SecureTextInput.h',
'platform/SerializedResource.h',
@@ -2765,6 +2725,15 @@
'platform/chromium/Prerender.h',
'platform/chromium/PrerenderHandle.cpp',
'platform/chromium/SSLKeyGeneratorChromium.cpp',
+ 'platform/chromium/ScrollbarThemeChromium.cpp',
+ 'platform/chromium/ScrollbarThemeChromium.h',
+ 'platform/chromium/ScrollbarThemeChromiumAndroid.cpp',
+ 'platform/chromium/ScrollbarThemeChromiumDefault.cpp',
+ 'platform/chromium/ScrollbarThemeChromiumDefault.h',
+ 'platform/chromium/ScrollbarThemeChromiumOverlay.cpp',
+ 'platform/chromium/ScrollbarThemeChromiumOverlay.h',
+ 'platform/chromium/ScrollbarThemeChromiumWin.cpp',
+ 'platform/chromium/ScrollbarThemeChromiumWin.h',
'platform/chromium/SharedTimerChromium.cpp',
'platform/chromium/SoundChromiumPosix.cpp',
'platform/chromium/SoundChromiumWin.cpp',
@@ -3088,6 +3057,12 @@
'platform/mac/ScrollAnimatorMac.mm',
'platform/mac/ScrollElasticityController.h',
'platform/mac/ScrollElasticityController.mm',
+ 'platform/mac/ScrollbarThemeMac.h',
+ 'platform/mac/ScrollbarThemeMac.mm',
+ 'platform/mac/ScrollbarThemeMacNonOverlayAPI.h',
+ 'platform/mac/ScrollbarThemeMacNonOverlayAPI.mm',
+ 'platform/mac/ScrollbarThemeMacOverlayAPI.h',
+ 'platform/mac/ScrollbarThemeMacOverlayAPI.mm',
'platform/mac/ThemeMac.h',
'platform/mac/ThemeMac.mm',
'platform/mac/WebFontCache.mm',
@@ -3765,10 +3740,10 @@
'animation/TimedItemCalculationsTest.cpp',
'animation/TimedItemTest.cpp',
'css/CSSParserValuesTest.cpp',
- 'fetch/ImageResourceTest.cpp',
- 'fetch/MemoryCacheTest.cpp',
- 'fetch/ResourceFetcherTest.cpp',
'html/TimeRangesTest.cpp',
+ 'loader/cache/ImageResourceTest.cpp',
+ 'loader/cache/MemoryCacheTest.cpp',
+ 'loader/cache/ResourceFetcherTest.cpp',
'page/ImageBitmapTest.cpp',
'platform/DecimalTest.cpp',
'platform/SharedBufferTest.cpp',
diff --git a/chromium/third_party/WebKit/Source/core/core_derived_sources.gyp b/chromium/third_party/WebKit/Source/core/core_derived_sources.gyp
index e89bab627a6..7e09172cdc1 100644
--- a/chromium/third_party/WebKit/Source/core/core_derived_sources.gyp
+++ b/chromium/third_party/WebKit/Source/core/core_derived_sources.gyp
@@ -481,7 +481,7 @@
'scripts/Hasher.pm',
'scripts/StaticString.pm',
'scripts/make_names.pl',
- 'fetch/FetchInitiatorTypeNames.in',
+ 'loader/cache/FetchInitiatorTypeNames.in',
],
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/blink/FetchInitiatorTypeNames.cpp',
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSArrayFunctionValue.h b/chromium/third_party/WebKit/Source/core/css/CSSArrayFunctionValue.h
index 9325207b6b0..2e25e9cb3ca 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSArrayFunctionValue.h
+++ b/chromium/third_party/WebKit/Source/core/css/CSSArrayFunctionValue.h
@@ -50,7 +50,7 @@ public:
private:
CSSArrayFunctionValue();
- explicit CSSArrayFunctionValue(const CSSArrayFunctionValue& cloneFrom);
+ CSSArrayFunctionValue(const CSSArrayFunctionValue& cloneFrom);
};
} // namespace WebCore
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSCanvasValue.h b/chromium/third_party/WebKit/Source/core/css/CSSCanvasValue.h
index 8283adb124e..c2e7b779a1b 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSCanvasValue.h
+++ b/chromium/third_party/WebKit/Source/core/css/CSSCanvasValue.h
@@ -50,7 +50,7 @@ public:
bool equals(const CSSCanvasValue&) const;
private:
- explicit CSSCanvasValue(const String& name)
+ CSSCanvasValue(const String& name)
: CSSImageGeneratorValue(CanvasClass)
, m_canvasObserver(this)
, m_name(name)
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp b/chromium/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp
index 7285c6033ca..5484ae54383 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp
+++ b/chromium/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp
@@ -83,14 +83,6 @@ namespace WebCore {
// NOTE: Do not use this list, use computableProperties() instead
// to respect runtime enabling of CSS properties.
static const CSSPropertyID staticComputableProperties[] = {
- CSSPropertyAnimationDelay,
- CSSPropertyAnimationDirection,
- CSSPropertyAnimationDuration,
- CSSPropertyAnimationFillMode,
- CSSPropertyAnimationIterationCount,
- CSSPropertyAnimationName,
- CSSPropertyAnimationPlayState,
- CSSPropertyAnimationTimingFunction,
CSSPropertyBackgroundAttachment,
CSSPropertyBackgroundBlendMode,
CSSPropertyBackgroundClip,
@@ -2338,48 +2330,24 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
return cssValuePool().createIdentifierValue(CSSValueBorderBox);
case CSSPropertyWebkitAppRegion:
return cssValuePool().createIdentifierValue(style->getDraggableRegionMode() == DraggableRegionDrag ? CSSValueDrag : CSSValueNoDrag);
- case CSSPropertyAnimationDelay:
- if (!RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled())
- break;
case CSSPropertyWebkitAnimationDelay:
return getDelayValue(style->animations());
- case CSSPropertyAnimationDirection:
- if (!RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled())
- break;
case CSSPropertyWebkitAnimationDirection: {
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
const CSSAnimationDataList* t = style->animations();
if (t) {
for (size_t i = 0; i < t->size(); ++i) {
- switch (t->animation(i)->direction()) {
- case CSSAnimationData::AnimationDirectionNormal:
- list->append(cssValuePool().createIdentifierValue(CSSValueNormal));
- break;
- case CSSAnimationData::AnimationDirectionAlternate:
+ if (t->animation(i)->direction())
list->append(cssValuePool().createIdentifierValue(CSSValueAlternate));
- break;
- case CSSAnimationData::AnimationDirectionReverse:
- list->append(cssValuePool().createIdentifierValue(CSSValueReverse));
- break;
- case CSSAnimationData::AnimationDirectionAlternateReverse:
- list->append(cssValuePool().createIdentifierValue(CSSValueAlternateReverse));
- break;
- default:
- ASSERT_NOT_REACHED();
- }
+ else
+ list->append(cssValuePool().createIdentifierValue(CSSValueNormal));
}
} else
list->append(cssValuePool().createIdentifierValue(CSSValueNormal));
return list.release();
}
- case CSSPropertyAnimationDuration:
- if (!RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled())
- break;
case CSSPropertyWebkitAnimationDuration:
return getDurationValue(style->animations());
- case CSSPropertyAnimationFillMode:
- if (!RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled())
- break;
case CSSPropertyWebkitAnimationFillMode: {
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
const CSSAnimationDataList* t = style->animations();
@@ -2404,9 +2372,6 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
list->append(cssValuePool().createIdentifierValue(CSSValueNone));
return list.release();
}
- case CSSPropertyAnimationIterationCount:
- if (!RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled())
- break;
case CSSPropertyWebkitAnimationIterationCount: {
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
const CSSAnimationDataList* t = style->animations();
@@ -2422,9 +2387,6 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
list->append(cssValuePool().createValue(CSSAnimationData::initialAnimationIterationCount(), CSSPrimitiveValue::CSS_NUMBER));
return list.release();
}
- case CSSPropertyAnimationName:
- if (!RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled())
- break;
case CSSPropertyWebkitAnimationName: {
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
const CSSAnimationDataList* t = style->animations();
@@ -2435,9 +2397,6 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
list->append(cssValuePool().createIdentifierValue(CSSValueNone));
return list.release();
}
- case CSSPropertyAnimationPlayState:
- if (!RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled())
- break;
case CSSPropertyWebkitAnimationPlayState: {
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
const CSSAnimationDataList* t = style->animations();
@@ -2453,9 +2412,6 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
list->append(cssValuePool().createIdentifierValue(CSSValueRunning));
return list.release();
}
- case CSSPropertyAnimationTimingFunction:
- if (!RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled())
- break;
case CSSPropertyWebkitAnimationTimingFunction:
return getTimingFunctionValue(style->animations());
case CSSPropertyWebkitAppearance:
@@ -2810,7 +2766,6 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
break;
/* Unimplemented -webkit- properties */
- case CSSPropertyAnimation:
case CSSPropertyWebkitAnimation:
case CSSPropertyWebkitBorderRadius:
case CSSPropertyWebkitMarginCollapse:
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSCrossfadeValue.cpp b/chromium/third_party/WebKit/Source/core/css/CSSCrossfadeValue.cpp
index d409f79aafa..c48eaf220e0 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSCrossfadeValue.cpp
+++ b/chromium/third_party/WebKit/Source/core/css/CSSCrossfadeValue.cpp
@@ -27,7 +27,7 @@
#include "core/css/CSSCrossfadeValue.h"
#include "core/css/CSSImageValue.h"
-#include "core/fetch/ImageResource.h"
+#include "core/loader/cache/ImageResource.h"
#include "core/platform/graphics/CrossfadeGeneratedImage.h"
#include "core/rendering/RenderObject.h"
#include "core/rendering/style/StyleFetchedImage.h"
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSCrossfadeValue.h b/chromium/third_party/WebKit/Source/core/css/CSSCrossfadeValue.h
index 4df75201818..450b6153caf 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSCrossfadeValue.h
+++ b/chromium/third_party/WebKit/Source/core/css/CSSCrossfadeValue.h
@@ -28,9 +28,9 @@
#include "core/css/CSSImageGeneratorValue.h"
#include "core/css/CSSPrimitiveValue.h"
-#include "core/fetch/ImageResource.h"
-#include "core/fetch/ImageResourceClient.h"
-#include "core/fetch/ResourcePtr.h"
+#include "core/loader/cache/ImageResource.h"
+#include "core/loader/cache/ImageResourceClient.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "core/platform/graphics/Image.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSCursorImageValue.cpp b/chromium/third_party/WebKit/Source/core/css/CSSCursorImageValue.cpp
index dd68e0b9850..21deed71b99 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSCursorImageValue.cpp
+++ b/chromium/third_party/WebKit/Source/core/css/CSSCursorImageValue.cpp
@@ -25,8 +25,8 @@
#include "SVGNames.h"
#include "core/css/CSSImageSetValue.h"
#include "core/css/CSSImageValue.h"
-#include "core/fetch/ImageResource.h"
-#include "core/fetch/ResourceFetcher.h"
+#include "core/loader/cache/ImageResource.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/rendering/style/StyleFetchedImage.h"
#include "core/rendering/style/StyleFetchedImageSet.h"
#include "core/rendering/style/StyleImage.h"
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSFilterValue.h b/chromium/third_party/WebKit/Source/core/css/CSSFilterValue.h
index 3398cfa788b..d937e0c201e 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSFilterValue.h
+++ b/chromium/third_party/WebKit/Source/core/css/CSSFilterValue.h
@@ -66,8 +66,8 @@ public:
bool equals(const CSSFilterValue&) const;
private:
- explicit CSSFilterValue(FilterOperationType);
- explicit CSSFilterValue(const CSSFilterValue& cloneFrom);
+ CSSFilterValue(FilterOperationType);
+ CSSFilterValue(const CSSFilterValue& cloneFrom);
FilterOperationType m_type;
};
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSFontFaceSource.cpp b/chromium/third_party/WebKit/Source/core/css/CSSFontFaceSource.cpp
index c70ee4aa4b0..1f160aa51f7 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSFontFaceSource.cpp
+++ b/chromium/third_party/WebKit/Source/core/css/CSSFontFaceSource.cpp
@@ -28,7 +28,7 @@
#include "core/css/CSSFontFace.h"
#include "core/css/CSSFontSelector.h"
-#include "core/fetch/FontResource.h"
+#include "core/loader/cache/FontResource.h"
#include "core/platform/HistogramSupport.h"
#include "core/platform/graphics/FontCache.h"
#include "core/platform/graphics/FontDescription.h"
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSFontFaceSource.h b/chromium/third_party/WebKit/Source/core/css/CSSFontFaceSource.h
index e99c8e52a86..aea2ac51258 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSFontFaceSource.h
+++ b/chromium/third_party/WebKit/Source/core/css/CSSFontFaceSource.h
@@ -26,8 +26,8 @@
#ifndef CSSFontFaceSource_h
#define CSSFontFaceSource_h
-#include "core/fetch/FontResource.h"
-#include "core/fetch/ResourcePtr.h"
+#include "core/loader/cache/FontResource.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "core/platform/Timer.h"
#include "wtf/HashMap.h"
#include "wtf/text/AtomicString.h"
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp b/chromium/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp
index 7b3cef66d05..46fd349a0db 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp
+++ b/chromium/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp
@@ -30,9 +30,9 @@
#include "core/css/StyleSheetContents.h"
#include "core/dom/Document.h"
#include "core/dom/Node.h"
-#include "core/fetch/FetchRequest.h"
-#include "core/fetch/FontResource.h"
-#include "core/fetch/ResourceFetcher.h"
+#include "core/loader/cache/FetchRequest.h"
+#include "core/loader/cache/FontResource.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/platform/graphics/FontCustomPlatformData.h"
#include "core/svg/SVGFontFaceElement.h"
#include "wtf/text/StringBuilder.h"
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.h b/chromium/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.h
index 9129f1c9b4d..023e38ec181 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.h
+++ b/chromium/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.h
@@ -27,7 +27,7 @@
#define CSSFontFaceSrcValue_h
#include "core/css/CSSValue.h"
-#include "core/fetch/ResourcePtr.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "wtf/PassRefPtr.h"
#include "wtf/text/WTFString.h"
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSFontSelector.cpp b/chromium/third_party/WebKit/Source/core/css/CSSFontSelector.cpp
index 3bc725a2c93..f721acd1d2e 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSFontSelector.cpp
+++ b/chromium/third_party/WebKit/Source/core/css/CSSFontSelector.cpp
@@ -43,9 +43,9 @@
#include "core/css/StyleRule.h"
#include "core/css/resolver/StyleResolver.h"
#include "core/dom/Document.h"
-#include "core/fetch/FontResource.h"
-#include "core/fetch/ResourceFetcher.h"
#include "core/loader/FrameLoader.h"
+#include "core/loader/cache/FontResource.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/page/Frame.h"
#include "core/page/Settings.h"
#include "core/platform/graphics/FontCache.h"
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSFontSelector.h b/chromium/third_party/WebKit/Source/core/css/CSSFontSelector.h
index 306160f49c3..8d41ad2ba01 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSFontSelector.h
+++ b/chromium/third_party/WebKit/Source/core/css/CSSFontSelector.h
@@ -26,7 +26,7 @@
#ifndef CSSFontSelector_h
#define CSSFontSelector_h
-#include "core/fetch/ResourcePtr.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "core/platform/Timer.h"
#include "core/platform/graphics/FontSelector.h"
#include "wtf/Forward.h"
@@ -74,7 +74,7 @@ public:
void beginLoadingFontSoon(FontResource*);
private:
- explicit CSSFontSelector(Document*);
+ CSSFontSelector(Document*);
void dispatchInvalidationCallbacks();
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSGradientValue.h b/chromium/third_party/WebKit/Source/core/css/CSSGradientValue.h
index 2eed10b981f..5c3c631d507 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSGradientValue.h
+++ b/chromium/third_party/WebKit/Source/core/css/CSSGradientValue.h
@@ -164,7 +164,7 @@ private:
{
}
- explicit CSSLinearGradientValue(const CSSLinearGradientValue& other)
+ CSSLinearGradientValue(const CSSLinearGradientValue& other)
: CSSGradientValue(other, LinearGradientClass, other.gradientType())
, m_angle(other.m_angle)
{
@@ -207,7 +207,7 @@ private:
{
}
- explicit CSSRadialGradientValue(const CSSRadialGradientValue& other)
+ CSSRadialGradientValue(const CSSRadialGradientValue& other)
: CSSGradientValue(other, RadialGradientClass, other.gradientType())
, m_firstRadius(other.m_firstRadius)
, m_secondRadius(other.m_secondRadius)
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSImageGeneratorValue.h b/chromium/third_party/WebKit/Source/core/css/CSSImageGeneratorValue.h
index 4d967684ed4..8a1602410af 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSImageGeneratorValue.h
+++ b/chromium/third_party/WebKit/Source/core/css/CSSImageGeneratorValue.h
@@ -68,7 +68,7 @@ public:
void loadSubimages(ResourceFetcher*);
protected:
- explicit CSSImageGeneratorValue(ClassType);
+ CSSImageGeneratorValue(ClassType);
Image* getImage(RenderObject*, const IntSize&);
void putImage(const IntSize&, PassRefPtr<Image>);
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp b/chromium/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp
index 231244d3271..efae6467979 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp
+++ b/chromium/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp
@@ -30,9 +30,9 @@
#include "core/css/CSSImageValue.h"
#include "core/css/CSSPrimitiveValue.h"
#include "core/dom/Document.h"
-#include "core/fetch/FetchRequest.h"
-#include "core/fetch/ImageResource.h"
-#include "core/fetch/ResourceFetcher.h"
+#include "core/loader/cache/FetchRequest.h"
+#include "core/loader/cache/ImageResource.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/rendering/style/StyleFetchedImageSet.h"
#include "core/rendering/style/StylePendingImage.h"
#include "wtf/text/StringBuilder.h"
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSImageSetValue.h b/chromium/third_party/WebKit/Source/core/css/CSSImageSetValue.h
index 7f5a377441f..42fdae908ea 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSImageSetValue.h
+++ b/chromium/third_party/WebKit/Source/core/css/CSSImageSetValue.h
@@ -66,7 +66,7 @@ protected:
private:
CSSImageSetValue();
- explicit CSSImageSetValue(const CSSImageSetValue& cloneFrom);
+ CSSImageSetValue(const CSSImageSetValue& cloneFrom);
void fillImageSet();
static inline bool compareByScaleFactor(ImageWithScale first, ImageWithScale second) { return first.scaleFactor < second.scaleFactor; }
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSImageValue.cpp b/chromium/third_party/WebKit/Source/core/css/CSSImageValue.cpp
index c2b4cde2260..afd96591987 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSImageValue.cpp
+++ b/chromium/third_party/WebKit/Source/core/css/CSSImageValue.cpp
@@ -24,9 +24,9 @@
#include "FetchInitiatorTypeNames.h"
#include "core/css/CSSParser.h"
#include "core/dom/Document.h"
-#include "core/fetch/FetchRequest.h"
-#include "core/fetch/ImageResource.h"
-#include "core/fetch/ResourceFetcher.h"
+#include "core/loader/cache/FetchRequest.h"
+#include "core/loader/cache/ImageResource.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/rendering/style/StyleFetchedImage.h"
#include "core/rendering/style/StylePendingImage.h"
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSImageValue.h b/chromium/third_party/WebKit/Source/core/css/CSSImageValue.h
index 0e66982cb1a..1a9b3ea5852 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSImageValue.h
+++ b/chromium/third_party/WebKit/Source/core/css/CSSImageValue.h
@@ -22,7 +22,7 @@
#define CSSImageValue_h
#include "core/css/CSSValue.h"
-#include "core/fetch/ResourceFetcher.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "wtf/RefPtr.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSInitialValue.h b/chromium/third_party/WebKit/Source/core/css/CSSInitialValue.h
index f2bc029904f..4a0f53fb772 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSInitialValue.h
+++ b/chromium/third_party/WebKit/Source/core/css/CSSInitialValue.h
@@ -44,7 +44,7 @@ public:
bool equals(const CSSInitialValue&) const { return true; }
private:
- explicit CSSInitialValue(bool implicit)
+ CSSInitialValue(bool implicit)
: CSSValue(InitialClass)
, m_isImplicit(implicit)
{
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSKeyframeRule.cpp b/chromium/third_party/WebKit/Source/core/css/CSSKeyframeRule.cpp
index 672b726c4c7..6024c87c838 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSKeyframeRule.cpp
+++ b/chromium/third_party/WebKit/Source/core/css/CSSKeyframeRule.cpp
@@ -54,14 +54,14 @@ void StyleKeyframe::setProperties(PassRefPtr<StylePropertySet> properties)
}
/* static */
-void StyleKeyframe::parseKeyString(const String& s, Vector<double>& keys)
+void StyleKeyframe::parseKeyString(const String& s, Vector<float>& keys)
{
keys.clear();
Vector<String> strings;
s.split(',', strings);
for (size_t i = 0; i < strings.size(); ++i) {
- double key = -1;
+ float key = -1;
String cur = strings[i].stripWhiteSpace();
// For now the syntax MUST be 'xxx%' or 'from' or 'to', where xxx is a legal floating point number
@@ -70,7 +70,7 @@ void StyleKeyframe::parseKeyString(const String& s, Vector<double>& keys)
else if (cur == "to")
key = 1;
else if (cur.endsWith('%')) {
- double k = cur.substring(0, cur.length() - 1).toDouble();
+ float k = cur.substring(0, cur.length() - 1).toFloat();
if (k >= 0 && k <= 100)
key = k / 100;
}
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSKeyframeRule.h b/chromium/third_party/WebKit/Source/core/css/CSSKeyframeRule.h
index a2833a2d954..17a44829661 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSKeyframeRule.h
+++ b/chromium/third_party/WebKit/Source/core/css/CSSKeyframeRule.h
@@ -51,7 +51,7 @@ public:
// invalid string?
void setKeyText(const String& s) { m_key = s; }
- void getKeys(Vector<double>& keys) const { parseKeyString(m_key, keys); }
+ void getKeys(Vector<float>& keys) const { parseKeyString(m_key, keys); }
const StylePropertySet* properties() const { return m_properties.get(); }
MutableStylePropertySet* mutableProperties();
@@ -62,7 +62,7 @@ public:
private:
StyleKeyframe();
- static void parseKeyString(const String&, Vector<double>& keys);
+ static void parseKeyString(const String&, Vector<float>& keys);
RefPtr<StylePropertySet> m_properties;
// FIXME: This should be a parsed vector of floats.
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSKeyframesRule.h b/chromium/third_party/WebKit/Source/core/css/CSSKeyframesRule.h
index be2ba3cef38..cae53c61092 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSKeyframesRule.h
+++ b/chromium/third_party/WebKit/Source/core/css/CSSKeyframesRule.h
@@ -58,7 +58,7 @@ public:
private:
StyleRuleKeyframes();
- explicit StyleRuleKeyframes(const StyleRuleKeyframes&);
+ StyleRuleKeyframes(const StyleRuleKeyframes&);
Vector<RefPtr<StyleKeyframe> > m_keyframes;
AtomicString m_name;
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSLineBoxContainValue.h b/chromium/third_party/WebKit/Source/core/css/CSSLineBoxContainValue.h
index 6e5a050e525..de630498b07 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSLineBoxContainValue.h
+++ b/chromium/third_party/WebKit/Source/core/css/CSSLineBoxContainValue.h
@@ -53,7 +53,7 @@ private:
LineBoxContain m_value;
private:
- explicit CSSLineBoxContainValue(LineBoxContain);
+ CSSLineBoxContainValue(LineBoxContain);
};
} // namespace
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSParser-in.cpp b/chromium/third_party/WebKit/Source/core/css/CSSParser-in.cpp
index ee73ceef792..0e45c5c3823 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSParser-in.cpp
+++ b/chromium/third_party/WebKit/Source/core/css/CSSParser-in.cpp
@@ -2402,16 +2402,6 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
}
return false;
}
- case CSSPropertyAnimationDelay:
- case CSSPropertyAnimationDirection:
- case CSSPropertyAnimationDuration:
- case CSSPropertyAnimationFillMode:
- case CSSPropertyAnimationName:
- case CSSPropertyAnimationPlayState:
- case CSSPropertyAnimationIterationCount:
- case CSSPropertyAnimationTimingFunction:
- if (!RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled())
- break;
case CSSPropertyWebkitAnimationDelay:
case CSSPropertyWebkitAnimationDirection:
case CSSPropertyWebkitAnimationDuration:
@@ -2603,7 +2593,7 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
case CSSPropertyBorder:
// [ 'border-width' || 'border-style' || <color> ] | inherit
{
- if (parseShorthand(propId, parsingShorthandForProperty(CSSPropertyBorder), important)) {
+ if (parseShorthand(propId, borderShorthandForParsing(), important)) {
// The CSS3 Borders and Backgrounds specification says that border also resets border-image. It's as
// though a value of none was specified for the image.
addExpandedPropertyForValue(CSSPropertyBorderImage, cssValuePool().createImplicitInitialValue(), important);
@@ -2667,11 +2657,8 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
return parseShorthand(propId, webkitColumnRuleShorthand(), important);
case CSSPropertyWebkitTextStroke:
return parseShorthand(propId, webkitTextStrokeShorthand(), important);
- case CSSPropertyAnimation:
- if (!RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled())
- break;
case CSSPropertyWebkitAnimation:
- return parseAnimationShorthand(propId, important);
+ return parseAnimationShorthand(important);
case CSSPropertyTransition:
case CSSPropertyWebkitTransition:
return parseTransitionShorthand(propId, important);
@@ -3086,18 +3073,18 @@ void CSSParser::addAnimationValue(RefPtr<CSSValue>& lval, PassRefPtr<CSSValue> r
lval = rval;
}
-bool CSSParser::parseAnimationShorthand(CSSPropertyID propId, bool important)
+bool CSSParser::parseAnimationShorthand(bool important)
{
- const StylePropertyShorthand& animationProperties = parsingShorthandForProperty(propId);
+ const StylePropertyShorthand& animationProperties = webkitAnimationShorthandForParsing();
const unsigned numProperties = 7;
// The list of properties in the shorthand should be the same
// length as the list with animation name in last position, even though they are
// in a different order.
- ASSERT(numProperties == animationProperties.length());
- ASSERT(numProperties == shorthandForProperty(propId).length());
+ ASSERT(numProperties == webkitAnimationShorthandForParsing().length());
+ ASSERT(numProperties == webkitAnimationShorthand().length());
- ShorthandScope scope(this, propId);
+ ShorthandScope scope(this, CSSPropertyWebkitAnimation);
bool parsedProperty[numProperties] = { false };
AnimationParseContext context;
@@ -4463,7 +4450,6 @@ bool CSSParser::parseAnimationProperty(CSSPropertyID propId, RefPtr<CSSValue>& r
}
else {
switch (propId) {
- case CSSPropertyAnimationDelay:
case CSSPropertyWebkitAnimationDelay:
case CSSPropertyTransitionDelay:
case CSSPropertyWebkitTransitionDelay:
@@ -4471,13 +4457,11 @@ bool CSSParser::parseAnimationProperty(CSSPropertyID propId, RefPtr<CSSValue>& r
if (currValue)
m_valueList->next();
break;
- case CSSPropertyAnimationDirection:
case CSSPropertyWebkitAnimationDirection:
currValue = parseAnimationDirection();
if (currValue)
m_valueList->next();
break;
- case CSSPropertyAnimationDuration:
case CSSPropertyWebkitAnimationDuration:
case CSSPropertyTransitionDuration:
case CSSPropertyWebkitTransitionDuration:
@@ -4485,25 +4469,21 @@ bool CSSParser::parseAnimationProperty(CSSPropertyID propId, RefPtr<CSSValue>& r
if (currValue)
m_valueList->next();
break;
- case CSSPropertyAnimationFillMode:
case CSSPropertyWebkitAnimationFillMode:
currValue = parseAnimationFillMode();
if (currValue)
m_valueList->next();
break;
- case CSSPropertyAnimationIterationCount:
case CSSPropertyWebkitAnimationIterationCount:
currValue = parseAnimationIterationCount();
if (currValue)
m_valueList->next();
break;
- case CSSPropertyAnimationName:
case CSSPropertyWebkitAnimationName:
currValue = parseAnimationName();
if (currValue)
m_valueList->next();
break;
- case CSSPropertyAnimationPlayState:
case CSSPropertyWebkitAnimationPlayState:
currValue = parseAnimationPlayState();
if (currValue)
@@ -4517,7 +4497,6 @@ bool CSSParser::parseAnimationProperty(CSSPropertyID propId, RefPtr<CSSValue>& r
if (currValue)
m_valueList->next();
break;
- case CSSPropertyAnimationTimingFunction:
case CSSPropertyWebkitAnimationTimingFunction:
case CSSPropertyTransitionTimingFunction:
case CSSPropertyWebkitTransitionTimingFunction:
@@ -10226,7 +10205,7 @@ inline void CSSParser::detectAtToken(int length, bool hasEscape)
--length;
// charset, font-face, import, media, namespace, page, supports,
- // -webkit-keyframes, keyframes, and -webkit-mediaquery are not affected by hasEscape.
+ // -webkit-keyframes, and -webkit-mediaquery are not affected by hasEscape.
SWITCH(name, length) {
CASE("bottom-left") {
if (LIKELY(!hasEscape))
@@ -10262,9 +10241,6 @@ inline void CSSParser::detectAtToken(int length, bool hasEscape)
m_parsingMode = MediaQueryMode;
m_token = IMPORT_SYM;
}
- CASE("keyframes") {
- m_token = WEBKIT_KEYFRAMES_SYM;
- }
CASE("left-top") {
if (LIKELY(!hasEscape))
m_token = LEFTTOP_SYM;
@@ -11508,7 +11484,7 @@ StyleKeyframe* CSSParser::createKeyframe(CSSParserValueList* keys)
StringBuilder keyString;
for (unsigned i = 0; i < keys->size(); ++i) {
ASSERT(keys->valueAt(i)->unit == CSSPrimitiveValue::CSS_NUMBER);
- double key = keys->valueAt(i)->fValue;
+ float key = static_cast<float>(keys->valueAt(i)->fValue);
if (key < 0 || key > 100) {
// As per http://www.w3.org/TR/css3-animations/#keyframes,
// "If a keyframe selector specifies negative percentage values
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSParser.h b/chromium/third_party/WebKit/Source/core/css/CSSParser.h
index ce4532832fc..1f0ff6a0644 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSParser.h
+++ b/chromium/third_party/WebKit/Source/core/css/CSSParser.h
@@ -167,7 +167,7 @@ public:
bool parseCubicBezierTimingFunctionValue(CSSParserValueList*& args, double& result);
bool parseAnimationProperty(CSSPropertyID, RefPtr<CSSValue>&, AnimationParseContext&);
bool parseTransitionShorthand(CSSPropertyID, bool important);
- bool parseAnimationShorthand(CSSPropertyID, bool important);
+ bool parseAnimationShorthand(bool important);
PassRefPtr<CSSValue> parseColumnWidth();
PassRefPtr<CSSValue> parseColumnCount();
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSProperty.cpp b/chromium/third_party/WebKit/Source/core/css/CSSProperty.cpp
index 57912167f4e..9fee7be3cd0 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSProperty.cpp
+++ b/chromium/third_party/WebKit/Source/core/css/CSSProperty.cpp
@@ -361,15 +361,6 @@ bool CSSProperty::isInheritedProperty(CSSPropertyID propertyID)
case CSSPropertyWordWrap:
case CSSPropertyWritingMode:
return true;
- case CSSPropertyAnimation:
- case CSSPropertyAnimationDelay:
- case CSSPropertyAnimationDirection:
- case CSSPropertyAnimationDuration:
- case CSSPropertyAnimationFillMode:
- case CSSPropertyAnimationIterationCount:
- case CSSPropertyAnimationName:
- case CSSPropertyAnimationPlayState:
- case CSSPropertyAnimationTimingFunction:
case CSSPropertyAlignmentBaseline:
case CSSPropertyBackground:
case CSSPropertyBackgroundAttachment:
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSProperty.h b/chromium/third_party/WebKit/Source/core/css/CSSProperty.h
index fd802ecbe40..a400af1b582 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSProperty.h
+++ b/chromium/third_party/WebKit/Source/core/css/CSSProperty.h
@@ -22,7 +22,6 @@
#define CSSProperty_h
#include "CSSPropertyNames.h"
-#include "RuntimeEnabledFeatures.h"
#include "core/css/CSSValue.h"
#include "core/platform/text/TextDirection.h"
#include "core/platform/text/WritingMode.h"
@@ -90,38 +89,8 @@ private:
inline CSSPropertyID prefixingVariantForPropertyId(CSSPropertyID propId)
{
- if (!RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled() && (propId >= CSSPropertyWebkitAnimation && propId <= CSSPropertyAnimationTimingFunction))
- return propId;
-
CSSPropertyID propertyId = CSSPropertyInvalid;
switch (propId) {
- case CSSPropertyAnimation:
- propertyId = CSSPropertyWebkitAnimation;
- break;
- case CSSPropertyAnimationDelay:
- propertyId = CSSPropertyWebkitAnimationDelay;
- break;
- case CSSPropertyAnimationDirection:
- propertyId = CSSPropertyWebkitAnimationDirection;
- break;
- case CSSPropertyAnimationDuration:
- propertyId = CSSPropertyWebkitAnimationDuration;
- break;
- case CSSPropertyAnimationFillMode:
- propertyId = CSSPropertyWebkitAnimationFillMode;
- break;
- case CSSPropertyAnimationIterationCount:
- propertyId = CSSPropertyWebkitAnimationIterationCount;
- break;
- case CSSPropertyAnimationName:
- propertyId = CSSPropertyWebkitAnimationName;
- break;
- case CSSPropertyAnimationPlayState:
- propertyId = CSSPropertyWebkitAnimationPlayState;
- break;
- case CSSPropertyAnimationTimingFunction:
- propertyId = CSSPropertyWebkitAnimationTimingFunction;
- break;
case CSSPropertyTransitionDelay:
propertyId = CSSPropertyWebkitTransitionDelay;
break;
@@ -137,33 +106,6 @@ inline CSSPropertyID prefixingVariantForPropertyId(CSSPropertyID propId)
case CSSPropertyTransition:
propertyId = CSSPropertyWebkitTransition;
break;
- case CSSPropertyWebkitAnimation:
- propertyId = CSSPropertyAnimation;
- break;
- case CSSPropertyWebkitAnimationDelay:
- propertyId = CSSPropertyAnimationDelay;
- break;
- case CSSPropertyWebkitAnimationDirection:
- propertyId = CSSPropertyAnimationDirection;
- break;
- case CSSPropertyWebkitAnimationDuration:
- propertyId = CSSPropertyAnimationDuration;
- break;
- case CSSPropertyWebkitAnimationFillMode:
- propertyId = CSSPropertyAnimationFillMode;
- break;
- case CSSPropertyWebkitAnimationIterationCount:
- propertyId = CSSPropertyAnimationIterationCount;
- break;
- case CSSPropertyWebkitAnimationName:
- propertyId = CSSPropertyAnimationName;
- break;
- case CSSPropertyWebkitAnimationPlayState:
- propertyId = CSSPropertyAnimationPlayState;
- break;
- case CSSPropertyWebkitAnimationTimingFunction:
- propertyId = CSSPropertyAnimationTimingFunction;
- break;
case CSSPropertyWebkitTransitionDelay:
propertyId = CSSPropertyTransitionDelay;
break;
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSPropertyNames.in b/chromium/third_party/WebKit/Source/core/css/CSSPropertyNames.in
index 1a982238083..11f385b451a 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSPropertyNames.in
+++ b/chromium/third_party/WebKit/Source/core/css/CSSPropertyNames.in
@@ -19,15 +19,6 @@ display
-webkit-animation-name
-webkit-animation-play-state
-webkit-animation-timing-function
-animation
-animation-delay
-animation-direction
-animation-duration
-animation-fill-mode
-animation-iteration-count
-animation-name
-animation-play-state
-animation-timing-function
-webkit-transition
-webkit-transition-delay
-webkit-transition-duration
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSSVGDocumentValue.cpp b/chromium/third_party/WebKit/Source/core/css/CSSSVGDocumentValue.cpp
index 85886e2374e..38a9874f755 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSSVGDocumentValue.cpp
+++ b/chromium/third_party/WebKit/Source/core/css/CSSSVGDocumentValue.cpp
@@ -29,9 +29,9 @@
#include "FetchInitiatorTypeNames.h"
#include "core/css/CSSParser.h"
#include "core/dom/Document.h"
-#include "core/fetch/DocumentResource.h"
-#include "core/fetch/FetchRequest.h"
-#include "core/fetch/ResourceFetcher.h"
+#include "core/loader/cache/DocumentResource.h"
+#include "core/loader/cache/FetchRequest.h"
+#include "core/loader/cache/ResourceFetcher.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSSVGDocumentValue.h b/chromium/third_party/WebKit/Source/core/css/CSSSVGDocumentValue.h
index 7e43406ffb5..5f132211c9c 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSSVGDocumentValue.h
+++ b/chromium/third_party/WebKit/Source/core/css/CSSSVGDocumentValue.h
@@ -26,8 +26,8 @@
#define CSSSVGDocumentValue_h
#include "core/css/CSSValue.h"
-#include "core/fetch/DocumentResource.h"
-#include "core/fetch/ResourcePtr.h"
+#include "core/loader/cache/DocumentResource.h"
+#include "core/loader/cache/ResourcePtr.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSShaderValue.cpp b/chromium/third_party/WebKit/Source/core/css/CSSShaderValue.cpp
index bc8ce082d3e..a21af14661f 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSShaderValue.cpp
+++ b/chromium/third_party/WebKit/Source/core/css/CSSShaderValue.cpp
@@ -34,8 +34,8 @@
#include "FetchInitiatorTypeNames.h"
#include "core/css/CSSParser.h"
#include "core/dom/Document.h"
-#include "core/fetch/FetchRequest.h"
-#include "core/fetch/ResourceFetcher.h"
+#include "core/loader/cache/FetchRequest.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/rendering/style/StyleFetchedShader.h"
#include "core/rendering/style/StylePendingShader.h"
#include "wtf/text/StringBuilder.h"
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSShorthands.in b/chromium/third_party/WebKit/Source/core/css/CSSShorthands.in
index 9738a793d4d..04f9a632375 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSShorthands.in
+++ b/chromium/third_party/WebKit/Source/core/css/CSSShorthands.in
@@ -3,7 +3,6 @@
// followed by the longhands associated to the shorthand.
// Note: Mandatory blank line to skip parameter parsing phase
-animation longhands=animation-name;animation-duration;animation-timing-function;animation-delay;animation-iteration-count;animation-direction;animation-fill-mode, runtimeEnabledShorthand=CSSAnimationUnprefixed
background longhands=background-image;background-position-x;background-position-y;background-size;background-repeat-x;background-repeat-y;background-attachment;background-origin;background-clip;background-color
background-position longhands=background-position-x;background-position-y
background-repeat longhands=background-repeat-x;background-repeat-y
diff --git a/chromium/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp b/chromium/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp
index 42e71e531f9..413c80ea910 100644
--- a/chromium/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp
+++ b/chromium/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp
@@ -272,8 +272,8 @@ static bool deviceAspectRatioMediaFeatureEval(CSSValue* value, RenderStyle*, Fra
static bool evalResolution(CSSValue* value, Frame* frame, MediaFeaturePrefix op)
{
- // FIXME: Possibly handle other media types than 'screen' and 'print'.
- float actualResolution = 0;
+ // FIXME: Possible handle other media types than 'screen' and 'print'.
+ float deviceScaleFactor = 0;
// This checks the actual media type applied to the document, and we know
// this method only got called if this media type matches the one defined
@@ -281,16 +281,16 @@ static bool evalResolution(CSSValue* value, Frame* frame, MediaFeaturePrefix op)
// media type of the query will either be "print" or "all".
String mediaType = frame->view()->mediaType();
if (equalIgnoringCase(mediaType, "screen"))
- actualResolution = clampTo<float>(frame->devicePixelRatio());
+ deviceScaleFactor = frame->page()->deviceScaleFactor();
else if (equalIgnoringCase(mediaType, "print")) {
// The resolution of images while printing should not depend on the DPI
// of the screen. Until we support proper ways of querying this info
// we use 300px which is considered minimum for current printers.
- actualResolution = 300 / cssPixelsPerInch;
+ deviceScaleFactor = 300 / cssPixelsPerInch;
}
if (!value)
- return !!actualResolution;
+ return !!deviceScaleFactor;
if (!value->isPrimitiveValue())
return false;
@@ -298,7 +298,7 @@ static bool evalResolution(CSSValue* value, Frame* frame, MediaFeaturePrefix op)
CSSPrimitiveValue* resolution = toCSSPrimitiveValue(value);
if (resolution->isNumber())
- return compareValue(actualResolution, resolution->getFloatValue(), op);
+ return compareValue(deviceScaleFactor, resolution->getFloatValue(), op);
if (!resolution->isResolution())
return false;
@@ -310,11 +310,11 @@ static bool evalResolution(CSSValue* value, Frame* frame, MediaFeaturePrefix op)
// approximates the reference pixel". With that in mind, allowing 2 decimal
// point precision seems appropriate.
return compareValue(
- floorf(0.5 + 100 * actualResolution) / 100,
+ floorf(0.5 + 100 * deviceScaleFactor) / 100,
floorf(0.5 + 100 * resolution->getFloatValue(CSSPrimitiveValue::CSS_DPPX)) / 100, op);
}
- return compareValue(actualResolution, resolution->getFloatValue(CSSPrimitiveValue::CSS_DPPX), op);
+ return compareValue(deviceScaleFactor, resolution->getFloatValue(CSSPrimitiveValue::CSS_DPPX), op);
}
static bool devicePixelRatioMediaFeatureEval(CSSValue *value, RenderStyle*, Frame* frame, MediaFeaturePrefix op)
diff --git a/chromium/third_party/WebKit/Source/core/css/StyleInvalidationAnalysis.cpp b/chromium/third_party/WebKit/Source/core/css/StyleInvalidationAnalysis.cpp
index 9dea9bac2be..25773727488 100644
--- a/chromium/third_party/WebKit/Source/core/css/StyleInvalidationAnalysis.cpp
+++ b/chromium/third_party/WebKit/Source/core/css/StyleInvalidationAnalysis.cpp
@@ -88,34 +88,18 @@ static bool hasDistributedRule(StyleSheetContents* styleSheetContents)
return false;
}
-static bool hasAtHostRule(StyleSheetContents* styleSheetContents)
-{
- const Vector<RefPtr<StyleRuleBase> >& rules = styleSheetContents->childRules();
- for (unsigned i = 0; i < rules.size(); i++) {
- const StyleRuleBase* rule = rules[i].get();
- if (rule->isHostRule())
- return true;
- }
- return false;
-}
-
static Node* determineScopingNodeForStyleScoped(HTMLStyleElement* ownerElement, StyleSheetContents* styleSheetContents)
{
ASSERT(ownerElement && ownerElement->isRegisteredAsScoped());
- if (ownerElement->isInShadowTree()) {
- if (hasDistributedRule(styleSheetContents)) {
- ContainerNode* scope = ownerElement;
- do {
- scope = scope->containingShadowRoot()->shadowHost();
- } while (scope->isInShadowTree());
+ if (ownerElement->isInShadowTree() && hasDistributedRule(styleSheetContents)) {
+ ContainerNode* scope = ownerElement;
+ do {
+ scope = scope->containingShadowRoot()->shadowHost();
+ } while (scope->isInShadowTree());
- return scope;
- }
- if (ownerElement->isRegisteredAsScoped() && hasAtHostRule(styleSheetContents))
- return ownerElement->containingShadowRoot()->shadowHost();
+ return scope;
}
-
return ownerElement->isRegisteredInShadowRoot() ? ownerElement->containingShadowRoot()->shadowHost() : ownerElement->parentNode();
}
diff --git a/chromium/third_party/WebKit/Source/core/css/StylePropertyShorthandCustom.cpp b/chromium/third_party/WebKit/Source/core/css/StylePropertyShorthandCustom.cpp
index 1e6e628c340..e49efe5739f 100644
--- a/chromium/third_party/WebKit/Source/core/css/StylePropertyShorthandCustom.cpp
+++ b/chromium/third_party/WebKit/Source/core/css/StylePropertyShorthandCustom.cpp
@@ -36,30 +36,6 @@ const StylePropertyShorthand& borderShorthandForParsing()
return borderForParsingLonghands;
}
-const StylePropertyShorthand& animationShorthandForParsing()
-{
- // When we parse the animation shorthand we need to look for animation-name
- // last because otherwise it might match against the keywords for fill mode,
- // timing functions and infinite iteration. This means that animation names
- // that are the same as keywords (e.g. 'forwards') won't always match in the
- // shorthand. In that case the authors should be using longhands (or
- // reconsidering their approach). This is covered by the animations spec
- // bug: https://www.w3.org/Bugs/Public/show_bug.cgi?id=14790
- // And in the spec (editor's draft) at:
- // http://dev.w3.org/csswg/css3-animations/#animation-shorthand-property
- static const CSSPropertyID animationPropertiesForParsing[] = {
- CSSPropertyAnimationDuration,
- CSSPropertyAnimationTimingFunction,
- CSSPropertyAnimationDelay,
- CSSPropertyAnimationIterationCount,
- CSSPropertyAnimationDirection,
- CSSPropertyAnimationFillMode,
- CSSPropertyAnimationName
- };
- DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitAnimationLonghandsForParsing, (CSSPropertyAnimation, animationPropertiesForParsing, WTF_ARRAY_LENGTH(animationPropertiesForParsing)));
- return webkitAnimationLonghandsForParsing;
-}
-
const StylePropertyShorthand& webkitAnimationShorthandForParsing()
{
// When we parse the animation shorthand we need to look for animation-name
@@ -84,21 +60,6 @@ const StylePropertyShorthand& webkitAnimationShorthandForParsing()
return webkitAnimationLonghandsForParsing;
}
-// Returns an empty list if the property is not a shorthand, otherwise the list of longhands for parsing.
-const StylePropertyShorthand& parsingShorthandForProperty(CSSPropertyID propertyID)
-{
- switch (propertyID) {
- case CSSPropertyAnimation:
- return animationShorthandForParsing();
- case CSSPropertyBorder:
- return borderShorthandForParsing();
- case CSSPropertyWebkitAnimation:
- return webkitAnimationShorthandForParsing();
- default:
- return shorthandForProperty(propertyID);
- }
-}
-
bool isExpandedShorthand(CSSPropertyID id)
{
// The system fonts bypass the normal style resolution by using RenderTheme,
diff --git a/chromium/third_party/WebKit/Source/core/css/StyleRuleImport.cpp b/chromium/third_party/WebKit/Source/core/css/StyleRuleImport.cpp
index 15d3d5ba498..cf728136525 100644
--- a/chromium/third_party/WebKit/Source/core/css/StyleRuleImport.cpp
+++ b/chromium/third_party/WebKit/Source/core/css/StyleRuleImport.cpp
@@ -25,9 +25,9 @@
#include "FetchInitiatorTypeNames.h"
#include "core/css/StyleSheetContents.h"
#include "core/dom/Document.h"
-#include "core/fetch/CSSStyleSheetResource.h"
-#include "core/fetch/FetchRequest.h"
-#include "core/fetch/ResourceFetcher.h"
+#include "core/loader/cache/CSSStyleSheetResource.h"
+#include "core/loader/cache/FetchRequest.h"
+#include "core/loader/cache/ResourceFetcher.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/css/StyleRuleImport.h b/chromium/third_party/WebKit/Source/core/css/StyleRuleImport.h
index c44253f53c9..40412e398c3 100644
--- a/chromium/third_party/WebKit/Source/core/css/StyleRuleImport.h
+++ b/chromium/third_party/WebKit/Source/core/css/StyleRuleImport.h
@@ -23,8 +23,8 @@
#define StyleRuleImport_h
#include "core/css/StyleRule.h"
-#include "core/fetch/ResourcePtr.h"
-#include "core/fetch/StyleSheetResourceClient.h"
+#include "core/loader/cache/ResourcePtr.h"
+#include "core/loader/cache/StyleSheetResourceClient.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/css/StyleSheetContents.cpp b/chromium/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
index b99216d84a2..163276bf41a 100644
--- a/chromium/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
+++ b/chromium/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
@@ -28,7 +28,7 @@
#include "core/css/StyleRule.h"
#include "core/css/StyleRuleImport.h"
#include "core/dom/Node.h"
-#include "core/fetch/CSSStyleSheetResource.h"
+#include "core/loader/cache/CSSStyleSheetResource.h"
#include "weborigin/SecurityOrigin.h"
#include "wtf/Deque.h"
diff --git a/chromium/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp b/chromium/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp
index 208325e19e1..8fc95356f4a 100644
--- a/chromium/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp
+++ b/chromium/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp
@@ -32,7 +32,6 @@
#include "core/css/resolver/AnimatedStyleBuilder.h"
#include "core/animation/AnimatableNumber.h"
-#include "core/animation/AnimatableTransform.h"
#include "core/animation/AnimatableUnknown.h"
#include "core/animation/AnimatableValue.h"
#include "core/css/resolver/StyleBuilder.h"
@@ -123,9 +122,6 @@ void AnimatedStyleBuilder::applyProperty(CSSPropertyID property, StyleResolverSt
case CSSPropertyWebkitPerspectiveOriginY:
style->setPerspectiveOriginY(animatableValueToLength(value, state));
return;
- case CSSPropertyWebkitTransform:
- style->setTransform(toAnimatableTransform(value)->transformOperations());
- return;
case CSSPropertyWebkitTransformOriginX:
style->setTransformOriginX(animatableValueToLength(value, state));
return;
diff --git a/chromium/third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.cpp b/chromium/third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.cpp
index d3899ad1042..ee83ce26fad 100644
--- a/chromium/third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.cpp
+++ b/chromium/third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.cpp
@@ -56,11 +56,64 @@ namespace WebCore {
using namespace HTMLNames;
+static const unsigned cStyleSearchThreshold = 10;
+static const unsigned cStyleSearchLevelThreshold = 10;
+
static inline bool parentElementPreventsSharing(const Element* parentElement)
{
+ if (!parentElement)
+ return false;
return parentElement->hasFlagsSetDuringStylingOfChildren();
}
+Node* SharedStyleFinder::locateCousinList(Element* parent, unsigned& visitedNodeCount) const
+{
+ if (visitedNodeCount >= cStyleSearchThreshold * cStyleSearchLevelThreshold)
+ return 0;
+ if (!parent || !parent->isStyledElement())
+ return 0;
+ if (parent->hasScopedHTMLStyleChild())
+ return 0;
+ if (parent->inlineStyle())
+ return 0;
+ if (parent->isSVGElement() && toSVGElement(parent)->animatedSMILStyleProperties())
+ return 0;
+ if (parent->hasID() && m_features.idsInRules.contains(parent->idForStyleResolution().impl()))
+ return 0;
+ if (isShadowHost(parent) && parent->shadow()->containsActiveStyles())
+ return 0;
+
+ RenderStyle* parentStyle = parent->renderStyle();
+ unsigned subcount = 0;
+ Node* thisCousin = parent;
+ Node* currentNode = parent->previousSibling();
+
+ // Reserve the tries for this level. This effectively makes sure that the algorithm
+ // will never go deeper than cStyleSearchLevelThreshold levels into recursion.
+ visitedNodeCount += cStyleSearchThreshold;
+ while (thisCousin) {
+ while (currentNode) {
+ ++subcount;
+ if (!currentNode->hasScopedHTMLStyleChild() && currentNode->renderStyle() == parentStyle && currentNode->lastChild()
+ && currentNode->isElementNode() && !parentElementPreventsSharing(toElement(currentNode))
+ && !toElement(currentNode)->shadow()
+ ) {
+ // Adjust for unused reserved tries.
+ visitedNodeCount -= cStyleSearchThreshold - subcount;
+ return currentNode->lastChild();
+ }
+ if (subcount >= cStyleSearchThreshold)
+ return 0;
+ currentNode = currentNode->previousSibling();
+ }
+ currentNode = locateCousinList(thisCousin->parentElement(), visitedNodeCount);
+ thisCousin = currentNode;
+ }
+
+ return 0;
+}
+
+
bool SharedStyleFinder::canShareStyleWithControl(const ElementResolveContext& context, Element* element) const
{
if (!element->hasTagName(inputTag) || !context.element()->hasTagName(inputTag))
@@ -161,16 +214,9 @@ bool SharedStyleFinder::sharingCandidateHasIdenticalStyleAffectingAttributes(con
bool SharedStyleFinder::canShareStyleWithElement(const ElementResolveContext& context, Element* element) const
{
- if (context.element() == element)
- return false;
- Element* parent = element->parentElement();
RenderStyle* style = element->renderStyle();
if (!style)
return false;
- if (!parent)
- return false;
- if (context.element()->parentElement()->renderStyle() != parent->renderStyle())
- return false;
if (style->unique())
return false;
if (style->hasUniquePseudoStyle())
@@ -250,24 +296,22 @@ bool SharedStyleFinder::canShareStyleWithElement(const ElementResolveContext& co
return false;
}
- if (context.element()->parentElement() != parent) {
- if (!parent->isStyledElement())
- return false;
- if (parent->hasScopedHTMLStyleChild())
- return false;
- if (parent->inlineStyle())
- return false;
- if (parent->isSVGElement() && toSVGElement(parent)->animatedSMILStyleProperties())
- return false;
- if (parent->hasID() && m_features.idsInRules.contains(parent->idForStyleResolution().impl()))
- return false;
- if (parentElementPreventsSharing(parent))
- return false;
- }
-
return true;
}
+inline Element* SharedStyleFinder::findSiblingForStyleSharing(const ElementResolveContext& context, Node* node, unsigned& count) const
+{
+ for (; node; node = node->previousSibling()) {
+ if (!node->isStyledElement())
+ continue;
+ if (canShareStyleWithElement(context, toElement(node)))
+ break;
+ if (count++ == cStyleSearchThreshold)
+ return 0;
+ }
+ return toElement(node);
+}
+
#ifdef STYLE_STATS
Element* SharedStyleFinder::searchDocumentForSharedStyle(const ElementResolveContext& context) const
{
@@ -279,28 +323,10 @@ Element* SharedStyleFinder::searchDocumentForSharedStyle(const ElementResolveCon
}
#endif
-inline Element* SharedStyleFinder::findElementForStyleSharing(const ElementResolveContext& context) const
-{
- StyleSharingList& styleSharingList = m_styleResolver->styleSharingList();
- for (StyleSharingList::iterator iter = styleSharingList.begin(); iter != styleSharingList.end(); ++iter) {
- if (canShareStyleWithElement(context, *iter)) {
- Element* element = *iter;
- if (iter != styleSharingList.begin()) {
- // Move the element to the front of the LRU
- styleSharingList.remove(iter);
- styleSharingList.prepend(element);
- }
- return element;
- }
- }
- m_styleResolver->addToStyleSharingList(context.element());
- return 0;
-}
-
RenderStyle* SharedStyleFinder::locateSharedStyle(const ElementResolveContext& context, RenderStyle* newStyle)
{
STYLE_STATS_ADD_SEARCH();
- if (!context.element() || !context.element()->isStyledElement() || !context.element()->parentElement())
+ if (!context.element() || !context.element()->isStyledElement())
return 0;
// If the element has inline style it is probably unique.
@@ -344,7 +370,17 @@ RenderStyle* SharedStyleFinder::locateSharedStyle(const ElementResolveContext& c
// FIXME: This should be an explicit out parameter, instead of a member variable.
m_elementAffectedByClassRules = context.element() && context.element()->hasClass() && classNamesAffectedByRules(context.element()->classNames());
- Element* shareElement = findElementForStyleSharing(context);
+ // Check previous siblings and their cousins.
+ unsigned count = 0;
+ unsigned visitedNodeCount = 0;
+ Element* shareElement = 0;
+ Node* cousinList = context.element()->previousSibling();
+ while (cousinList) {
+ shareElement = findSiblingForStyleSharing(context, cousinList, count);
+ if (shareElement)
+ break;
+ cousinList = locateCousinList(cousinList->parentElement(), visitedNodeCount);
+ }
#ifdef STYLE_STATS
// FIXME: these stats don't to into account whether or not sibling/attribute
diff --git a/chromium/third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.h b/chromium/third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.h
index d407279a588..7734c3665d7 100644
--- a/chromium/third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.h
+++ b/chromium/third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.h
@@ -51,7 +51,8 @@ public:
RenderStyle* locateSharedStyle(const ElementResolveContext&, RenderStyle* newStyle);
private:
- Element* findElementForStyleSharing(const ElementResolveContext&) const;
+ Node* locateCousinList(Element* parent, unsigned& visitedNodeCount) const;
+ Element* findSiblingForStyleSharing(const ElementResolveContext&, Node*, unsigned& count) const;
// Only used when we're collecting stats on styles
Element* searchDocumentForSharedStyle(const ElementResolveContext&) const;
diff --git a/chromium/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp b/chromium/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
index 5f494e42d41..f49afb1a607 100644
--- a/chromium/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/chromium/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -1395,7 +1395,6 @@ void StyleBuilder::oldApplyProperty(CSSPropertyID id, StyleResolverState& state,
state.setLineHeightValue(0);
state.fontBuilder().fromSystemFont(primitiveValue->getValueID(), state.style()->effectiveZoom());
return;
- case CSSPropertyAnimation:
case CSSPropertyBackground:
case CSSPropertyBackgroundPosition:
case CSSPropertyBackgroundRepeat:
@@ -1823,14 +1822,6 @@ void StyleBuilder::oldApplyProperty(CSSPropertyID id, StyleResolverState& state,
}
// These properties are aliased and we already applied the property on the prefixed version.
- case CSSPropertyAnimationDelay:
- case CSSPropertyAnimationDirection:
- case CSSPropertyAnimationDuration:
- case CSSPropertyAnimationFillMode:
- case CSSPropertyAnimationIterationCount:
- case CSSPropertyAnimationName:
- case CSSPropertyAnimationPlayState:
- case CSSPropertyAnimationTimingFunction:
case CSSPropertyTransitionDelay:
case CSSPropertyTransitionDuration:
case CSSPropertyTransitionProperty:
diff --git a/chromium/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp b/chromium/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
index 8070d0f3f27..4ce361fa0a3 100644
--- a/chromium/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
+++ b/chromium/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
@@ -149,8 +149,8 @@ StyleResolver::StyleResolver(Document* document, bool matchAuthorAndUserStyles)
fontSelector()->addFontFaceRule((*it)->fontFaceRule());
}
#endif
-
- styleSheetCollection->appendActiveAuthorStyleSheets(this);
+ m_styleTree.setBuildInDocumentOrder(!styleSheetCollection->hasScopedStyleSheet());
+ appendAuthorStyleSheets(0, styleSheetCollection->activeAuthorStyleSheets());
}
void StyleResolver::appendAuthorStyleSheets(unsigned firstNew, const Vector<RefPtr<CSSStyleSheet> >& styleSheets)
@@ -170,10 +170,7 @@ void StyleResolver::appendAuthorStyleSheets(unsigned firstNew, const Vector<RefP
resolver->addRulesFromSheet(sheet, *m_medium, this);
m_inspectorCSSOMWrappers.collectFromStyleSheetIfNeeded(cssSheet);
}
-}
-void StyleResolver::finishAppendAuthorStyleSheets()
-{
collectFeatures();
if (document()->renderer() && document()->renderer()->style())
@@ -185,6 +182,7 @@ void StyleResolver::finishAppendAuthorStyleSheets()
void StyleResolver::resetAuthorStyle(const ContainerNode* scopingNode)
{
+ m_styleTree.clear();
ScopedStyleResolver* resolver = scopingNode ? m_styleTree.scopedStyleResolverFor(scopingNode) : m_styleTree.scopedStyleResolverForDocument();
if (!resolver)
return;
@@ -192,13 +190,8 @@ void StyleResolver::resetAuthorStyle(const ContainerNode* scopingNode)
m_ruleSets.shadowDistributedRules().reset(scopingNode);
resolver->resetAuthorStyle();
- if (!scopingNode)
- return;
-
- if (scopingNode->isShadowRoot())
- resetAtHostRules(scopingNode);
- if (!resolver->hasOnlyEmptyRuleSets())
+ if (!scopingNode || !resolver->hasOnlyEmptyRuleSets())
return;
m_styleTree.remove(scopingNode);
@@ -243,18 +236,6 @@ void StyleResolver::collectFeatures()
m_uncommonAttributeRuleSet = makeRuleSet(m_features.uncommonAttributeRules);
}
-void StyleResolver::addToStyleSharingList(Element* element)
-{
- if (m_styleSharingList.size() >= styleSharingListSize)
- m_styleSharingList.remove(--m_styleSharingList.end());
- m_styleSharingList.prepend(element);
-}
-
-void StyleResolver::clearStyleSharingList()
-{
- m_styleSharingList.clear();
-}
-
void StyleResolver::pushParentElement(Element* parent)
{
const ContainerNode* parentsParent = parent->parentOrShadowHostElement();
@@ -789,7 +770,7 @@ void StyleResolver::keyframeStylesForAnimation(Element* e, const RenderStyle* el
keyframeValue.addProperties(keyframe->properties());
// Add this keyframe style to all the indicated key times
- Vector<double> keys;
+ Vector<float> keys;
keyframe->getKeys(keys);
for (size_t keyIndex = 0; keyIndex < keys.size(); ++keyIndex) {
keyframeValue.setKey(keys[keyIndex]);
@@ -837,7 +818,7 @@ void StyleResolver::resolveKeyframes(Element* element, const RenderStyle* style,
for (size_t i = 0; i < styleKeyframes.size(); ++i) {
const StyleKeyframe* styleKeyframe = styleKeyframes[i].get();
RefPtr<RenderStyle> keyframeStyle = styleForKeyframe(element, style, styleKeyframe);
- Vector<double> offsets;
+ Vector<float> offsets;
styleKeyframe->getKeys(offsets);
RefPtr<Keyframe> firstOffsetKeyframe;
for (size_t j = 0; j < offsets.size(); ++j) {
@@ -921,7 +902,7 @@ const StylePropertySet* StyleResolver::firstKeyframeStyles(const Element* elemen
for (unsigned i = 0; i < styleKeyframes.size(); ++i) {
const StyleKeyframe* styleKeyframe = styleKeyframes[i].get();
- Vector<double> offsets;
+ Vector<float> offsets;
styleKeyframe->getKeys(offsets);
for (size_t j = 0; j < offsets.size(); ++j) {
if (!offsets[j]) {
diff --git a/chromium/third_party/WebKit/Source/core/css/resolver/StyleResolver.h b/chromium/third_party/WebKit/Source/core/css/resolver/StyleResolver.h
index 15db7d44f56..d9d14e9fc7e 100644
--- a/chromium/third_party/WebKit/Source/core/css/resolver/StyleResolver.h
+++ b/chromium/third_party/WebKit/Source/core/css/resolver/StyleResolver.h
@@ -36,7 +36,6 @@
#include "core/css/resolver/StyleBuilder.h"
#include "core/css/resolver/StyleResolverState.h"
#include "core/css/resolver/StyleResourceLoader.h"
-#include "wtf/Deque.h"
#include "wtf/HashMap.h"
#include "wtf/HashSet.h"
#include "wtf/RefPtr.h"
@@ -86,9 +85,6 @@ enum RuleMatchingBehavior {
MatchOnlyUserAgentRules,
};
-const unsigned styleSharingListSize = 20;
-typedef WTF::Deque<Element*, styleSharingListSize> StyleSharingList;
-
#undef STYLE_STATS
#ifdef STYLE_STATS
@@ -216,9 +212,10 @@ public:
// FIXME: It could be better to call m_ruleSets.appendAuthorStyleSheets() directly after we factor StyleRsolver further.
// https://bugs.webkit.org/show_bug.cgi?id=108890
void appendAuthorStyleSheets(unsigned firstNew, const Vector<RefPtr<CSSStyleSheet> >&);
+ // FIXME: resetAuthorStyle() will be removed when rulesets are reset in a per-scoping node manner.
+ void resetAuthorStyle();
void resetAuthorStyle(const ContainerNode*);
void resetAtHostRules(const ContainerNode*);
- void finishAppendAuthorStyleSheets();
DocumentRuleSets& ruleSets() { return m_ruleSets; }
const DocumentRuleSets& ruleSets() const { return m_ruleSets; }
@@ -279,11 +276,6 @@ public:
const RuleFeatureSet& ruleFeatureSet() const { return m_features; }
- StyleSharingList& styleSharingList() { return m_styleSharingList; }
-
- void addToStyleSharingList(Element*);
- void clearStyleSharingList();
-
#ifdef STYLE_STATS
ALWAYS_INLINE static StyleSharingStats& styleSharingStats() { return m_styleSharingStats; }
#endif
@@ -367,8 +359,6 @@ private:
StyleResourceLoader m_styleResourceLoader;
- StyleSharingList m_styleSharingList;
-
#ifdef STYLE_STATS
static StyleSharingStats m_styleSharingStats;
#endif
diff --git a/chromium/third_party/WebKit/Source/core/css/resolver/StyleResourceLoader.cpp b/chromium/third_party/WebKit/Source/core/css/resolver/StyleResourceLoader.cpp
index 3158763d320..bec09851013 100644
--- a/chromium/third_party/WebKit/Source/core/css/resolver/StyleResourceLoader.cpp
+++ b/chromium/third_party/WebKit/Source/core/css/resolver/StyleResourceLoader.cpp
@@ -29,7 +29,7 @@
#include "core/css/CSSSVGDocumentValue.h"
#include "core/css/CSSShaderValue.h"
#include "core/css/resolver/ElementStyleResources.h"
-#include "core/fetch/ResourceFetcher.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/platform/graphics/filters/custom/CustomFilterOperation.h"
#include "core/rendering/style/ContentData.h"
#include "core/rendering/style/CursorList.h"
diff --git a/chromium/third_party/WebKit/Source/core/dom/Clipboard.cpp b/chromium/third_party/WebKit/Source/core/dom/Clipboard.cpp
index ee98d9f9586..0c7f7252955 100644
--- a/chromium/third_party/WebKit/Source/core/dom/Clipboard.cpp
+++ b/chromium/third_party/WebKit/Source/core/dom/Clipboard.cpp
@@ -26,8 +26,8 @@
#include "config.h"
#include "core/dom/Clipboard.h"
-#include "core/fetch/ImageResource.h"
#include "core/fileapi/FileList.h"
+#include "core/loader/cache/ImageResource.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/dom/Clipboard.h b/chromium/third_party/WebKit/Source/core/dom/Clipboard.h
index bc861ded2e0..a32134b905c 100644
--- a/chromium/third_party/WebKit/Source/core/dom/Clipboard.h
+++ b/chromium/third_party/WebKit/Source/core/dom/Clipboard.h
@@ -27,7 +27,7 @@
#include "bindings/v8/ScriptWrappable.h"
#include "core/dom/ClipboardAccessPolicy.h"
#include "core/dom/Node.h"
-#include "core/fetch/ResourcePtr.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "core/page/DragActions.h"
#include "core/platform/DragImage.h"
#include "core/platform/graphics/IntPoint.h"
diff --git a/chromium/third_party/WebKit/Source/core/dom/ContainerNode.cpp b/chromium/third_party/WebKit/Source/core/dom/ContainerNode.cpp
index 0fb80f01519..1b26b71ed40 100644
--- a/chromium/third_party/WebKit/Source/core/dom/ContainerNode.cpp
+++ b/chromium/third_party/WebKit/Source/core/dom/ContainerNode.cpp
@@ -25,7 +25,6 @@
#include "bindings/v8/ExceptionState.h"
#include "bindings/v8/ExceptionStatePlaceholder.h"
-#include "core/css/resolver/StyleResolver.h"
#include "core/dom/ChildListMutationScope.h"
#include "core/dom/ContainerNodeAlgorithms.h"
#include "core/dom/EventNames.h"
@@ -683,8 +682,6 @@ void ContainerNode::resumePostAttachCallbacks()
if (s_postAttachCallbackQueue)
dispatchPostAttachCallbacks();
- if (StyleResolver* resolver = document()->styleResolverIfExists())
- resolver->clearStyleSharingList();
}
--s_attachDepth;
}
@@ -1039,8 +1036,6 @@ static void updateTreeAfterInsertion(ContainerNode* parent, Node* child, AttachB
child->lazyAttach();
else
child->attach();
- if (StyleResolver* resolver = parent->document()->document()->styleResolverIfExists())
- resolver->clearStyleSharingList();
}
dispatchChildInsertionEvents(child);
diff --git a/chromium/third_party/WebKit/Source/core/dom/CustomElement.cpp b/chromium/third_party/WebKit/Source/core/dom/CustomElement.cpp
index 1e506c5dcd7..6ffcd2a9730 100644
--- a/chromium/third_party/WebKit/Source/core/dom/CustomElement.cpp
+++ b/chromium/third_party/WebKit/Source/core/dom/CustomElement.cpp
@@ -35,7 +35,7 @@
#include "MathMLNames.h"
#include "SVGNames.h"
#include "core/dom/CustomElementCallbackScheduler.h"
-#include "core/dom/CustomElementObserver.h"
+#include "core/dom/CustomElementUpgradeCandidateMap.h"
#include "core/dom/Element.h"
namespace WebCore {
@@ -131,13 +131,12 @@ void CustomElement::wasDestroyed(Element* element)
break;
case Element::UpgradeCandidate:
- CustomElementObserver::notifyElementWasDestroyed(element);
+ CustomElementUpgradeCandidateMap::elementWasDestroyed(element);
break;
case Element::Defined:
case Element::Upgraded:
definitions().remove(element);
- CustomElementObserver::notifyElementWasDestroyed(element);
break;
}
}
diff --git a/chromium/third_party/WebKit/Source/core/dom/CustomElementException.cpp b/chromium/third_party/WebKit/Source/core/dom/CustomElementException.cpp
deleted file mode 100644
index b5752a8c02d..00000000000
--- a/chromium/third_party/WebKit/Source/core/dom/CustomElementException.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name of Google Inc. nor the names of its contributors
- * may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "core/dom/CustomElementException.h"
-
-#include "bindings/v8/ExceptionState.h"
-#include "core/dom/ExceptionCode.h"
-
-namespace WebCore {
-
-String CustomElementException::preamble(const AtomicString& type)
-{
- return "Failed to call 'register' on 'Document' for type '" + type + "': ";
-}
-
-void CustomElementException::throwException(Reason reason, const AtomicString& type, ExceptionState& es)
-{
- switch (reason) {
- case CannotRegisterFromExtension:
- es.throwDOMException(NotSupportedError, preamble(type) + "elements cannot be registered from extensions.");
- return;
-
- case ConstructorPropertyNotConfigurable:
- es.throwDOMException(NotSupportedError, preamble(type) + "prototype constructor property is not configurable.");
- return;
-
- case ContextDestroyedCheckingPrototype:
- es.throwDOMException(InvalidStateError, preamble(type) + "the context is no longer valid.");
- return;
-
- case ContextDestroyedCreatingCallbacks:
- es.throwDOMException(InvalidStateError);
- return;
-
- case ContextDestroyedRegisteringDefinition:
- es.throwDOMException(NotSupportedError);
- return;
-
- case InvalidName:
- es.throwDOMException(InvalidCharacterError, preamble(type) + ": '" + type + "' is not a valid name.");
- return;
-
- case NotYetImplemented:
- es.throwDOMException(InvalidStateError);
- return;
-
- case PrototypeDoesNotExtendHTMLElementSVGElementNamespace:
- es.throwDOMException(NamespaceError, preamble(type) + "the prototype does not extend an HTML or SVG element.");
- return;
-
- case PrototypeDoesNotExtendHTMLElementSVGElementPrototype:
- es.throwDOMException(InvalidStateError, preamble(type) + "the prototype does not extend an HTML or SVG element.");
- return;
-
- case PrototypeInUse:
- es.throwDOMException(NotSupportedError, preamble(type) + "prototype is already in-use as an interface prototype object.");
- return;
-
- case PrototypeNotAnObject:
- es.throwDOMException(InvalidStateError, preamble(type) + "the prototype option is not an object.");
- return;
-
- case TypeAlreadyRegistered:
- es.throwDOMException(InvalidStateError, preamble(type) + "a type with that name is already registered.");
- return;
- }
-
- ASSERT_NOT_REACHED();
-}
-
-} // namespace WebCore
diff --git a/chromium/third_party/WebKit/Source/core/dom/CustomElementException.h b/chromium/third_party/WebKit/Source/core/dom/CustomElementException.h
deleted file mode 100644
index 622ef220699..00000000000
--- a/chromium/third_party/WebKit/Source/core/dom/CustomElementException.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name of Google Inc. nor the names of its contributors
- * may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef CustomElementException_h
-#define CustomElementException_h
-
-#include "wtf/text/AtomicString.h"
-#include "wtf/text/WTFString.h"
-
-namespace WebCore {
-
-class ExceptionState;
-
-class CustomElementException {
-public:
- enum Reason {
- CannotRegisterFromExtension,
- ConstructorPropertyNotConfigurable,
- ContextDestroyedCheckingPrototype,
- ContextDestroyedCreatingCallbacks,
- ContextDestroyedRegisteringDefinition,
- InvalidName,
- NotYetImplemented,
- PrototypeDoesNotExtendHTMLElementSVGElementNamespace,
- PrototypeDoesNotExtendHTMLElementSVGElementPrototype,
- PrototypeInUse,
- PrototypeNotAnObject,
- TypeAlreadyRegistered
- };
-
- static void throwException(Reason, const AtomicString& type, ExceptionState&);
-
-private:
- CustomElementException();
-
- static String preamble(const AtomicString& type);
-};
-
-}
-
-#endif // CustomElementException_h
diff --git a/chromium/third_party/WebKit/Source/core/dom/CustomElementObserver.cpp b/chromium/third_party/WebKit/Source/core/dom/CustomElementObserver.cpp
deleted file mode 100644
index d4a9fba2842..00000000000
--- a/chromium/third_party/WebKit/Source/core/dom/CustomElementObserver.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name of Google Inc. nor the names of its contributors
- * may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "core/dom/CustomElementObserver.h"
-
-namespace WebCore {
-
-CustomElementObserver::ElementObserverMap& CustomElementObserver::elementObservers()
-{
- DEFINE_STATIC_LOCAL(ElementObserverMap, map, ());
- return map;
-}
-
-void CustomElementObserver::notifyElementWasDestroyed(Element* element)
-{
- ElementObserverMap::iterator it = elementObservers().find(element);
- if (it == elementObservers().end())
- return;
- it->value->elementWasDestroyed(element);
-}
-
-void CustomElementObserver::observe(Element* element)
-{
- ElementObserverMap::AddResult result = elementObservers().add(element, this);
- ASSERT(result.isNewEntry);
-}
-
-void CustomElementObserver::unobserve(Element* element)
-{
- CustomElementObserver* observer = elementObservers().take(element);
- ASSERT(observer == this);
-}
-
-} // namespace WebCore
diff --git a/chromium/third_party/WebKit/Source/core/dom/CustomElementObserver.h b/chromium/third_party/WebKit/Source/core/dom/CustomElementObserver.h
deleted file mode 100644
index 39d702e6e92..00000000000
--- a/chromium/third_party/WebKit/Source/core/dom/CustomElementObserver.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name of Google Inc. nor the names of its contributors
- * may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef CustomElementObserver_h
-#define CustomElementObserver_h
-
-#include "wtf/HashMap.h"
-
-namespace WebCore {
-
-class Element;
-
-class CustomElementObserver {
-public:
- CustomElementObserver() { }
- virtual ~CustomElementObserver() { }
-
- // API for CustomElement to kick off notifications
-
- static void notifyElementWasDestroyed(Element*);
-
-protected:
- void observe(Element*);
- void unobserve(Element*);
-
- virtual void elementWasDestroyed(Element* element) { unobserve(element); }
-
-private:
- // Maps elements to the observer watching them. At most one per
- // element at a time.
- typedef HashMap<Element*, CustomElementObserver*> ElementObserverMap;
- static ElementObserverMap& elementObservers();
-};
-
-}
-
-#endif // CustomElementObserver_h
diff --git a/chromium/third_party/WebKit/Source/core/dom/CustomElementRegistry.cpp b/chromium/third_party/WebKit/Source/core/dom/CustomElementRegistry.cpp
index 472cde1e9d2..9d9195cef5a 100644
--- a/chromium/third_party/WebKit/Source/core/dom/CustomElementRegistry.cpp
+++ b/chromium/third_party/WebKit/Source/core/dom/CustomElementRegistry.cpp
@@ -34,11 +34,12 @@
#include "HTMLNames.h"
#include "SVGNames.h"
#include "bindings/v8/CustomElementConstructorBuilder.h"
+#include "bindings/v8/ExceptionState.h"
#include "core/dom/CustomElement.h"
#include "core/dom/CustomElementDefinition.h"
-#include "core/dom/CustomElementException.h"
#include "core/dom/CustomElementRegistrationContext.h"
#include "core/dom/DocumentLifecycleObserver.h"
+#include "core/dom/ExceptionCode.h"
namespace WebCore {
@@ -66,30 +67,31 @@ CustomElementDefinition* CustomElementRegistry::registerElement(Document* docume
// consolidated in one place.
RegistrationContextObserver observer(document);
- AtomicString type = userSuppliedName.lower();
-
if (!constructorBuilder->isFeatureAllowed()) {
- CustomElementException::throwException(CustomElementException::CannotRegisterFromExtension, type, es);
+ es.throwDOMException(NotSupportedError);
return 0;
}
+ AtomicString type = userSuppliedName.lower();
if (!CustomElement::isValidTypeName(type)) {
- CustomElementException::throwException(CustomElementException::InvalidName, type, es);
+ es.throwDOMException(InvalidCharacterError);
return 0;
}
- if (!constructorBuilder->validateOptions(type, es))
+ if (!constructorBuilder->validateOptions()) {
+ es.throwDOMException(InvalidStateError);
return 0;
+ }
QualifiedName tagName = nullQName();
if (!constructorBuilder->findTagName(type, tagName)) {
- CustomElementException::throwException(CustomElementException::PrototypeDoesNotExtendHTMLElementSVGElementNamespace, type, es);
+ es.throwDOMException(NamespaceError);
return 0;
}
ASSERT(tagName.namespaceURI() == HTMLNames::xhtmlNamespaceURI || tagName.namespaceURI() == SVGNames::svgNamespaceURI);
if (m_registeredTypeNames.contains(type)) {
- CustomElementException::throwException(CustomElementException::TypeAlreadyRegistered, type, es);
+ es.throwDOMException(InvalidStateError);
return 0;
}
@@ -100,21 +102,23 @@ CustomElementDefinition* CustomElementRegistry::registerElement(Document* docume
// Consulting the constructor builder could execute script and
// kill the document.
if (observer.registrationContextWentAway()) {
- CustomElementException::throwException(CustomElementException::ContextDestroyedCreatingCallbacks, type, es);
+ es.throwDOMException(InvalidStateError);
return 0;
}
const CustomElementDescriptor descriptor(type, tagName.namespaceURI(), tagName.localName());
RefPtr<CustomElementDefinition> definition = CustomElementDefinition::create(descriptor, lifecycleCallbacks);
- if (!constructorBuilder->createConstructor(document, definition.get(), es))
+ if (!constructorBuilder->createConstructor(document, definition.get())) {
+ es.throwDOMException(NotSupportedError);
return 0;
+ }
m_definitions.add(descriptor, definition);
m_registeredTypeNames.add(descriptor.type());
if (!constructorBuilder->didRegisterDefinition(definition.get())) {
- CustomElementException::throwException(CustomElementException::ContextDestroyedRegisteringDefinition, type, es);
+ es.throwDOMException(NotSupportedError);
return 0;
}
diff --git a/chromium/third_party/WebKit/Source/core/dom/CustomElementUpgradeCandidateMap.cpp b/chromium/third_party/WebKit/Source/core/dom/CustomElementUpgradeCandidateMap.cpp
index 7dda7901d45..c84bcb7dec5 100644
--- a/chromium/third_party/WebKit/Source/core/dom/CustomElementUpgradeCandidateMap.cpp
+++ b/chromium/third_party/WebKit/Source/core/dom/CustomElementUpgradeCandidateMap.cpp
@@ -39,14 +39,14 @@ CustomElementUpgradeCandidateMap::~CustomElementUpgradeCandidateMap()
{
UpgradeCandidateMap::const_iterator::Keys end = m_upgradeCandidates.end().keys();
for (UpgradeCandidateMap::const_iterator::Keys it = m_upgradeCandidates.begin().keys(); it != end; ++it)
- unobserve(*it);
+ unregisterForElementDestructionNotification(*it, this);
}
void CustomElementUpgradeCandidateMap::add(const CustomElementDescriptor& descriptor, Element* element)
{
element->setCustomElementState(Element::UpgradeCandidate);
- observe(element);
+ registerForElementDestructionNotification(element, this);
UpgradeCandidateMap::AddResult result = m_upgradeCandidates.add(element, descriptor);
ASSERT(result.isNewEntry);
@@ -59,18 +59,8 @@ void CustomElementUpgradeCandidateMap::add(const CustomElementDescriptor& descri
void CustomElementUpgradeCandidateMap::remove(Element* element)
{
- unobserve(element);
- removeCommon(element);
-}
-
-void CustomElementUpgradeCandidateMap::elementWasDestroyed(Element* element)
-{
- CustomElementObserver::elementWasDestroyed(element);
- removeCommon(element);
-}
+ unregisterForElementDestructionNotification(element, this);
-void CustomElementUpgradeCandidateMap::removeCommon(Element* element)
-{
UpgradeCandidateMap::iterator candidate = m_upgradeCandidates.find(element);
ASSERT(candidate != m_upgradeCandidates.end());
@@ -85,11 +75,37 @@ ListHashSet<Element*> CustomElementUpgradeCandidateMap::takeUpgradeCandidatesFor
const ListHashSet<Element*>& candidates = m_unresolvedDefinitions.take(descriptor);
for (ElementSet::const_iterator candidate = candidates.begin(); candidate != candidates.end(); ++candidate) {
- unobserve(*candidate);
+ unregisterForElementDestructionNotification(*candidate, this);
m_upgradeCandidates.remove(*candidate);
}
return candidates;
}
+void CustomElementUpgradeCandidateMap::elementWasDestroyed(Element* element)
+{
+ DestructionObserverMap::iterator it = destructionObservers().find(element);
+ if (it == destructionObservers().end())
+ return;
+ it->value->remove(element); // will also remove the destruction observer
+}
+
+CustomElementUpgradeCandidateMap::DestructionObserverMap& CustomElementUpgradeCandidateMap::destructionObservers()
+{
+ DEFINE_STATIC_LOCAL(DestructionObserverMap, map, ());
+ return map;
+}
+
+void CustomElementUpgradeCandidateMap::registerForElementDestructionNotification(Element* element, CustomElementUpgradeCandidateMap* observer)
+{
+ DestructionObserverMap::AddResult result = destructionObservers().add(element, observer);
+ ASSERT(result.isNewEntry);
+}
+
+void CustomElementUpgradeCandidateMap::unregisterForElementDestructionNotification(Element* element, CustomElementUpgradeCandidateMap* observer)
+{
+ CustomElementUpgradeCandidateMap* map = destructionObservers().take(element);
+ ASSERT(map == observer);
+}
+
}
diff --git a/chromium/third_party/WebKit/Source/core/dom/CustomElementUpgradeCandidateMap.h b/chromium/third_party/WebKit/Source/core/dom/CustomElementUpgradeCandidateMap.h
index 0fef2f85969..2814c0a2d20 100644
--- a/chromium/third_party/WebKit/Source/core/dom/CustomElementUpgradeCandidateMap.h
+++ b/chromium/third_party/WebKit/Source/core/dom/CustomElementUpgradeCandidateMap.h
@@ -33,7 +33,6 @@
#include "core/dom/CustomElementDescriptor.h"
#include "core/dom/CustomElementDescriptorHash.h"
-#include "core/dom/CustomElementObserver.h"
#include "wtf/HashMap.h"
#include "wtf/ListHashSet.h"
#include "wtf/Noncopyable.h"
@@ -42,23 +41,26 @@ namespace WebCore {
class Element;
-class CustomElementUpgradeCandidateMap : CustomElementObserver {
+class CustomElementUpgradeCandidateMap {
WTF_MAKE_NONCOPYABLE(CustomElementUpgradeCandidateMap);
public:
CustomElementUpgradeCandidateMap() { }
~CustomElementUpgradeCandidateMap();
- // API for CustomElementRegistrationContext to save and take candidates
-
- typedef ListHashSet<Element*> ElementSet;
+ static void elementWasDestroyed(Element*);
void add(const CustomElementDescriptor&, Element*);
void remove(Element*);
+
+ typedef ListHashSet<Element*> ElementSet;
ElementSet takeUpgradeCandidatesFor(const CustomElementDescriptor&);
private:
- virtual void elementWasDestroyed(Element*) OVERRIDE;
- void removeCommon(Element*);
+ // Maps elements to upgrade candidate maps observing their destruction
+ typedef HashMap<Element*, CustomElementUpgradeCandidateMap*> DestructionObserverMap;
+ static DestructionObserverMap& destructionObservers();
+ static void registerForElementDestructionNotification(Element*, CustomElementUpgradeCandidateMap*);
+ static void unregisterForElementDestructionNotification(Element*, CustomElementUpgradeCandidateMap*);
typedef HashMap<Element*, CustomElementDescriptor> UpgradeCandidateMap;
UpgradeCandidateMap m_upgradeCandidates;
diff --git a/chromium/third_party/WebKit/Source/core/dom/DataTransferItemList.h b/chromium/third_party/WebKit/Source/core/dom/DataTransferItemList.h
index 90d847f886a..91fd9679e1d 100644
--- a/chromium/third_party/WebKit/Source/core/dom/DataTransferItemList.h
+++ b/chromium/third_party/WebKit/Source/core/dom/DataTransferItemList.h
@@ -56,8 +56,8 @@ public:
virtual PassRefPtr<DataTransferItem> item(unsigned long index) = 0;
virtual void deleteItem(unsigned long index, ExceptionState&) = 0;
virtual void clear() = 0;
- virtual PassRefPtr<DataTransferItem> add(const String& data, const String& type, ExceptionState&) = 0;
- virtual PassRefPtr<DataTransferItem> add(PassRefPtr<File>) = 0;
+ virtual void add(const String& data, const String& type, ExceptionState&) = 0;
+ virtual void add(PassRefPtr<File>) = 0;
};
} // namespace WebCore
diff --git a/chromium/third_party/WebKit/Source/core/dom/DataTransferItemList.idl b/chromium/third_party/WebKit/Source/core/dom/DataTransferItemList.idl
index 0babe031c24..eec5c0c5020 100644
--- a/chromium/third_party/WebKit/Source/core/dom/DataTransferItemList.idl
+++ b/chromium/third_party/WebKit/Source/core/dom/DataTransferItemList.idl
@@ -28,13 +28,15 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-interface DataTransferItemList {
+[
+ NoInterfaceObject
+] interface DataTransferItemList {
readonly attribute long length;
- [ImplementedAs=item] getter DataTransferItem (unsigned long index);
+ getter DataTransferItem item([Default=Undefined] optional unsigned long index);
- [RaisesException, ImplementedAs=deleteItem] void remove(unsigned long index);
void clear();
- DataTransferItem add(File? file);
- [RaisesException] DataTransferItem add(DOMString data, DOMString type);
+ void add(File? file);
+ [RaisesException] void add([Default=Undefined] optional DOMString data,
+ [Default=Undefined] optional DOMString type);
};
diff --git a/chromium/third_party/WebKit/Source/core/dom/Document.cpp b/chromium/third_party/WebKit/Source/core/dom/Document.cpp
index 82367ea555d..62dee7a7bbf 100644
--- a/chromium/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/chromium/third_party/WebKit/Source/core/dom/Document.cpp
@@ -51,7 +51,6 @@
#include "core/css/StyleSheetList.h"
#include "core/css/resolver/StyleResolver.h"
#include "core/dom/Attr.h"
-#include "core/dom/BeforeUnloadEvent.h"
#include "core/dom/CDATASection.h"
#include "core/dom/Comment.h"
#include "core/dom/ContextFeatures.h"
@@ -98,7 +97,6 @@
#include "core/dom/shadow/ShadowRoot.h"
#include "core/editing/Editor.h"
#include "core/editing/FrameSelection.h"
-#include "core/fetch/ResourceFetcher.h"
#include "core/html/FormController.h"
#include "core/html/HTMLAllCollection.h"
#include "core/html/HTMLAnchorElement.h"
@@ -110,7 +108,6 @@
#include "core/html/HTMLHtmlElement.h"
#include "core/html/HTMLIFrameElement.h"
#include "core/html/HTMLImport.h"
-#include "core/html/HTMLInputElement.h"
#include "core/html/HTMLLinkElement.h"
#include "core/html/HTMLNameCollection.h"
#include "core/html/HTMLScriptElement.h"
@@ -131,6 +128,7 @@
#include "core/loader/Prerenderer.h"
#include "core/loader/TextResourceDecoder.h"
#include "core/loader/appcache/ApplicationCacheHost.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/page/Chrome.h"
#include "core/page/ChromeClient.h"
#include "core/page/ContentSecurityPolicy.h"
@@ -146,6 +144,7 @@
#include "core/page/PageConsole.h"
#include "core/page/PointerLockController.h"
#include "core/page/Settings.h"
+#include "core/page/ValidationMessageClient.h"
#include "core/page/animation/AnimationController.h"
#include "core/page/scrolling/ScrollingCoordinator.h"
#include "core/platform/DateComponents.h"
@@ -436,7 +435,6 @@ Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC
, m_referrerPolicy(ReferrerPolicyDefault)
, m_directionSetOnDocumentElement(false)
, m_writingModeSetOnDocumentElement(false)
- , m_didAllowNavigationViaBeforeUnloadConfirmationPanel(false)
, m_writeRecursionIsTooDeep(false)
, m_writeRecursionDepth(0)
, m_wheelEventHandlerCount(0)
@@ -1088,11 +1086,8 @@ void Document::setReadyState(ReadyState readyState)
m_documentTiming.domLoading = monotonicallyIncreasingTime();
break;
case Interactive:
- if (!m_documentTiming.domInteractive) {
+ if (!m_documentTiming.domInteractive)
m_documentTiming.domInteractive = monotonicallyIncreasingTime();
- if (RuntimeEnabledFeatures::webAnimationsEnabled())
- m_timeline->setZeroTimeAsPerfTime(m_documentTiming.domInteractive);
- }
break;
case Complete:
if (!m_documentTiming.domComplete)
@@ -1298,7 +1293,6 @@ void Document::updateTitle(const StringWithDirection& title)
m_rawTitle = title;
- StringWithDirection oldTitle = m_title;
if (m_rawTitle.string().isEmpty())
m_title = StringWithDirection();
else {
@@ -1307,11 +1301,8 @@ void Document::updateTitle(const StringWithDirection& title)
else
m_title = canonicalizedTitle<UChar>(this, m_rawTitle);
}
-
- if (!m_frame || oldTitle == m_title)
- return;
- m_frame->loader()->history()->setCurrentItemTitle(m_title);
- m_frame->loader()->client()->dispatchDidReceiveTitle(m_title);
+ if (Frame* f = frame())
+ f->loader()->setTitle(m_title);
}
void Document::setTitle(const String& title)
@@ -1680,10 +1671,8 @@ void Document::recalcStyle(StyleChange change)
m_inStyleRecalc = false;
// Pseudo element removal and similar may only work with these flags still set. Reset them after the style recalc.
- if (m_styleResolver) {
+ if (m_styleResolver)
m_styleSheetCollection->resetCSSFeatureFlags(m_styleResolver->ruleFeatureSet());
- m_styleResolver->clearStyleSharingList();
- }
if (frameView) {
frameView->resumeScheduledEvents();
@@ -1899,8 +1888,11 @@ void Document::detach(const AttachContext& context)
{
ASSERT(attached());
- if (page())
- page()->documentDetached(this);
+ if (page()) {
+ page()->pointerLockController()->documentDetached(this);
+ if (ValidationMessageClient* client = page()->validationMessageClient())
+ client->documentDetached(*this);
+ }
if (this == topDocument())
clearAXObjectCache();
@@ -2330,95 +2322,6 @@ void Document::implicitClose()
accessSVGExtensions()->startAnimations();
}
-bool Document::dispatchBeforeUnloadEvent(Chrome& chrome, Document* navigatingDocument)
-{
- if (!m_domWindow)
- return true;
-
- if (!body())
- return true;
-
- RefPtr<Document> protect(this);
-
- RefPtr<BeforeUnloadEvent> beforeUnloadEvent = BeforeUnloadEvent::create();
- m_loadEventProgress = BeforeUnloadEventInProgress;
- dispatchWindowEvent(beforeUnloadEvent.get(), this);
- m_loadEventProgress = BeforeUnloadEventCompleted;
- if (!beforeUnloadEvent->defaultPrevented())
- defaultEventHandler(beforeUnloadEvent.get());
- if (beforeUnloadEvent->result().isNull())
- return true;
-
- if (navigatingDocument->m_didAllowNavigationViaBeforeUnloadConfirmationPanel) {
- addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Blocked attempt to show multiple 'beforeunload' confirmation panels for a single navigation.");
- return true;
- }
-
- String text = displayStringModifiedByEncoding(beforeUnloadEvent->result());
- if (chrome.runBeforeUnloadConfirmPanel(text, m_frame)) {
- navigatingDocument->m_didAllowNavigationViaBeforeUnloadConfirmationPanel = true;
- return true;
- }
- return false;
-}
-
-void Document::dispatchUnloadEvents()
-{
- RefPtr<Document> protect(this);
- if (m_parser)
- m_parser->stopParsing();
-
- if (m_loadEventProgress >= LoadEventTried && m_loadEventProgress <= UnloadEventInProgress) {
- Element* currentFocusedElement = focusedElement();
- if (currentFocusedElement && currentFocusedElement->hasTagName(inputTag))
- toHTMLInputElement(currentFocusedElement)->endEditing();
- if (m_loadEventProgress < PageHideInProgress) {
- m_loadEventProgress = PageHideInProgress;
- dispatchWindowEvent(PageTransitionEvent::create(eventNames().pagehideEvent, false), this);
- if (!m_frame)
- return;
-
- // The DocumentLoader (and thus its DocumentLoadTiming) might get destroyed
- // while dispatching the event, so protect it to prevent writing the end
- // time into freed memory.
- RefPtr<DocumentLoader> documentLoader = m_frame->loader()->provisionalDocumentLoader();
- m_loadEventProgress = UnloadEventInProgress;
- RefPtr<Event> unloadEvent(Event::create(eventNames().unloadEvent, false, false));
- if (documentLoader && !documentLoader->timing()->unloadEventStart() && !documentLoader->timing()->unloadEventEnd()) {
- DocumentLoadTiming* timing = documentLoader->timing();
- ASSERT(timing->navigationStart());
- timing->markUnloadEventStart();
- dispatchWindowEvent(unloadEvent, this);
- timing->markUnloadEventEnd();
- } else {
- m_frame->domWindow()->dispatchEvent(unloadEvent, m_frame->document());
- }
- }
- updateStyleIfNeeded();
- m_loadEventProgress = UnloadEventHandled;
- }
-
- if (!m_frame)
- return;
-
- // Don't remove event listeners from a transitional empty document (see https://bugs.webkit.org/show_bug.cgi?id=28716 for more information).
- bool keepEventListeners = m_frame->loader()->stateMachine()->isDisplayingInitialEmptyDocument() && m_frame->loader()->provisionalDocumentLoader()
- && isSecureTransitionTo(m_frame->loader()->provisionalDocumentLoader()->url());
- if (!keepEventListeners)
- removeAllEventListeners();
-}
-
-Document::PageDismissalType Document::pageDismissalEventBeingDispatched() const
-{
- if (m_loadEventProgress == BeforeUnloadEventInProgress)
- return BeforeUnloadDismissal;
- if (m_loadEventProgress == PageHideInProgress)
- return PageHideDismissal;
- if (m_loadEventProgress == UnloadEventInProgress)
- return UnloadDismissal;
- return NoDismissal;
-}
-
void Document::setParsing(bool b)
{
m_bParsing = b;
@@ -2710,7 +2613,6 @@ Frame* Document::findUnsafeParentScrollPropagationBoundary()
void Document::seamlessParentUpdatedStylesheets()
{
- m_styleSheetCollection->didModifySeamlessParentStyleSheet();
styleResolverChanged(RecalcStyleImmediately);
}
@@ -4730,18 +4632,18 @@ void Document::webkitExitPointerLock()
{
if (!page())
return;
- if (Element* target = page()->pointerLockController().element()) {
+ if (Element* target = page()->pointerLockController()->element()) {
if (target->document() != this)
return;
}
- page()->pointerLockController().requestPointerUnlock();
+ page()->pointerLockController()->requestPointerUnlock();
}
Element* Document::webkitPointerLockElement() const
{
- if (!page() || page()->pointerLockController().lockPending())
+ if (!page() || page()->pointerLockController()->lockPending())
return 0;
- if (Element* element = page()->pointerLockController().element()) {
+ if (Element* element = page()->pointerLockController()->element()) {
if (element->document() == this)
return element;
}
diff --git a/chromium/third_party/WebKit/Source/core/dom/Document.h b/chromium/third_party/WebKit/Source/core/dom/Document.h
index f6aadfd9832..cd905432eef 100644
--- a/chromium/third_party/WebKit/Source/core/dom/Document.h
+++ b/chromium/third_party/WebKit/Source/core/dom/Document.h
@@ -67,7 +67,6 @@ class CSSStyleSheetResource;
class ScriptResource;
class CanvasRenderingContext;
class CharacterData;
-class Chrome;
class Comment;
class ContentSecurityPolicyResponseHeaders;
class ContextFeatures;
@@ -546,17 +545,6 @@ public:
// implicitClose() actually does the work of closing the input stream.
void implicitClose();
- bool dispatchBeforeUnloadEvent(Chrome&, Document* navigatingDocument);
- void dispatchUnloadEvents();
-
- enum PageDismissalType {
- NoDismissal = 0,
- BeforeUnloadDismissal = 1,
- PageHideDismissal = 2,
- UnloadDismissal = 3
- };
- PageDismissalType pageDismissalEventBeingDispatched() const;
-
void cancelParsing();
void write(const SegmentedString& text, Document* ownerDocument = 0);
@@ -766,8 +754,6 @@ public:
String title() const { return m_title.string(); }
void setTitle(const String&);
- const StringWithDirection& titleWithDirection() const { return m_title; }
-
Element* titleElement() const { return m_titleElement.get(); }
void setTitleElement(const StringWithDirection&, Element* titleElement);
void removeTitle(Element* titleElement);
@@ -928,15 +914,15 @@ public:
LoadEventTried,
LoadEventInProgress,
LoadEventCompleted,
- BeforeUnloadEventInProgress,
- BeforeUnloadEventCompleted,
- PageHideInProgress,
UnloadEventInProgress,
UnloadEventHandled
};
bool loadEventStillNeeded() const { return m_loadEventProgress == LoadEventNotRun; }
bool processingLoadEvent() const { return m_loadEventProgress == LoadEventInProgress; }
bool loadEventFinished() const { return m_loadEventProgress >= LoadEventCompleted; }
+ bool unloadEventStillNeeded() const { return m_loadEventProgress >= LoadEventTried && m_loadEventProgress <= UnloadEventInProgress; }
+ void unloadEventStarted() { m_loadEventProgress = UnloadEventInProgress; }
+ void unloadEventWasHandled() { m_loadEventProgress = UnloadEventHandled; }
virtual bool isContextThread() const;
virtual bool isJSExecutionForbidden() const { return false; }
@@ -1331,8 +1317,6 @@ private:
bool m_directionSetOnDocumentElement;
bool m_writingModeSetOnDocumentElement;
- bool m_didAllowNavigationViaBeforeUnloadConfirmationPanel;
-
DocumentTiming m_documentTiming;
RefPtr<MediaQueryMatcher> m_mediaQueryMatcher;
bool m_writeRecursionIsTooDeep;
diff --git a/chromium/third_party/WebKit/Source/core/dom/Document.idl b/chromium/third_party/WebKit/Source/core/dom/Document.idl
index c27623ad891..0fc91ba9df1 100644
--- a/chromium/third_party/WebKit/Source/core/dom/Document.idl
+++ b/chromium/third_party/WebKit/Source/core/dom/Document.idl
@@ -33,10 +33,10 @@ callback CustomElementConstructor = Element ();
DocumentFragment createDocumentFragment();
[PerWorldBindings] Text createTextNode([Default=Undefined] optional DOMString data);
Comment createComment([Default=Undefined] optional DOMString data);
- [RaisesException, MeasureAs=DocumentCreateCDATASection] CDATASection createCDATASection([Default=Undefined] optional DOMString data); // Removed from DOM4.
+ [RaisesException] CDATASection createCDATASection([Default=Undefined] optional DOMString data);
[RaisesException] ProcessingInstruction createProcessingInstruction([Default=Undefined] optional DOMString target,
[Default=Undefined] optional DOMString data);
- [RaisesException, MeasureAs=DocumentCreateAttribute] Attr createAttribute([Default=Undefined] optional DOMString name); // Removed from DOM4.
+ [RaisesException] Attr createAttribute([Default=Undefined] optional DOMString name);
[PerWorldBindings] NodeList getElementsByTagName([Default=Undefined] optional DOMString tagname);
// Introduced in DOM Level 2:
@@ -45,19 +45,19 @@ callback CustomElementConstructor = Element ();
optional boolean deep);
[CustomElementCallbacks=Enable, PerWorldBindings, ActivityLog=AccessForIsolatedWorlds, RaisesException] Element createElementNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI,
[TreatNullAs=NullString,Default=Undefined] optional DOMString qualifiedName);
- [RaisesException, MeasureAs=DocumentCreateAttributeNS] Attr createAttributeNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI,
- [TreatNullAs=NullString,Default=Undefined] optional DOMString qualifiedName); // Removed from DOM4.
+ [RaisesException] Attr createAttributeNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI,
+ [TreatNullAs=NullString,Default=Undefined] optional DOMString qualifiedName);
NodeList getElementsByTagNameNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI,
[Default=Undefined] optional DOMString localName);
[PerWorldBindings] Element getElementById([Default=Undefined] optional DOMString elementId);
// DOM Level 3 Core
- [TreatReturnedNullStringAs=Null, MeasureAs=DocumentInputEncoding] readonly attribute DOMString inputEncoding; // Removed from DOM4.
+ [TreatReturnedNullStringAs=Null] readonly attribute DOMString inputEncoding;
- [TreatReturnedNullStringAs=Null, MeasureAs=DocumentXMLEncoding] readonly attribute DOMString xmlEncoding; // Removed from DOM4.
- [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, SetterRaisesException, MeasureAs=DocumentXMLVersion] attribute DOMString xmlVersion; // Removed from DOM4.
- [SetterRaisesException, MeasureAs=DocumentXMLStandalone] attribute boolean xmlStandalone; // Removed from DOM4.
+ [TreatReturnedNullStringAs=Null] readonly attribute DOMString xmlEncoding;
+ [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, SetterRaisesException] attribute DOMString xmlVersion;
+ [SetterRaisesException] attribute boolean xmlStandalone;
[RaisesException, CustomElementCallbacks=Enable] Node adoptNode([Default=Undefined] optional Node source);
diff --git a/chromium/third_party/WebKit/Source/core/dom/DocumentStyleSheetCollection.cpp b/chromium/third_party/WebKit/Source/core/dom/DocumentStyleSheetCollection.cpp
index 5e24213368a..74ef2b1164a 100644
--- a/chromium/third_party/WebKit/Source/core/dom/DocumentStyleSheetCollection.cpp
+++ b/chromium/third_party/WebKit/Source/core/dom/DocumentStyleSheetCollection.cpp
@@ -37,8 +37,6 @@
#include "core/dom/Document.h"
#include "core/dom/Element.h"
#include "core/dom/ProcessingInstruction.h"
-#include "core/dom/ShadowTreeStyleSheetCollection.h"
-#include "core/dom/shadow/ShadowRoot.h"
#include "core/html/HTMLIFrameElement.h"
#include "core/html/HTMLLinkElement.h"
#include "core/html/HTMLStyleElement.h"
@@ -65,7 +63,6 @@ DocumentStyleSheetCollection::DocumentStyleSheetCollection(Document* document)
, m_usesBeforeAfterRulesOverride(false)
, m_usesRemUnits(false)
, m_collectionForDocument(document)
- , m_needsDocumentStyleSheetsUpdate(true)
{
}
@@ -83,55 +80,6 @@ DocumentStyleSheetCollection::~DocumentStyleSheetCollection()
m_authorStyleSheets[i]->clearOwnerNode();
}
-void DocumentStyleSheetCollection::insertTreeScopeInDocumentOrder(TreeScopeSet& treeScopes, TreeScope* treeScope)
-{
- if (treeScopes.isEmpty()) {
- treeScopes.add(treeScope);
- return;
- }
- if (treeScopes.contains(treeScope))
- return;
-
- TreeScopeSet::iterator begin = treeScopes.begin();
- TreeScopeSet::iterator end = treeScopes.end();
- TreeScopeSet::iterator it = end;
- TreeScope* followingTreeScope = 0;
- do {
- --it;
- TreeScope* n = *it;
- unsigned short position = n->comparePosition(treeScope);
- if (position & Node::DOCUMENT_POSITION_FOLLOWING) {
- treeScopes.insertBefore(followingTreeScope, treeScope);
- return;
- }
- followingTreeScope = n;
- } while (it != begin);
-
- treeScopes.insertBefore(followingTreeScope, treeScope);
-}
-
-StyleSheetCollection* DocumentStyleSheetCollection::ensureStyleSheetCollectionFor(TreeScope* treeScope)
-{
- if (treeScope == m_document)
- return &m_collectionForDocument;
-
- HashMap<TreeScope*, OwnPtr<StyleSheetCollection> >::AddResult result = m_styleSheetCollectionMap.add(treeScope, nullptr);
- if (result.isNewEntry)
- result.iterator->value = adoptPtr(new ShadowTreeStyleSheetCollection(toShadowRoot(treeScope)));
- return result.iterator->value.get();
-}
-
-StyleSheetCollection* DocumentStyleSheetCollection::styleSheetCollectionFor(TreeScope* treeScope)
-{
- if (treeScope == m_document)
- return &m_collectionForDocument;
-
- HashMap<TreeScope*, OwnPtr<StyleSheetCollection> >::iterator it = m_styleSheetCollectionMap.find(treeScope);
- if (it == m_styleSheetCollectionMap.end())
- return 0;
- return it->value.get();
-}
-
const Vector<RefPtr<StyleSheet> >& DocumentStyleSheetCollection::styleSheetsForStyleSheetList()
{
return m_collectionForDocument.styleSheetsForStyleSheetList();
@@ -142,19 +90,6 @@ const Vector<RefPtr<CSSStyleSheet> >& DocumentStyleSheetCollection::activeAuthor
return m_collectionForDocument.activeAuthorStyleSheets();
}
-void DocumentStyleSheetCollection::getActiveAuthorStyleSheets(Vector<const Vector<RefPtr<CSSStyleSheet> >*>& activeAuthorStyleSheets) const
-{
- activeAuthorStyleSheets.append(&m_collectionForDocument.activeAuthorStyleSheets());
-
- HashMap<TreeScope*, OwnPtr<StyleSheetCollection> >::const_iterator::Values begin = m_styleSheetCollectionMap.values().begin();
- HashMap<TreeScope*, OwnPtr<StyleSheetCollection> >::const_iterator::Values end = m_styleSheetCollectionMap.values().end();
- HashMap<TreeScope*, OwnPtr<StyleSheetCollection> >::const_iterator::Values it = begin;
- for (; it != end; ++it) {
- const StyleSheetCollection* collection = it->get();
- activeAuthorStyleSheets.append(&collection->activeAuthorStyleSheets());
- }
-}
-
void DocumentStyleSheetCollection::combineCSSFeatureFlags(const RuleFeatureSet& features)
{
// Delay resetting the flags until after next style recalc since unapplying the style may not work without these set (this is true at least with before/after).
@@ -253,7 +188,6 @@ void DocumentStyleSheetCollection::updateInjectedStyleSheetCache() const
void DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache()
{
m_injectedStyleSheetCacheValid = false;
- m_needsDocumentStyleSheetsUpdate = true;
// FIXME: updateInjectedStyleSheetCache is called inside StyleSheetCollection::updateActiveStyleSheets
// and batch updates lots of sheets so we can't call addedStyleSheet() or removedStyleSheet().
m_document->styleResolverChanged(DeferRecalcStyle);
@@ -264,7 +198,6 @@ void DocumentStyleSheetCollection::addAuthorSheet(PassRefPtr<StyleSheetContents>
ASSERT(!authorSheet->isUserStyleSheet());
m_authorStyleSheets.append(CSSStyleSheet::create(authorSheet, m_document));
m_document->addedStyleSheet(m_authorStyleSheets.last().get(), RecalcStyleImmediately);
- m_needsDocumentStyleSheetsUpdate = true;
}
void DocumentStyleSheetCollection::addUserSheet(PassRefPtr<StyleSheetContents> userSheet)
@@ -272,23 +205,16 @@ void DocumentStyleSheetCollection::addUserSheet(PassRefPtr<StyleSheetContents> u
ASSERT(userSheet->isUserStyleSheet());
m_userStyleSheets.append(CSSStyleSheet::create(userSheet, m_document));
m_document->addedStyleSheet(m_userStyleSheets.last().get(), RecalcStyleImmediately);
- m_needsDocumentStyleSheetsUpdate = true;
}
// This method is called whenever a top-level stylesheet has finished loading.
-void DocumentStyleSheetCollection::removePendingSheet(Node* styleSheetCandidateNode, RemovePendingSheetNotificationType notification)
+void DocumentStyleSheetCollection::removePendingSheet(RemovePendingSheetNotificationType notification)
{
// Make sure we knew this sheet was pending, and that our count isn't out of sync.
ASSERT(m_pendingStylesheets > 0);
m_pendingStylesheets--;
- TreeScope* treeScope = isHTMLStyleElement(styleSheetCandidateNode) ? styleSheetCandidateNode->treeScope() : m_document;
- if (treeScope == m_document)
- m_needsDocumentStyleSheetsUpdate = true;
- else
- m_dirtyTreeScopes.add(treeScope);
-
if (m_pendingStylesheets)
return;
@@ -304,59 +230,21 @@ void DocumentStyleSheetCollection::removePendingSheet(Node* styleSheetCandidateN
void DocumentStyleSheetCollection::addStyleSheetCandidateNode(Node* node, bool createdByParser)
{
- if (!node->inDocument())
- return;
-
- TreeScope* treeScope = isHTMLStyleElement(node) ? node->treeScope() : m_document;
- ASSERT(isHTMLStyleElement(node) || treeScope == m_document);
-
- StyleSheetCollection* collection = ensureStyleSheetCollectionFor(treeScope);
- ASSERT(collection);
- collection->addStyleSheetCandidateNode(node, createdByParser);
-
- if (treeScope == m_document) {
- m_needsDocumentStyleSheetsUpdate = true;
- return;
- }
-
- insertTreeScopeInDocumentOrder(m_activeTreeScopes, treeScope);
- m_dirtyTreeScopes.add(treeScope);
+ m_collectionForDocument.addStyleSheetCandidateNode(node, createdByParser);
}
void DocumentStyleSheetCollection::removeStyleSheetCandidateNode(Node* node, ContainerNode* scopingNode)
{
- TreeScope* treeScope = scopingNode ? scopingNode->treeScope() : m_document;
- ASSERT(isHTMLStyleElement(node) || treeScope == m_document);
-
- StyleSheetCollection* collection = styleSheetCollectionFor(treeScope);
- ASSERT(collection);
- collection->removeStyleSheetCandidateNode(node, scopingNode);
-
- if (treeScope == m_document) {
- m_needsDocumentStyleSheetsUpdate = true;
- return;
- }
- m_dirtyTreeScopes.add(treeScope);
- m_activeTreeScopes.remove(treeScope);
+ m_collectionForDocument.removeStyleSheetCandidateNode(node, scopingNode);
}
-void DocumentStyleSheetCollection::modifiedStyleSheetCandidateNode(Node* node)
+static bool styleSheetsUseRemUnits(const Vector<RefPtr<CSSStyleSheet> >& sheets)
{
- if (!node->inDocument())
- return;
-
- TreeScope* treeScope = isHTMLStyleElement(node) ? node->treeScope() : m_document;
- ASSERT(isHTMLStyleElement(node) || treeScope == m_document);
- if (treeScope == m_document) {
- m_needsDocumentStyleSheetsUpdate = true;
- return;
+ for (unsigned i = 0; i < sheets.size(); ++i) {
+ if (sheets[i]->contents()->usesRemUnits())
+ return true;
}
- m_dirtyTreeScopes.add(treeScope);
-}
-
-bool DocumentStyleSheetCollection::shouldUpdateShadowTreeStyleSheetCollection(StyleResolverUpdateMode updateMode)
-{
- return !m_dirtyTreeScopes.isEmpty() || updateMode == FullStyleUpdate;
+ return false;
}
bool DocumentStyleSheetCollection::updateActiveStyleSheets(StyleResolverUpdateMode updateMode)
@@ -372,91 +260,18 @@ bool DocumentStyleSheetCollection::updateActiveStyleSheets(StyleResolverUpdateMo
if (!m_document->renderer() || !m_document->attached())
return false;
- bool requiresFullStyleRecalc = false;
- if (m_needsDocumentStyleSheetsUpdate || updateMode == FullStyleUpdate)
- requiresFullStyleRecalc = m_collectionForDocument.updateActiveStyleSheets(this, updateMode);
-
- if (shouldUpdateShadowTreeStyleSheetCollection(updateMode)) {
- TreeScopeSet treeScopes = updateMode == FullStyleUpdate ? m_activeTreeScopes : m_dirtyTreeScopes;
- HashSet<TreeScope*> treeScopesRemoved;
-
- for (TreeScopeSet::iterator it = treeScopes.begin(); it != treeScopes.end(); ++it) {
- TreeScope* treeScope = *it;
- ASSERT(treeScope != m_document);
- ShadowTreeStyleSheetCollection* collection = static_cast<ShadowTreeStyleSheetCollection*>(styleSheetCollectionFor(treeScope));
- ASSERT(collection);
- collection->updateActiveStyleSheets(this, updateMode);
- if (!collection->hasStyleSheetCandidateNodes())
- treeScopesRemoved.add(treeScope);
- }
- if (!treeScopesRemoved.isEmpty())
- for (HashSet<TreeScope*>::iterator it = treeScopesRemoved.begin(); it != treeScopesRemoved.end(); ++it)
- m_activeTreeScopes.remove(*it);
- m_dirtyTreeScopes.clear();
- }
-
- if (StyleResolver* styleResolver = m_document->styleResolverIfExists()) {
- styleResolver->finishAppendAuthorStyleSheets();
- resetCSSFeatureFlags(styleResolver->ruleFeatureSet());
- }
-
+ StyleSheetCollection::StyleResolverUpdateType styleResolverUpdateType;
+ bool requiresFullStyleRecalc = m_collectionForDocument.updateActiveStyleSheets(this, updateMode, styleResolverUpdateType);
m_needsUpdateActiveStylesheetsOnStyleRecalc = false;
- activeStyleSheetsUpdatedForInspector();
- m_usesRemUnits = m_collectionForDocument.usesRemUnits();
-
- if (m_needsDocumentStyleSheetsUpdate || updateMode == FullStyleUpdate) {
- m_document->notifySeamlessChildDocumentsOfStylesheetUpdate();
- m_needsDocumentStyleSheetsUpdate = false;
- }
-
- return requiresFullStyleRecalc;
-}
-
-void DocumentStyleSheetCollection::activeStyleSheetsUpdatedForInspector()
-{
- if (m_activeTreeScopes.isEmpty()) {
- InspectorInstrumentation::activeStyleSheetsUpdated(m_document, m_collectionForDocument.styleSheetsForStyleSheetList());
- return;
- }
- Vector<RefPtr<StyleSheet> > activeStyleSheets;
- activeStyleSheets.append(m_collectionForDocument.styleSheetsForStyleSheetList());
+ if (styleResolverUpdateType != StyleSheetCollection::Reconstruct)
+ resetCSSFeatureFlags(m_document->styleResolver()->ruleFeatureSet());
- TreeScopeSet::iterator begin = m_activeTreeScopes.begin();
- TreeScopeSet::iterator end = m_activeTreeScopes.end();
- for (TreeScopeSet::iterator it = begin; it != end; ++it) {
- if (StyleSheetCollection* collection = m_styleSheetCollectionMap.get(*it))
- activeStyleSheets.append(collection->styleSheetsForStyleSheetList());
- }
+ InspectorInstrumentation::activeStyleSheetsUpdated(m_document, m_collectionForDocument.styleSheetsForStyleSheetList());
+ m_usesRemUnits = styleSheetsUseRemUnits(m_collectionForDocument.activeAuthorStyleSheets());
+ m_document->notifySeamlessChildDocumentsOfStylesheetUpdate();
- // FIXME: Inspector needs a vector which has all active stylesheets.
- // However, creating such a large vector might cause performance regression.
- // Need to implement some smarter solution.
- InspectorInstrumentation::activeStyleSheetsUpdated(m_document, activeStyleSheets);
-}
-
-void DocumentStyleSheetCollection::didRemoveShadowRoot(ShadowRoot* shadowRoot)
-{
- m_styleSheetCollectionMap.remove(shadowRoot);
-}
-
-void DocumentStyleSheetCollection::appendActiveAuthorStyleSheets(StyleResolver* styleResolver)
-{
- ASSERT(styleResolver);
-
- styleResolver->setBuildScopedStyleTreeInDocumentOrder(true);
- styleResolver->appendAuthorStyleSheets(0, m_collectionForDocument.activeAuthorStyleSheets());
-
- TreeScopeSet::iterator begin = m_activeTreeScopes.begin();
- TreeScopeSet::iterator end = m_activeTreeScopes.end();
- for (TreeScopeSet::iterator it = begin; it != end; ++it) {
- if (StyleSheetCollection* collection = m_styleSheetCollectionMap.get(*it)) {
- styleResolver->setBuildScopedStyleTreeInDocumentOrder(!collection->scopingNodesForStyleScoped());
- styleResolver->appendAuthorStyleSheets(0, collection->activeAuthorStyleSheets());
- }
- }
- styleResolver->finishAppendAuthorStyleSheets();
- styleResolver->setBuildScopedStyleTreeInDocumentOrder(false);
+ return requiresFullStyleRecalc;
}
}
diff --git a/chromium/third_party/WebKit/Source/core/dom/DocumentStyleSheetCollection.h b/chromium/third_party/WebKit/Source/core/dom/DocumentStyleSheetCollection.h
index 2dd47c549f7..bbafeb858e6 100644
--- a/chromium/third_party/WebKit/Source/core/dom/DocumentStyleSheetCollection.h
+++ b/chromium/third_party/WebKit/Source/core/dom/DocumentStyleSheetCollection.h
@@ -64,7 +64,6 @@ public:
void addStyleSheetCandidateNode(Node*, bool createdByParser);
void removeStyleSheetCandidateNode(Node*, ContainerNode* scopingNode = 0);
- void modifiedStyleSheetCandidateNode(Node*);
void clearPageUserSheet();
void updatePageUserSheet();
@@ -88,7 +87,7 @@ public:
RemovePendingSheetNotifyImmediately,
RemovePendingSheetNotifyLater
};
- void removePendingSheet(Node* styleSheetCandidateNode, RemovePendingSheetNotificationType = RemovePendingSheetNotifyImmediately);
+ void removePendingSheet(RemovePendingSheetNotificationType = RemovePendingSheetNotifyImmediately);
bool hasPendingSheets() const { return m_pendingStylesheets > 0; }
@@ -106,22 +105,9 @@ public:
void combineCSSFeatureFlags(const RuleFeatureSet&);
void resetCSSFeatureFlags(const RuleFeatureSet&);
- void didModifySeamlessParentStyleSheet() { m_needsDocumentStyleSheetsUpdate = true; }
- void didRemoveShadowRoot(ShadowRoot*);
- void appendActiveAuthorStyleSheets(StyleResolver*);
- void getActiveAuthorStyleSheets(Vector<const Vector<RefPtr<CSSStyleSheet> >*>& activeAuthorStyleSheets) const;
-
private:
DocumentStyleSheetCollection(Document*);
- StyleSheetCollection* ensureStyleSheetCollectionFor(TreeScope*);
- StyleSheetCollection* styleSheetCollectionFor(TreeScope*);
- void activeStyleSheetsUpdatedForInspector();
- bool shouldUpdateShadowTreeStyleSheetCollection(StyleResolverUpdateMode);
-
- typedef ListHashSet<TreeScope*, 16> TreeScopeSet;
- static void insertTreeScopeInDocumentOrder(TreeScopeSet&, TreeScope*);
-
Document* m_document;
// Track the number of currently loading top-level stylesheets needed for rendering.
@@ -139,14 +125,10 @@ private:
Vector<RefPtr<CSSStyleSheet> > m_userStyleSheets;
Vector<RefPtr<CSSStyleSheet> > m_authorStyleSheets;
+ bool m_hadActiveLoadingStylesheet;
bool m_needsUpdateActiveStylesheetsOnStyleRecalc;
- StyleSheetCollectionForDocument m_collectionForDocument;
- HashMap<TreeScope*, OwnPtr<StyleSheetCollection> > m_styleSheetCollectionMap;
-
- TreeScopeSet m_dirtyTreeScopes;
- TreeScopeSet m_activeTreeScopes;
- bool m_needsDocumentStyleSheetsUpdate;
+ StyleSheetCollection m_collectionForDocument;
String m_preferredStylesheetSetName;
String m_selectedStylesheetSetName;
diff --git a/chromium/third_party/WebKit/Source/core/dom/DocumentType.idl b/chromium/third_party/WebKit/Source/core/dom/DocumentType.idl
index 510240a1362..8f192f3f562 100644
--- a/chromium/third_party/WebKit/Source/core/dom/DocumentType.idl
+++ b/chromium/third_party/WebKit/Source/core/dom/DocumentType.idl
@@ -22,14 +22,14 @@ interface DocumentType : Node {
// DOM Level 1
readonly attribute DOMString name;
- [MeasureAs=DocumentTypeEntities] readonly attribute NamedNodeMap entities; // Removed from DOM4.
- [MeasureAs=DocumentTypeNotations] readonly attribute NamedNodeMap notations; // Removed from DOM4.
+ readonly attribute NamedNodeMap entities;
+ readonly attribute NamedNodeMap notations;
// DOM Level 2
[TreatReturnedNullStringAs=Null] readonly attribute DOMString publicId;
[TreatReturnedNullStringAs=Null] readonly attribute DOMString systemId;
- [TreatReturnedNullStringAs=Null, MeasureAs=DocumentTypeInternalSubset] readonly attribute DOMString internalSubset; // Removed from DOM4.
+ [TreatReturnedNullStringAs=Null] readonly attribute DOMString internalSubset;
};
DocumentType implements ChildNode;
diff --git a/chromium/third_party/WebKit/Source/core/dom/Element.cpp b/chromium/third_party/WebKit/Source/core/dom/Element.cpp
index ade43c82f1f..b7147bcdc82 100644
--- a/chromium/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/chromium/third_party/WebKit/Source/core/dom/Element.cpp
@@ -1279,7 +1279,7 @@ void Element::removedFrom(ContainerNode* insertionPoint)
setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(false);
if (document()->page())
- document()->page()->pointerLockController().elementRemoved(this);
+ document()->page()->pointerLockController()->elementRemoved(this);
setSavedLayerScrollOffset(IntSize());
@@ -1318,16 +1318,6 @@ void Element::attach(const AttachContext& context)
StyleResolverParentPusher parentPusher(this);
WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates;
- // We've already been through detach when doing a lazyAttach, but we might
- // need to clear any state that's been added since then.
- if (hasRareData() && styleChangeType() == LazyAttachStyleChange) {
- ElementRareData* data = elementRareData();
- data->clearComputedStyle();
- data->resetDynamicRestyleObservations();
- if (!context.resolvedStyle)
- data->resetStyleState();
- }
-
NodeRenderingContext(this, context.resolvedStyle).createRendererForElementIfNeeded();
createPseudoElementIfNeeded(BEFORE);
@@ -1511,9 +1501,6 @@ bool Element::recalcStyle(StyleChange change)
change = Force;
else if (change != Force)
change = localChange;
- } else {
- // We still want to seed the style sharing list when just walking the tree to maximize sharing.
- document()->styleResolver()->addToStyleSharingList(this);
}
StyleResolverParentPusher parentPusher(this);
@@ -1547,11 +1534,10 @@ bool Element::recalcStyle(StyleChange change)
} else if (child->isElementNode()) {
Element* element = toElement(child);
- bool childRulesChanged = element->needsStyleRecalc() && element->styleChangeType() >= SubtreeStyleChange;
-
if (forceCheckOfNextElementSibling || forceCheckOfAnyElementSibling)
element->setNeedsStyleRecalc();
+ bool childRulesChanged = element->needsStyleRecalc() && element->styleChangeType() >= SubtreeStyleChange;
forceCheckOfNextElementSibling = childRulesChanged && hasDirectAdjacentRules;
forceCheckOfAnyElementSibling = forceCheckOfAnyElementSibling || (childRulesChanged && hasIndirectAdjacentRules);
@@ -1642,6 +1628,12 @@ ShadowRoot* Element::ensureUserAgentShadowRoot()
return shadowRoot;
}
+Element* Element::uaShadowElementById(const AtomicString& id) const
+{
+ ShadowRoot* shadowRoot = userAgentShadowRoot();
+ return shadowRoot ? shadowRoot->getElementById(id) : 0;
+}
+
bool Element::supportsShadowElementForUserAgentShadow() const
{
return true;
@@ -2638,7 +2630,7 @@ void Element::setIsInTopLayer(bool inTopLayer)
void Element::webkitRequestPointerLock()
{
if (document()->page())
- document()->page()->pointerLockController().requestPointerLock(this);
+ document()->page()->pointerLockController()->requestPointerLock(this);
}
SpellcheckAttributeState Element::spellcheckAttributeState() const
diff --git a/chromium/third_party/WebKit/Source/core/dom/Element.h b/chromium/third_party/WebKit/Source/core/dom/Element.h
index f90ed9e58dd..7b075ce8638 100644
--- a/chromium/third_party/WebKit/Source/core/dom/Element.h
+++ b/chromium/third_party/WebKit/Source/core/dom/Element.h
@@ -446,6 +446,7 @@ public:
ShadowRoot* userAgentShadowRoot() const;
ShadowRoot* ensureUserAgentShadowRoot();
+ Element* uaShadowElementById(const AtomicString& id) const;
virtual bool supportsShadowElementForUserAgentShadow() const;
virtual const AtomicString& shadowPseudoId() const { return !part().isEmpty() ? part() : pseudo(); }
diff --git a/chromium/third_party/WebKit/Source/core/dom/Element.idl b/chromium/third_party/WebKit/Source/core/dom/Element.idl
index 72241970591..0137af97e90 100644
--- a/chromium/third_party/WebKit/Source/core/dom/Element.idl
+++ b/chromium/third_party/WebKit/Source/core/dom/Element.idl
@@ -30,9 +30,9 @@
[RaisesException, CustomElementCallbacks=Enable] void setAttribute([Default=Undefined] optional DOMString name,
[Default=Undefined] optional DOMString value);
[CustomElementCallbacks=Enable] void removeAttribute([Default=Undefined] optional DOMString name);
- [MeasureAs=ElementGetAttributeNode] Attr getAttributeNode([Default=Undefined] optional DOMString name); // Removed from DOM4.
- [RaisesException, CustomElementCallbacks=Enable, MeasureAs=ElementSetAttributeNode] Attr setAttributeNode([Default=Undefined, StrictTypeChecking] optional Attr newAttr); // Removed from DOM4.
- [RaisesException, CustomElementCallbacks=Enable, MeasureAs=ElementRemoveAttributeNode] Attr removeAttributeNode([Default=Undefined, StrictTypeChecking] optional Attr oldAttr); // Removed from DOM4.
+ Attr getAttributeNode([Default=Undefined] optional DOMString name);
+ [RaisesException, CustomElementCallbacks=Enable] Attr setAttributeNode([Default=Undefined, StrictTypeChecking] optional Attr newAttr);
+ [RaisesException, CustomElementCallbacks=Enable] Attr removeAttributeNode([Default=Undefined, StrictTypeChecking] optional Attr oldAttr);
[PerWorldBindings] NodeList getElementsByTagName([Default=Undefined] optional DOMString name);
// For ObjC this is defined on Node for legacy support.
@@ -50,8 +50,8 @@
DOMString localName);
NodeList getElementsByTagNameNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI,
[Default=Undefined] optional DOMString localName);
- [MeasureAs=ElementGetAttributeNodeNS] Attr getAttributeNodeNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI,
- [Default=Undefined] optional DOMString localName); // Removed from DOM4.
+ Attr getAttributeNodeNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI,
+ [Default=Undefined] optional DOMString localName);
[RaisesException, CustomElementCallbacks=Enable] Attr setAttributeNodeNS([Default=Undefined, StrictTypeChecking] optional Attr newAttr);
boolean hasAttribute(DOMString name);
boolean hasAttributeNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI,
diff --git a/chromium/third_party/WebKit/Source/core/dom/Node.cpp b/chromium/third_party/WebKit/Source/core/dom/Node.cpp
index 981e4afc5c4..39360244d6c 100644
--- a/chromium/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/chromium/third_party/WebKit/Source/core/dom/Node.cpp
@@ -1030,33 +1030,6 @@ bool Node::containsIncludingHostElements(const Node* node) const
return false;
}
-inline void Node::detachNode(Node* root, const AttachContext& context)
-{
- Node* node = root;
- while (node) {
- if (node->styleChangeType() == LazyAttachStyleChange) {
- // FIXME: This is needed because Node::lazyAttach marks nodes as being attached even
- // though they've never been through attach(). This allows us to avoid doing all the
- // virtual calls to detach() and other associated work.
- node->clearAttached();
- node->clearChildNeedsStyleRecalc();
-
- for (ShadowRoot* shadowRoot = node->youngestShadowRoot(); shadowRoot; shadowRoot = shadowRoot->olderShadowRoot())
- detachNode(shadowRoot, context);
-
- node = NodeTraversal::next(node, root);
- continue;
- }
- // Handle normal reattaches from style recalc (ex. display type changes)
- // or descendants of lazy attached nodes that got actually attached, for example,
- // by innerHTML or editing.
- // FIXME: innerHTML and editing should also lazyAttach.
- if (node->attached())
- node->detach(context);
- node = NodeTraversal::nextSkippingChildren(node, root);
- }
-}
-
void Node::reattach(const AttachContext& context)
{
// FIXME: Text::updateTextRenderer calls reattach outside a style recalc.
@@ -1064,7 +1037,8 @@ void Node::reattach(const AttachContext& context)
AttachContext reattachContext(context);
reattachContext.performingReattach = true;
- detachNode(this, reattachContext);
+ if (attached())
+ detach(reattachContext);
attach(reattachContext);
}
@@ -1136,7 +1110,7 @@ void Node::detach(const AttachContext& context)
}
}
- clearAttached();
+ clearFlag(IsAttachedFlag);
#ifndef NDEBUG
detachingNode = 0;
@@ -2490,8 +2464,9 @@ void Node::defaultEventHandler(Event* event)
if (dispatchDOMActivateEvent(detail, event))
event->setDefaultHandled();
} else if (eventType == eventNames().contextmenuEvent) {
- if (Page* page = document()->page())
- page->contextMenuController().handleContextMenuEvent(event);
+ if (Frame* frame = document()->frame())
+ if (Page* page = frame->page())
+ page->contextMenuController()->handleContextMenuEvent(event);
} else if (eventType == eventNames().textInputEvent) {
if (event->hasInterface(eventNames().interfaceForTextEvent))
if (Frame* frame = document()->frame())
@@ -2648,14 +2623,15 @@ PassRefPtr<NodeList> Node::getDestinationInsertionPoints()
document()->updateDistributionForNodeIfNeeded(this);
Vector<InsertionPoint*, 8> insertionPoints;
collectInsertionPointsWhereNodeIsDistributed(this, insertionPoints);
- Vector<RefPtr<Node> > filteredInsertionPoints;
for (size_t i = 0; i < insertionPoints.size(); ++i) {
InsertionPoint* insertionPoint = insertionPoints[i];
ASSERT(insertionPoint->containingShadowRoot());
- if (insertionPoint->containingShadowRoot()->type() != ShadowRoot::UserAgentShadowRoot)
- filteredInsertionPoints.append(insertionPoint);
+ if (insertionPoint->containingShadowRoot()->type() == ShadowRoot::UserAgentShadowRoot)
+ return StaticNodeList::createEmpty();
}
- return StaticNodeList::adopt(filteredInsertionPoints);
+ Vector<RefPtr<Node> > asNodes;
+ asNodes.appendRange(insertionPoints.begin(), insertionPoints.end());
+ return StaticNodeList::adopt(asNodes);
}
void Node::registerScopedHTMLStyleChild()
diff --git a/chromium/third_party/WebKit/Source/core/dom/Node.h b/chromium/third_party/WebKit/Source/core/dom/Node.h
index 92a02e3713a..a651d060e69 100644
--- a/chromium/third_party/WebKit/Source/core/dom/Node.h
+++ b/chromium/third_party/WebKit/Source/core/dom/Node.h
@@ -839,9 +839,6 @@ private:
void setStyleChange(StyleChangeType);
- void detachNode(Node*, const AttachContext&);
- void clearAttached() { clearFlag(IsAttachedFlag); }
-
// Used to share code between lazyAttach and setNeedsStyleRecalc.
void markAncestorsWithChildNeedsStyleRecalc();
diff --git a/chromium/third_party/WebKit/Source/core/dom/Node.idl b/chromium/third_party/WebKit/Source/core/dom/Node.idl
index 55643f02a63..0c7c5a12526 100644
--- a/chromium/third_party/WebKit/Source/core/dom/Node.idl
+++ b/chromium/third_party/WebKit/Source/core/dom/Node.idl
@@ -61,11 +61,11 @@
[CustomElementCallbacks=Enable] void normalize();
// Introduced in DOM Level 2:
- [MeasureAs=NodeIsSupported] boolean isSupported([Default=Undefined] optional DOMString feature,
- [TreatNullAs=NullString,Default=Undefined] optional DOMString version); // Removed in DOM4.
+ boolean isSupported([Default=Undefined] optional DOMString feature,
+ [TreatNullAs=NullString,Default=Undefined] optional DOMString version);
- [TreatReturnedNullStringAs=Null, PerWorldBindings, MeasureAs=NodeNamespaceURI] readonly attribute DOMString namespaceURI; // Removed from DOM4.
- [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, PerWorldBindings, SetterRaisesException, MeasureAs=NodePrefix] attribute DOMString prefix; // Removed from DOM4.
+ [TreatReturnedNullStringAs=Null, PerWorldBindings] readonly attribute DOMString namespaceURI;
+ [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, PerWorldBindings, SetterRaisesException] attribute DOMString prefix;
[TreatReturnedNullStringAs=Null, PerWorldBindings] readonly attribute DOMString localName;
// Introduced in DOM Level 3:
@@ -74,7 +74,7 @@
// FIXME: the spec says this can also raise on retrieval.
[TreatReturnedNullStringAs=Null, TreatNullAs=NullString, PerWorldBindings, SetterRaisesException, CustomElementCallbacks=Enable] attribute DOMString textContent;
- [MeasureAs=NodeIsSameNode] boolean isSameNode([Default=Undefined] optional Node other); // Removed in DOM4.
+ boolean isSameNode([Default=Undefined] optional Node other);
boolean isEqualNode([Default=Undefined] optional Node other);
[TreatReturnedNullStringAs=Null] DOMString lookupPrefix([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI);
boolean isDefaultNamespace([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI);
diff --git a/chromium/third_party/WebKit/Source/core/dom/PendingScript.cpp b/chromium/third_party/WebKit/Source/core/dom/PendingScript.cpp
index 6ad05cfed0e..aab3343f3fe 100644
--- a/chromium/third_party/WebKit/Source/core/dom/PendingScript.cpp
+++ b/chromium/third_party/WebKit/Source/core/dom/PendingScript.cpp
@@ -27,7 +27,7 @@
#include "core/dom/PendingScript.h"
#include "core/dom/Element.h"
-#include "core/fetch/ScriptResource.h"
+#include "core/loader/cache/ScriptResource.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/dom/PendingScript.h b/chromium/third_party/WebKit/Source/core/dom/PendingScript.h
index 0f169a9cabe..bf902b21987 100644
--- a/chromium/third_party/WebKit/Source/core/dom/PendingScript.h
+++ b/chromium/third_party/WebKit/Source/core/dom/PendingScript.h
@@ -26,8 +26,8 @@
#ifndef PendingScript_h
#define PendingScript_h
-#include "core/fetch/ResourceClient.h"
-#include "core/fetch/ResourcePtr.h"
+#include "core/loader/cache/ResourceClient.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefPtr.h"
#include "wtf/text/TextPosition.h"
diff --git a/chromium/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp b/chromium/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp
index cf915dc2dc7..def6f8efa93 100644
--- a/chromium/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp
+++ b/chromium/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp
@@ -27,10 +27,10 @@
#include "core/css/StyleSheetContents.h"
#include "core/dom/Document.h"
#include "core/dom/DocumentStyleSheetCollection.h"
-#include "core/fetch/CSSStyleSheetResource.h"
-#include "core/fetch/FetchRequest.h"
-#include "core/fetch/ResourceFetcher.h"
-#include "core/fetch/XSLStyleSheetResource.h"
+#include "core/loader/cache/CSSStyleSheetResource.h"
+#include "core/loader/cache/FetchRequest.h"
+#include "core/loader/cache/ResourceFetcher.h"
+#include "core/loader/cache/XSLStyleSheetResource.h"
#include "core/xml/XSLStyleSheet.h"
#include "core/xml/parser/XMLDocumentParser.h" // for parseAttributes()
@@ -170,7 +170,7 @@ void ProcessingInstruction::checkStyleSheet()
else {
// The request may have been denied if (for example) the stylesheet is local and the document is remote.
m_loading = false;
- document()->styleSheetCollection()->removePendingSheet(this);
+ document()->styleSheetCollection()->removePendingSheet();
}
}
}
@@ -188,7 +188,7 @@ bool ProcessingInstruction::isLoading() const
bool ProcessingInstruction::sheetLoaded()
{
if (!isLoading()) {
- document()->styleSheetCollection()->removePendingSheet(this);
+ document()->styleSheetCollection()->removePendingSheet();
return true;
}
return false;
diff --git a/chromium/third_party/WebKit/Source/core/dom/ProcessingInstruction.h b/chromium/third_party/WebKit/Source/core/dom/ProcessingInstruction.h
index d8c837bcff9..1ae797633e1 100644
--- a/chromium/third_party/WebKit/Source/core/dom/ProcessingInstruction.h
+++ b/chromium/third_party/WebKit/Source/core/dom/ProcessingInstruction.h
@@ -23,8 +23,8 @@
#define ProcessingInstruction_h
#include "core/dom/Node.h"
-#include "core/fetch/ResourcePtr.h"
-#include "core/fetch/StyleSheetResourceClient.h"
+#include "core/loader/cache/ResourcePtr.h"
+#include "core/loader/cache/StyleSheetResourceClient.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/dom/ScriptLoader.cpp b/chromium/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
index 55d6844df0d..6d1c06b4b70 100644
--- a/chromium/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
+++ b/chromium/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
@@ -35,12 +35,12 @@
#include "core/dom/ScriptRunner.h"
#include "core/dom/ScriptableDocumentParser.h"
#include "core/dom/Text.h"
-#include "core/fetch/FetchRequest.h"
-#include "core/fetch/ResourceFetcher.h"
-#include "core/fetch/ScriptResource.h"
#include "core/html/HTMLImport.h"
#include "core/html/HTMLScriptElement.h"
#include "core/html/parser/HTMLParserIdioms.h"
+#include "core/loader/cache/FetchRequest.h"
+#include "core/loader/cache/ResourceFetcher.h"
+#include "core/loader/cache/ScriptResource.h"
#include "core/page/ContentSecurityPolicy.h"
#include "core/page/Frame.h"
#include "core/platform/MIMETypeRegistry.h"
diff --git a/chromium/third_party/WebKit/Source/core/dom/ScriptLoader.h b/chromium/third_party/WebKit/Source/core/dom/ScriptLoader.h
index dfa88184585..390d83a2f89 100644
--- a/chromium/third_party/WebKit/Source/core/dom/ScriptLoader.h
+++ b/chromium/third_party/WebKit/Source/core/dom/ScriptLoader.h
@@ -21,8 +21,8 @@
#ifndef ScriptLoader_h
#define ScriptLoader_h
-#include "core/fetch/ResourceClient.h"
-#include "core/fetch/ResourcePtr.h"
+#include "core/loader/cache/ResourceClient.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "wtf/text/TextPosition.h"
#include "wtf/text/WTFString.h"
diff --git a/chromium/third_party/WebKit/Source/core/dom/ScriptRunner.cpp b/chromium/third_party/WebKit/Source/core/dom/ScriptRunner.cpp
index f63ab5056c0..d25001e0f42 100644
--- a/chromium/third_party/WebKit/Source/core/dom/ScriptRunner.cpp
+++ b/chromium/third_party/WebKit/Source/core/dom/ScriptRunner.cpp
@@ -30,7 +30,7 @@
#include "core/dom/Element.h"
#include "core/dom/PendingScript.h"
#include "core/dom/ScriptLoader.h"
-#include "core/fetch/ScriptResource.h"
+#include "core/loader/cache/ScriptResource.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/dom/ScriptRunner.h b/chromium/third_party/WebKit/Source/core/dom/ScriptRunner.h
index b793589a8e8..ef9e270b5c9 100644
--- a/chromium/third_party/WebKit/Source/core/dom/ScriptRunner.h
+++ b/chromium/third_party/WebKit/Source/core/dom/ScriptRunner.h
@@ -26,7 +26,7 @@
#ifndef ScriptRunner_h
#define ScriptRunner_h
-#include "core/fetch/ResourcePtr.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "core/platform/Timer.h"
#include "wtf/HashMap.h"
#include "wtf/Noncopyable.h"
diff --git a/chromium/third_party/WebKit/Source/core/dom/ShadowTreeStyleSheetCollection.cpp b/chromium/third_party/WebKit/Source/core/dom/ShadowTreeStyleSheetCollection.cpp
deleted file mode 100644
index 2c53a058c09..00000000000
--- a/chromium/third_party/WebKit/Source/core/dom/ShadowTreeStyleSheetCollection.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
- * (C) 1999 Antti Koivisto (koivisto@kde.org)
- * (C) 2001 Dirk Mueller (mueller@kde.org)
- * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
- * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All rights reserved.
- * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "core/dom/ShadowTreeStyleSheetCollection.h"
-
-#include "HTMLNames.h"
-#include "core/css/CSSStyleSheet.h"
-#include "core/css/resolver/StyleResolver.h"
-#include "core/dom/Document.h"
-#include "core/dom/DocumentStyleSheetCollection.h"
-#include "core/dom/Element.h"
-#include "core/dom/shadow/ShadowRoot.h"
-#include "core/html/HTMLStyleElement.h"
-#include "core/page/Settings.h"
-
-namespace WebCore {
-
-using namespace HTMLNames;
-
-ShadowTreeStyleSheetCollection::ShadowTreeStyleSheetCollection(ShadowRoot* shadowRoot)
- : StyleSheetCollection(shadowRoot)
-{
-}
-
-void ShadowTreeStyleSheetCollection::collectStyleSheets(DocumentStyleSheetCollection* collections, Vector<RefPtr<StyleSheet> >& styleSheets, Vector<RefPtr<CSSStyleSheet> >& activeSheets)
-{
- if (document()->settings() && !document()->settings()->authorAndUserStylesEnabled())
- return;
-
- DocumentOrderedList::iterator begin = m_styleSheetCandidateNodes.begin();
- DocumentOrderedList::iterator end = m_styleSheetCandidateNodes.end();
- for (DocumentOrderedList::iterator it = begin; it != end; ++it) {
- Node* node = *it;
- StyleSheet* sheet = 0;
- CSSStyleSheet* activeSheet = 0;
-
- if (!node->isHTMLElement() || !node->hasTagName(styleTag))
- continue;
-
- Element* element = toElement(node);
- AtomicString title = element->getAttribute(titleAttr);
- bool enabledViaScript = false;
-
- sheet = static_cast<HTMLStyleElement*>(node)->sheet();
- if (sheet && !sheet->disabled() && sheet->isCSSStyleSheet())
- activeSheet = static_cast<CSSStyleSheet*>(sheet);
-
- // FIXME: clarify how PREFERRED or ALTERNATE works in shadow trees.
- // Should we set preferred/selected stylesheets name in shadow trees and
- // use the name in document?
- AtomicString rel = element->getAttribute(relAttr);
- if (!enabledViaScript && sheet && !title.isEmpty()) {
- if (collections->preferredStylesheetSetName().isEmpty()) {
- if (element->hasLocalName(styleTag) || !rel.contains("alternate")) {
- collections->setPreferredStylesheetSetName(title);
- collections->setSelectedStylesheetSetName(title);
- }
- }
- if (title != collections->preferredStylesheetSetName())
- activeSheet = 0;
- }
-
- if (rel.contains("alternate") && title.isEmpty())
- activeSheet = 0;
-
- if (sheet)
- styleSheets.append(sheet);
- if (activeSheet)
- activeSheets.append(activeSheet);
- }
-}
-
-bool ShadowTreeStyleSheetCollection::updateActiveStyleSheets(DocumentStyleSheetCollection* collections, StyleResolverUpdateMode updateMode)
-{
- Vector<RefPtr<StyleSheet> > styleSheets;
- Vector<RefPtr<CSSStyleSheet> > activeCSSStyleSheets;
- collectStyleSheets(collections, styleSheets, activeCSSStyleSheets);
-
- bool requiresFullStyleRecalc = true;
-
- // If we have already decided to destroy StyleResolver, we don't need to analyze. Reconstruction will take care.
- if (StyleResolver* styleResolver = document()->styleResolverIfExists()) {
- StyleResolverUpdateType styleResolverUpdateType;
-
- analyzeStyleSheetChange(updateMode, activeAuthorStyleSheets(), activeCSSStyleSheets, styleResolverUpdateType, requiresFullStyleRecalc);
-
- // FIXME: We might have already had styles in child treescope. In this case, we cannot use buildScopedStyleTreeInDocumentOrder.
- // Need to change "false" to some valid condition.
- styleResolver->setBuildScopedStyleTreeInDocumentOrder(false);
- if (styleResolverUpdateType == Reset || styleResolverUpdateType == Reconstruct) {
- // We should not destroy StyleResolver when we find any stylesheet update in a shadow tree.
- // In this case, we will reset rulesets created from style elements in the shadow tree.
- resetAllRuleSetsInTreeScope(styleResolver);
- styleResolver->appendAuthorStyleSheets(0, activeCSSStyleSheets);
- } else {
- ASSERT(styleResolverUpdateType == Additive);
- styleResolver->appendAuthorStyleSheets(m_activeAuthorStyleSheets.size(), activeCSSStyleSheets);
- }
- }
- m_scopingNodesForStyleScoped.didRemoveScopingNodes();
- m_activeAuthorStyleSheets.swap(activeCSSStyleSheets);
- m_styleSheetsForStyleSheetList.swap(styleSheets);
- updateUsesRemUnits();
-
- return requiresFullStyleRecalc;
-}
-
-}
diff --git a/chromium/third_party/WebKit/Source/core/dom/ShadowTreeStyleSheetCollection.h b/chromium/third_party/WebKit/Source/core/dom/ShadowTreeStyleSheetCollection.h
deleted file mode 100644
index e3984406ef3..00000000000
--- a/chromium/third_party/WebKit/Source/core/dom/ShadowTreeStyleSheetCollection.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
- * (C) 1999 Antti Koivisto (koivisto@kde.org)
- * (C) 2001 Dirk Mueller (mueller@kde.org)
- * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
- * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All rights reserved.
- * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef ShadowTreeStyleSheetCollection_h
-#define ShadowTreeStyleSheetCollection_h
-
-#include "core/dom/StyleSheetCollection.h"
-
-namespace WebCore {
-
-class CSSStyleSheet;
-class DocumentStyleSheetCollection;
-class ShadowRoot;
-class StyleSheet;
-class StyleSheetCollection;
-
-class ShadowTreeStyleSheetCollection FINAL : public StyleSheetCollection {
- WTF_MAKE_NONCOPYABLE(ShadowTreeStyleSheetCollection); WTF_MAKE_FAST_ALLOCATED;
-public:
- explicit ShadowTreeStyleSheetCollection(ShadowRoot*);
-
- bool updateActiveStyleSheets(DocumentStyleSheetCollection*, StyleResolverUpdateMode);
-
-private:
- void collectStyleSheets(DocumentStyleSheetCollection*, Vector<RefPtr<StyleSheet> >& styleSheets, Vector<RefPtr<CSSStyleSheet> >& activeSheets);
-};
-
-}
-
-#endif
-
diff --git a/chromium/third_party/WebKit/Source/core/dom/StyleElement.cpp b/chromium/third_party/WebKit/Source/core/dom/StyleElement.cpp
index 8f31ee46d6d..0320d1670ee 100644
--- a/chromium/third_party/WebKit/Source/core/dom/StyleElement.cpp
+++ b/chromium/third_party/WebKit/Source/core/dom/StyleElement.cpp
@@ -127,7 +127,7 @@ void StyleElement::createSheet(Element* e, const String& text)
Document* document = e->document();
if (m_sheet) {
if (m_sheet->isLoading())
- document->styleSheetCollection()->removePendingSheet(e);
+ document->styleSheetCollection()->removePendingSheet();
clearSheet();
}
@@ -169,7 +169,7 @@ bool StyleElement::sheetLoaded(Document* document)
if (isLoading())
return false;
- document->styleSheetCollection()->removePendingSheet(m_sheet->ownerNode());
+ document->styleSheetCollection()->removePendingSheet();
return true;
}
diff --git a/chromium/third_party/WebKit/Source/core/dom/StyleSheetCollection.cpp b/chromium/third_party/WebKit/Source/core/dom/StyleSheetCollection.cpp
index a665b8074de..80ca3d2a967 100644
--- a/chromium/third_party/WebKit/Source/core/dom/StyleSheetCollection.cpp
+++ b/chromium/third_party/WebKit/Source/core/dom/StyleSheetCollection.cpp
@@ -37,11 +37,13 @@
#include "core/dom/DocumentStyleSheetCollection.h"
#include "core/dom/Element.h"
#include "core/dom/ProcessingInstruction.h"
-#include "core/dom/shadow/ShadowRoot.h"
#include "core/html/HTMLIFrameElement.h"
#include "core/html/HTMLLinkElement.h"
#include "core/html/HTMLStyleElement.h"
+#include "core/page/Page.h"
+#include "core/page/PageGroup.h"
#include "core/page/Settings.h"
+#include "core/page/UserContentURLPattern.h"
#include "core/svg/SVGStyleElement.h"
namespace WebCore {
@@ -84,115 +86,7 @@ void StyleSheetCollection::removeStyleSheetCandidateNode(Node* node, ContainerNo
m_scopingNodesForStyleScoped.remove(scopingNode);
}
-StyleSheetCollection::StyleResolverUpdateType StyleSheetCollection::compareStyleSheets(const Vector<RefPtr<CSSStyleSheet> >& oldStyleSheets, const Vector<RefPtr<CSSStyleSheet> >& newStylesheets, Vector<StyleSheetContents*>& addedSheets)
-{
- // Find out which stylesheets are new.
- unsigned newStylesheetCount = newStylesheets.size();
- unsigned oldStylesheetCount = oldStyleSheets.size();
- if (newStylesheetCount < oldStylesheetCount)
- return Reconstruct;
-
- unsigned newIndex = 0;
- for (unsigned oldIndex = 0; oldIndex < oldStylesheetCount; ++oldIndex) {
- if (newIndex >= newStylesheetCount)
- return Reconstruct;
- while (oldStyleSheets[oldIndex] != newStylesheets[newIndex]) {
- addedSheets.append(newStylesheets[newIndex]->contents());
- ++newIndex;
- if (newIndex == newStylesheetCount)
- return Reconstruct;
- }
- ++newIndex;
- }
- bool hasInsertions = !addedSheets.isEmpty();
- while (newIndex < newStylesheetCount) {
- addedSheets.append(newStylesheets[newIndex]->contents());
- ++newIndex;
- }
- // If all new sheets were added at the end of the list we can just add them to existing StyleResolver.
- // If there were insertions we need to re-add all the stylesheets so rules are ordered correctly.
- return hasInsertions ? Reset : Additive;
-}
-
-bool StyleSheetCollection::activeLoadingStyleSheetLoaded(const Vector<RefPtr<CSSStyleSheet> >& newStyleSheets)
-{
- // StyleSheets of <style> elements that @import stylesheets are active but loading. We need to trigger a full recalc when such loads are done.
- bool hasActiveLoadingStylesheet = false;
- unsigned newStylesheetCount = newStyleSheets.size();
- for (unsigned i = 0; i < newStylesheetCount; ++i) {
- if (newStyleSheets[i]->isLoading())
- hasActiveLoadingStylesheet = true;
- }
- if (m_hadActiveLoadingStylesheet && !hasActiveLoadingStylesheet) {
- m_hadActiveLoadingStylesheet = false;
- return true;
- }
- m_hadActiveLoadingStylesheet = hasActiveLoadingStylesheet;
- return false;
-}
-
-void StyleSheetCollection::analyzeStyleSheetChange(StyleResolverUpdateMode updateMode, const Vector<RefPtr<CSSStyleSheet> >& oldStyleSheets, const Vector<RefPtr<CSSStyleSheet> >& newStyleSheets, StyleResolverUpdateType& styleResolverUpdateType, bool& requiresFullStyleRecalc)
-{
- styleResolverUpdateType = Reconstruct;
- requiresFullStyleRecalc = true;
-
- if (activeLoadingStyleSheetLoaded(newStyleSheets))
- return;
-
- if (updateMode != AnalyzedStyleUpdate)
- return;
- if (!document()->styleResolverIfExists())
- return;
-
- // Find out which stylesheets are new.
- Vector<StyleSheetContents*> addedSheets;
- styleResolverUpdateType = compareStyleSheets(oldStyleSheets, newStyleSheets, addedSheets);
-
- // If we are already parsing the body and so may have significant amount of elements, put some effort into trying to avoid style recalcs.
- if (!document()->body() || document()->hasNodesWithPlaceholderStyle())
- return;
- StyleInvalidationAnalysis invalidationAnalysis(addedSheets);
- if (invalidationAnalysis.dirtiesAllStyle())
- return;
- invalidationAnalysis.invalidateStyle(document());
- requiresFullStyleRecalc = false;
-}
-
-void StyleSheetCollection::resetAllRuleSetsInTreeScope(StyleResolver* styleResolver)
-{
- // FIXME: If many web developers use style scoped, implement reset RuleSets in per-scoping node manner.
- if (DocumentOrderedList* styleScopedScopingNodes = scopingNodesForStyleScoped()) {
- for (DocumentOrderedList::iterator it = styleScopedScopingNodes->begin(); it != styleScopedScopingNodes->end(); ++it)
- styleResolver->resetAuthorStyle(toContainerNode(*it));
- }
- if (ListHashSet<Node*, 4>* removedNodes = scopingNodesRemoved()) {
- for (ListHashSet<Node*, 4>::iterator it = removedNodes->begin(); it != removedNodes->end(); ++it)
- styleResolver->resetAuthorStyle(toContainerNode(*it));
- }
- styleResolver->resetAuthorStyle(toContainerNode(m_treeScope->rootNode()));
-}
-
-static bool styleSheetsUseRemUnits(const Vector<RefPtr<CSSStyleSheet> >& sheets)
-{
- for (unsigned i = 0; i < sheets.size(); ++i) {
- if (sheets[i]->contents()->usesRemUnits())
- return true;
- }
- return false;
-}
-
-void StyleSheetCollection::updateUsesRemUnits()
-{
- m_usesRemUnits = styleSheetsUseRemUnits(m_activeAuthorStyleSheets);
-}
-
-StyleSheetCollectionForDocument::StyleSheetCollectionForDocument(TreeScope* treeScope)
- : StyleSheetCollection(treeScope)
-{
- ASSERT(treeScope->rootNode() == treeScope->rootNode()->document());
-}
-
-void StyleSheetCollectionForDocument::collectStyleSheets(DocumentStyleSheetCollection* collections, Vector<RefPtr<StyleSheet> >& styleSheets, Vector<RefPtr<CSSStyleSheet> >& activeSheets)
+void StyleSheetCollection::collectStyleSheets(DocumentStyleSheetCollection* collections, Vector<RefPtr<StyleSheet> >& styleSheets, Vector<RefPtr<CSSStyleSheet> >& activeSheets)
{
if (document()->settings() && !document()->settings()->authorAndUserStylesEnabled())
return;
@@ -279,6 +173,80 @@ void StyleSheetCollectionForDocument::collectStyleSheets(DocumentStyleSheetColle
}
}
+StyleSheetCollection::StyleResolverUpdateType StyleSheetCollection::compareStyleSheets(const Vector<RefPtr<CSSStyleSheet> >& oldStyleSheets, const Vector<RefPtr<CSSStyleSheet> >& newStylesheets, Vector<StyleSheetContents*>& addedSheets)
+{
+ // Find out which stylesheets are new.
+ unsigned newStylesheetCount = newStylesheets.size();
+ unsigned oldStylesheetCount = oldStyleSheets.size();
+ if (newStylesheetCount < oldStylesheetCount)
+ return Reconstruct;
+
+ unsigned newIndex = 0;
+ for (unsigned oldIndex = 0; oldIndex < oldStylesheetCount; ++oldIndex) {
+ if (newIndex >= newStylesheetCount)
+ return Reconstruct;
+ while (oldStyleSheets[oldIndex] != newStylesheets[newIndex]) {
+ addedSheets.append(newStylesheets[newIndex]->contents());
+ ++newIndex;
+ if (newIndex == newStylesheetCount)
+ return Reconstruct;
+ }
+ ++newIndex;
+ }
+ bool hasInsertions = !addedSheets.isEmpty();
+ while (newIndex < newStylesheetCount) {
+ addedSheets.append(newStylesheets[newIndex]->contents());
+ ++newIndex;
+ }
+ // If all new sheets were added at the end of the list we can just add them to existing StyleResolver.
+ // If there were insertions we need to re-add all the stylesheets so rules are ordered correctly.
+ return hasInsertions ? Reset : Additive;
+}
+
+bool StyleSheetCollection::activeLoadingStyleSheetLoaded(const Vector<RefPtr<CSSStyleSheet> >& newStyleSheets)
+{
+ // StyleSheets of <style> elements that @import stylesheets are active but loading. We need to trigger a full recalc when such loads are done.
+ bool hasActiveLoadingStylesheet = false;
+ unsigned newStylesheetCount = newStyleSheets.size();
+ for (unsigned i = 0; i < newStylesheetCount; ++i) {
+ if (newStyleSheets[i]->isLoading())
+ hasActiveLoadingStylesheet = true;
+ }
+ if (m_hadActiveLoadingStylesheet && !hasActiveLoadingStylesheet) {
+ m_hadActiveLoadingStylesheet = false;
+ return true;
+ }
+ m_hadActiveLoadingStylesheet = hasActiveLoadingStylesheet;
+ return false;
+}
+
+void StyleSheetCollection::analyzeStyleSheetChange(StyleResolverUpdateMode updateMode, const Vector<RefPtr<CSSStyleSheet> >& oldStyleSheets, const Vector<RefPtr<CSSStyleSheet> >& newStyleSheets, StyleResolverUpdateType& styleResolverUpdateType, bool& requiresFullStyleRecalc)
+{
+ styleResolverUpdateType = Reconstruct;
+ requiresFullStyleRecalc = true;
+
+ if (activeLoadingStyleSheetLoaded(newStyleSheets))
+ return;
+
+ if (updateMode != AnalyzedStyleUpdate)
+ return;
+ if (!document()->styleResolverIfExists())
+ return;
+
+ // Find out which stylesheets are new.
+ Vector<StyleSheetContents*> addedSheets;
+ styleResolverUpdateType = compareStyleSheets(oldStyleSheets, newStyleSheets, addedSheets);
+
+ // If we are already parsing the body and so may have significant amount of elements, put some effort into trying to avoid style recalcs.
+ if (!document()->body() || document()->hasNodesWithPlaceholderStyle())
+ return;
+ StyleInvalidationAnalysis invalidationAnalysis(addedSheets);
+ if (invalidationAnalysis.dirtiesAllStyle())
+ return;
+ invalidationAnalysis.invalidateStyle(document());
+ requiresFullStyleRecalc = false;
+}
+
static void collectActiveCSSStyleSheetsFromSeamlessParents(Vector<RefPtr<CSSStyleSheet> >& sheets, Document* document)
{
HTMLIFrameElement* seamlessParentIFrame = document->seamlessParentIFrame();
@@ -287,7 +255,7 @@ static void collectActiveCSSStyleSheetsFromSeamlessParents(Vector<RefPtr<CSSStyl
sheets.append(seamlessParentIFrame->document()->styleSheetCollection()->activeAuthorStyleSheets());
}
-bool StyleSheetCollectionForDocument::updateActiveStyleSheets(DocumentStyleSheetCollection* collections, StyleResolverUpdateMode updateMode)
+bool StyleSheetCollection::updateActiveStyleSheets(DocumentStyleSheetCollection* collections, StyleResolverUpdateMode updateMode, StyleResolverUpdateType& styleResolverUpdateType)
{
Vector<RefPtr<StyleSheet> > styleSheets;
Vector<RefPtr<CSSStyleSheet> > activeCSSStyleSheets;
@@ -296,20 +264,25 @@ bool StyleSheetCollectionForDocument::updateActiveStyleSheets(DocumentStyleSheet
collectActiveCSSStyleSheetsFromSeamlessParents(activeCSSStyleSheets, document());
collectStyleSheets(collections, styleSheets, activeCSSStyleSheets);
- StyleResolverUpdateType styleResolverUpdateType;
bool requiresFullStyleRecalc;
analyzeStyleSheetChange(updateMode, activeAuthorStyleSheets(), activeCSSStyleSheets, styleResolverUpdateType, requiresFullStyleRecalc);
if (styleResolverUpdateType == Reconstruct) {
document()->clearStyleResolver();
} else {
- StyleResolver* styleResolver = document()->styleResolverIfExists();
- ASSERT(styleResolver);
- // FIXME: We might have already had styles in child treescope. In this case, we cannot use buildScopedStyleTreeInDocumentOrder.
- // Need to change "false" to some valid condition.
- styleResolver->setBuildScopedStyleTreeInDocumentOrder(false);
+ StyleResolver* styleResolver = document()->styleResolver();
+ styleResolver->setBuildScopedStyleTreeInDocumentOrder(!scopingNodesForStyleScoped());
if (styleResolverUpdateType == Reset) {
- resetAllRuleSetsInTreeScope(styleResolver);
+ if (DocumentOrderedList* styleScopedScopingNodes = scopingNodesForStyleScoped()) {
+ for (DocumentOrderedList::iterator it = styleScopedScopingNodes->begin(); it != styleScopedScopingNodes->end(); ++it)
+ styleResolver->resetAuthorStyle(toContainerNode(*it));
+ }
+ if (ListHashSet<Node*, 4>* removedNodes = scopingNodesRemoved()) {
+ for (ListHashSet<Node*, 4>::iterator it = removedNodes->begin(); it != removedNodes->end(); ++it)
+ styleResolver->resetAuthorStyle(toContainerNode(*it));
+ }
+ ASSERT(m_treeScope->rootNode() == document());
+ styleResolver->resetAuthorStyle(toContainerNode(m_treeScope->rootNode()));
styleResolver->appendAuthorStyleSheets(0, activeCSSStyleSheets);
} else {
ASSERT(styleResolverUpdateType == Additive);
@@ -319,7 +292,6 @@ bool StyleSheetCollectionForDocument::updateActiveStyleSheets(DocumentStyleSheet
m_scopingNodesForStyleScoped.didRemoveScopingNodes();
m_activeAuthorStyleSheets.swap(activeCSSStyleSheets);
m_styleSheetsForStyleSheetList.swap(styleSheets);
- updateUsesRemUnits();
return requiresFullStyleRecalc;
}
diff --git a/chromium/third_party/WebKit/Source/core/dom/StyleSheetCollection.h b/chromium/third_party/WebKit/Source/core/dom/StyleSheetCollection.h
index ce410343379..91da7850001 100644
--- a/chromium/third_party/WebKit/Source/core/dom/StyleSheetCollection.h
+++ b/chromium/third_party/WebKit/Source/core/dom/StyleSheetCollection.h
@@ -52,63 +52,47 @@ class StyleSheetList;
class StyleSheetCollection {
WTF_MAKE_NONCOPYABLE(StyleSheetCollection); WTF_MAKE_FAST_ALLOCATED;
public:
+ explicit StyleSheetCollection(TreeScope*);
+
void addStyleSheetCandidateNode(Node*, bool createdByParser);
void removeStyleSheetCandidateNode(Node*, ContainerNode* scopingNode);
- bool hasStyleSheetCandidateNodes() const { return !m_styleSheetCandidateNodes.isEmpty(); }
Vector<RefPtr<CSSStyleSheet> >& activeAuthorStyleSheets() { return m_activeAuthorStyleSheets; }
Vector<RefPtr<StyleSheet> >& styleSheetsForStyleSheetList() { return m_styleSheetsForStyleSheetList; }
const Vector<RefPtr<CSSStyleSheet> >& activeAuthorStyleSheets() const { return m_activeAuthorStyleSheets; }
const Vector<RefPtr<StyleSheet> >& styleSheetsForStyleSheetList() const { return m_styleSheetsForStyleSheetList; }
- bool usesRemUnits() const { return m_usesRemUnits; }
-
DocumentOrderedList& styleSheetCandidateNodes() { return m_styleSheetCandidateNodes; }
DocumentOrderedList* scopingNodesForStyleScoped() { return m_scopingNodesForStyleScoped.scopingNodes(); }
ListHashSet<Node*, 4>* scopingNodesRemoved() { return m_scopingNodesForStyleScoped.scopingNodesRemoved(); }
-protected:
- explicit StyleSheetCollection(TreeScope*);
-
- Document* document() { return m_treeScope->documentScope(); }
-
enum StyleResolverUpdateType {
Reconstruct,
Reset,
Additive
};
- void analyzeStyleSheetChange(StyleResolverUpdateMode, const Vector<RefPtr<CSSStyleSheet> >& oldStyleSheets, const Vector<RefPtr<CSSStyleSheet> >& newStylesheets, StyleResolverUpdateType&, bool& requiresFullStyleRecalc);
- void resetAllRuleSetsInTreeScope(StyleResolver*);
- void updateUsesRemUnits();
+ bool updateActiveStyleSheets(DocumentStyleSheetCollection*, StyleResolverUpdateMode, StyleResolverUpdateType&);
private:
+ Document* document() { return m_treeScope->documentScope(); }
+
+ void collectStyleSheets(DocumentStyleSheetCollection* collections, Vector<RefPtr<StyleSheet> >& styleSheets, Vector<RefPtr<CSSStyleSheet> >& activeSheets);
+
StyleResolverUpdateType compareStyleSheets(const Vector<RefPtr<CSSStyleSheet> >& oldStyleSheets, const Vector<RefPtr<CSSStyleSheet> >& newStylesheets, Vector<StyleSheetContents*>& addedSheets);
bool activeLoadingStyleSheetLoaded(const Vector<RefPtr<CSSStyleSheet> >& newStyleSheets);
-protected:
+ void analyzeStyleSheetChange(StyleResolverUpdateMode, const Vector<RefPtr<CSSStyleSheet> >& oldStyleSheets, const Vector<RefPtr<CSSStyleSheet> >& newStylesheets, StyleResolverUpdateType&, bool& requiresFullStyleRecalc);
+
Vector<RefPtr<StyleSheet> > m_styleSheetsForStyleSheetList;
Vector<RefPtr<CSSStyleSheet> > m_activeAuthorStyleSheets;
TreeScope* m_treeScope;
bool m_hadActiveLoadingStylesheet;
- bool m_usesRemUnits;
DocumentOrderedList m_styleSheetCandidateNodes;
StyleSheetScopingNodeList m_scopingNodesForStyleScoped;
};
-// FIXME: rename this class to DocumentStyleSheetCollection.
-class StyleSheetCollectionForDocument FINAL : public StyleSheetCollection {
- WTF_MAKE_NONCOPYABLE(StyleSheetCollectionForDocument); WTF_MAKE_FAST_ALLOCATED;
-public:
- explicit StyleSheetCollectionForDocument(TreeScope*);
-
- bool updateActiveStyleSheets(DocumentStyleSheetCollection*, StyleResolverUpdateMode);
-
-private:
- void collectStyleSheets(DocumentStyleSheetCollection*, Vector<RefPtr<StyleSheet> >& styleSheets, Vector<RefPtr<CSSStyleSheet> >& activeSheets);
-};
-
}
#endif
diff --git a/chromium/third_party/WebKit/Source/core/dom/shadow/ContentDistributor.cpp b/chromium/third_party/WebKit/Source/core/dom/shadow/ContentDistributor.cpp
index de321d98914..9bbccdc5711 100644
--- a/chromium/third_party/WebKit/Source/core/dom/shadow/ContentDistributor.cpp
+++ b/chromium/third_party/WebKit/Source/core/dom/shadow/ContentDistributor.cpp
@@ -33,6 +33,7 @@
#include "core/html/shadow/HTMLContentElement.h"
#include "core/html/shadow/HTMLShadowElement.h"
+
namespace WebCore {
void ContentDistribution::swap(ContentDistribution& other)
@@ -156,6 +157,8 @@ InsertionPoint* ContentDistributor::findInsertionPointFor(const Node* key) const
void ContentDistributor::populate(Node* node, Vector<Node*>& pool)
{
+ node->lazyReattachIfAttached();
+
if (!isActiveInsertionPoint(node)) {
pool.append(node);
return;
@@ -224,14 +227,6 @@ void ContentDistributor::distribute(Element* host)
if (ElementShadow* shadow = shadowOfParentForDistribution(shadowElement))
shadow->setNeedsDistributionRecalc();
}
-
- // Detach all nodes that were not distributed and have a renderer.
- for (size_t i = 0; i < pool.size(); ++i) {
- if (distributed[i])
- continue;
- if (pool[i]->renderer())
- pool[i]->lazyReattachIfAttached();
- }
}
void ContentDistributor::distributeSelectionsTo(InsertionPoint* insertionPoint, const Vector<Node*>& pool, Vector<bool>& distributed)
@@ -251,6 +246,7 @@ void ContentDistributor::distributeSelectionsTo(InsertionPoint* insertionPoint,
distributed[i] = true;
}
+ insertionPoint->lazyReattachIfAttached();
insertionPoint->setDistribution(distribution);
}
@@ -258,6 +254,7 @@ void ContentDistributor::distributeNodeChildrenTo(InsertionPoint* insertionPoint
{
ContentDistribution distribution;
for (Node* node = containerNode->firstChild(); node; node = node->nextSibling()) {
+ node->lazyReattachIfAttached();
if (isActiveInsertionPoint(node)) {
InsertionPoint* innerInsertionPoint = toInsertionPoint(node);
if (innerInsertionPoint->hasDistribution()) {
@@ -277,6 +274,7 @@ void ContentDistributor::distributeNodeChildrenTo(InsertionPoint* insertionPoint
}
}
+ insertionPoint->lazyReattachIfAttached();
insertionPoint->setDistribution(distribution);
}
diff --git a/chromium/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp b/chromium/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp
index c00c3c90c01..b4626d77409 100644
--- a/chromium/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp
+++ b/chromium/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp
@@ -52,48 +52,6 @@ InsertionPoint::~InsertionPoint()
{
}
-void InsertionPoint::setDistribution(ContentDistribution& distribution)
-{
- if (shouldUseFallbackElements()) {
- for (Node* child = firstChild(); child; child = child->nextSibling())
- child->lazyReattachIfAttached();
- }
-
- // Attempt not to reattach nodes that would be distributed to the exact same
- // location by comparing the old and new distributions.
-
- size_t i = 0;
- size_t j = 0;
-
- for ( ; i < m_distribution.size() && j < distribution.size(); ++i, ++j) {
- if (m_distribution.size() < distribution.size()) {
- // If the new distribution is larger than the old one, reattach all nodes in
- // the new distribution that were inserted.
- for ( ; j < distribution.size() && m_distribution.at(i) != distribution.at(j); ++j)
- distribution.at(j)->lazyReattachIfAttached();
- } else if (m_distribution.size() > distribution.size()) {
- // If the old distribution is larger than the new one, reattach all nodes in
- // the old distribution that were removed.
- for ( ; i < m_distribution.size() && m_distribution.at(i) != distribution.at(j); ++i)
- m_distribution.at(i)->lazyReattachIfAttached();
- } else if (m_distribution.at(i) != distribution.at(j)) {
- // If both distributions are the same length reattach both old and new.
- m_distribution.at(i)->lazyReattachIfAttached();
- distribution.at(j)->lazyReattachIfAttached();
- }
- }
-
- // If we hit the end of either list above we need to reattach all remaining nodes.
-
- for ( ; i < m_distribution.size(); ++i)
- m_distribution.at(i)->lazyReattachIfAttached();
-
- for ( ; j < distribution.size(); ++j)
- distribution.at(j)->lazyReattachIfAttached();
-
- m_distribution.swap(distribution);
-}
-
void InsertionPoint::attach(const AttachContext& context)
{
for (size_t i = 0; i < m_distribution.size(); ++i) {
diff --git a/chromium/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.h b/chromium/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.h
index b7031292e6f..993ea347969 100644
--- a/chromium/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.h
+++ b/chromium/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.h
@@ -44,7 +44,7 @@ public:
virtual ~InsertionPoint();
bool hasDistribution() const { return !m_distribution.isEmpty(); }
- void setDistribution(ContentDistribution&);
+ void setDistribution(ContentDistribution& distribution) { m_distribution.swap(distribution); }
void clearDistribution() { m_distribution.clear(); }
bool isActive() const;
diff --git a/chromium/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp b/chromium/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp
index 1385db124da..a218b17f3a8 100644
--- a/chromium/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp
+++ b/chromium/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp
@@ -29,7 +29,6 @@
#include "bindings/v8/ExceptionState.h"
#include "core/css/resolver/StyleResolver.h"
-#include "core/dom/DocumentStyleSheetCollection.h"
#include "core/dom/Text.h"
#include "core/dom/shadow/ContentDistributor.h"
#include "core/dom/shadow/ElementShadow.h"
@@ -77,8 +76,6 @@ ShadowRoot::~ShadowRoot()
ASSERT(!m_prev);
ASSERT(!m_next);
- documentInternal()->styleSheetCollection()->didRemoveShadowRoot(this);
-
// We cannot let ContainerNode destructor call willBeDeletedFrom()
// for this ShadowRoot instance because TreeScope destructor
// clears Node::m_treeScope thus ContainerNode is no longer able
diff --git a/chromium/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.h b/chromium/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.h
index 993fdb2efd2..3bfcc3dd49f 100644
--- a/chromium/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.h
+++ b/chromium/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.h
@@ -149,17 +149,6 @@ inline ShadowRoot* toShadowRoot(Node* node)
return const_cast<ShadowRoot*>(toShadowRoot(static_cast<const Node*>(node)));
}
-inline const ShadowRoot* toShadowRoot(const TreeScope* treeScope)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!treeScope || (treeScope->rootNode() && treeScope->rootNode()->isShadowRoot()));
- return static_cast<const ShadowRoot*>(treeScope);
-}
-
-inline ShadowRoot* toShadowRoot(TreeScope* treeScope)
-{
- return const_cast<ShadowRoot*>(toShadowRoot(static_cast<const TreeScope*>(treeScope)));
-}
-
} // namespace
#endif
diff --git a/chromium/third_party/WebKit/Source/core/editing/Editor.cpp b/chromium/third_party/WebKit/Source/core/editing/Editor.cpp
index 340f11ad0c7..5931025ea9a 100644
--- a/chromium/third_party/WebKit/Source/core/editing/Editor.cpp
+++ b/chromium/third_party/WebKit/Source/core/editing/Editor.cpp
@@ -60,10 +60,10 @@
#include "core/editing/VisibleUnits.h"
#include "core/editing/htmlediting.h"
#include "core/editing/markup.h"
-#include "core/fetch/ResourceFetcher.h"
#include "core/html/HTMLImageElement.h"
#include "core/html/HTMLInputElement.h"
#include "core/html/HTMLTextAreaElement.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/page/EditorClient.h"
#include "core/page/EventHandler.h"
#include "core/page/FocusController.h"
diff --git a/chromium/third_party/WebKit/Source/core/features.gypi b/chromium/third_party/WebKit/Source/core/features.gypi
index 40a89de7eb2..3ed82e7f0ef 100644
--- a/chromium/third_party/WebKit/Source/core/features.gypi
+++ b/chromium/third_party/WebKit/Source/core/features.gypi
@@ -63,6 +63,7 @@
'ENABLE_MEDIA_CAPTURE=1',
'ENABLE_NOTIFICATIONS=0',
'ENABLE_ORIENTATION_EVENTS=1',
+ 'ENABLE_PRINTING=0',
'ENABLE_NAVIGATOR_CONTENT_UTILS=0',
'WTF_USE_NATIVE_FULLSCREEN_VIDEO=1',
],
@@ -77,6 +78,7 @@
'ENABLE_NAVIGATOR_CONTENT_UTILS=1',
'ENABLE_NOTIFICATIONS=1',
'ENABLE_ORIENTATION_EVENTS=0',
+ 'ENABLE_PRINTING=1',
'ENABLE_WEB_AUDIO=1',
],
}],
diff --git a/chromium/third_party/WebKit/Source/core/history/BackForwardClient.h b/chromium/third_party/WebKit/Source/core/history/BackForwardClient.h
index 0a3cf738f91..3bbc8bc4032 100644
--- a/chromium/third_party/WebKit/Source/core/history/BackForwardClient.h
+++ b/chromium/third_party/WebKit/Source/core/history/BackForwardClient.h
@@ -38,9 +38,17 @@ class BackForwardClient {
public:
virtual ~BackForwardClient() { }
- virtual void didAddItem() = 0;
+ virtual void addItem(PassRefPtr<HistoryItem>) = 0;
+
+ virtual void goToItem(HistoryItem*) = 0;
+
+ virtual HistoryItem* itemAtIndex(int) = 0;
virtual int backListCount() = 0;
virtual int forwardListCount() = 0;
+
+ virtual bool isActive() = 0;
+
+ virtual void close() = 0;
};
} // namespace WebCore
diff --git a/chromium/third_party/WebKit/Source/core/history/BackForwardController.cpp b/chromium/third_party/WebKit/Source/core/history/BackForwardController.cpp
index 45fde048b80..5e59897c5bd 100644
--- a/chromium/third_party/WebKit/Source/core/history/BackForwardController.cpp
+++ b/chromium/third_party/WebKit/Source/core/history/BackForwardController.cpp
@@ -28,9 +28,6 @@
#include "core/history/BackForwardClient.h"
#include "core/history/HistoryItem.h"
-#include "core/loader/FrameLoader.h"
-#include "core/loader/FrameLoaderClient.h"
-#include "core/page/Frame.h"
#include "core/page/Page.h"
namespace WebCore {
@@ -51,29 +48,58 @@ PassOwnPtr<BackForwardController> BackForwardController::create(Page* page, Back
return adoptPtr(new BackForwardController(page, client));
}
-bool BackForwardController::goBackOrForward(int distance)
+void BackForwardController::goBackOrForward(int distance)
{
- ASSERT(distance);
- if (distance > forwardCount())
- distance = forwardCount();
- else if (distance < -backCount())
- distance = backCount();
-
- if (!distance)
- return false;
- m_page->mainFrame()->loader()->client()->navigateBackForward(distance);
- return true;
+ if (distance == 0)
+ return;
+
+ HistoryItem* item = itemAtIndex(distance);
+ if (!item) {
+ if (distance > 0) {
+ if (forwardCount())
+ item = itemAtIndex(forwardCount());
+ } else {
+ if (backCount())
+ item = itemAtIndex(-backCount());
+ }
+ }
+
+ if (!item)
+ return;
+
+ m_page->goToItem(item);
+}
+
+bool BackForwardController::goBack()
+{
+ HistoryItem* item = backItem();
+
+ if (item) {
+ m_page->goToItem(item);
+ return true;
+ }
+ return false;
+}
+
+bool BackForwardController::goForward()
+{
+ HistoryItem* item = forwardItem();
+
+ if (item) {
+ m_page->goToItem(item);
+ return true;
+ }
+ return false;
}
void BackForwardController::addItem(PassRefPtr<HistoryItem> item)
{
- m_currentItem = item;
- m_client->didAddItem();
+ m_client->addItem(item);
}
void BackForwardController::setCurrentItem(HistoryItem* item)
{
- m_currentItem = item;
+ m_client->goToItem(item);
}
int BackForwardController::count() const
@@ -91,4 +117,19 @@ int BackForwardController::forwardCount() const
return m_client->forwardListCount();
}
+HistoryItem* BackForwardController::itemAtIndex(int i)
+{
+ return m_client->itemAtIndex(i);
+}
+
+bool BackForwardController::isActive()
+{
+ return m_client->isActive();
+}
+
+void BackForwardController::close()
+{
+ m_client->close();
+}
+
} // namespace WebCore
diff --git a/chromium/third_party/WebKit/Source/core/history/BackForwardController.h b/chromium/third_party/WebKit/Source/core/history/BackForwardController.h
index 79c48a02a5a..d315fd6dfaa 100644
--- a/chromium/third_party/WebKit/Source/core/history/BackForwardController.h
+++ b/chromium/third_party/WebKit/Source/core/history/BackForwardController.h
@@ -46,26 +46,33 @@ public:
BackForwardClient* client() const { return m_client; }
- bool goBackOrForward(int distance);
- bool goBack() { return goBackOrForward(-1); }
- bool goForward() { return goBackOrForward(1); }
+ void goBackOrForward(int distance);
+
+ bool goBack();
+ bool goForward();
void addItem(PassRefPtr<HistoryItem>);
void setCurrentItem(HistoryItem*);
- HistoryItem* currentItem() { return m_currentItem.get(); }
int count() const;
int backCount() const;
int forwardCount() const;
+ HistoryItem* itemAtIndex(int);
+
+ bool isActive();
+
+ void close();
+
+ HistoryItem* backItem() { return itemAtIndex(-1); }
+ HistoryItem* currentItem() { return itemAtIndex(0); }
+ HistoryItem* forwardItem() { return itemAtIndex(1); }
+
private:
BackForwardController(Page*, BackForwardClient*);
Page* m_page;
BackForwardClient* m_client;
-
- // FIXME: Ideally, we could derive this from HistoryController, but the rules for setting it are non-obvious.
- RefPtr<HistoryItem> m_currentItem;
};
} // namespace WebCore
diff --git a/chromium/third_party/WebKit/Source/core/history/HistoryItem.cpp b/chromium/third_party/WebKit/Source/core/history/HistoryItem.cpp
index 4db012dd42e..1a2c317a1d5 100644
--- a/chromium/third_party/WebKit/Source/core/history/HistoryItem.cpp
+++ b/chromium/third_party/WebKit/Source/core/history/HistoryItem.cpp
@@ -53,6 +53,18 @@ HistoryItem::HistoryItem()
{
}
+HistoryItem::HistoryItem(const String& urlString)
+ : m_urlString(urlString)
+ , m_originalURLString(urlString)
+ , m_lastVisitedTime(0)
+ , m_pageScaleFactor(0)
+ , m_isTargetItem(false)
+ , m_visitCount(0)
+ , m_itemSequenceNumber(generateSequenceNumber())
+ , m_documentSequenceNumber(generateSequenceNumber())
+{
+}
+
HistoryItem::~HistoryItem()
{
}
diff --git a/chromium/third_party/WebKit/Source/core/history/HistoryItem.h b/chromium/third_party/WebKit/Source/core/history/HistoryItem.h
index 8ac78ab71be..5b7119c6c7a 100644
--- a/chromium/third_party/WebKit/Source/core/history/HistoryItem.h
+++ b/chromium/third_party/WebKit/Source/core/history/HistoryItem.h
@@ -46,6 +46,10 @@ typedef Vector<RefPtr<HistoryItem> > HistoryItemVector;
class HistoryItem : public RefCounted<HistoryItem> {
public:
static PassRefPtr<HistoryItem> create() { return adoptRef(new HistoryItem); }
+ static PassRefPtr<HistoryItem> create(const String& urlString)
+ {
+ return adoptRef(new HistoryItem(urlString));
+ }
~HistoryItem();
@@ -132,6 +136,8 @@ public:
private:
HistoryItem();
+ explicit HistoryItem(const String& urlString);
+
explicit HistoryItem(const HistoryItem&);
void recordVisitAtTime(double);
diff --git a/chromium/third_party/WebKit/Source/core/html/BaseMultipleFieldsDateAndTimeInputType.cpp b/chromium/third_party/WebKit/Source/core/html/BaseMultipleFieldsDateAndTimeInputType.cpp
index 1c3a2a0ac8c..8ea2d94ce4e 100644
--- a/chromium/third_party/WebKit/Source/core/html/BaseMultipleFieldsDateAndTimeInputType.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/BaseMultipleFieldsDateAndTimeInputType.cpp
@@ -130,22 +130,22 @@ bool DateTimeFormatValidator::validateFormat(const String& format, const BaseMul
DateTimeEditElement* BaseMultipleFieldsDateAndTimeInputType::dateTimeEditElement() const
{
- return toDateTimeEditElement(element()->userAgentShadowRoot()->getElementById(ShadowElementNames::dateTimeEdit()));
+ return toDateTimeEditElement(element()->uaShadowElementById(ShadowElementNames::dateTimeEdit()));
}
SpinButtonElement* BaseMultipleFieldsDateAndTimeInputType::spinButtonElement() const
{
- return toSpinButtonElement(element()->userAgentShadowRoot()->getElementById(ShadowElementNames::spinButton()));
+ return toSpinButtonElement(element()->uaShadowElementById(ShadowElementNames::spinButton()));
}
ClearButtonElement* BaseMultipleFieldsDateAndTimeInputType::clearButtonElement() const
{
- return toClearButtonElement(element()->userAgentShadowRoot()->getElementById(ShadowElementNames::clearButton()));
+ return toClearButtonElement(element()->uaShadowElementById(ShadowElementNames::clearButton()));
}
PickerIndicatorElement* BaseMultipleFieldsDateAndTimeInputType::pickerIndicatorElement() const
{
- return toPickerIndicatorElement(element()->userAgentShadowRoot()->getElementById(ShadowElementNames::pickerIndicator()));
+ return toPickerIndicatorElement(element()->uaShadowElementById(ShadowElementNames::pickerIndicator()));
}
inline bool BaseMultipleFieldsDateAndTimeInputType::containsFocusedShadowElement() const
diff --git a/chromium/third_party/WebKit/Source/core/html/DOMURL.cpp b/chromium/third_party/WebKit/Source/core/html/DOMURL.cpp
index a7b7f7175cb..360cc2ff526 100644
--- a/chromium/third_party/WebKit/Source/core/html/DOMURL.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/DOMURL.cpp
@@ -29,10 +29,10 @@
#include "core/html/DOMURL.h"
#include "core/dom/ScriptExecutionContext.h"
-#include "core/fetch/MemoryCache.h"
#include "core/fileapi/Blob.h"
#include "core/fileapi/BlobURL.h"
#include "core/html/PublicURLManager.h"
+#include "core/loader/cache/MemoryCache.h"
#include "weborigin/KURL.h"
#include "wtf/MainThread.h"
diff --git a/chromium/third_party/WebKit/Source/core/html/FormAssociatedElement.cpp b/chromium/third_party/WebKit/Source/core/html/FormAssociatedElement.cpp
index 58f6654ae4c..a31e058e88b 100644
--- a/chromium/third_party/WebKit/Source/core/html/FormAssociatedElement.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/FormAssociatedElement.cpp
@@ -75,9 +75,6 @@ void FormAssociatedElement::didMoveToNewDocument(Document* oldDocument)
void FormAssociatedElement::insertedInto(ContainerNode* insertionPoint)
{
- if (m_form && insertionPoint->highestAncestor() != m_form->highestAncestor())
- setForm(0);
-
resetFormOwner();
if (!insertionPoint->inDocument())
return;
diff --git a/chromium/third_party/WebKit/Source/core/html/HTMLCollection.cpp b/chromium/third_party/WebKit/Source/core/html/HTMLCollection.cpp
index f4d175a0bde..613c57a069b 100644
--- a/chromium/third_party/WebKit/Source/core/html/HTMLCollection.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/HTMLCollection.cpp
@@ -211,7 +211,7 @@ template <> inline bool isMatchingElement(const HTMLCollection* htmlCollection,
case MapAreas:
return element->hasLocalName(areaTag);
case DocApplets:
- return element->hasLocalName(appletTag) || (element->hasLocalName(objectTag) && toHTMLObjectElement(element)->containsJavaApplet());
+ return element->hasLocalName(appletTag) || (element->hasLocalName(objectTag) && static_cast<HTMLObjectElement*>(element)->containsJavaApplet());
case DocEmbeds:
return element->hasLocalName(embedTag);
case DocLinks:
diff --git a/chromium/third_party/WebKit/Source/core/html/HTMLDocument.h b/chromium/third_party/WebKit/Source/core/html/HTMLDocument.h
index 927fdca66d8..993fbc0cb36 100644
--- a/chromium/third_party/WebKit/Source/core/html/HTMLDocument.h
+++ b/chromium/third_party/WebKit/Source/core/html/HTMLDocument.h
@@ -24,7 +24,7 @@
#define HTMLDocument_h
#include "core/dom/Document.h"
-#include "core/fetch/ResourceClient.h"
+#include "core/loader/cache/ResourceClient.h"
#include "wtf/HashCountedSet.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/html/HTMLElement.cpp b/chromium/third_party/WebKit/Source/core/html/HTMLElement.cpp
index 4e19dd02b72..6692228f53d 100644
--- a/chromium/third_party/WebKit/Source/core/html/HTMLElement.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/HTMLElement.cpp
@@ -1080,11 +1080,6 @@ void HTMLElement::handleKeypressEvent(KeyboardEvent* event)
{
if (!document()->settings() || !document()->settings()->spatialNavigationEnabled() || !supportsFocus())
return;
- // if the element is a text form control (like <input type=text> or <textarea>)
- // or has contentEditable attribute on, we should enter a space or newline
- // even in spatial navigation mode instead of handling it as a "click" action.
- if (isTextFormControl() || isContentEditable())
- return;
int charCode = event->charCode();
if (charCode == '\r' || charCode == ' ') {
dispatchSimulatedClick(event);
diff --git a/chromium/third_party/WebKit/Source/core/html/HTMLEmbedElement.cpp b/chromium/third_party/WebKit/Source/core/html/HTMLEmbedElement.cpp
index a04335ce91b..e0c1e7e4a39 100644
--- a/chromium/third_party/WebKit/Source/core/html/HTMLEmbedElement.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/HTMLEmbedElement.cpp
@@ -183,7 +183,7 @@ bool HTMLEmbedElement::rendererIsNeeded(const NodeRenderingContext& context)
ContainerNode* p = parentNode();
if (p && p->hasTagName(objectTag)) {
ASSERT(p->renderer());
- if (!toHTMLObjectElement(p)->useFallbackContent()) {
+ if (!static_cast<HTMLObjectElement*>(p)->useFallbackContent()) {
ASSERT(!p->renderer()->isEmbeddedObject());
return false;
}
diff --git a/chromium/third_party/WebKit/Source/core/html/HTMLFieldSetElement.cpp b/chromium/third_party/WebKit/Source/core/html/HTMLFieldSetElement.cpp
index d9ceedd819f..b3f3e9c8fc6 100644
--- a/chromium/third_party/WebKit/Source/core/html/HTMLFieldSetElement.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/HTMLFieldSetElement.cpp
@@ -116,7 +116,7 @@ void HTMLFieldSetElement::refreshElementsIfNeeded() const
for (Element* element = ElementTraversal::firstWithin(this); element; element = ElementTraversal::next(element, this)) {
if (element->hasTagName(objectTag)) {
- m_associatedElements.append(toHTMLObjectElement(element));
+ m_associatedElements.append(static_cast<HTMLObjectElement*>(element));
continue;
}
diff --git a/chromium/third_party/WebKit/Source/core/html/HTMLImageElement.cpp b/chromium/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
index 2f54b1083fc..571462bafbd 100644
--- a/chromium/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
@@ -28,9 +28,9 @@
#include "bindings/v8/ScriptEventListener.h"
#include "core/dom/Attribute.h"
#include "core/dom/EventNames.h"
-#include "core/fetch/ImageResource.h"
#include "core/html/HTMLFormElement.h"
#include "core/html/parser/HTMLParserIdioms.h"
+#include "core/loader/cache/ImageResource.h"
#include "core/rendering/RenderImage.h"
using namespace std;
@@ -179,11 +179,6 @@ void HTMLImageElement::attach(const AttachContext& context)
Node::InsertionNotificationRequest HTMLImageElement::insertedInto(ContainerNode* insertionPoint)
{
// m_form can be non-null if it was set in constructor.
- if (m_form && insertionPoint->highestAncestor() != m_form->highestAncestor()) {
- m_form->removeImgElement(this);
- m_form = 0;
- }
-
if (!m_form) {
m_form = findFormAncestor();
if (m_form)
diff --git a/chromium/third_party/WebKit/Source/core/html/HTMLImageLoader.cpp b/chromium/third_party/WebKit/Source/core/html/HTMLImageLoader.cpp
index f4954f7ab64..6b966acb800 100644
--- a/chromium/third_party/WebKit/Source/core/html/HTMLImageLoader.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/HTMLImageLoader.cpp
@@ -26,10 +26,10 @@
#include "core/dom/Element.h"
#include "core/dom/Event.h"
#include "core/dom/EventNames.h"
-#include "core/fetch/ImageResource.h"
#include "core/html/HTMLObjectElement.h"
#include "core/html/HTMLVideoElement.h"
#include "core/html/parser/HTMLParserIdioms.h"
+#include "core/loader/cache/ImageResource.h"
namespace WebCore {
@@ -69,7 +69,7 @@ void HTMLImageLoader::notifyFinished(Resource*)
bool loadError = cachedImage->errorOccurred() || cachedImage->response().httpStatusCode() >= 400;
if (loadError && element->hasTagName(HTMLNames::objectTag))
- toHTMLObjectElement(element.get())->renderFallbackContent();
+ static_cast<HTMLObjectElement*>(element.get())->renderFallbackContent();
}
}
diff --git a/chromium/third_party/WebKit/Source/core/html/HTMLImportLoader.cpp b/chromium/third_party/WebKit/Source/core/html/HTMLImportLoader.cpp
index 7cfbd2924ea..ef2d766d7ee 100644
--- a/chromium/third_party/WebKit/Source/core/html/HTMLImportLoader.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/HTMLImportLoader.cpp
@@ -32,19 +32,21 @@
#include "core/html/HTMLImportLoader.h"
#include "core/dom/Document.h"
-#include "core/fetch/ResourceFetcher.h"
#include "core/html/HTMLDocument.h"
#include "core/html/HTMLImportLoaderClient.h"
#include "core/loader/DocumentWriter.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/page/ContentSecurityPolicyResponseHeaders.h"
namespace WebCore {
-HTMLImportLoader::HTMLImportLoader(HTMLImport* parent, const KURL& url)
+HTMLImportLoader::HTMLImportLoader(HTMLImport* parent, const KURL& url, const ResourcePtr<RawResource>& resource)
: m_parent(parent)
, m_state(StateLoading)
+ , m_resource(resource)
, m_url(url)
{
+ m_resource->addClient(this);
}
HTMLImportLoader::~HTMLImportLoader()
@@ -56,12 +58,6 @@ HTMLImportLoader::~HTMLImportLoader()
m_resource->removeClient(this);
}
-void HTMLImportLoader::setResource(const ResourcePtr<RawResource>& resource)
-{
- m_resource = resource;
- m_resource->addClient(this);
-}
-
void HTMLImportLoader::responseReceived(Resource*, const ResourceResponse& response)
{
setState(startWritingAndParsing(response));
diff --git a/chromium/third_party/WebKit/Source/core/html/HTMLImportLoader.h b/chromium/third_party/WebKit/Source/core/html/HTMLImportLoader.h
index 5406049ac84..4b9b3996b2f 100644
--- a/chromium/third_party/WebKit/Source/core/html/HTMLImportLoader.h
+++ b/chromium/third_party/WebKit/Source/core/html/HTMLImportLoader.h
@@ -31,9 +31,9 @@
#ifndef HTMLImportLoader_h
#define HTMLImportLoader_h
-#include "core/fetch/RawResource.h"
-#include "core/fetch/ResourcePtr.h"
#include "core/html/HTMLImport.h"
+#include "core/loader/cache/RawResource.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "weborigin/KURL.h"
#include "wtf/RefCounted.h"
#include "wtf/Vector.h"
@@ -52,13 +52,12 @@ public:
StateReady
};
- HTMLImportLoader(HTMLImport*, const KURL&);
+ HTMLImportLoader(HTMLImport*, const KURL&, const ResourcePtr<RawResource>&);
virtual ~HTMLImportLoader();
Document* importedDocument() const;
const KURL& url() const { return m_url; }
- void setResource(const ResourcePtr<RawResource>&);
void addClient(HTMLImportLoaderClient*);
void removeClient(HTMLImportLoaderClient*);
void importDestroyed();
diff --git a/chromium/third_party/WebKit/Source/core/html/HTMLImportsController.cpp b/chromium/third_party/WebKit/Source/core/html/HTMLImportsController.cpp
index 9ebaa5c4637..cb2107ab860 100644
--- a/chromium/third_party/WebKit/Source/core/html/HTMLImportsController.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/HTMLImportsController.cpp
@@ -32,9 +32,9 @@
#include "core/html/HTMLImportsController.h"
#include "core/dom/Document.h"
-#include "core/fetch/ResourceFetcher.h"
#include "core/html/HTMLImportLoader.h"
#include "core/html/HTMLImportLoaderClient.h"
+#include "core/loader/cache/ResourceFetcher.h"
namespace WebCore {
@@ -78,14 +78,9 @@ PassRefPtr<HTMLImportLoader> HTMLImportsController::createLoader(HTMLImport* par
if (!resource)
return 0;
- RefPtr<HTMLImportLoader> loader = adoptRef(new HTMLImportLoader(parent, request.url()));
+ RefPtr<HTMLImportLoader> loader = adoptRef(new HTMLImportLoader(parent, request.url(), resource));
parent->appendChild(loader.get());
m_imports.append(loader);
-
- // We set resource after the import tree is built since
- // Resource::addClient() immediately calls back to feed the bytes when the resource is cached.
- loader->setResource(resource);
-
return loader.release();
}
diff --git a/chromium/third_party/WebKit/Source/core/html/HTMLImportsController.h b/chromium/third_party/WebKit/Source/core/html/HTMLImportsController.h
index 0a06c4ef1fb..b106d8ac358 100644
--- a/chromium/third_party/WebKit/Source/core/html/HTMLImportsController.h
+++ b/chromium/third_party/WebKit/Source/core/html/HTMLImportsController.h
@@ -31,9 +31,9 @@
#ifndef HTMLImportsController_h
#define HTMLImportsController_h
-#include "core/fetch/RawResource.h"
#include "core/html/HTMLImport.h"
#include "core/html/LinkResource.h"
+#include "core/loader/cache/RawResource.h"
#include "core/platform/Supplementable.h"
#include "core/platform/Timer.h"
#include "wtf/FastAllocBase.h"
diff --git a/chromium/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp b/chromium/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
index abc47635a06..cf9220a68c4 100644
--- a/chromium/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
@@ -37,12 +37,12 @@
#include "core/dom/DocumentStyleSheetCollection.h"
#include "core/dom/Event.h"
#include "core/dom/EventSender.h"
-#include "core/fetch/CSSStyleSheetResource.h"
-#include "core/fetch/FetchRequest.h"
-#include "core/fetch/ResourceFetcher.h"
#include "core/html/LinkImport.h"
#include "core/loader/FrameLoader.h"
#include "core/loader/FrameLoaderClient.h"
+#include "core/loader/cache/CSSStyleSheetResource.h"
+#include "core/loader/cache/FetchRequest.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/page/ContentSecurityPolicy.h"
#include "core/page/Frame.h"
#include "core/page/FrameView.h"
@@ -507,8 +507,6 @@ void LinkStyle::removePendingSheet(RemovePendingSheetNotificationType notificati
if (type == None)
return;
if (type == NonBlocking) {
- // Tell StyleSheetCollections to re-compute styleSheets of this m_owner's treescope.
- m_owner->document()->styleSheetCollection()->modifiedStyleSheetCandidateNode(m_owner);
// Document::removePendingSheet() triggers the style selector recalc for blocking sheets.
// FIXME: We don't have enough knowledge at this point to know if we're adding or removing a sheet
// so we can't call addedStyleSheet() or removedStyleSheet().
@@ -516,7 +514,7 @@ void LinkStyle::removePendingSheet(RemovePendingSheetNotificationType notificati
return;
}
- m_owner->document()->styleSheetCollection()->removePendingSheet(m_owner,
+ m_owner->document()->styleSheetCollection()->removePendingSheet(
notification == RemovePendingSheetNotifyImmediately
? DocumentStyleSheetCollection::RemovePendingSheetNotifyImmediately
: DocumentStyleSheetCollection::RemovePendingSheetNotifyLater);
diff --git a/chromium/third_party/WebKit/Source/core/html/HTMLLinkElement.h b/chromium/third_party/WebKit/Source/core/html/HTMLLinkElement.h
index 213a40d8c63..9d10b261a86 100644
--- a/chromium/third_party/WebKit/Source/core/html/HTMLLinkElement.h
+++ b/chromium/third_party/WebKit/Source/core/html/HTMLLinkElement.h
@@ -26,14 +26,14 @@
#include "core/css/CSSStyleSheet.h"
#include "core/dom/IconURL.h"
-#include "core/fetch/ResourcePtr.h"
-#include "core/fetch/StyleSheetResourceClient.h"
#include "core/html/DOMSettableTokenList.h"
#include "core/html/HTMLElement.h"
#include "core/html/LinkRelAttribute.h"
#include "core/html/LinkResource.h"
#include "core/loader/LinkLoader.h"
#include "core/loader/LinkLoaderClient.h"
+#include "core/loader/cache/ResourcePtr.h"
+#include "core/loader/cache/StyleSheetResourceClient.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/html/HTMLNameCollection.cpp b/chromium/third_party/WebKit/Source/core/html/HTMLNameCollection.cpp
index f4e5065cfaa..6e637b21300 100644
--- a/chromium/third_party/WebKit/Source/core/html/HTMLNameCollection.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/HTMLNameCollection.cpp
@@ -87,7 +87,7 @@ Element* HTMLNameCollection::virtualItemAfter(unsigned& offsetInArray, Element*
return current;
} else if (current->hasTagName(objectTag)) {
if ((current->getNameAttribute() == m_name || current->getIdAttribute() == m_name)
- && toHTMLObjectElement(current)->isDocNamedItem())
+ && static_cast<HTMLObjectElement*>(current)->isDocNamedItem())
return current;
} else if (current->hasTagName(imgTag)) {
if (current->getNameAttribute() == m_name || (current->getIdAttribute() == m_name && current->hasName()))
diff --git a/chromium/third_party/WebKit/Source/core/html/HTMLObjectElement.cpp b/chromium/third_party/WebKit/Source/core/html/HTMLObjectElement.cpp
index 3abb23644af..0dd38fd488b 100644
--- a/chromium/third_party/WebKit/Source/core/html/HTMLObjectElement.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/HTMLObjectElement.cpp
@@ -31,13 +31,13 @@
#include "core/dom/NodeList.h"
#include "core/dom/NodeTraversal.h"
#include "core/dom/Text.h"
-#include "core/fetch/ImageResource.h"
#include "core/html/FormDataList.h"
#include "core/html/HTMLDocument.h"
#include "core/html/HTMLImageLoader.h"
#include "core/html/HTMLMetaElement.h"
#include "core/html/HTMLParamElement.h"
#include "core/html/parser/HTMLParserIdioms.h"
+#include "core/loader/cache/ImageResource.h"
#include "core/page/Frame.h"
#include "core/page/Page.h"
#include "core/page/Settings.h"
@@ -450,7 +450,8 @@ bool HTMLObjectElement::containsJavaApplet() const
&& equalIgnoringCase(child->getNameAttribute(), "type")
&& MIMETypeRegistry::isJavaAppletMIMEType(child->getAttribute(valueAttr).string()))
return true;
- if (child->hasTagName(objectTag) && toHTMLObjectElement(child)->containsJavaApplet())
+ if (child->hasTagName(objectTag)
+ && static_cast<HTMLObjectElement*>(child)->containsJavaApplet())
return true;
if (child->hasTagName(appletTag))
return true;
diff --git a/chromium/third_party/WebKit/Source/core/html/HTMLObjectElement.h b/chromium/third_party/WebKit/Source/core/html/HTMLObjectElement.h
index 09de9171cd0..5b8d1d2bb40 100644
--- a/chromium/third_party/WebKit/Source/core/html/HTMLObjectElement.h
+++ b/chromium/third_party/WebKit/Source/core/html/HTMLObjectElement.h
@@ -109,12 +109,6 @@ private:
bool m_useFallbackContent : 1;
};
-inline HTMLObjectElement* toHTMLObjectElement(Node* node)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(HTMLNames::objectTag));
- return static_cast<HTMLObjectElement*>(node);
-}
-
}
#endif
diff --git a/chromium/third_party/WebKit/Source/core/html/ImageDocument.cpp b/chromium/third_party/WebKit/Source/core/html/ImageDocument.cpp
index 5015382d88b..64a0dc19c21 100644
--- a/chromium/third_party/WebKit/Source/core/html/ImageDocument.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/ImageDocument.cpp
@@ -31,7 +31,6 @@
#include "core/dom/EventNames.h"
#include "core/dom/MouseEvent.h"
#include "core/dom/RawDataDocumentParser.h"
-#include "core/fetch/ImageResource.h"
#include "core/html/HTMLBodyElement.h"
#include "core/html/HTMLHeadElement.h"
#include "core/html/HTMLHtmlElement.h"
@@ -40,6 +39,7 @@
#include "core/loader/DocumentLoader.h"
#include "core/loader/FrameLoader.h"
#include "core/loader/FrameLoaderClient.h"
+#include "core/loader/cache/ImageResource.h"
#include "core/page/Frame.h"
#include "core/page/FrameView.h"
#include "core/page/Page.h"
diff --git a/chromium/third_party/WebKit/Source/core/html/ImageInputType.cpp b/chromium/third_party/WebKit/Source/core/html/ImageInputType.cpp
index 85b049e6f3e..2ad3d907af8 100644
--- a/chromium/third_party/WebKit/Source/core/html/ImageInputType.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/ImageInputType.cpp
@@ -25,13 +25,13 @@
#include "HTMLNames.h"
#include "core/dom/MouseEvent.h"
-#include "core/fetch/ImageResource.h"
#include "core/html/FormDataList.h"
#include "core/html/HTMLFormElement.h"
#include "core/html/HTMLImageLoader.h"
#include "core/html/HTMLInputElement.h"
#include "core/html/InputTypeNames.h"
#include "core/html/parser/HTMLParserIdioms.h"
+#include "core/loader/cache/ImageResource.h"
#include "core/rendering/RenderImage.h"
#include "wtf/PassOwnPtr.h"
diff --git a/chromium/third_party/WebKit/Source/core/html/LinkResource.h b/chromium/third_party/WebKit/Source/core/html/LinkResource.h
index b4eeb3d44ad..8c6c84e0fda 100644
--- a/chromium/third_party/WebKit/Source/core/html/LinkResource.h
+++ b/chromium/third_party/WebKit/Source/core/html/LinkResource.h
@@ -31,7 +31,7 @@
#ifndef LinkResource_h
#define LinkResource_h
-#include "core/fetch/FetchRequest.h"
+#include "core/loader/cache/FetchRequest.h"
#include "weborigin/KURL.h"
#include "wtf/RefCounted.h"
#include "wtf/text/WTFString.h"
diff --git a/chromium/third_party/WebKit/Source/core/html/RadioNodeList.cpp b/chromium/third_party/WebKit/Source/core/html/RadioNodeList.cpp
index 0522f12ec50..5768dcf135e 100644
--- a/chromium/third_party/WebKit/Source/core/html/RadioNodeList.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/RadioNodeList.cpp
@@ -90,7 +90,7 @@ bool RadioNodeList::checkElementMatchesRadioNodeListFilter(Element* testElement)
if (ownerNode()->hasTagName(formTag)) {
HTMLFormElement* formElement = 0;
if (testElement->hasTagName(objectTag))
- formElement = toHTMLObjectElement(testElement)->form();
+ formElement = static_cast<HTMLObjectElement*>(testElement)->form();
else
formElement = toHTMLFormControlElement(testElement)->form();
if (!formElement || formElement != ownerNode())
diff --git a/chromium/third_party/WebKit/Source/core/html/SearchInputType.cpp b/chromium/third_party/WebKit/Source/core/html/SearchInputType.cpp
index b68d9a486a6..3982770bd93 100644
--- a/chromium/third_party/WebKit/Source/core/html/SearchInputType.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/SearchInputType.cpp
@@ -34,7 +34,6 @@
#include "HTMLNames.h"
#include "bindings/v8/ExceptionStatePlaceholder.h"
#include "core/dom/KeyboardEvent.h"
-#include "core/dom/shadow/ShadowRoot.h"
#include "core/html/HTMLInputElement.h"
#include "core/html/InputTypeNames.h"
#include "core/html/shadow/ShadowElementNames.h"
@@ -151,7 +150,7 @@ bool SearchInputType::searchEventsShouldBeDispatched() const
void SearchInputType::didSetValueByUserEdit(ValueChangeState state)
{
- if (element()->userAgentShadowRoot()->getElementById(ShadowElementNames::clearButton()))
+ if (element()->uaShadowElementById(ShadowElementNames::clearButton()))
toRenderSearchField(element()->renderer())->updateCancelButtonVisibility();
// If the incremental attribute is set, then dispatch the search event
diff --git a/chromium/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp b/chromium/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp
index 4f362bcda9f..71580c98a9f 100644
--- a/chromium/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp
@@ -26,11 +26,11 @@
#include "config.h"
#include "core/html/canvas/CanvasRenderingContext.h"
-#include "core/fetch/ImageResource.h"
#include "core/html/HTMLCanvasElement.h"
#include "core/html/HTMLImageElement.h"
#include "core/html/HTMLVideoElement.h"
#include "core/html/canvas/CanvasPattern.h"
+#include "core/loader/cache/ImageResource.h"
#include "weborigin/SecurityOrigin.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext2D.cpp b/chromium/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext2D.cpp
index 176cb57349a..feff097a1ff 100644
--- a/chromium/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext2D.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext2D.cpp
@@ -42,7 +42,6 @@
#include "core/css/StylePropertySet.h"
#include "core/css/resolver/StyleResolver.h"
#include "core/dom/ExceptionCode.h"
-#include "core/fetch/ImageResource.h"
#include "core/html/HTMLCanvasElement.h"
#include "core/html/HTMLImageElement.h"
#include "core/html/HTMLMediaElement.h"
@@ -54,6 +53,7 @@
#include "core/html/canvas/CanvasPattern.h"
#include "core/html/canvas/CanvasStyle.h"
#include "core/html/canvas/DOMPath.h"
+#include "core/loader/cache/ImageResource.h"
#include "core/page/ImageBitmap.h"
#include "core/platform/graphics/DrawLooper.h"
#include "core/platform/graphics/FloatQuad.h"
diff --git a/chromium/third_party/WebKit/Source/core/html/canvas/WebGLRenderingContext.cpp b/chromium/third_party/WebKit/Source/core/html/canvas/WebGLRenderingContext.cpp
index 6eaec39cd93..01e667d5559 100644
--- a/chromium/third_party/WebKit/Source/core/html/canvas/WebGLRenderingContext.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/canvas/WebGLRenderingContext.cpp
@@ -29,7 +29,6 @@
#include "RuntimeEnabledFeatures.h"
#include "bindings/v8/ExceptionState.h"
#include "core/dom/ExceptionCode.h"
-#include "core/fetch/ImageResource.h"
#include "core/html/HTMLCanvasElement.h"
#include "core/html/HTMLImageElement.h"
#include "core/html/HTMLVideoElement.h"
@@ -67,6 +66,7 @@
#include "core/inspector/InspectorInstrumentation.h"
#include "core/loader/FrameLoader.h"
#include "core/loader/FrameLoaderClient.h"
+#include "core/loader/cache/ImageResource.h"
#include "core/page/Frame.h"
#include "core/page/Page.h"
#include "core/page/Settings.h"
@@ -553,8 +553,6 @@ WebGLRenderingContext::WebGLRenderingContext(HTMLCanvasElement* passedCanvas, Pa
, m_numGLErrorsToConsoleAllowed(maxGLErrorsAllowedToConsole)
, m_multisamplingAllowed(false)
, m_multisamplingObserverRegistered(false)
- , m_onePlusMaxEnabledAttribIndex(0)
- , m_onePlusMaxNonDefaultTextureUnit(0)
{
ASSERT(m_context);
ScriptWrappable::init(this);
@@ -578,31 +576,32 @@ WebGLRenderingContext::WebGLRenderingContext(HTMLCanvasElement* passedCanvas, Pa
}
// Register extensions.
+ static const char* unprefixed[] = { "", 0, };
static const char* webkitPrefix[] = { "WEBKIT_", 0, };
static const char* bothPrefixes[] = { "", "WEBKIT_", 0, };
- registerExtension<ANGLEInstancedArrays>(m_angleInstancedArrays);
- registerExtension<EXTTextureFilterAnisotropic>(m_extTextureFilterAnisotropic, PrefixedExtension, webkitPrefix);
- registerExtension<OESElementIndexUint>(m_oesElementIndexUint);
- registerExtension<OESStandardDerivatives>(m_oesStandardDerivatives);
- registerExtension<OESTextureFloat>(m_oesTextureFloat);
- registerExtension<OESTextureFloatLinear>(m_oesTextureFloatLinear);
- registerExtension<OESTextureHalfFloat>(m_oesTextureHalfFloat);
- registerExtension<OESTextureHalfFloatLinear>(m_oesTextureHalfFloatLinear);
- registerExtension<OESVertexArrayObject>(m_oesVertexArrayObject);
- registerExtension<WebGLCompressedTextureATC>(m_webglCompressedTextureATC, PrefixedExtension, webkitPrefix);
- registerExtension<WebGLCompressedTexturePVRTC>(m_webglCompressedTexturePVRTC, PrefixedExtension, webkitPrefix);
- registerExtension<WebGLCompressedTextureS3TC>(m_webglCompressedTextureS3TC, PrefixedExtension, bothPrefixes);
- registerExtension<WebGLDepthTexture>(m_webglDepthTexture, PrefixedExtension, bothPrefixes);
- registerExtension<WebGLLoseContext>(m_webglLoseContext, ApprovedExtension, bothPrefixes);
+ registerExtension<EXTTextureFilterAnisotropic>(m_extTextureFilterAnisotropic, false, false, true, webkitPrefix);
+ registerExtension<OESElementIndexUint>(m_oesElementIndexUint, false, false, false, unprefixed);
+ registerExtension<OESStandardDerivatives>(m_oesStandardDerivatives, false, false, false, unprefixed);
+ registerExtension<OESTextureFloat>(m_oesTextureFloat, false, false, false, unprefixed);
+ registerExtension<OESTextureFloatLinear>(m_oesTextureFloatLinear, false, false, false, unprefixed);
+ registerExtension<OESTextureHalfFloat>(m_oesTextureHalfFloat, false, false, false, unprefixed);
+ registerExtension<OESTextureHalfFloatLinear>(m_oesTextureHalfFloatLinear, false, false, false, unprefixed);
+ registerExtension<OESVertexArrayObject>(m_oesVertexArrayObject, false, false, false, unprefixed);
+ registerExtension<WebGLCompressedTextureATC>(m_webglCompressedTextureATC, false, false, true, webkitPrefix);
+ registerExtension<WebGLCompressedTexturePVRTC>(m_webglCompressedTexturePVRTC, false, false, true, webkitPrefix);
+ registerExtension<WebGLCompressedTextureS3TC>(m_webglCompressedTextureS3TC, false, false, true, bothPrefixes);
+ registerExtension<WebGLDepthTexture>(m_webglDepthTexture, false, false, true, bothPrefixes);
+ registerExtension<WebGLLoseContext>(m_webglLoseContext, false, false, false, bothPrefixes);
// Register draft extensions.
- registerExtension<EXTFragDepth>(m_extFragDepth, DraftExtension);
- registerExtension<WebGLDrawBuffers>(m_webglDrawBuffers, DraftExtension);
+ registerExtension<ANGLEInstancedArrays>(m_angleInstancedArrays, false, true, false, unprefixed);
+ registerExtension<EXTFragDepth>(m_extFragDepth, false, true, false, unprefixed);
+ registerExtension<WebGLDrawBuffers>(m_webglDrawBuffers, false, true, false, unprefixed);
// Register privileged extensions.
- registerExtension<WebGLDebugRendererInfo>(m_webglDebugRendererInfo, PrivilegedExtension);
- registerExtension<WebGLDebugShaders>(m_webglDebugShaders, PrivilegedExtension);
+ registerExtension<WebGLDebugRendererInfo>(m_webglDebugRendererInfo, true, false, false, unprefixed);
+ registerExtension<WebGLDebugShaders>(m_webglDebugShaders, true, false, false, unprefixed);
}
void WebGLRenderingContext::initializeNewContext()
@@ -1140,17 +1139,9 @@ void WebGLRenderingContext::bindTexture(GC3Denum target, WebGLTexture* texture)
synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "bindTexture", "invalid target");
return;
}
-
m_context->bindTexture(target, objectOrZero(texture));
- if (texture) {
+ if (texture)
texture->setTarget(target, maxLevel);
- m_onePlusMaxNonDefaultTextureUnit = max(m_activeTextureUnit + 1, m_onePlusMaxNonDefaultTextureUnit);
- } else {
- // If the disabled index is the current maximum, trace backwards to find the new max enabled texture index
- if (m_onePlusMaxNonDefaultTextureUnit == m_activeTextureUnit + 1) {
- findNewMaxNonDefaultTextureUnit();
- }
- }
// Note: previously we used to automatically set the TEXTURE_WRAP_R
// repeat mode to CLAMP_TO_EDGE for cube map textures, because OpenGL
@@ -1389,7 +1380,7 @@ void WebGLRenderingContext::compressedTexImage2D(GC3Denum target, GC3Dint level,
synthesizeGLError(GraphicsContext3D::INVALID_VALUE, "compressedTexImage2D", "border not 0");
return;
}
- if (!validateCompressedTexDimensions("compressedTexImage2D", NotTexSubImage2D, target, level, width, height, internalformat))
+ if (!validateCompressedTexDimensions("compressedTexImage2D", level, width, height, internalformat))
return;
if (!validateCompressedTexFuncData("compressedTexImage2D", width, height, internalformat, data))
return;
@@ -1665,27 +1656,17 @@ void WebGLRenderingContext::deleteTexture(WebGLTexture* texture)
{
if (!deleteObject(texture))
return;
-
- int maxBoundTextureIndex = -1;
- for (size_t i = 0; i < m_onePlusMaxNonDefaultTextureUnit; ++i) {
+ for (size_t i = 0; i < m_textureUnits.size(); ++i) {
if (texture == m_textureUnits[i].m_texture2DBinding) {
m_textureUnits[i].m_texture2DBinding = 0;
- maxBoundTextureIndex = i;
if (!i)
m_drawingBuffer->setTexture2DBinding(0);
}
- if (texture == m_textureUnits[i].m_textureCubeMapBinding) {
+ if (texture == m_textureUnits[i].m_textureCubeMapBinding)
m_textureUnits[i].m_textureCubeMapBinding = 0;
- maxBoundTextureIndex = i;
- }
}
if (m_framebufferBinding)
m_framebufferBinding->removeAttachmentFromBoundFramebuffer(texture);
-
- // If the deleted was bound to the the current maximum index, trace backwards to find the new max texture index
- if (m_onePlusMaxNonDefaultTextureUnit == maxBoundTextureIndex + 1) {
- findNewMaxNonDefaultTextureUnit();
- }
}
void WebGLRenderingContext::depthFunc(GC3Denum func)
@@ -1755,12 +1736,6 @@ void WebGLRenderingContext::disableVertexAttribArray(GC3Duint index)
WebGLVertexArrayObjectOES::VertexAttribState& state = m_boundVertexArrayObject->getVertexAttribState(index);
state.enabled = false;
-
- // If the disabled index is the current maximum, trace backwards to find the new max enabled attrib index
- if (m_onePlusMaxEnabledAttribIndex == index + 1) {
- findNewMaxEnabledAttribIndex();
- }
-
m_context->disableVertexAttribArray(index);
}
@@ -1770,7 +1745,7 @@ bool WebGLRenderingContext::validateRenderingState()
return false;
// Look in each enabled vertex attrib and check if they've been bound to a buffer.
- for (unsigned i = 0; i < m_onePlusMaxEnabledAttribIndex; ++i) {
+ for (unsigned i = 0; i < m_maxVertexAttribs; ++i) {
const WebGLVertexArrayObjectOES::VertexAttribState& state = m_boundVertexArrayObject->getVertexAttribState(i);
if (state.enabled
&& (!state.bufferBinding || !state.bufferBinding->object()))
@@ -1879,8 +1854,6 @@ void WebGLRenderingContext::enableVertexAttribArray(GC3Duint index)
WebGLVertexArrayObjectOES::VertexAttribState& state = m_boundVertexArrayObject->getVertexAttribState(index);
state.enabled = true;
- m_onePlusMaxEnabledAttribIndex = max(index + 1, m_onePlusMaxEnabledAttribIndex);
-
m_context->enableVertexAttribArray(index);
}
@@ -2137,9 +2110,7 @@ GC3Denum WebGLRenderingContext::getError()
bool WebGLRenderingContext::ExtensionTracker::matchesNameWithPrefixes(const String& name) const
{
- static const char* unprefixed[] = { "", 0, };
-
- const char** prefixes = m_prefixes ? m_prefixes : unprefixed;
+ const char** prefixes = m_prefixes;
for (; *prefixes; ++prefixes) {
String prefixedName = String(*prefixes) + getExtensionName();
if (equalIgnoringCase(prefixedName, name)) {
@@ -4307,7 +4278,7 @@ void WebGLRenderingContext::handleTextureCompleteness(const char* functionName,
bool resetActiveUnit = false;
WebGLTexture::TextureExtensionFlag flag = static_cast<WebGLTexture::TextureExtensionFlag>((m_oesTextureFloatLinear ? WebGLTexture::TextureFloatLinearExtensionEnabled : 0)
| (m_oesTextureHalfFloatLinear ? WebGLTexture::TextureHalfFloatLinearExtensionEnabled : 0));
- for (unsigned ii = 0; ii < m_onePlusMaxNonDefaultTextureUnit; ++ii) {
+ for (unsigned ii = 0; ii < m_textureUnits.size(); ++ii) {
if ((m_textureUnits[ii].m_texture2DBinding.get() && m_textureUnits[ii].m_texture2DBinding->needToUseBlackTexture(flag))
|| (m_textureUnits[ii].m_textureCubeMapBinding.get() && m_textureUnits[ii].m_textureCubeMapBinding->needToUseBlackTexture(flag))) {
if (ii != m_activeTextureUnit) {
@@ -4585,7 +4556,7 @@ bool WebGLRenderingContext::validateTexFuncLevel(const char* functionName, GC3De
}
switch (target) {
case GraphicsContext3D::TEXTURE_2D:
- if (level >= m_maxTextureLevel) {
+ if (level > m_maxTextureLevel) {
synthesizeGLError(GraphicsContext3D::INVALID_VALUE, functionName, "level out of range");
return false;
}
@@ -4596,7 +4567,7 @@ bool WebGLRenderingContext::validateTexFuncLevel(const char* functionName, GC3De
case GraphicsContext3D::TEXTURE_CUBE_MAP_NEGATIVE_Y:
case GraphicsContext3D::TEXTURE_CUBE_MAP_POSITIVE_Z:
case GraphicsContext3D::TEXTURE_CUBE_MAP_NEGATIVE_Z:
- if (level >= m_maxCubeMapTextureLevel) {
+ if (level > m_maxCubeMapTextureLevel) {
synthesizeGLError(GraphicsContext3D::INVALID_VALUE, functionName, "level out of range");
return false;
}
@@ -4607,9 +4578,19 @@ bool WebGLRenderingContext::validateTexFuncLevel(const char* functionName, GC3De
return true;
}
-bool WebGLRenderingContext::validateTexFuncDimensions(const char* functionName, TexFuncValidationFunctionType functionType,
- GC3Denum target, GC3Dint level, GC3Dsizei width, GC3Dsizei height)
+bool WebGLRenderingContext::validateTexFuncParameters(const char* functionName,
+ TexFuncValidationFunctionType functionType,
+ GC3Denum target, GC3Dint level,
+ GC3Denum internalformat,
+ GC3Dsizei width, GC3Dsizei height, GC3Dint border,
+ GC3Denum format, GC3Denum type)
{
+ // We absolutely have to validate the format and type combination.
+ // The texImage2D entry points taking HTMLImage, etc. will produce
+ // temporary data based on this combination, so it must be legal.
+ if (!validateTexFuncFormatAndType(functionName, format, type, level) || !validateTexFuncLevel(functionName, target, level))
+ return false;
+
if (width < 0 || height < 0) {
synthesizeGLError(GraphicsContext3D::INVALID_VALUE, functionName, "width or height < 0");
return false;
@@ -4617,7 +4598,7 @@ bool WebGLRenderingContext::validateTexFuncDimensions(const char* functionName,
switch (target) {
case GraphicsContext3D::TEXTURE_2D:
- if (width > (m_maxTextureSize >> level) || height > (m_maxTextureSize >> level)) {
+ if (width > m_maxTextureSize || height > m_maxTextureSize) {
synthesizeGLError(GraphicsContext3D::INVALID_VALUE, functionName, "width or height out of range");
return false;
}
@@ -4634,7 +4615,7 @@ bool WebGLRenderingContext::validateTexFuncDimensions(const char* functionName,
}
// No need to check height here. For texImage width == height.
// For texSubImage that will be checked when checking yoffset + height is in range.
- if (width > (m_maxCubeMapTextureSize >> level)) {
+ if (width > m_maxCubeMapTextureSize) {
synthesizeGLError(GraphicsContext3D::INVALID_VALUE, functionName, "width or height out of range for cube map");
return false;
}
@@ -4643,20 +4624,6 @@ bool WebGLRenderingContext::validateTexFuncDimensions(const char* functionName,
synthesizeGLError(GraphicsContext3D::INVALID_ENUM, functionName, "invalid target");
return false;
}
- return true;
-}
-
-bool WebGLRenderingContext::validateTexFuncParameters(const char* functionName, TexFuncValidationFunctionType functionType, GC3Denum target,
- GC3Dint level, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height, GC3Dint border, GC3Denum format, GC3Denum type)
-{
- // We absolutely have to validate the format and type combination.
- // The texImage2D entry points taking HTMLImage, etc. will produce
- // temporary data based on this combination, so it must be legal.
- if (!validateTexFuncFormatAndType(functionName, format, type, level) || !validateTexFuncLevel(functionName, target, level))
- return false;
-
- if (!validateTexFuncDimensions(functionName, functionType, target, level, width, height))
- return false;
if (format != internalformat) {
synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, "format != internalformat");
@@ -4823,11 +4790,8 @@ bool WebGLRenderingContext::validateCompressedTexFuncData(const char* functionNa
return true;
}
-bool WebGLRenderingContext::validateCompressedTexDimensions(const char* functionName, TexFuncValidationFunctionType functionType, GC3Denum target, GC3Dint level, GC3Dsizei width, GC3Dsizei height, GC3Denum format)
+bool WebGLRenderingContext::validateCompressedTexDimensions(const char* functionName, GC3Dint level, GC3Dsizei width, GC3Dsizei height, GC3Denum format)
{
- if (!validateTexFuncDimensions(functionName, functionType, target, level, width, height))
- return false;
-
switch (format) {
case Extensions3D::COMPRESSED_RGB_S3TC_DXT1_EXT:
case Extensions3D::COMPRESSED_RGBA_S3TC_DXT1_EXT:
@@ -4872,7 +4836,7 @@ bool WebGLRenderingContext::validateCompressedTexSubDimensions(const char* funct
synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, "dimensions out of range");
return false;
}
- return validateCompressedTexDimensions(functionName, TexSubImage2D, target, level, width, height, format);
+ return validateCompressedTexDimensions(functionName, level, width, height, format);
}
default:
return false;
@@ -5233,7 +5197,7 @@ bool WebGLRenderingContext::validateDrawInstanced(const char* functionName, GC3D
}
// Ensure at least one enabled vertex attrib has a divisor of 0.
- for (unsigned i = 0; i < m_onePlusMaxEnabledAttribIndex; ++i) {
+ for (unsigned i = 0; i < m_maxVertexAttribs; ++i) {
const WebGLVertexArrayObjectOES::VertexAttribState& state = m_boundVertexArrayObject->getVertexAttribState(i);
if (state.enabled && !state.divisor)
return true;
@@ -5558,31 +5522,4 @@ void WebGLRenderingContext::multisamplingChanged(bool enabled)
}
}
-void WebGLRenderingContext::findNewMaxEnabledAttribIndex()
-{
- // Trace backwards from the current max to find the new max enabled attrib index
- int startIndex = m_onePlusMaxEnabledAttribIndex - 1;
- for (int i = startIndex; i >= 0; --i) {
- if (m_boundVertexArrayObject->getVertexAttribState(i).enabled) {
- m_onePlusMaxEnabledAttribIndex = i + 1;
- return;
- }
- }
- m_onePlusMaxEnabledAttribIndex = 0;
-}
-
-void WebGLRenderingContext::findNewMaxNonDefaultTextureUnit()
-{
- // Trace backwards from the current max to find the new max non-default texture unit
- int startIndex = m_onePlusMaxNonDefaultTextureUnit - 1;
- for (int i = startIndex; i >= 0; --i) {
- if (m_textureUnits[i].m_texture2DBinding
- || m_textureUnits[i].m_textureCubeMapBinding) {
- m_onePlusMaxNonDefaultTextureUnit = i + 1;
- return;
- }
- }
- m_onePlusMaxNonDefaultTextureUnit = 0;
-}
-
} // namespace WebCore
diff --git a/chromium/third_party/WebKit/Source/core/html/canvas/WebGLRenderingContext.h b/chromium/third_party/WebKit/Source/core/html/canvas/WebGLRenderingContext.h
index 386bb374675..39aeae7a0c7 100644
--- a/chromium/third_party/WebKit/Source/core/html/canvas/WebGLRenderingContext.h
+++ b/chromium/third_party/WebKit/Source/core/html/canvas/WebGLRenderingContext.h
@@ -506,12 +506,6 @@ public:
bool m_synthesizedErrorsToConsole;
int m_numGLErrorsToConsoleAllowed;
- bool m_multisamplingAllowed;
- bool m_multisamplingObserverRegistered;
-
- GC3Duint m_onePlusMaxEnabledAttribIndex;
- unsigned long m_onePlusMaxNonDefaultTextureUnit;
-
// Enabled extension objects.
RefPtr<ANGLEInstancedArrays> m_angleInstancedArrays;
RefPtr<EXTFragDepth> m_extFragDepth;
@@ -532,19 +526,12 @@ public:
RefPtr<WebGLCompressedTextureS3TC> m_webglCompressedTextureS3TC;
RefPtr<WebGLDepthTexture> m_webglDepthTexture;
- enum ExtensionFlags {
- ApprovedExtension = 0x00,
- DraftExtension = 0x01,
- PrivilegedExtension = 0x02,
- PrefixedExtension = 0x04,
- };
-
class ExtensionTracker {
public:
- ExtensionTracker(ExtensionFlags flags, const char** prefixes)
- : m_privileged(flags & PrivilegedExtension)
- , m_draft(flags & DraftExtension)
- , m_prefixed(flags & PrefixedExtension)
+ ExtensionTracker(bool privileged, bool draft, bool prefixed, const char** prefixes)
+ : m_privileged(privileged)
+ , m_draft(draft)
+ , m_prefixed(prefixed)
, m_prefixes(prefixes)
{
}
@@ -585,8 +572,8 @@ public:
template <typename T>
class TypedExtensionTracker : public ExtensionTracker {
public:
- TypedExtensionTracker(RefPtr<T>& extensionField, ExtensionFlags flags, const char** prefixes)
- : ExtensionTracker(flags, prefixes)
+ TypedExtensionTracker(RefPtr<T>& extensionField, bool privileged, bool draft, bool prefixed, const char** prefixes)
+ : ExtensionTracker(privileged, draft, prefixed, prefixes)
, m_extensionField(extensionField)
{
}
@@ -633,9 +620,9 @@ public:
Vector<ExtensionTracker*> m_extensions;
template <typename T>
- void registerExtension(RefPtr<T>& extensionPtr, ExtensionFlags flags = ApprovedExtension, const char** prefixes = 0)
+ void registerExtension(RefPtr<T>& extensionPtr, bool privileged, bool draft, bool prefixed, const char** prefixes)
{
- m_extensions.append(new TypedExtensionTracker<T>(extensionPtr, flags, prefixes));
+ m_extensions.append(new TypedExtensionTracker<T>(extensionPtr, privileged, draft, prefixed, prefixes));
}
// Errors raised by synthesizeGLError() while the context is lost.
@@ -723,11 +710,6 @@ public:
bool validateTexFunc(const char* functionName, TexFuncValidationFunctionType, TexFuncValidationSourceType, GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dsizei width,
GC3Dsizei height, GC3Dint border, GC3Denum format, GC3Denum type, GC3Dint xoffset, GC3Dint yoffset);
- // Helper function to check input width and height for functions {copy, compressed}Tex{Sub}Image.
- // Generates GL error and returns false if width or height is invalid.
- bool validateTexFuncDimensions(const char* functionName, TexFuncValidationFunctionType,
- GC3Denum target, GC3Dint level, GC3Dsizei width, GC3Dsizei height);
-
// Helper function to check input parameters for functions {copy}Tex{Sub}Image.
// Generates GL error and returns false if parameters are invalid.
bool validateTexFuncParameters(const char* functionName,
@@ -768,7 +750,7 @@ public:
// Helper function to validate compressed texture dimensions are valid for
// the given format.
- bool validateCompressedTexDimensions(const char* functionName, TexFuncValidationFunctionType, GC3Denum target, GC3Dint level, GC3Dsizei width, GC3Dsizei height, GC3Denum format);
+ bool validateCompressedTexDimensions(const char* functionName, GC3Dint level, GC3Dsizei width, GC3Dsizei height, GC3Denum format);
// Helper function to validate compressed texture dimensions are valid for
// the given format.
@@ -891,9 +873,8 @@ public:
void restoreCurrentTexture2D();
virtual void multisamplingChanged(bool);
-
- void findNewMaxEnabledAttribIndex();
- void findNewMaxNonDefaultTextureUnit();
+ bool m_multisamplingAllowed;
+ bool m_multisamplingObserverRegistered;
friend class WebGLStateRestorer;
friend class WebGLRenderingContextEvictionManager;
diff --git a/chromium/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h b/chromium/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h
index a30571440e0..1a1e2d7add1 100644
--- a/chromium/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h
+++ b/chromium/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h
@@ -28,7 +28,6 @@
#include "core/dom/ParserContentPolicy.h"
#include "core/dom/ScriptableDocumentParser.h"
-#include "core/fetch/ResourceClient.h"
#include "core/html/parser/BackgroundHTMLInputStream.h"
#include "core/html/parser/CompactHTMLToken.h"
#include "core/html/parser/HTMLInputStream.h"
@@ -41,6 +40,7 @@
#include "core/html/parser/HTMLTreeBuilderSimulator.h"
#include "core/html/parser/XSSAuditor.h"
#include "core/html/parser/XSSAuditorDelegate.h"
+#include "core/loader/cache/ResourceClient.h"
#include "core/platform/text/SegmentedString.h"
#include "wtf/Deque.h"
#include "wtf/OwnPtr.h"
diff --git a/chromium/third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.cpp b/chromium/third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.cpp
index 1d5317c4775..4960d81c30e 100644
--- a/chromium/third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.cpp
@@ -27,9 +27,9 @@
#include "core/html/parser/HTMLResourcePreloader.h"
#include "core/dom/Document.h"
-#include "core/fetch/FetchInitiatorInfo.h"
-#include "core/fetch/ResourceFetcher.h"
#include "core/html/HTMLImport.h"
+#include "core/loader/cache/FetchInitiatorInfo.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/css/MediaList.h"
#include "core/css/MediaQueryEvaluator.h"
#include "core/platform/HistogramSupport.h"
diff --git a/chromium/third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.h b/chromium/third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.h
index 75c620d86a8..1b94671ccc6 100644
--- a/chromium/third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.h
+++ b/chromium/third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.h
@@ -26,8 +26,8 @@
#ifndef HTMLResourcePreloader_h
#define HTMLResourcePreloader_h
-#include "core/fetch/FetchRequest.h"
-#include "core/fetch/Resource.h"
+#include "core/loader/cache/FetchRequest.h"
+#include "core/loader/cache/Resource.h"
#include "wtf/CurrentTime.h"
#include "wtf/text/TextPosition.h"
diff --git a/chromium/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.cpp b/chromium/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.cpp
index 9fd75103758..5141c82a9d6 100644
--- a/chromium/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.cpp
@@ -32,10 +32,10 @@
#include "core/dom/IgnoreDestructiveWriteCountIncrementer.h"
#include "core/dom/Microtask.h"
#include "core/dom/ScriptLoader.h"
-#include "core/fetch/ScriptResource.h"
#include "core/html/parser/HTMLInputStream.h"
#include "core/html/parser/HTMLScriptRunnerHost.h"
#include "core/html/parser/NestingLevelIncrementer.h"
+#include "core/loader/cache/ScriptResource.h"
#include "core/page/Frame.h"
#include "core/platform/NotImplemented.h"
diff --git a/chromium/third_party/WebKit/Source/core/html/shadow/DateTimeFieldElements.cpp b/chromium/third_party/WebKit/Source/core/html/shadow/DateTimeFieldElements.cpp
index d9b59c6be6c..fda494d7df8 100644
--- a/chromium/third_party/WebKit/Source/core/html/shadow/DateTimeFieldElements.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/shadow/DateTimeFieldElements.cpp
@@ -141,9 +141,10 @@ void DateTimeHourFieldElementBase::setValueAsDateTimeFieldsState(const DateTimeF
return;
}
- const int hour11 = hour12 == 12 ? 0 : hour12;
- const int hour23 = dateTimeFieldsState.ampm() == DateTimeFieldsState::AMPMValuePM ? hour11 + 12 : hour11;
- setValueAsInteger(hour23);
+ if (dateTimeFieldsState.ampm() == DateTimeFieldsState::AMPMValuePM)
+ setValueAsInteger((hour12 + 12) % 24);
+ else
+ setValueAsInteger(hour12 % 12);
}
// ----------------------------
@@ -255,7 +256,7 @@ void DateTimeHour23FieldElement::populateDateTimeFieldsState(DateTimeFieldsState
const int value = valueAsInteger();
- dateTimeFieldsState.setHour(value % 12 ? value % 12 : 12);
+ dateTimeFieldsState.setHour(value ? value % 12 : 12);
dateTimeFieldsState.setAMPM(value >= 12 ? DateTimeFieldsState::AMPMValuePM : DateTimeFieldsState::AMPMValueAM);
}
diff --git a/chromium/third_party/WebKit/Source/core/html/shadow/PasswordGeneratorButtonElement.cpp b/chromium/third_party/WebKit/Source/core/html/shadow/PasswordGeneratorButtonElement.cpp
index 8f6b3c6f85e..81b52fb9bbb 100644
--- a/chromium/third_party/WebKit/Source/core/html/shadow/PasswordGeneratorButtonElement.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/shadow/PasswordGeneratorButtonElement.cpp
@@ -37,9 +37,9 @@
#include "core/dom/NodeRenderStyle.h"
#include "core/dom/shadow/ElementShadow.h"
#include "core/dom/shadow/ShadowRoot.h"
-#include "core/fetch/ImageResource.h"
#include "core/html/HTMLInputElement.h"
#include "core/html/shadow/HTMLShadowElement.h"
+#include "core/loader/cache/ImageResource.h"
#include "core/page/Chrome.h"
#include "core/page/ChromeClient.h"
#include "core/page/Page.h"
diff --git a/chromium/third_party/WebKit/Source/core/html/shadow/PasswordGeneratorButtonElement.h b/chromium/third_party/WebKit/Source/core/html/shadow/PasswordGeneratorButtonElement.h
index 3a3d7c1c214..20320345bc4 100644
--- a/chromium/third_party/WebKit/Source/core/html/shadow/PasswordGeneratorButtonElement.h
+++ b/chromium/third_party/WebKit/Source/core/html/shadow/PasswordGeneratorButtonElement.h
@@ -31,8 +31,8 @@
#ifndef PasswordGeneratorButtonElement_h
#define PasswordGeneratorButtonElement_h
-#include "core/fetch/ResourcePtr.h"
#include "core/html/HTMLDivElement.h"
+#include "core/loader/cache/ResourcePtr.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/inspector/InjectedScriptCanvasModuleSource.js b/chromium/third_party/WebKit/Source/core/inspector/InjectedScriptCanvasModuleSource.js
index 00d50cf82c8..c4bd77f5977 100644
--- a/chromium/third_party/WebKit/Source/core/inspector/InjectedScriptCanvasModuleSource.js
+++ b/chromium/third_party/WebKit/Source/core/inspector/InjectedScriptCanvasModuleSource.js
@@ -185,16 +185,6 @@ var TypeUtils = {
},
/**
- * @param {string} property
- * @param {!Object} obj
- * @return {boolean}
- */
- isEnumPropertyName: function(property, obj)
- {
- return (/^[A-Z][A-Z0-9_]+$/.test(property) && typeof obj[property] === "number");
- },
-
- /**
* @return {CanvasRenderingContext2D}
*/
_dummyCanvas2dContext: function()
@@ -209,7 +199,7 @@ var TypeUtils = {
}
}
-/** @typedef {{name:string, valueIsEnum:(boolean|undefined), value:*, values:(!Array.<TypeUtils.InternalResourceStateDescriptor>|undefined), isArray:(boolean|undefined)}} */
+/** @typedef {{name: string, value: *, values: (!Array.<TypeUtils.InternalResourceStateDescriptor>|undefined)}} */
TypeUtils.InternalResourceStateDescriptor;
/**
@@ -495,13 +485,6 @@ Call.prototype = {
*/
replay: function(replayableCall, cache)
{
- var replayableResult = replayableCall.result();
- if (replayableResult instanceof ReplayableResource && !cache.has(replayableResult.id())) {
- var resource = replayableResult.replay(cache);
- console.assert(resource.calls().length > 0, "Expected create* call for the Resource");
- return resource.calls()[0];
- }
-
var replayObject = ReplayableResource.replay(replayableCall.replayableResource(), cache);
var replayArgs = replayableCall.args().map(function(obj) {
return ReplayableResource.replay(obj, cache);
@@ -514,9 +497,8 @@ Call.prototype = {
var replayFunction = replayObject[replayableCall.functionName()];
console.assert(typeof replayFunction === "function", "Expected a function to replay");
replayResult = replayFunction.apply(replayObject, replayArgs);
-
- if (replayableResult instanceof ReplayableResource) {
- var resource = replayableResult.replay(cache);
+ if (replayableCall.result() instanceof ReplayableResource) {
+ var resource = replayableCall.result().replay(cache);
if (!resource.wrappedObject())
resource.setWrappedObject(replayResult);
}
@@ -531,11 +513,6 @@ Call.prototype = {
var attachments = replayableCall.attachments();
if (attachments)
this._attachments = TypeUtils.cloneObject(attachments);
-
- var thisResource = Resource.forObject(replayObject);
- if (thisResource)
- thisResource.onCallReplayed(this);
-
return this;
}
}
@@ -801,7 +778,7 @@ Resource.prototype = {
},
/**
- * @return {!Array.<!Call>}
+ * @return {!Array.<Call>}
*/
calls: function()
{
@@ -845,7 +822,6 @@ Resource.prototype = {
var pname = statePropertyNames[i];
result.push({ name: pname, value: proxyObject[pname] });
}
- result.push({ name: "context", value: this.contextResource() });
return result;
},
@@ -935,14 +911,6 @@ Resource.prototype = {
},
/**
- * @param {!Call} call
- */
- onCallReplayed: function(call)
- {
- // Ignore by default.
- },
-
- /**
* @param {!Object} object
*/
_bindObjectToResource: function(object)
@@ -993,7 +961,7 @@ Resource.prototype = {
proxy[property] = this._wrapCustomFunction(this, wrappedObject, wrappedObject[property], property, customWrapFunction);
else
proxy[property] = this._wrapFunction(this, wrappedObject, wrappedObject[property], property);
- } else if (TypeUtils.isEnumPropertyName(property, wrappedObject)) {
+ } else if (/^[A-Z0-9_]+$/.test(property) && typeof wrappedObject[property] === "number") {
// Fast access to enums and constants.
proxy[property] = wrappedObject[property];
} else {
@@ -1389,8 +1357,8 @@ WebGLBoundResource.prototype = {
*/
pushBinding: function(target, bindMethodName)
{
- if (this._state.bindTarget !== target) {
- this._state.bindTarget = target;
+ if (this._state.BINDING !== target) {
+ this._state.BINDING = target;
this.pushCall(new Call(WebGLRenderingContextResource.forObject(this), bindMethodName, [target, this]));
}
},
@@ -1411,66 +1379,6 @@ function WebGLTextureResource(wrappedObject, name)
WebGLTextureResource.prototype = {
/**
- * @override (overrides @return type)
- * @return {WebGLTexture}
- */
- wrappedObject: function()
- {
- return this._wrappedObject;
- },
-
- /**
- * @override
- * @return {!Array.<TypeUtils.InternalResourceStateDescriptor>}
- */
- currentState: function()
- {
- var result = [];
- var glResource = WebGLRenderingContextResource.forObject(this);
- var gl = glResource.wrappedObject();
- var texture = this.wrappedObject();
- if (!gl || !texture)
- return result;
- result.push({ name: "isTexture", value: gl.isTexture(texture) });
- result.push({ name: "context", value: this.contextResource() });
-
- var target = this._state.bindTarget;
- if (typeof target !== "number")
- return result;
-
- var bindingParameter;
- switch (target) {
- case gl.TEXTURE_2D:
- bindingParameter = gl.TEXTURE_BINDING_2D;
- break;
- case gl.TEXTURE_CUBE_MAP:
- bindingParameter = gl.TEXTURE_BINDING_CUBE_MAP;
- break;
- default:
- console.error("ASSERT_NOT_REACHED: unknown texture target " + target);
- return result;
- }
- result.push({ name: "target", value: target, valueIsEnum: true });
-
- var oldTexture = /** @type {WebGLTexture} */ (gl.getParameter(bindingParameter));
- if (oldTexture !== texture)
- gl.bindTexture(target, texture);
-
- var textureParameters = [
- "TEXTURE_MAG_FILTER",
- "TEXTURE_MIN_FILTER",
- "TEXTURE_WRAP_S",
- "TEXTURE_WRAP_T",
- "TEXTURE_MAX_ANISOTROPY_EXT" // EXT_texture_filter_anisotropic extension
- ];
- glResource.queryStateValues(gl.getTexParameter, target, textureParameters, result);
-
- if (oldTexture !== texture)
- gl.bindTexture(target, oldTexture);
- return result;
- },
-
- /**
* @override
* @param {!Object} data
* @param {!Cache.<Resource>} cache
@@ -1572,83 +1480,18 @@ WebGLProgramResource.prototype = {
/**
* @override
- * @return {!Array.<TypeUtils.InternalResourceStateDescriptor>}
+ * @param {!Object} data
+ * @param {!Cache.<ReplayableResource>} cache
*/
- currentState: function()
+ _populateReplayableData: function(data, cache)
{
- /**
- * @param {!Object} obj
- * @param {!Array.<TypeUtils.InternalResourceStateDescriptor>} output
- */
- function convertToStateDescriptors(obj, output)
- {
- for (var pname in obj)
- output.push({ name: pname, value: obj[pname], valueIsEnum: (pname === "type") });
- }
-
- var result = [];
- var program = this.wrappedObject();
- if (!program)
- return result;
var glResource = WebGLRenderingContextResource.forObject(this);
var gl = glResource.wrappedObject();
- var programParameters = ["DELETE_STATUS", "LINK_STATUS", "VALIDATE_STATUS"];
- glResource.queryStateValues(gl.getProgramParameter, program, programParameters, result);
- result.push({ name: "getProgramInfoLog", value: gl.getProgramInfoLog(program) });
- result.push({ name: "isProgram", value: gl.isProgram(program) });
- result.push({ name: "context", value: this.contextResource() });
-
- // ATTACHED_SHADERS
- var callFormatter = CallFormatter.forResource(this);
- var shaders = gl.getAttachedShaders(program) || [];
- var shaderDescriptors = [];
- for (var i = 0, n = shaders.length; i < n; ++i) {
- var shaderResource = Resource.forObject(shaders[i]);
- var pname = callFormatter.enumNameForValue(shaderResource.type());
- shaderDescriptors.push({ name: pname, value: shaderResource });
- }
- result.push({ name: "ATTACHED_SHADERS", values: shaderDescriptors, isArray: true });
-
- // ACTIVE_UNIFORMS
- var uniformDescriptors = [];
- var uniforms = this._activeUniforms(true);
- for (var i = 0, n = uniforms.length; i < n; ++i) {
- var pname = "" + i;
- var values = [];
- convertToStateDescriptors(uniforms[i], values);
- uniformDescriptors.push({ name: pname, values: values });
- }
- result.push({ name: "ACTIVE_UNIFORMS", values: uniformDescriptors, isArray: true });
-
- // ACTIVE_ATTRIBUTES
- var attributesCount = /** @type {number} */ (gl.getProgramParameter(program, gl.ACTIVE_ATTRIBUTES));
- var attributeDescriptors = [];
- for (var i = 0; i < attributesCount; ++i) {
- var activeInfo = gl.getActiveAttrib(program, i);
- if (!activeInfo)
- continue;
- var pname = "" + i;
- var values = [];
- convertToStateDescriptors(activeInfo, values);
- attributeDescriptors.push({ name: pname, values: values });
- }
- result.push({ name: "ACTIVE_ATTRIBUTES", values: attributeDescriptors, isArray: true });
+ var program = this.wrappedObject();
- return result;
- },
+ var originalErrors = glResource.getAllErrors();
- /**
- * @param {boolean=} includeAllInfo
- * @return {!Array.<{name:string, type:number, value:*, size:(number|undefined)}>}
- */
- _activeUniforms: function(includeAllInfo)
- {
var uniforms = [];
- var program = this.wrappedObject();
- if (!program)
- return uniforms;
-
- var gl = WebGLRenderingContextResource.forObject(this).wrappedObject();
var uniformsCount = /** @type {number} */ (gl.getProgramParameter(program, gl.ACTIVE_UNIFORMS));
for (var i = 0; i < uniformsCount; ++i) {
var activeInfo = gl.getActiveUniform(program, i);
@@ -1658,27 +1501,14 @@ WebGLProgramResource.prototype = {
if (!uniformLocation)
continue;
var value = gl.getUniform(program, uniformLocation);
- var item = Object.create(null);
- item.name = activeInfo.name;
- item.type = activeInfo.type;
- item.value = value;
- if (includeAllInfo)
- item.size = activeInfo.size;
- uniforms.push(item);
+ uniforms.push({
+ name: activeInfo.name,
+ type: activeInfo.type,
+ value: value
+ });
}
- return uniforms;
- },
+ data.uniforms = uniforms;
- /**
- * @override
- * @param {!Object} data
- * @param {!Cache.<ReplayableResource>} cache
- */
- _populateReplayableData: function(data, cache)
- {
- var glResource = WebGLRenderingContextResource.forObject(this);
- var originalErrors = glResource.getAllErrors();
- data.uniforms = this._activeUniforms();
glResource.restoreErrors(originalErrors);
},
@@ -1775,15 +1605,6 @@ function WebGLShaderResource(wrappedObject, name)
WebGLShaderResource.prototype = {
/**
- * @override (overrides @return type)
- * @return {WebGLShader}
- */
- wrappedObject: function()
- {
- return this._wrappedObject;
- },
-
- /**
* @return {number}
*/
type: function()
@@ -1797,36 +1618,6 @@ WebGLShaderResource.prototype = {
/**
* @override
- * @return {!Array.<TypeUtils.InternalResourceStateDescriptor>}
- */
- currentState: function()
- {
- var result = [];
- var shader = this.wrappedObject();
- if (!shader)
- return result;
- var glResource = WebGLRenderingContextResource.forObject(this);
- var gl = glResource.wrappedObject();
- var shaderParameters = ["SHADER_TYPE", "DELETE_STATUS", "COMPILE_STATUS"];
- glResource.queryStateValues(gl.getShaderParameter, shader, shaderParameters, result);
- result.push({ name: "getShaderInfoLog", value: gl.getShaderInfoLog(shader) });
- result.push({ name: "getShaderSource", value: gl.getShaderSource(shader) });
- result.push({ name: "isShader", value: gl.isShader(shader) });
- result.push({ name: "context", value: this.contextResource() });
-
- // getShaderPrecisionFormat
- var shaderType = this.type();
- var precisionValues = [];
- var precisionParameters = ["LOW_FLOAT", "MEDIUM_FLOAT", "HIGH_FLOAT", "LOW_INT", "MEDIUM_INT", "HIGH_INT"];
- for (var i = 0, pname; pname = precisionParameters[i]; ++i)
- precisionValues.push({ name: pname, value: gl.getShaderPrecisionFormat(shaderType, gl[pname]) });
- result.push({ name: "getShaderPrecisionFormat", values: precisionValues });
-
- return result;
- },
-
- /**
- * @override
* @param {!Call} call
*/
pushCall: function(call)
@@ -1852,60 +1643,6 @@ function WebGLBufferResource(wrappedObject, name)
WebGLBufferResource.prototype = {
/**
- * @override (overrides @return type)
- * @return {WebGLBuffer}
- */
- wrappedObject: function()
- {
- return this._wrappedObject;
- },
-
- /**
- * @override
- * @return {!Array.<TypeUtils.InternalResourceStateDescriptor>}
- */
- currentState: function()
- {
- var result = [];
- var glResource = WebGLRenderingContextResource.forObject(this);
- var gl = glResource.wrappedObject();
- var buffer = this.wrappedObject();
- if (!gl || !buffer)
- return result;
- result.push({ name: "isBuffer", value: gl.isBuffer(buffer) });
- result.push({ name: "context", value: this.contextResource() });
-
- var target = this._state.bindTarget;
- if (typeof target !== "number")
- return result;
-
- var bindingParameter;
- switch (target) {
- case gl.ARRAY_BUFFER:
- bindingParameter = gl.ARRAY_BUFFER_BINDING;
- break;
- case gl.ELEMENT_ARRAY_BUFFER:
- bindingParameter = gl.ELEMENT_ARRAY_BUFFER_BINDING;
- break;
- default:
- console.error("ASSERT_NOT_REACHED: unknown buffer target " + target);
- return result;
- }
- result.push({ name: "target", value: target, valueIsEnum: true });
-
- var oldBuffer = /** @type {WebGLBuffer} */ (gl.getParameter(bindingParameter));
- if (oldBuffer !== buffer)
- gl.bindBuffer(target, buffer);
-
- var bufferParameters = ["BUFFER_SIZE", "BUFFER_USAGE"];
- glResource.queryStateValues(gl.getBufferParameter, target, bufferParameters, result);
-
- if (oldBuffer !== buffer)
- gl.bindBuffer(target, oldBuffer);
- return result;
- },
-
- /**
* @override
* @param {!Call} call
*/
@@ -1932,50 +1669,6 @@ function WebGLFramebufferResource(wrappedObject, name)
WebGLFramebufferResource.prototype = {
/**
- * @override (overrides @return type)
- * @return {WebGLFramebuffer}
- */
- wrappedObject: function()
- {
- return this._wrappedObject;
- },
-
- /**
- * @override
- * @return {!Array.<TypeUtils.InternalResourceStateDescriptor>}
- */
- currentState: function()
- {
- var result = [];
- var framebuffer = this.wrappedObject();
- if (!framebuffer)
- return result;
- var gl = WebGLRenderingContextResource.forObject(this).wrappedObject();
-
- var oldFramebuffer = /** @type {WebGLFramebuffer} */ (gl.getParameter(gl.FRAMEBUFFER_BINDING));
- if (oldFramebuffer !== framebuffer)
- gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);
-
- var attachmentParameters = ["COLOR_ATTACHMENT0", "DEPTH_ATTACHMENT", "STENCIL_ATTACHMENT"];
- var framebufferParameters = ["FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE", "FRAMEBUFFER_ATTACHMENT_OBJECT_NAME", "FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL", "FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE"];
- for (var i = 0, attachment; attachment = attachmentParameters[i]; ++i) {
- var values = [];
- for (var j = 0, pname; pname = framebufferParameters[j]; ++j) {
- var value = gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl[attachment], gl[pname]);
- value = Resource.forObject(value) || value;
- values.push({ name: pname, value: value, valueIsEnum: WebGLRenderingContextResource.GetResultIsEnum[pname] });
- }
- result.push({ name: attachment, values: values });
- }
- result.push({ name: "isFramebuffer", value: gl.isFramebuffer(framebuffer) });
- result.push({ name: "context", value: this.contextResource() });
-
- if (oldFramebuffer !== framebuffer)
- gl.bindFramebuffer(gl.FRAMEBUFFER, oldFramebuffer);
- return result;
- },
-
- /**
* @override
* @param {!Call} call
*/
@@ -2001,42 +1694,6 @@ function WebGLRenderbufferResource(wrappedObject, name)
WebGLRenderbufferResource.prototype = {
/**
- * @override (overrides @return type)
- * @return {WebGLRenderbuffer}
- */
- wrappedObject: function()
- {
- return this._wrappedObject;
- },
-
- /**
- * @override
- * @return {!Array.<TypeUtils.InternalResourceStateDescriptor>}
- */
- currentState: function()
- {
- var result = [];
- var renderbuffer = this.wrappedObject();
- if (!renderbuffer)
- return result;
- var glResource = WebGLRenderingContextResource.forObject(this);
- var gl = glResource.wrappedObject();
-
- var oldRenderbuffer = /** @type {WebGLRenderbuffer} */ (gl.getParameter(gl.RENDERBUFFER_BINDING));
- if (oldRenderbuffer !== renderbuffer)
- gl.bindRenderbuffer(gl.RENDERBUFFER, renderbuffer);
-
- var renderbufferParameters = ["RENDERBUFFER_WIDTH", "RENDERBUFFER_HEIGHT", "RENDERBUFFER_INTERNAL_FORMAT", "RENDERBUFFER_RED_SIZE", "RENDERBUFFER_GREEN_SIZE", "RENDERBUFFER_BLUE_SIZE", "RENDERBUFFER_ALPHA_SIZE", "RENDERBUFFER_DEPTH_SIZE", "RENDERBUFFER_STENCIL_SIZE"];
- glResource.queryStateValues(gl.getRenderbufferParameter, gl.RENDERBUFFER, renderbufferParameters, result);
- result.push({ name: "isRenderbuffer", value: gl.isRenderbuffer(renderbuffer) });
- result.push({ name: "context", value: this.contextResource() });
-
- if (oldRenderbuffer !== renderbuffer)
- gl.bindRenderbuffer(gl.RENDERBUFFER, oldRenderbuffer);
- return result;
- },
-
- /**
* @override
* @param {!Call} call
*/
@@ -2051,122 +1708,6 @@ WebGLRenderbufferResource.prototype = {
/**
* @constructor
- * @extends {Resource}
- * @param {!Object} wrappedObject
- * @param {string} name
- */
-function WebGLUniformLocationResource(wrappedObject, name)
-{
- Resource.call(this, wrappedObject, name);
-}
-
-WebGLUniformLocationResource.prototype = {
- /**
- * @override (overrides @return type)
- * @return {WebGLUniformLocation}
- */
- wrappedObject: function()
- {
- return this._wrappedObject;
- },
-
- /**
- * @return {WebGLProgramResource}
- */
- program: function()
- {
- var call = this._calls[0];
- if (call && call.functionName() === "getUniformLocation")
- return /** @type {WebGLProgramResource} */ (Resource.forObject(call.args()[0]));
- console.error("ASSERT_NOT_REACHED: Failed to restore WebGLUniformLocation from the log.", call);
- return null;
- },
-
- /**
- * @return {string}
- */
- name: function()
- {
- var call = this._calls[0];
- if (call && call.functionName() === "getUniformLocation")
- return call.args()[1];
- console.error("ASSERT_NOT_REACHED: Failed to restore WebGLUniformLocation from the log.", call);
- return "";
- },
-
- /**
- * @override
- * @return {!Array.<TypeUtils.InternalResourceStateDescriptor>}
- */
- currentState: function()
- {
- var result = [];
- var location = this.wrappedObject();
- if (!location)
- return result;
- var programResource = this.program();
- var program = programResource && programResource.wrappedObject();
- if (!program)
- return result;
- var gl = WebGLRenderingContextResource.forObject(this).wrappedObject();
- var uniformValue = gl.getUniform(program, location);
- var name = this.name();
- result.push({ name: "name", value: name });
- result.push({ name: "program", value: programResource });
- result.push({ name: "value", value: uniformValue });
- result.push({ name: "context", value: this.contextResource() });
-
- if (typeof this._type !== "number") {
- var altName = name + "[0]";
- var uniformsCount = /** @type {number} */ (gl.getProgramParameter(program, gl.ACTIVE_UNIFORMS));
- for (var i = 0; i < uniformsCount; ++i) {
- var activeInfo = gl.getActiveUniform(program, i);
- if (!activeInfo)
- continue;
- if (activeInfo.name === name || activeInfo.name === altName) {
- this._type = activeInfo.type;
- this._size = activeInfo.size;
- if (activeInfo.name === name)
- break;
- }
- }
- }
- if (typeof this._type === "number")
- result.push({ name: "type", value: this._type, valueIsEnum: true });
- if (typeof this._size === "number")
- result.push({ name: "size", value: this._size });
-
- return result;
- },
-
- /**
- * @override
- * @param {!Object} data
- * @param {!Cache.<ReplayableResource>} cache
- */
- _populateReplayableData: function(data, cache)
- {
- data.type = this._type;
- data.size = this._size;
- },
-
- /**
- * @override
- * @param {!Object} data
- * @param {!Cache.<Resource>} cache
- */
- _doReplayCalls: function(data, cache)
- {
- this._type = data.type;
- this._size = data.size;
- Resource.prototype._doReplayCalls.call(this, data, cache);
- },
-
- __proto__: Resource.prototype
-}
-
-/**
- * @constructor
* @extends {ContextResource}
* @param {!WebGLRenderingContext} glContext
*/
@@ -2175,10 +1716,8 @@ function WebGLRenderingContextResource(glContext)
ContextResource.call(this, glContext, "WebGLRenderingContext");
/** @type {Object.<number, boolean>} */
this._customErrors = null;
- /** @type {!Object.<string, string>} */
+ /** @type {!Object.<string, boolean>} */
this._extensions = {};
- /** @type {!Object.<string, number>} */
- this._extensionEnums = {};
}
/**
@@ -2232,7 +1771,6 @@ WebGLRenderingContextResource.StateParameters = [
"DEPTH_RANGE",
"DEPTH_WRITEMASK",
"ELEMENT_ARRAY_BUFFER_BINDING",
- "FRAGMENT_SHADER_DERIVATIVE_HINT_OES", // OES_standard_derivatives extension
"FRAMEBUFFER_BINDING",
"FRONT_FACE",
"GENERATE_MIPMAP_HINT",
@@ -2263,56 +1801,10 @@ WebGLRenderingContextResource.StateParameters = [
"UNPACK_COLORSPACE_CONVERSION_WEBGL",
"UNPACK_FLIP_Y_WEBGL",
"UNPACK_PREMULTIPLY_ALPHA_WEBGL",
- "VERTEX_ARRAY_BINDING_OES", // OES_vertex_array_object extension
"VIEWPORT"
];
/**
- * True for those enums that return also an enum via a getter API method (e.g. getParameter, getShaderParameter, etc.).
- * @const
- * @type {!Object.<string, boolean>}
- */
-WebGLRenderingContextResource.GetResultIsEnum = TypeUtils.createPrefixedPropertyNamesSet([
- // gl.getParameter()
- "ACTIVE_TEXTURE",
- "BLEND_DST_ALPHA",
- "BLEND_DST_RGB",
- "BLEND_EQUATION_ALPHA",
- "BLEND_EQUATION_RGB",
- "BLEND_SRC_ALPHA",
- "BLEND_SRC_RGB",
- "CULL_FACE_MODE",
- "DEPTH_FUNC",
- "FRONT_FACE",
- "GENERATE_MIPMAP_HINT",
- "FRAGMENT_SHADER_DERIVATIVE_HINT_OES",
- "STENCIL_BACK_FAIL",
- "STENCIL_BACK_FUNC",
- "STENCIL_BACK_PASS_DEPTH_FAIL",
- "STENCIL_BACK_PASS_DEPTH_PASS",
- "STENCIL_FAIL",
- "STENCIL_FUNC",
- "STENCIL_PASS_DEPTH_FAIL",
- "STENCIL_PASS_DEPTH_PASS",
- "UNPACK_COLORSPACE_CONVERSION_WEBGL",
- // gl.getBufferParameter()
- "BUFFER_USAGE",
- // gl.getFramebufferAttachmentParameter()
- "FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",
- // gl.getRenderbufferParameter()
- "RENDERBUFFER_INTERNAL_FORMAT",
- // gl.getTexParameter()
- "TEXTURE_MAG_FILTER",
- "TEXTURE_MIN_FILTER",
- "TEXTURE_WRAP_S",
- "TEXTURE_WRAP_T",
- // gl.getShaderParameter()
- "SHADER_TYPE",
- // gl.getVertexAttrib()
- "VERTEX_ATTRIB_ARRAY_TYPE"
-]);
-
-/**
* @const
* @type {!Object.<string, boolean>}
*/
@@ -2429,51 +1921,11 @@ WebGLRenderingContextResource.prototype = {
/**
* @param {string} name
- * @param {Object} obj
*/
- registerWebGLExtension: function(name, obj)
+ addExtension: function(name)
{
// FIXME: Wrap OES_vertex_array_object extension.
- var lowerName = name.toLowerCase();
- if (obj && !this._extensions[lowerName]) {
- this._extensions[lowerName] = name;
- for (var property in obj) {
- if (TypeUtils.isEnumPropertyName(property, obj))
- this._extensionEnums[property] = /** @type {number} */ (obj[property]);
- }
- }
- },
-
- /**
- * @param {string} name
- * @return {number|undefined}
- */
- _enumValueForName: function(name)
- {
- if (typeof this._extensionEnums[name] === "number")
- return this._extensionEnums[name];
- var gl = this.wrappedObject();
- return (typeof gl[name] === "number" ? gl[name] : undefined);
- },
-
- /**
- * @param {function(this:WebGLRenderingContext, T, number):*} func
- * @param {T} targetOrWebGLObject
- * @param {!Array.<string>} pnames
- * @param {!Array.<TypeUtils.InternalResourceStateDescriptor>} output
- * @template T
- */
- queryStateValues: function(func, targetOrWebGLObject, pnames, output)
- {
- var gl = this.wrappedObject();
- for (var i = 0, pname; pname = pnames[i]; ++i) {
- var enumValue = this._enumValueForName(pname);
- if (typeof enumValue !== "number")
- continue;
- var value = func.call(gl, targetOrWebGLObject, enumValue);
- value = Resource.forObject(value) || value;
- output.push({ name: pname, value: value, valueIsEnum: WebGLRenderingContextResource.GetResultIsEnum[pname] });
- }
+ this._extensions[name.toLowerCase()] = true;
},
/**
@@ -2489,10 +1941,9 @@ WebGLRenderingContextResource.prototype = {
function convertToStateDescriptors(obj, output)
{
for (var pname in obj)
- output.push({ name: pname, value: obj[pname], valueIsEnum: WebGLRenderingContextResource.GetResultIsEnum[pname] });
+ output.push({ name: pname, value: obj[pname] });
}
- var gl = this.wrappedObject();
var glState = this._internalCurrentState(null);
// VERTEX_ATTRIB_ARRAYS
@@ -2517,30 +1968,13 @@ WebGLRenderingContextResource.prototype = {
var result = [];
convertToStateDescriptors(glState, result);
- result.push({ name: "VERTEX_ATTRIB_ARRAYS", values: vertexAttribStates, isArray: true });
- result.push({ name: "TEXTURE_UNITS", values: textureUnits, isArray: true });
-
- var textureBindingParameters = ["TEXTURE_BINDING_2D", "TEXTURE_BINDING_CUBE_MAP"];
- for (var i = 0, pname; pname = textureBindingParameters[i]; ++i) {
- var value = gl.getParameter(gl[pname]);
- value = Resource.forObject(value) || value;
- result.push({ name: pname, value: value });
- }
-
- // ENABLED_EXTENSIONS
- var enabledExtensions = [];
- for (var lowerName in this._extensions) {
- var pname = this._extensions[lowerName];
- var value = gl.getExtension(pname);
- value = Resource.forObject(value) || value;
- enabledExtensions.push({ name: pname, value: value });
- }
- result.push({ name: "ENABLED_EXTENSIONS", values: enabledExtensions, isArray: true });
-
+ result.push({ name: "VERTEX_ATTRIB_ARRAYS[" + vertexAttribStates.length + "]", values: vertexAttribStates });
+ result.push({ name: "TEXTURE_UNITS[" + textureUnits.length + "]", values: textureUnits });
return result;
},
/**
+ * @override
* @param {?Cache.<ReplayableResource>} cache
* @return {!Object.<string, *>}
*/
@@ -2563,33 +1997,20 @@ WebGLRenderingContextResource.prototype = {
WebGLRenderingContextResource.GLCapabilities.forEach(function(parameter) {
glState[parameter] = gl.isEnabled(gl[parameter]);
});
- for (var i = 0, pname; pname = WebGLRenderingContextResource.StateParameters[i]; ++i) {
- var enumValue = this._enumValueForName(pname);
- if (typeof enumValue === "number")
- glState[pname] = maybeToReplayable(gl.getParameter(enumValue));
- }
+ WebGLRenderingContextResource.StateParameters.forEach(function(parameter) {
+ glState[parameter] = maybeToReplayable(gl.getParameter(gl[parameter]));
+ });
// VERTEX_ATTRIB_ARRAYS
var maxVertexAttribs = /** @type {number} */ (gl.getParameter(gl.MAX_VERTEX_ATTRIBS));
- var vertexAttribParameters = [
- "VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",
- "VERTEX_ATTRIB_ARRAY_ENABLED",
- "VERTEX_ATTRIB_ARRAY_SIZE",
- "VERTEX_ATTRIB_ARRAY_STRIDE",
- "VERTEX_ATTRIB_ARRAY_TYPE",
- "VERTEX_ATTRIB_ARRAY_NORMALIZED",
- "CURRENT_VERTEX_ATTRIB",
- "VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE" // ANGLE_instanced_arrays extension
- ];
+ var vertexAttribParameters = ["VERTEX_ATTRIB_ARRAY_BUFFER_BINDING", "VERTEX_ATTRIB_ARRAY_ENABLED", "VERTEX_ATTRIB_ARRAY_SIZE", "VERTEX_ATTRIB_ARRAY_STRIDE", "VERTEX_ATTRIB_ARRAY_TYPE", "VERTEX_ATTRIB_ARRAY_NORMALIZED", "CURRENT_VERTEX_ATTRIB"];
var vertexAttribStates = [];
- for (var index = 0; index < maxVertexAttribs; ++index) {
+ for (var i = 0; i < maxVertexAttribs; ++i) {
var state = Object.create(null);
- for (var i = 0, pname; pname = vertexAttribParameters[i]; ++i) {
- var enumValue = this._enumValueForName(pname);
- if (typeof enumValue === "number")
- state[pname] = maybeToReplayable(gl.getVertexAttrib(index, enumValue));
- }
- state.VERTEX_ATTRIB_ARRAY_POINTER = gl.getVertexAttribOffset(index, gl.VERTEX_ATTRIB_ARRAY_POINTER);
+ vertexAttribParameters.forEach(function(attribParameter) {
+ state[attribParameter] = maybeToReplayable(gl.getVertexAttrib(i, gl[attribParameter]));
+ });
+ state.VERTEX_ATTRIB_ARRAY_POINTER = gl.getVertexAttribOffset(i, gl.VERTEX_ATTRIB_ARRAY_POINTER);
vertexAttribStates.push(state);
}
glState.VERTEX_ATTRIB_ARRAYS = vertexAttribStates;
@@ -2623,7 +2044,6 @@ WebGLRenderingContextResource.prototype = {
data.originalCanvas = gl.canvas;
data.originalContextAttributes = gl.getContextAttributes();
data.extensions = TypeUtils.cloneObject(this._extensions);
- data.extensionEnums = TypeUtils.cloneObject(this._extensionEnums);
data.glState = this._internalCurrentState(cache);
},
@@ -2636,7 +2056,6 @@ WebGLRenderingContextResource.prototype = {
{
this._customErrors = null;
this._extensions = TypeUtils.cloneObject(data.extensions) || {};
- this._extensionEnums = TypeUtils.cloneObject(data.extensionEnums) || {};
var canvas = data.originalCanvas.cloneNode(true);
var replayContext = null;
@@ -2684,10 +2103,6 @@ WebGLRenderingContextResource.prototype = {
gl.hint(gl.GENERATE_MIPMAP_HINT, glState.GENERATE_MIPMAP_HINT);
gl.lineWidth(glState.LINE_WIDTH);
- var enumValue = this._enumValueForName("FRAGMENT_SHADER_DERIVATIVE_HINT_OES");
- if (typeof enumValue === "number")
- gl.hint(enumValue, glState.FRAGMENT_SHADER_DERIVATIVE_HINT_OES);
-
WebGLRenderingContextResource.PixelStoreParameters.forEach(function(parameter) {
gl.pixelStorei(gl[parameter], glState[parameter]);
});
@@ -2795,30 +2210,6 @@ WebGLRenderingContextResource.prototype = {
/**
* @override
- * @param {!Call} call
- */
- onCallReplayed: function(call)
- {
- var functionName = call.functionName();
- var args = call.args();
- switch (functionName) {
- case "bindBuffer":
- case "bindFramebuffer":
- case "bindRenderbuffer":
- case "bindTexture":
- // Update BINDING state for Resources in the replay world.
- var resource = Resource.forObject(args[1]);
- if (resource)
- resource.pushBinding(args[0], functionName);
- break;
- case "getExtension":
- this.registerWebGLExtension(args[0], /** @type {Object} */ (call.result()));
- break;
- }
- },
-
- /**
- * @override
* @return {!Object.<string, Function>}
*/
_customWrapFunctions: function()
@@ -2833,7 +2224,7 @@ WebGLRenderingContextResource.prototype = {
wrapFunctions["createTexture"] = Resource.WrapFunction.resourceFactoryMethod(WebGLTextureResource, "WebGLTexture");
wrapFunctions["createFramebuffer"] = Resource.WrapFunction.resourceFactoryMethod(WebGLFramebufferResource, "WebGLFramebuffer");
wrapFunctions["createRenderbuffer"] = Resource.WrapFunction.resourceFactoryMethod(WebGLRenderbufferResource, "WebGLRenderbuffer");
- wrapFunctions["getUniformLocation"] = Resource.WrapFunction.resourceFactoryMethod(WebGLUniformLocationResource, "WebGLUniformLocation");
+ wrapFunctions["getUniformLocation"] = Resource.WrapFunction.resourceFactoryMethod(Resource, "WebGLUniformLocation");
/**
* @param {string} methodName
@@ -2903,7 +2294,7 @@ WebGLRenderingContextResource.prototype = {
*/
wrapFunctions["getExtension"] = function(name)
{
- this._resource.registerWebGLExtension(name, this.result());
+ this._resource.addExtension(name);
}
//
@@ -2949,7 +2340,6 @@ WebGLRenderingContextResource.prototype = {
*/
wrapFunctions["bindBuffer"] = wrapFunctions["bindFramebuffer"] = wrapFunctions["bindRenderbuffer"] = function(target, obj)
{
- this._resource.currentBinding(target); // To call WebGLBoundResource.prototype.pushBinding().
this._resource._registerBoundResource("__bindBuffer_" + target, obj);
}
/**
@@ -2959,7 +2349,6 @@ WebGLRenderingContextResource.prototype = {
*/
wrapFunctions["bindTexture"] = function(target, obj)
{
- this._resource.currentBinding(target); // To call WebGLBoundResource.prototype.pushBinding().
var gl = /** @type {WebGLRenderingContext} */ (this._originalObject);
var currentTextureBinding = /** @type {number} */ (gl.getParameter(gl.ACTIVE_TEXTURE));
this._resource._registerBoundResource("__bindTexture_" + target + "_" + currentTextureBinding, obj);
@@ -3108,7 +2497,6 @@ CanvasRenderingContext2DResource.prototype = {
var state = this._internalCurrentState(null);
for (var pname in state)
result.push({ name: pname, value: state[pname] });
- result.push({ name: "context", value: this.contextResource() });
return result;
},
@@ -3428,36 +2816,31 @@ function CallFormatter(drawingMethodNames)
CallFormatter.prototype = {
/**
* @param {!ReplayableCall} replayableCall
- * @param {string=} objectGroup
* @return {!Object}
*/
- formatCall: function(replayableCall, objectGroup)
+ formatCall: function(replayableCall)
{
var result = {};
var functionName = replayableCall.functionName();
if (functionName) {
result.functionName = functionName;
- result.arguments = [];
- var args = replayableCall.args();
- for (var i = 0, n = args.length; i < n; ++i)
- result.arguments.push(this.formatValue(args[i], objectGroup));
+ result.arguments = replayableCall.args().map(this.formatValue.bind(this));
if (replayableCall.result() !== undefined)
- result.result = this.formatValue(replayableCall.result(), objectGroup);
+ result.result = this.formatValue(replayableCall.result());
if (this._drawingMethodNames[functionName])
result.isDrawingCall = true;
} else {
result.property = replayableCall.propertyName();
- result.value = this.formatValue(replayableCall.propertyValue(), objectGroup);
+ result.value = this.formatValue(replayableCall.propertyValue());
}
return result;
},
/**
* @param {*} value
- * @param {string=} objectGroup
* @return {!CanvasAgent.CallArgument}
*/
- formatValue: function(value, objectGroup)
+ formatValue: function(value)
{
if (value instanceof Resource || value instanceof ReplayableResource) {
return {
@@ -3466,70 +2849,31 @@ CallFormatter.prototype = {
};
}
- var remoteObject = injectedScript.wrapObject(value, objectGroup || "", true, false);
- var description = remoteObject.description || ("" + value);
-
+ var remoteObject = injectedScript.wrapObject(value, "", true, false);
var result = {
- description: description,
+ description: remoteObject.description || ("" + value),
type: /** @type {CanvasAgent.CallArgumentType} */ (remoteObject.type)
};
if (remoteObject.subtype)
result.subtype = /** @type {CanvasAgent.CallArgumentSubtype} */ (remoteObject.subtype);
- if (remoteObject.objectId) {
- if (objectGroup)
- result.remoteObject = remoteObject;
- else
- injectedScript.releaseObject(remoteObject.objectId);
- }
+ if (remoteObject.objectId)
+ injectedScript.releaseObject(remoteObject.objectId);
return result;
},
/**
- * @param {string} name
- * @return {?string}
- */
- enumValueForName: function(name)
- {
- return null;
- },
-
- /**
- * @param {number} value
- * @param {Array.<string>=} options
- * @return {?string}
- */
- enumNameForValue: function(value, options)
- {
- return null;
- },
-
- /**
* @param {!Array.<TypeUtils.InternalResourceStateDescriptor>} descriptors
- * @param {string=} objectGroup
* @return {!Array.<!CanvasAgent.ResourceStateDescriptor>}
*/
- formatResourceStateDescriptors: function(descriptors, objectGroup)
+ convertResourceStateDescriptors: function(descriptors)
{
var result = [];
for (var i = 0, n = descriptors.length; i < n; ++i) {
var d = descriptors[i];
- var item;
if (d.values)
- item = { name: d.name, values: this.formatResourceStateDescriptors(d.values, objectGroup) };
- else {
- item = { name: d.name, value: this.formatValue(d.value, objectGroup) };
- if (d.valueIsEnum && typeof d.value === "number") {
- var enumName = this.enumNameForValue(d.value);
- if (enumName)
- item.value.enumName = enumName;
- }
- }
- var enumValue = this.enumValueForName(d.name);
- if (enumValue)
- item.enumValueForName = enumValue;
- if (d.isArray)
- item.isArray = true;
- result.push(item);
+ result.push({ name: d.name, values: this.convertResourceStateDescriptors(d.values) });
+ else
+ result.push({ name: d.name, value: this.formatValue(d.value) });
}
return result;
}
@@ -3652,12 +2996,11 @@ WebGLCallFormatter.prototype = {
/**
* @override
* @param {!ReplayableCall} replayableCall
- * @param {string=} objectGroup
* @return {!Object}
*/
- formatCall: function(replayableCall, objectGroup)
+ formatCall: function(replayableCall)
{
- var result = CallFormatter.prototype.formatCall.call(this, replayableCall, objectGroup);
+ var result = CallFormatter.prototype.formatCall.call(this, replayableCall);
if (!result.functionName)
return result;
var enumsInfo = this._findEnumsInfo(replayableCall);
@@ -3667,52 +3010,23 @@ WebGLCallFormatter.prototype = {
for (var i = 0, n = enumArgsIndexes.length; i < n; ++i) {
var index = enumArgsIndexes[i];
var callArgument = result.arguments[index];
- this._formatEnumValue(callArgument, enumsInfo["hints"]);
+ if (callArgument && !isNaN(callArgument.description))
+ callArgument.description = this._enumValueToString(+callArgument.description, enumsInfo["hints"]) || callArgument.description;
}
var bitfieldArgsIndexes = enumsInfo["bitfield"] || [];
for (var i = 0, n = bitfieldArgsIndexes.length; i < n; ++i) {
var index = bitfieldArgsIndexes[i];
var callArgument = result.arguments[index];
- this._formatEnumBitmaskValue(callArgument, enumsInfo["hints"]);
+ if (callArgument && !isNaN(callArgument.description))
+ callArgument.description = this._enumBitmaskToString(+callArgument.description, enumsInfo["hints"]) || callArgument.description;
}
- if (enumsInfo.returnType === "enum")
- this._formatEnumValue(result.result, enumsInfo["hints"]);
- else if (enumsInfo.returnType === "bitfield")
- this._formatEnumBitmaskValue(result.result, enumsInfo["hints"]);
- return result;
- },
-
- /**
- * @override
- * @param {string} name
- * @return {?string}
- */
- enumValueForName: function(name)
- {
- this._initialize();
- if (name in this._enumNameToValue)
- return "" + this._enumNameToValue[name];
- return null;
- },
-
- /**
- * @override
- * @param {number} value
- * @param {Array.<string>=} options
- * @return {?string}
- */
- enumNameForValue: function(value, options)
- {
- this._initialize();
- options = options || [];
- for (var i = 0, n = options.length; i < n; ++i) {
- if (this._enumNameToValue[options[i]] === value)
- return options[i];
+ if (enumsInfo.returnType && result.result) {
+ if (enumsInfo.returnType === "enum")
+ result.result.description = this._enumValueToString(+result.result.description, enumsInfo["hints"]) || result.result.description;
+ else if (enumsInfo.returnType === "bitfield")
+ result.result.description = this._enumBitmaskToString(+result.result.description, enumsInfo["hints"]) || result.result.description;
}
- var names = this._enumValueToNames[value];
- if (!names || names.length !== 1)
- return null;
- return names[0];
+ return result;
},
/**
@@ -3749,30 +3063,34 @@ WebGLCallFormatter.prototype = {
},
/**
- * @param {?CanvasAgent.CallArgument|undefined} callArgument
+ * @param {number} value
* @param {Array.<string>=} options
+ * @return {string}
*/
- _formatEnumValue: function(callArgument, options)
+ _enumValueToString: function(value, options)
{
- if (!callArgument || isNaN(callArgument.description))
- return;
this._initialize();
- var value = +callArgument.description;
- var enumName = this.enumNameForValue(value, options);
- if (enumName)
- callArgument.enumName = enumName;
+ options = options || [];
+ for (var i = 0, n = options.length; i < n; ++i) {
+ if (this._enumNameToValue[options[i]] === value)
+ return options[i];
+ }
+ var names = this._enumValueToNames[value];
+ if (!names || names.length !== 1) {
+ console.warn("Ambiguous WebGL enum names for value " + value + ": " + names);
+ return "";
+ }
+ return names[0];
},
/**
- * @param {?CanvasAgent.CallArgument|undefined} callArgument
+ * @param {number} value
* @param {Array.<string>=} options
+ * @return {string}
*/
- _formatEnumBitmaskValue: function(callArgument, options)
+ _enumBitmaskToString: function(value, options)
{
- if (!callArgument || isNaN(callArgument.description))
- return;
this._initialize();
- var value = +callArgument.description;
options = options || [];
/** @type {!Array.<string>} */
var result = [];
@@ -3789,13 +3107,13 @@ WebGLCallFormatter.prototype = {
var names = this._enumValueToNames[bitValue];
if (!names || names.length !== 1) {
console.warn("Ambiguous WebGL enum names for value " + bitValue + ": " + names);
- return;
+ return "";
}
result.push(names[0]);
value = nextValue;
}
result.sort();
- callArgument.enumName = result.join(" | ");
+ return result.join(" | ");
},
_initialize: function()
@@ -3817,7 +3135,7 @@ WebGLCallFormatter.prototype = {
if (!obj)
return;
for (var property in obj) {
- if (TypeUtils.isEnumPropertyName(property, obj)) {
+ if (/^[A-Z0-9_]+$/.test(property) && typeof obj[property] === "number") {
var value = /** @type {number} */ (obj[property]);
this._enumNameToValue[property] = value;
var names = this._enumValueToNames[value];
@@ -4253,7 +3571,6 @@ InjectedCanvasModule.prototype = {
this._manager.dropTraceLog(traceLog);
delete this._traceLogs[id];
delete this._traceLogPlayers[id];
- injectedScript.releaseObjectGroup(id);
},
/**
@@ -4326,8 +3643,6 @@ InjectedCanvasModule.prototype = {
return "Error: Trace log with the given ID not found.";
this._traceLogPlayers[traceLogId] = this._traceLogPlayers[traceLogId] || new TraceLogPlayer(traceLog);
- injectedScript.releaseObjectGroup(traceLogId);
-
var beforeTime = TypeUtils.now();
var lastCall = this._traceLogPlayers[traceLogId].stepTo(stepNo);
var replayTime = Math.max(0, TypeUtils.now() - beforeTime);
@@ -4432,7 +3747,7 @@ InjectedCanvasModule.prototype = {
};
if (resource) {
result.imageURL = overrideImageURL || resource.toDataURL();
- result.descriptors = CallFormatter.forResource(resource).formatResourceStateDescriptors(resource.currentState(), traceLogId);
+ result.descriptors = CallFormatter.forResource(resource).convertResourceStateDescriptors(resource.currentState());
}
return result;
},
diff --git a/chromium/third_party/WebKit/Source/core/inspector/InjectedScriptSource.js b/chromium/third_party/WebKit/Source/core/inspector/InjectedScriptSource.js
index 49b35ba0992..437ea48932c 100644
--- a/chromium/third_party/WebKit/Source/core/inspector/InjectedScriptSource.js
+++ b/chromium/third_party/WebKit/Source/core/inspector/InjectedScriptSource.js
@@ -939,7 +939,7 @@ InjectedScript.RemoteObject.prototype = {
* @param {Object} object
* @param {Array.<string>=} firstLevelKeys
* @param {?Array.<string>=} secondLevelKeys
- * @return {!RuntimeAgent.ObjectPreview} preview
+ * @return {Object} preview
*/
_generatePreview: function(object, firstLevelKeys, secondLevelKeys)
{
@@ -956,20 +956,20 @@ InjectedScript.RemoteObject.prototype = {
indexes: isTableRowsRequest ? 1000 : Math.max(100, firstLevelKeysCount)
};
for (var o = object; injectedScript._isDefined(o); o = o.__proto__)
- this._generateProtoPreview(/** @type {!Object} */ (o), preview, propertiesThreshold, firstLevelKeys, secondLevelKeys);
+ this._generateProtoPreview(o, preview, propertiesThreshold, firstLevelKeys, secondLevelKeys);
return preview;
},
/**
- * @param {!Object} object
- * @param {!RuntimeAgent.ObjectPreview} preview
- * @param {!Object} propertiesThreshold
+ * @param {Object} object
+ * @param {Object} preview
+ * @param {Object} propertiesThreshold
* @param {Array.<string>=} firstLevelKeys
* @param {Array.<string>=} secondLevelKeys
*/
_generateProtoPreview: function(object, preview, propertiesThreshold, firstLevelKeys, secondLevelKeys)
{
- var propertyNames = firstLevelKeys ? firstLevelKeys : Object.keys(object);
+ var propertyNames = firstLevelKeys ? firstLevelKeys : Object.keys(/** @type {!Object} */ (object));
try {
for (var i = 0; i < propertyNames.length; ++i) {
if (!propertiesThreshold.properties || !propertiesThreshold.indexes) {
@@ -981,7 +981,7 @@ InjectedScript.RemoteObject.prototype = {
if (this.subtype === "array" && name === "length")
continue;
- var descriptor = Object.getOwnPropertyDescriptor(object, name);
+ var descriptor = Object.getOwnPropertyDescriptor(/** @type {!Object} */ (object), name);
if (!("value" in descriptor) || !descriptor.enumerable) {
preview.lossless = false;
continue;
@@ -1036,9 +1036,9 @@ InjectedScript.RemoteObject.prototype = {
},
/**
- * @param {!RuntimeAgent.ObjectPreview} preview
- * @param {!Object} property
- * @param {!Object} propertiesThreshold
+ * @param {Object} preview
+ * @param {Object} property
+ * @param {Object} propertiesThreshold
*/
_appendPropertyPreview: function(preview, property, propertiesThreshold)
{
diff --git a/chromium/third_party/WebKit/Source/core/inspector/InspectorController.cpp b/chromium/third_party/WebKit/Source/core/inspector/InspectorController.cpp
index fdb31a51c32..a9cb37b199a 100644
--- a/chromium/third_party/WebKit/Source/core/inspector/InspectorController.cpp
+++ b/chromium/third_party/WebKit/Source/core/inspector/InspectorController.cpp
@@ -322,15 +322,6 @@ Node* InspectorController::highlightedNode() const
return m_overlay->highlightedNode();
}
-bool InspectorController::handleGestureEvent(Frame* frame, const PlatformGestureEvent& event)
-{
- // Overlay should not consume events.
- m_overlay->handleGestureEvent(event);
- if (InspectorDOMAgent* domAgent = m_instrumentingAgents->inspectorDOMAgent())
- return domAgent->handleGestureEvent(frame, event);
- return false;
-}
-
bool InspectorController::handleMouseEvent(Frame* frame, const PlatformMouseEvent& event)
{
// Overlay should not consume events.
diff --git a/chromium/third_party/WebKit/Source/core/inspector/InspectorController.h b/chromium/third_party/WebKit/Source/core/inspector/InspectorController.h
index 95f036886a2..42f224add2a 100644
--- a/chromium/third_party/WebKit/Source/core/inspector/InspectorController.h
+++ b/chromium/third_party/WebKit/Source/core/inspector/InspectorController.h
@@ -55,7 +55,6 @@ class InspectorState;
class InstrumentingAgents;
class IntSize;
class Page;
-class PlatformGestureEvent;
class PlatformMouseEvent;
class PlatformTouchEvent;
class PostWorkerNotificationToFrontendTask;
@@ -95,7 +94,6 @@ public:
void hideHighlight();
Node* highlightedNode() const;
- bool handleGestureEvent(Frame*, const PlatformGestureEvent&);
bool handleMouseEvent(Frame*, const PlatformMouseEvent&);
bool handleTouchEvent(Frame*, const PlatformTouchEvent&);
diff --git a/chromium/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp b/chromium/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp
index 39976bdf548..a4f32e2453b 100644
--- a/chromium/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp
+++ b/chromium/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp
@@ -70,7 +70,6 @@
#include "core/page/Frame.h"
#include "core/page/FrameTree.h"
#include "core/page/Page.h"
-#include "core/platform/PlatformGestureEvent.h"
#include "core/platform/PlatformMouseEvent.h"
#include "core/platform/PlatformTouchEvent.h"
#include "core/rendering/HitTestResult.h"
@@ -163,11 +162,6 @@ static Node* hoveredNodeForPoint(Frame* frame, const IntPoint& point, bool ignor
return node;
}
-static Node* hoveredNodeForEvent(Frame* frame, const PlatformGestureEvent& event, bool ignorePointerEventsNone)
-{
- return hoveredNodeForPoint(frame, event.position(), ignorePointerEventsNone);
-}
-
static Node* hoveredNodeForEvent(Frame* frame, const PlatformMouseEvent& event, bool ignorePointerEventsNone)
{
return hoveredNodeForPoint(frame, event.position(), ignorePointerEventsNone);
@@ -1059,19 +1053,6 @@ bool InspectorDOMAgent::handleMousePress()
return false;
}
-bool InspectorDOMAgent::handleGestureEvent(Frame* frame, const PlatformGestureEvent& event)
-{
- if (m_searchingForNode == NotSearching || event.type() != PlatformEvent::GestureTap)
- return false;
- Node* node = hoveredNodeForEvent(frame, event, false);
- if (node && m_inspectModeHighlightConfig) {
- m_overlay->highlightNode(node, 0 /* eventTarget */, *m_inspectModeHighlightConfig);
- inspect(node);
- return true;
- }
- return false;
-}
-
bool InspectorDOMAgent::handleTouchEvent(Frame* frame, const PlatformTouchEvent& event)
{
if (m_searchingForNode == NotSearching)
diff --git a/chromium/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.h b/chromium/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.h
index 6cba33dc2fa..e0a0362425e 100644
--- a/chromium/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.h
+++ b/chromium/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.h
@@ -60,7 +60,6 @@ class InspectorPageAgent;
class InspectorState;
class InstrumentingAgents;
class Node;
-class PlatformGestureEvent;
class PlatformTouchEvent;
class RevalidateStyleAttributeTask;
class ShadowRoot;
@@ -181,7 +180,6 @@ public:
PassRefPtr<TypeBuilder::Runtime::RemoteObject> resolveNode(Node*, const String& objectGroup);
bool handleMousePress();
- bool handleGestureEvent(Frame*, const PlatformGestureEvent&);
bool handleTouchEvent(Frame*, const PlatformTouchEvent&);
void handleMouseMove(Frame*, const PlatformMouseEvent&);
diff --git a/chromium/third_party/WebKit/Source/core/inspector/InspectorDebuggerAgent.cpp b/chromium/third_party/WebKit/Source/core/inspector/InspectorDebuggerAgent.cpp
index 19d838035b3..9f260a48355 100644
--- a/chromium/third_party/WebKit/Source/core/inspector/InspectorDebuggerAgent.cpp
+++ b/chromium/third_party/WebKit/Source/core/inspector/InspectorDebuggerAgent.cpp
@@ -34,7 +34,6 @@
#include "InspectorFrontend.h"
#include "bindings/v8/ScriptDebugServer.h"
#include "bindings/v8/ScriptObject.h"
-#include "core/fetch/Resource.h"
#include "core/inspector/ContentSearchUtils.h"
#include "core/inspector/InjectedScript.h"
#include "core/inspector/InjectedScriptManager.h"
@@ -43,6 +42,7 @@
#include "core/inspector/InstrumentingAgents.h"
#include "core/inspector/ScriptArguments.h"
#include "core/inspector/ScriptCallStack.h"
+#include "core/loader/cache/Resource.h"
#include "core/platform/JSONValues.h"
#include "core/platform/text/RegularExpression.h"
#include "wtf/text/WTFString.h"
diff --git a/chromium/third_party/WebKit/Source/core/inspector/InspectorFrontendHost.cpp b/chromium/third_party/WebKit/Source/core/inspector/InspectorFrontendHost.cpp
index 6f0d3bf04bd..333afc2baca 100644
--- a/chromium/third_party/WebKit/Source/core/inspector/InspectorFrontendHost.cpp
+++ b/chromium/third_party/WebKit/Source/core/inspector/InspectorFrontendHost.cpp
@@ -247,7 +247,8 @@ void InspectorFrontendHost::showContextMenu(Event* event, const Vector<ContextMe
return;
}
RefPtr<FrontendMenuProvider> menuProvider = FrontendMenuProvider::create(this, frontendApiObject, items);
- m_frontendPage->contextMenuController().showContextMenu(event, menuProvider);
+ ContextMenuController* menuController = m_frontendPage->contextMenuController();
+ menuController->showContextMenu(event, menuProvider);
m_menuProvider = menuProvider.get();
}
diff --git a/chromium/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.cpp b/chromium/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.cpp
index 2f16ff13169..5cffed0ac74 100644
--- a/chromium/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.cpp
+++ b/chromium/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.cpp
@@ -31,7 +31,6 @@
#include "config.h"
#include "core/inspector/InspectorInstrumentation.h"
-#include "core/fetch/FetchInitiatorInfo.h"
#include "core/inspector/InspectorAgent.h"
#include "core/inspector/InspectorCSSAgent.h"
#include "core/inspector/InspectorConsoleAgent.h"
@@ -42,6 +41,7 @@
#include "core/inspector/InspectorTimelineAgent.h"
#include "core/inspector/InstrumentingAgents.h"
#include "core/inspector/WorkerInspectorController.h"
+#include "core/loader/cache/FetchInitiatorInfo.h"
#include "core/workers/WorkerGlobalScope.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/inspector/InspectorOverlay.cpp b/chromium/third_party/WebKit/Source/core/inspector/InspectorOverlay.cpp
index 6ac89394e66..25ea756f3f4 100644
--- a/chromium/third_party/WebKit/Source/core/inspector/InspectorOverlay.cpp
+++ b/chromium/third_party/WebKit/Source/core/inspector/InspectorOverlay.cpp
@@ -255,14 +255,6 @@ void InspectorOverlay::invalidate()
m_client->highlight();
}
-bool InspectorOverlay::handleGestureEvent(const PlatformGestureEvent& event)
-{
- if (isEmpty())
- return false;
-
- return overlayPage()->mainFrame()->eventHandler()->handleGestureEvent(event);
-}
-
bool InspectorOverlay::handleMouseEvent(const PlatformMouseEvent& event)
{
if (isEmpty())
diff --git a/chromium/third_party/WebKit/Source/core/inspector/InspectorOverlay.h b/chromium/third_party/WebKit/Source/core/inspector/InspectorOverlay.h
index 2defc500952..a9863eeba81 100644
--- a/chromium/third_party/WebKit/Source/core/inspector/InspectorOverlay.h
+++ b/chromium/third_party/WebKit/Source/core/inspector/InspectorOverlay.h
@@ -49,7 +49,6 @@ class InspectorOverlayHost;
class JSONValue;
class Node;
class Page;
-class PlatformGestureEvent;
class PlatformMouseEvent;
class PlatformTouchEvent;
@@ -127,7 +126,6 @@ public:
void drawOutline(GraphicsContext*, const LayoutRect&, const Color&);
void getHighlight(Highlight*) const;
void resize(const IntSize&);
- bool handleGestureEvent(const PlatformGestureEvent&);
bool handleMouseEvent(const PlatformMouseEvent&);
bool handleTouchEvent(const PlatformTouchEvent&);
diff --git a/chromium/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp b/chromium/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
index a428616881b..9a939cdd47f 100644
--- a/chromium/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
+++ b/chromium/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
@@ -39,13 +39,6 @@
#include "core/dom/DeviceOrientationController.h"
#include "core/dom/Document.h"
#include "core/dom/UserGestureIndicator.h"
-#include "core/fetch/CSSStyleSheetResource.h"
-#include "core/fetch/FontResource.h"
-#include "core/fetch/ImageResource.h"
-#include "core/fetch/MemoryCache.h"
-#include "core/fetch/Resource.h"
-#include "core/fetch/ResourceFetcher.h"
-#include "core/fetch/ScriptResource.h"
#include "core/html/HTMLFrameOwnerElement.h"
#include "core/inspector/ContentSearchUtils.h"
#include "core/inspector/DOMPatchSupport.h"
@@ -61,6 +54,13 @@
#include "core/loader/FrameLoadRequest.h"
#include "core/loader/FrameLoader.h"
#include "core/loader/TextResourceDecoder.h"
+#include "core/loader/cache/CSSStyleSheetResource.h"
+#include "core/loader/cache/FontResource.h"
+#include "core/loader/cache/ImageResource.h"
+#include "core/loader/cache/MemoryCache.h"
+#include "core/loader/cache/Resource.h"
+#include "core/loader/cache/ResourceFetcher.h"
+#include "core/loader/cache/ScriptResource.h"
#include "core/page/Frame.h"
#include "core/page/FrameView.h"
#include "core/page/Page.h"
@@ -396,7 +396,7 @@ void InspectorPageAgent::disable(ErrorString*)
setShowPaintRects(0, false);
setShowDebugBorders(0, false);
setShowFPSCounter(0, false);
- setEmulatedMedia(0, String());
+ setEmulatedMedia(0, "");
setContinuousPaintingEnabled(0, false);
setShowScrollBottleneckRects(0, false);
setShowViewportSizeOnResize(0, false, 0);
@@ -693,7 +693,7 @@ bool InspectorPageAgent::deviceMetricsChanged(int width, int height, double font
// These two always fit an int.
int currentWidth = static_cast<int>(m_state->getLong(PageAgentState::pageAgentScreenWidthOverride));
int currentHeight = static_cast<int>(m_state->getLong(PageAgentState::pageAgentScreenHeightOverride));
- double currentFontScaleFactor = m_state->getDouble(PageAgentState::pageAgentFontScaleFactorOverride, 1);
+ double currentFontScaleFactor = m_state->getDouble(PageAgentState::pageAgentFontScaleFactorOverride);
bool currentFitWindow = m_state->getBoolean(PageAgentState::pageAgentFitWindow);
return width != currentWidth || height != currentHeight || fontScaleFactor != currentFontScaleFactor || fitWindow != currentFitWindow;
diff --git a/chromium/third_party/WebKit/Source/core/inspector/InspectorProfilerAgent.cpp b/chromium/third_party/WebKit/Source/core/inspector/InspectorProfilerAgent.cpp
index 953542430d8..d0375e75011 100644
--- a/chromium/third_party/WebKit/Source/core/inspector/InspectorProfilerAgent.cpp
+++ b/chromium/third_party/WebKit/Source/core/inspector/InspectorProfilerAgent.cpp
@@ -162,6 +162,7 @@ void InspectorProfilerAgent::getCPUProfile(ErrorString* errorString, int rawUid,
}
profileObject = TypeBuilder::Profiler::CPUProfile::create()
.setHead(it->value->buildInspectorObjectForHead())
+ .setIdleTime(it->value->idleTime())
.setStartTime(it->value->startTime())
.setEndTime(it->value->endTime());
profileObject->setSamples(it->value->buildInspectorObjectForSamples());
@@ -268,7 +269,6 @@ void InspectorProfilerAgent::willProcessTask()
{
if (!m_profileNameIdleTimeMap || !m_profileNameIdleTimeMap->size())
return;
- ScriptProfiler::setIdle(false);
if (!m_previousTaskEndTime)
return;
@@ -284,7 +284,6 @@ void InspectorProfilerAgent::didProcessTask()
if (!m_profileNameIdleTimeMap || !m_profileNameIdleTimeMap->size())
return;
m_previousTaskEndTime = WTF::monotonicallyIncreasingTime();
- ScriptProfiler::setIdle(true);
}
} // namespace WebCore
diff --git a/chromium/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp b/chromium/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp
index 1b6317af76d..14c54bb35a2 100644
--- a/chromium/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp
+++ b/chromium/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp
@@ -36,10 +36,6 @@
#include "bindings/v8/ScriptCallStackFactory.h"
#include "core/dom/Document.h"
#include "core/dom/ScriptableDocumentParser.h"
-#include "core/fetch/FetchInitiatorInfo.h"
-#include "core/fetch/MemoryCache.h"
-#include "core/fetch/Resource.h"
-#include "core/fetch/ResourceLoader.h"
#include "core/inspector/IdentifiersFactory.h"
#include "core/inspector/InspectorClient.h"
#include "core/inspector/InspectorOverlay.h"
@@ -51,8 +47,12 @@
#include "core/loader/DocumentLoader.h"
#include "core/loader/DocumentThreadableLoader.h"
#include "core/loader/FrameLoader.h"
+#include "core/loader/ResourceLoader.h"
#include "core/loader/ThreadableLoader.h"
#include "core/loader/ThreadableLoaderClient.h"
+#include "core/loader/cache/FetchInitiatorInfo.h"
+#include "core/loader/cache/MemoryCache.h"
+#include "core/loader/cache/Resource.h"
#include "core/page/Frame.h"
#include "core/page/Page.h"
#include "core/platform/JSONValues.h"
diff --git a/chromium/third_party/WebKit/Source/core/inspector/InspectorState.cpp b/chromium/third_party/WebKit/Source/core/inspector/InspectorState.cpp
index 8e25c288f78..2ed6d20664c 100644
--- a/chromium/third_party/WebKit/Source/core/inspector/InspectorState.cpp
+++ b/chromium/third_party/WebKit/Source/core/inspector/InspectorState.cpp
@@ -84,14 +84,8 @@ String InspectorState::getString(const String& propertyName)
long InspectorState::getLong(const String& propertyName)
{
- return getLong(propertyName, 0);
-}
-
-
-long InspectorState::getLong(const String& propertyName, long defaultValue)
-{
JSONObject::iterator it = m_properties->find(propertyName);
- long value = defaultValue;
+ long value = 0;
if (it != m_properties->end())
it->value->asNumber(&value);
return value;
@@ -99,13 +93,8 @@ long InspectorState::getLong(const String& propertyName, long defaultValue)
double InspectorState::getDouble(const String& propertyName)
{
- return getDouble(propertyName, 0);
-}
-
-double InspectorState::getDouble(const String& propertyName, double defaultValue)
-{
JSONObject::iterator it = m_properties->find(propertyName);
- double value = defaultValue;
+ double value = 0;
if (it != m_properties->end())
it->value->asNumber(&value);
return value;
diff --git a/chromium/third_party/WebKit/Source/core/inspector/InspectorState.h b/chromium/third_party/WebKit/Source/core/inspector/InspectorState.h
index 0679736b33d..7fe1f500d5d 100644
--- a/chromium/third_party/WebKit/Source/core/inspector/InspectorState.h
+++ b/chromium/third_party/WebKit/Source/core/inspector/InspectorState.h
@@ -60,9 +60,7 @@ public:
bool getBoolean(const String& propertyName);
String getString(const String& propertyName);
long getLong(const String& propertyName);
- long getLong(const String& propertyName, long defaultValue);
double getDouble(const String& propertyName);
- double getDouble(const String& propertyName, double defaultValue);
PassRefPtr<JSONObject> getObject(const String& propertyName);
void setBoolean(const String& propertyName, bool value) { setValue(propertyName, JSONBasicValue::create(value)); }
diff --git a/chromium/third_party/WebKit/Source/core/inspector/NetworkResourcesData.cpp b/chromium/third_party/WebKit/Source/core/inspector/NetworkResourcesData.cpp
index f5c8abefe9e..cc210a91a6b 100644
--- a/chromium/third_party/WebKit/Source/core/inspector/NetworkResourcesData.cpp
+++ b/chromium/third_party/WebKit/Source/core/inspector/NetworkResourcesData.cpp
@@ -30,8 +30,8 @@
#include "core/inspector/NetworkResourcesData.h"
#include "core/dom/DOMImplementation.h"
-#include "core/fetch/Resource.h"
#include "core/loader/TextResourceDecoder.h"
+#include "core/loader/cache/Resource.h"
#include "core/platform/SharedBuffer.h"
#include "core/platform/network/ResourceResponse.h"
diff --git a/chromium/third_party/WebKit/Source/core/inspector/ScriptProfile.cpp b/chromium/third_party/WebKit/Source/core/inspector/ScriptProfile.cpp
index 5db3af7bf14..513586b69f2 100644
--- a/chromium/third_party/WebKit/Source/core/inspector/ScriptProfile.cpp
+++ b/chromium/third_party/WebKit/Source/core/inspector/ScriptProfile.cpp
@@ -85,7 +85,7 @@ static PassRefPtr<TypeBuilder::Profiler::CPUProfileNode> buildInspectorObjectFor
.setScriptId(String::number(node->GetScriptId()))
.setUrl(toWebCoreString(node->GetScriptResourceName()))
.setLineNumber(node->GetLineNumber())
- .setHitCount(node->GetHitCount())
+ .setHitCount(node->GetSelfSamplesCount())
.setCallUID(node->GetCallUid())
.setChildren(children.release());
result->setId(node->GetNodeId());
diff --git a/chromium/third_party/WebKit/Source/core/loader/CrossOriginAccessControl.cpp b/chromium/third_party/WebKit/Source/core/loader/CrossOriginAccessControl.cpp
index edfbb620835..6c4fbf0f83c 100644
--- a/chromium/third_party/WebKit/Source/core/loader/CrossOriginAccessControl.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/CrossOriginAccessControl.cpp
@@ -148,24 +148,17 @@ bool passesAccessControlCheck(const ResourceResponse& response, StoredCredential
// FIXME: Access-Control-Allow-Origin can contain a list of origins.
if (accessControlOriginString != securityOrigin->toString()) {
- if (accessControlOriginString == "*") {
- errorDescription = "Wildcards cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin '" + securityOrigin->toString() + "' is therefore not allowed access.";
- } else if (accessControlOriginString.isEmpty()) {
- errorDescription = "No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '" + securityOrigin->toString() + "' is therefore not allowed access.";
- } else {
- KURL headerOrigin(KURL(), accessControlOriginString);
- if (!headerOrigin.isValid())
- errorDescription = "The 'Access-Control-Allow-Origin' header contains the invalid value '" + accessControlOriginString + "'. Origin '" + securityOrigin->toString() + "' is therefore not allowed access.";
- else
- errorDescription = "The 'Access-Control-Allow-Origin' whitelists only '" + accessControlOriginString + "'. Origin '" + securityOrigin->toString() + "' is not in the list, and is therefore not allowed access.";
- }
+ if (accessControlOriginString == "*")
+ errorDescription = "Cannot use wildcard in Access-Control-Allow-Origin when credentials flag is true.";
+ else
+ errorDescription = "Origin " + securityOrigin->toString() + " is not allowed by Access-Control-Allow-Origin.";
return false;
}
if (includeCredentials == AllowStoredCredentials) {
const String& accessControlCredentialsString = response.httpHeaderField(accessControlAllowCredentials);
if (accessControlCredentialsString != "true") {
- errorDescription = "Credentials flag is 'true', but the 'Access-Control-Allow-Credentials' header is '" + accessControlCredentialsString + "'. It must be 'true' to allow credentials.";
+ errorDescription = "Credentials flag is true, but Access-Control-Allow-Credentials is not \"true\".";
return false;
}
}
diff --git a/chromium/third_party/WebKit/Source/core/loader/CrossOriginAccessControl.h b/chromium/third_party/WebKit/Source/core/loader/CrossOriginAccessControl.h
index 0d58400e69c..a660e01f3fc 100644
--- a/chromium/third_party/WebKit/Source/core/loader/CrossOriginAccessControl.h
+++ b/chromium/third_party/WebKit/Source/core/loader/CrossOriginAccessControl.h
@@ -27,7 +27,7 @@
#ifndef CrossOriginAccessControl_h
#define CrossOriginAccessControl_h
-#include "core/fetch/ResourceLoaderOptions.h"
+#include "core/loader/ResourceLoaderOptions.h"
#include "core/platform/network/ResourceRequest.h"
#include "wtf/Forward.h"
#include "wtf/HashSet.h"
diff --git a/chromium/third_party/WebKit/Source/core/loader/CrossOriginPreflightResultCache.h b/chromium/third_party/WebKit/Source/core/loader/CrossOriginPreflightResultCache.h
index 3911a2c1373..0006d48b7d8 100644
--- a/chromium/third_party/WebKit/Source/core/loader/CrossOriginPreflightResultCache.h
+++ b/chromium/third_party/WebKit/Source/core/loader/CrossOriginPreflightResultCache.h
@@ -27,7 +27,7 @@
#ifndef CrossOriginPreflightResultCache_h
#define CrossOriginPreflightResultCache_h
-#include "core/fetch/ResourceLoaderOptions.h"
+#include "core/loader/ResourceLoaderOptions.h"
#include "weborigin/KURLHash.h"
#include "wtf/HashMap.h"
#include "wtf/HashSet.h"
diff --git a/chromium/third_party/WebKit/Source/core/loader/DocumentLoader.cpp b/chromium/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
index 73f7c6e4040..bb5a31827b3 100644
--- a/chromium/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
@@ -36,20 +36,20 @@
#include "core/dom/Document.h"
#include "core/dom/DocumentParser.h"
#include "core/dom/Event.h"
-#include "core/fetch/MemoryCache.h"
-#include "core/fetch/ResourceFetcher.h"
-#include "core/fetch/ResourceLoader.h"
#include "core/html/HTMLFrameOwnerElement.h"
#include "core/inspector/InspectorInstrumentation.h"
#include "core/loader/DocumentWriter.h"
#include "core/loader/FrameLoader.h"
#include "core/loader/FrameLoaderClient.h"
+#include "core/loader/ResourceLoader.h"
#include "core/loader/SinkDocument.h"
#include "core/loader/TextResourceDecoder.h"
#include "core/loader/UniqueIdentifier.h"
#include "core/loader/appcache/ApplicationCacheHost.h"
#include "core/loader/archive/ArchiveResourceCollection.h"
#include "core/loader/archive/MHTMLArchive.h"
+#include "core/loader/cache/MemoryCache.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/page/DOMWindow.h"
#include "core/page/Frame.h"
#include "core/page/FrameTree.h"
@@ -240,7 +240,7 @@ void DocumentLoader::stopLoading()
Document* doc = m_frame->document();
if (loading || doc->parsing())
- m_frame->loader()->stopLoading();
+ m_frame->loader()->stopLoading(UnloadEventPolicyNone);
}
// Always cancel multipart loaders
@@ -807,6 +807,15 @@ bool DocumentLoader::scheduleArchiveLoad(Resource* cachedResource, const Resourc
return true;
}
+void DocumentLoader::setTitle(const StringWithDirection& title)
+{
+ if (m_pageTitle == title)
+ return;
+
+ m_pageTitle = title;
+ frameLoader()->didChangeTitle(this);
+}
+
KURL DocumentLoader::urlForHistory() const
{
// Return the URL to be used for history and B/F list.
diff --git a/chromium/third_party/WebKit/Source/core/loader/DocumentLoader.h b/chromium/third_party/WebKit/Source/core/loader/DocumentLoader.h
index 9797bbf56cc..112292e661e 100644
--- a/chromium/third_party/WebKit/Source/core/loader/DocumentLoader.h
+++ b/chromium/third_party/WebKit/Source/core/loader/DocumentLoader.h
@@ -30,13 +30,13 @@
#ifndef DocumentLoader_h
#define DocumentLoader_h
-#include "core/fetch/RawResource.h"
-#include "core/fetch/ResourceLoaderOptions.h"
-#include "core/fetch/ResourcePtr.h"
#include "core/loader/DocumentLoadTiming.h"
#include "core/loader/DocumentWriter.h"
#include "core/loader/NavigationAction.h"
+#include "core/loader/ResourceLoaderOptions.h"
#include "core/loader/SubstituteData.h"
+#include "core/loader/cache/RawResource.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "core/platform/Timer.h"
#include "core/platform/network/ResourceError.h"
#include "core/platform/network/ResourceRequest.h"
@@ -120,6 +120,7 @@ namespace WebCore {
bool replacesCurrentHistoryItem() const { return m_replacesCurrentHistoryItem; }
void setReplacesCurrentHistoryItem(bool replacesCurrentHistoryItem) { m_replacesCurrentHistoryItem = replacesCurrentHistoryItem; }
bool isLoadingInAPISense() const;
+ void setTitle(const StringWithDirection&);
const String& overrideEncoding() const { return m_overrideEncoding; }
bool scheduleArchiveLoad(Resource*, const ResourceRequest&);
@@ -134,6 +135,7 @@ namespace WebCore {
void setTriggeringAction(const NavigationAction& action) { m_triggeringAction = action; }
void setOverrideEncoding(const String& encoding) { m_overrideEncoding = encoding; }
+ const StringWithDirection& title() const { return m_pageTitle; }
KURL urlForHistory() const;
@@ -249,6 +251,8 @@ namespace WebCore {
bool m_isClientRedirect;
bool m_replacesCurrentHistoryItem;
+ StringWithDirection m_pageTitle;
+
String m_overrideEncoding;
// The action that triggered loading - we keep this around for the
diff --git a/chromium/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp b/chromium/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
index f8e5c83c26b..f7e05443729 100644
--- a/chromium/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
@@ -33,15 +33,15 @@
#include "core/loader/DocumentThreadableLoader.h"
#include "core/dom/Document.h"
-#include "core/fetch/FetchRequest.h"
-#include "core/fetch/RawResource.h"
-#include "core/fetch/ResourceFetcher.h"
#include "core/inspector/InspectorInstrumentation.h"
#include "core/loader/CrossOriginAccessControl.h"
#include "core/loader/CrossOriginPreflightResultCache.h"
#include "core/loader/DocumentThreadableLoaderClient.h"
#include "core/loader/FrameLoader.h"
#include "core/loader/ThreadableLoaderClient.h"
+#include "core/loader/cache/FetchRequest.h"
+#include "core/loader/cache/RawResource.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/page/ContentSecurityPolicy.h"
#include "core/page/Frame.h"
#include "core/platform/network/ResourceError.h"
diff --git a/chromium/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h b/chromium/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h
index 4e44cfb60e6..06e85eb31e7 100644
--- a/chromium/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h
+++ b/chromium/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h
@@ -32,9 +32,9 @@
#ifndef DocumentThreadableLoader_h
#define DocumentThreadableLoader_h
-#include "core/fetch/RawResource.h"
-#include "core/fetch/ResourcePtr.h"
#include "core/loader/ThreadableLoader.h"
+#include "core/loader/cache/RawResource.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "core/platform/Timer.h"
#include "core/platform/network/ResourceError.h"
#include "wtf/Forward.h"
diff --git a/chromium/third_party/WebKit/Source/core/loader/EmptyClients.h b/chromium/third_party/WebKit/Source/core/loader/EmptyClients.h
index cf92613977b..09da78f3845 100644
--- a/chromium/third_party/WebKit/Source/core/loader/EmptyClients.h
+++ b/chromium/third_party/WebKit/Source/core/loader/EmptyClients.h
@@ -228,7 +228,8 @@ public:
virtual void transitionToCommittedForNewPage() OVERRIDE { }
- virtual void navigateBackForward(int offset) const OVERRIDE { }
+ virtual bool shouldGoToHistoryItem(HistoryItem*) const OVERRIDE { return false; }
+ virtual bool shouldStopLoadingForHistoryItem(HistoryItem*) const OVERRIDE { return false; }
virtual void didDisplayInsecureContent() OVERRIDE { }
virtual void didRunInsecureContent(SecurityOrigin*, const KURL&) OVERRIDE { }
virtual void didDetectXSS(const KURL&, bool) OVERRIDE { }
@@ -323,7 +324,6 @@ public:
EmptyContextMenuClient() { }
virtual ~EmptyContextMenuClient() { }
virtual void showContextMenu(const ContextMenu*) OVERRIDE { }
- virtual void clearContextMenu() OVERRIDE { }
};
class EmptyDragClient : public DragClient {
@@ -360,9 +360,13 @@ public:
class EmptyBackForwardClient : public BackForwardClient {
public:
- virtual void didAddItem() OVERRIDE { }
+ virtual void addItem(PassRefPtr<HistoryItem>) OVERRIDE { }
+ virtual void goToItem(HistoryItem*) OVERRIDE { }
+ virtual HistoryItem* itemAtIndex(int) OVERRIDE { return 0; }
virtual int backListCount() OVERRIDE { return 0; }
virtual int forwardListCount() OVERRIDE { return 0; }
+ virtual bool isActive() OVERRIDE { return false; }
+ virtual void close() OVERRIDE { }
};
void fillWithEmptyClients(Page::PageClients&);
diff --git a/chromium/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/chromium/third_party/WebKit/Source/core/loader/FrameLoader.cpp
index aadc4413c1c..1cfc5ca8cee 100644
--- a/chromium/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -39,17 +39,17 @@
#include "bindings/v8/DOMWrapperWorld.h"
#include "bindings/v8/ScriptController.h"
#include "bindings/v8/SerializedScriptValue.h"
+#include "core/dom/BeforeUnloadEvent.h"
#include "core/dom/Document.h"
#include "core/dom/Element.h"
#include "core/dom/Event.h"
#include "core/dom/EventNames.h"
#include "core/dom/PageTransitionEvent.h"
#include "core/editing/Editor.h"
-#include "core/fetch/ResourceFetcher.h"
-#include "core/fetch/ResourceLoader.h"
#include "core/history/BackForwardController.h"
#include "core/history/HistoryItem.h"
#include "core/html/HTMLFormElement.h"
+#include "core/html/HTMLInputElement.h"
#include "core/html/HTMLObjectElement.h"
#include "core/html/parser/HTMLParserIdioms.h"
#include "core/inspector/InspectorController.h"
@@ -62,8 +62,10 @@
#include "core/loader/FrameLoaderClient.h"
#include "core/loader/IconController.h"
#include "core/loader/ProgressTracker.h"
+#include "core/loader/ResourceLoader.h"
#include "core/loader/UniqueIdentifier.h"
#include "core/loader/appcache/ApplicationCacheHost.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/page/Chrome.h"
#include "core/page/ChromeClient.h"
#include "core/page/ContentSecurityPolicy.h"
@@ -158,6 +160,7 @@ FrameLoader::FrameLoader(Frame* frame, FrameLoaderClient* client)
, m_state(FrameStateProvisional)
, m_loadType(FrameLoadTypeStandard)
, m_inStopAllLoaders(false)
+ , m_pageDismissalEventBeingDispatched(NoDismissal)
, m_isComplete(false)
, m_containsPlugins(false)
, m_needsClear(false)
@@ -170,6 +173,7 @@ FrameLoader::FrameLoader(Frame* frame, FrameLoaderClient* client)
, m_suppressOpenerInNewFrame(false)
, m_startingClientRedirect(false)
, m_forcedSandboxFlags(SandboxNone)
+ , m_hasAllowedNavigationViaBeforeUnloadConfirmationPanel(false)
{
}
@@ -275,8 +279,58 @@ void FrameLoader::submitForm(PassRefPtr<FormSubmission> submission)
targetFrame->navigationScheduler()->scheduleFormSubmission(submission);
}
-void FrameLoader::stopLoading()
-{
+void FrameLoader::stopLoading(UnloadEventPolicy unloadEventPolicy)
+{
+ if (m_frame->document() && m_frame->document()->parser())
+ m_frame->document()->parser()->stopParsing();
+
+ if (unloadEventPolicy != UnloadEventPolicyNone) {
+ if (m_frame->document()) {
+ if (m_frame->document()->unloadEventStillNeeded()) {
+ m_frame->document()->unloadEventStarted();
+ Element* currentFocusedElement = m_frame->document()->focusedElement();
+ if (currentFocusedElement && currentFocusedElement->hasTagName(inputTag))
+ toHTMLInputElement(currentFocusedElement)->endEditing();
+ if (m_pageDismissalEventBeingDispatched == NoDismissal) {
+ if (unloadEventPolicy == UnloadEventPolicyUnloadAndPageHide) {
+ m_pageDismissalEventBeingDispatched = PageHideDismissal;
+ m_frame->domWindow()->dispatchEvent(PageTransitionEvent::create(eventNames().pagehideEvent, false), m_frame->document());
+ }
+ RefPtr<Event> unloadEvent(Event::create(eventNames().unloadEvent, false, false));
+ // The DocumentLoader (and thus its DocumentLoadTiming) might get destroyed
+ // while dispatching the event, so protect it to prevent writing the end
+ // time into freed memory.
+ RefPtr<DocumentLoader> documentLoader = m_provisionalDocumentLoader;
+ m_pageDismissalEventBeingDispatched = UnloadDismissal;
+ if (documentLoader && !documentLoader->timing()->unloadEventStart() && !documentLoader->timing()->unloadEventEnd()) {
+ DocumentLoadTiming* timing = documentLoader->timing();
+ ASSERT(timing->navigationStart());
+ timing->markUnloadEventStart();
+ m_frame->domWindow()->dispatchEvent(unloadEvent, m_frame->document());
+ timing->markUnloadEventEnd();
+ } else {
+ m_frame->domWindow()->dispatchEvent(unloadEvent, m_frame->document());
+ }
+ }
+ m_pageDismissalEventBeingDispatched = NoDismissal;
+ if (m_frame->document()) {
+ m_frame->document()->updateStyleIfNeeded();
+ m_frame->document()->unloadEventWasHandled();
+ }
+ }
+ }
+
+ // Dispatching the unload event could have made m_frame->document() null.
+ if (m_frame->document()) {
+ // Don't remove event listeners from a transitional empty document (see bug 28716 for more information).
+ bool keepEventListeners = m_stateMachine.isDisplayingInitialEmptyDocument() && m_provisionalDocumentLoader
+ && m_frame->document()->isSecureTransitionTo(m_provisionalDocumentLoader->url());
+
+ if (!keepEventListeners)
+ m_frame->document()->removeAllEventListeners();
+ }
+ }
+
m_isComplete = true; // to avoid calling completed() in finishedParsing()
if (m_frame->document() && m_frame->document()->parsing()) {
@@ -314,9 +368,8 @@ bool FrameLoader::closeURL()
history()->saveDocumentState();
// Should only send the pagehide event here if the current document exists.
- if (m_frame->document())
- m_frame->document()->dispatchUnloadEvents();
- stopLoading();
+ Document* currentDocument = m_frame->document();
+ stopLoading(currentDocument ? UnloadEventPolicyUnloadAndPageHide : UnloadEventPolicyUnloadOnly);
m_frame->editor()->clearUndoRedoOperations();
return true;
@@ -403,6 +456,13 @@ void FrameLoader::receivedFirstData()
dispatchDidCommitLoad();
dispatchDidClearWindowObjectsInAllWorlds();
+
+ if (m_documentLoader) {
+ StringWithDirection ptitle = m_documentLoader->title();
+ // If we have a title let the WebView know about it.
+ if (!ptitle.isNull())
+ m_client->dispatchDidReceiveTitle(ptitle);
+ }
}
void FrameLoader::setOutgoingReferrer(const KURL& url)
@@ -627,7 +687,7 @@ void FrameLoader::handleFallbackContent()
HTMLFrameOwnerElement* owner = m_frame->ownerElement();
if (!owner || !owner->hasTagName(objectTag))
return;
- toHTMLObjectElement(owner)->renderFallbackContent();
+ static_cast<HTMLObjectElement*>(owner)->renderFallbackContent();
}
bool FrameLoader::allowPlugins(ReasonForCallingAllowPlugins reason)
@@ -673,7 +733,6 @@ void FrameLoader::updateForSameDocumentNavigation(const KURL& newURL, SameDocume
m_documentLoader->appendRedirect(newURL);
m_client->dispatchDidNavigateWithinPage();
- m_client->dispatchDidReceiveTitle(m_frame->document()->titleWithDirection());
if (m_frame->document()->loadEventFinished())
m_client->postProgressFinishedNotification();
@@ -744,7 +803,10 @@ void FrameLoader::prepareForHistoryNavigation()
RefPtr<HistoryItem> currentItem = history()->currentItem();
if (!currentItem) {
insertDummyHistoryItem();
+
ASSERT(stateMachine()->isDisplayingInitialEmptyDocument());
+ stateMachine()->advanceTo(FrameLoaderStateMachine::StartedFirstRealLoad);
+ stateMachine()->advanceTo(FrameLoaderStateMachine::DisplayingInitialEmptyDocumentPostCommit);
stateMachine()->advanceTo(FrameLoaderStateMachine::CommittedFirstRealLoad);
}
}
@@ -922,7 +984,7 @@ void FrameLoader::reload(ReloadPolicy reloadPolicy, const KURL& overrideURL, con
void FrameLoader::stopAllLoaders(ClearProvisionalItemPolicy clearProvisionalItemPolicy)
{
- if (m_frame->document()->pageDismissalEventBeingDispatched() != Document::NoDismissal)
+ if (m_pageDismissalEventBeingDispatched != NoDismissal)
return;
// If this method is called from within this method, infinite recursion can occur (3442218). Avoid this.
@@ -1013,6 +1075,8 @@ void FrameLoader::commitProvisionalLoad()
pdl->timing()->setHasSameOriginAsPreviousDocument(securityOrigin->canRequest(m_frame->document()->url()));
}
+ clearAllowNavigationViaBeforeUnloadConfirmationPanel();
+
// The call to closeURL() invokes the unload event handler, which can execute arbitrary
// JavaScript. If the script initiates a new load, we need to abandon the current load,
// or the two will stomp each other.
@@ -1488,7 +1552,7 @@ bool FrameLoader::shouldClose()
for (i = 0; i < targetFrames.size(); i++) {
if (!targetFrames[i]->tree()->isDescendantOf(m_frame))
continue;
- if (!targetFrames[i]->document()->dispatchBeforeUnloadEvent(page->chrome(), m_frame->document()))
+ if (!targetFrames[i]->loader()->fireBeforeUnloadEvent(page->chrome(), this))
break;
}
@@ -1502,10 +1566,43 @@ bool FrameLoader::shouldClose()
return shouldClose;
}
+bool FrameLoader::fireBeforeUnloadEvent(Chrome& chrome, FrameLoader* navigatingFrameLoader)
+{
+ DOMWindow* domWindow = m_frame->domWindow();
+ if (!domWindow)
+ return true;
+
+ RefPtr<Document> document = m_frame->document();
+ if (!document->body())
+ return true;
+
+ RefPtr<BeforeUnloadEvent> beforeUnloadEvent = BeforeUnloadEvent::create();
+ m_pageDismissalEventBeingDispatched = BeforeUnloadDismissal;
+ domWindow->dispatchEvent(beforeUnloadEvent.get(), domWindow->document());
+ m_pageDismissalEventBeingDispatched = NoDismissal;
+
+ if (!beforeUnloadEvent->defaultPrevented())
+ document->defaultEventHandler(beforeUnloadEvent.get());
+ if (beforeUnloadEvent->result().isNull())
+ return true;
+
+ if (navigatingFrameLoader->hasAllowedNavigationViaBeforeUnloadConfirmationPanel()) {
+ m_frame->document()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Blocked attempt to show multiple 'beforeunload' confirmation panels for a single navigation.");
+ return true;
+ }
+
+ String text = document->displayStringModifiedByEncoding(beforeUnloadEvent->result());
+ if (chrome.runBeforeUnloadConfirmPanel(text, m_frame)) {
+ navigatingFrameLoader->didAllowNavigationViaBeforeUnloadConfirmationPanel();
+ return true;
+ }
+ return false;
+}
+
void FrameLoader::loadWithNavigationAction(const ResourceRequest& request, const NavigationAction& action, FrameLoadType type, PassRefPtr<FormState> formState, const SubstituteData& substituteData, const String& overrideEncoding)
{
ASSERT(m_client->hasWebView());
- if (m_frame->document()->pageDismissalEventBeingDispatched() != Document::NoDismissal)
+ if (m_pageDismissalEventBeingDispatched != NoDismissal)
return;
// We skip dispatching the beforeload event on the frame owner if we've already committed a real
@@ -1569,7 +1666,7 @@ void FrameLoader::loadWithNavigationAction(const ResourceRequest& request, const
void FrameLoader::checkNewWindowPolicyAndContinue(PassRefPtr<FormState> formState, const String& frameName, const NavigationAction& action)
{
- if (m_frame->document()->pageDismissalEventBeingDispatched() != Document::NoDismissal)
+ if (m_pageDismissalEventBeingDispatched != NoDismissal)
return;
if (m_frame->document() && m_frame->document()->isSandboxed(SandboxPopups))
@@ -1819,6 +1916,11 @@ void FrameLoader::insertDummyHistoryItem()
frame()->page()->backForward()->setCurrentItem(currentItem.get());
}
+void FrameLoader::setTitle(const StringWithDirection& title)
+{
+ documentLoader()->setTitle(title);
+}
+
String FrameLoader::referrer() const
{
return m_documentLoader ? m_documentLoader->request().httpReferrer() : "";
@@ -1863,6 +1965,15 @@ SandboxFlags FrameLoader::effectiveSandboxFlags() const
return flags;
}
+void FrameLoader::didChangeTitle(DocumentLoader* loader)
+{
+ if (loader == m_documentLoader) {
+ // Must update the entries in the back-forward list too.
+ history()->setCurrentItemTitle(loader->title());
+ m_client->dispatchDidReceiveTitle(loader->title());
+ }
+}
+
void FrameLoader::dispatchDidCommitLoad()
{
m_client->dispatchDidCommitLoad();
diff --git a/chromium/third_party/WebKit/Source/core/loader/FrameLoader.h b/chromium/third_party/WebKit/Source/core/loader/FrameLoader.h
index 157ffba8f6c..9fb25273c3e 100644
--- a/chromium/third_party/WebKit/Source/core/loader/FrameLoader.h
+++ b/chromium/third_party/WebKit/Source/core/loader/FrameLoader.h
@@ -34,13 +34,13 @@
#include "core/dom/IconURL.h"
#include "core/dom/SecurityContext.h"
-#include "core/fetch/CachePolicy.h"
-#include "core/fetch/ResourceLoadNotifier.h"
-#include "core/fetch/ResourceLoaderOptions.h"
#include "core/loader/FrameLoaderStateMachine.h"
#include "core/loader/FrameLoaderTypes.h"
#include "core/loader/HistoryController.h"
#include "core/loader/MixedContentChecker.h"
+#include "core/loader/ResourceLoadNotifier.h"
+#include "core/loader/ResourceLoaderOptions.h"
+#include "core/loader/cache/CachePolicy.h"
#include "core/page/LayoutMilestones.h"
#include "core/platform/Timer.h"
#include "wtf/Forward.h"
@@ -109,7 +109,7 @@ public:
void stopAllLoaders(ClearProvisionalItemPolicy = ShouldClearProvisionalItem);
void stopForUserCancel(bool deferCheckLoadComplete = false);
void stop();
- void stopLoading();
+ void stopLoading(UnloadEventPolicy);
bool closeURL();
void cancelAndClear();
// FIXME: clear() is trying to do too many things. We should break it down into smaller functions (ideally with fewer raw Boolean parameters).
@@ -142,6 +142,7 @@ public:
bool isLoadingMainFrame() const;
bool subframeIsLoading() const;
+ void didChangeTitle(DocumentLoader*);
bool shouldTreatURLAsSrcdocDocument(const KURL&) const;
@@ -201,6 +202,8 @@ public:
bool isComplete() const;
+ void setTitle(const StringWithDirection&);
+
void commitProvisionalLoad();
FrameLoaderStateMachine* stateMachine() const { return &m_stateMachine; }
@@ -224,6 +227,14 @@ public:
bool containsPlugins() const { return m_containsPlugins; }
bool allowPlugins(ReasonForCallingAllowPlugins);
+ enum PageDismissalType {
+ NoDismissal = 0,
+ BeforeUnloadDismissal = 1,
+ PageHideDismissal = 2,
+ UnloadDismissal = 3
+ };
+ PageDismissalType pageDismissalEventBeingDispatched() const { return m_pageDismissalEventBeingDispatched; }
+
void updateForSameDocumentNavigation(const KURL&, SameDocumentNavigationSource, PassRefPtr<SerializedScriptValue>, const String& title);
private:
@@ -241,6 +252,11 @@ private:
SubstituteData defaultSubstituteDataForURL(const KURL&);
+ bool fireBeforeUnloadEvent(Chrome&, FrameLoader*);
+ bool hasAllowedNavigationViaBeforeUnloadConfirmationPanel() const { return m_hasAllowedNavigationViaBeforeUnloadConfirmationPanel; }
+ void didAllowNavigationViaBeforeUnloadConfirmationPanel() { m_hasAllowedNavigationViaBeforeUnloadConfirmationPanel = true; }
+ void clearAllowNavigationViaBeforeUnloadConfirmationPanel() { m_hasAllowedNavigationViaBeforeUnloadConfirmationPanel = false; }
+
void checkNavigationPolicyAndContinueFragmentScroll(const NavigationAction&, bool isNewNavigation);
void checkNewWindowPolicyAndContinue(PassRefPtr<FormState>, const String& frameName, const NavigationAction&);
@@ -300,6 +316,7 @@ private:
String m_outgoingReferrer;
+ PageDismissalType m_pageDismissalEventBeingDispatched;
bool m_isComplete;
bool m_needsClear;
@@ -321,6 +338,8 @@ private:
SandboxFlags m_forcedSandboxFlags;
+ bool m_hasAllowedNavigationViaBeforeUnloadConfirmationPanel;
+
RefPtr<HistoryItem> m_requestedHistoryItem;
};
diff --git a/chromium/third_party/WebKit/Source/core/loader/FrameLoaderClient.h b/chromium/third_party/WebKit/Source/core/loader/FrameLoaderClient.h
index 8a0924a2b2e..f02a306c464 100644
--- a/chromium/third_party/WebKit/Source/core/loader/FrameLoaderClient.h
+++ b/chromium/third_party/WebKit/Source/core/loader/FrameLoaderClient.h
@@ -128,7 +128,8 @@ class FetchRequest;
virtual void loadURLExternally(const ResourceRequest&, NavigationPolicy, const String& suggestedName = String()) = 0;
- virtual void navigateBackForward(int offset) const = 0;
+ virtual bool shouldGoToHistoryItem(HistoryItem*) const = 0;
+ virtual bool shouldStopLoadingForHistoryItem(HistoryItem*) const = 0;
// Another page has accessed the initial empty document of this frame.
// It is no longer safe to display a provisional URL, since a URL spoof
diff --git a/chromium/third_party/WebKit/Source/core/loader/FrameLoaderStateMachine.cpp b/chromium/third_party/WebKit/Source/core/loader/FrameLoaderStateMachine.cpp
index 52957e41884..4cff5c7794e 100644
--- a/chromium/third_party/WebKit/Source/core/loader/FrameLoaderStateMachine.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/FrameLoaderStateMachine.cpp
@@ -61,7 +61,7 @@ bool FrameLoaderStateMachine::isDisplayingInitialEmptyDocument() const
void FrameLoaderStateMachine::advanceTo(State state)
{
- ASSERT(m_state < state);
+ ASSERT(State(m_state + 1) == state);
m_state = state;
}
diff --git a/chromium/third_party/WebKit/Source/core/loader/FrameLoaderTypes.h b/chromium/third_party/WebKit/Source/core/loader/FrameLoaderTypes.h
index 1ef7b5dfddb..a7444ba8409 100644
--- a/chromium/third_party/WebKit/Source/core/loader/FrameLoaderTypes.h
+++ b/chromium/third_party/WebKit/Source/core/loader/FrameLoaderTypes.h
@@ -71,6 +71,12 @@ namespace WebCore {
ObjectContentOtherPlugin
};
+ enum UnloadEventPolicy {
+ UnloadEventPolicyNone,
+ UnloadEventPolicyUnloadOnly,
+ UnloadEventPolicyUnloadAndPageHide
+ };
+
enum ShouldSendReferrer {
MaybeSendReferrer,
NeverSendReferrer
diff --git a/chromium/third_party/WebKit/Source/core/loader/HistoryController.cpp b/chromium/third_party/WebKit/Source/core/loader/HistoryController.cpp
index 7db88749b4e..900765c8a77 100644
--- a/chromium/third_party/WebKit/Source/core/loader/HistoryController.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/HistoryController.cpp
@@ -196,8 +196,12 @@ bool HistoryController::shouldStopLoadingForHistoryItem(HistoryItem* targetItem)
{
if (!m_currentItem)
return false;
+
// Don't abort the current load if we're navigating within the current document.
- return !m_currentItem->shouldDoSameDocumentNavigationTo(targetItem);
+ if (m_currentItem->shouldDoSameDocumentNavigationTo(targetItem))
+ return false;
+
+ return m_frame->loader()->client()->shouldStopLoadingForHistoryItem(targetItem);
}
// Main funnel for navigating to a previous location (back/forward, non-search snap-back)
@@ -213,6 +217,8 @@ void HistoryController::goToItem(HistoryItem* targetItem)
Page* page = m_frame->page();
if (!page)
return;
+ if (!m_frame->loader()->client()->shouldGoToHistoryItem(targetItem))
+ return;
if (m_defersLoading) {
m_deferredItem = targetItem;
return;
@@ -245,7 +251,8 @@ void HistoryController::setDefersLoading(bool defer)
void HistoryController::updateForBackForwardNavigation()
{
#if !LOG_DISABLED
- LOG(History, "WebCoreHistory: Updating History for back/forward navigation in frame %s", m_frame->document()->title().utf8().data());
+ if (m_frame->loader()->documentLoader())
+ LOG(History, "WebCoreHistory: Updating History for back/forward navigation in frame %s", m_frame->loader()->documentLoader()->title().string().utf8().data());
#endif
saveScrollPositionAndViewStateToItem(m_previousItem.get());
@@ -258,7 +265,8 @@ void HistoryController::updateForBackForwardNavigation()
void HistoryController::updateForReload()
{
#if !LOG_DISABLED
- LOG(History, "WebCoreHistory: Updating History for reload in frame %s", m_frame->document()->title().utf8().data());
+ if (m_frame->loader()->documentLoader())
+ LOG(History, "WebCoreHistory: Updating History for reload in frame %s", m_frame->loader()->documentLoader()->title().string().utf8().data());
#endif
if (m_currentItem) {
@@ -287,7 +295,7 @@ void HistoryController::updateForStandardLoad()
void HistoryController::updateForRedirectWithLockedBackForwardList()
{
#if !LOG_DISABLED
- LOG(History, "WebCoreHistory: Updating History for redirect load in frame %s", m_frame->document()->title().utf8().data());
+ LOG(History, "WebCoreHistory: Updating History for redirect load in frame %s", m_frame->loader()->documentLoader()->title().string().utf8().data());
#endif
if (!m_currentItem && !m_frame->tree()->parent()) {
@@ -309,8 +317,8 @@ void HistoryController::updateForCommit()
{
FrameLoader* frameLoader = m_frame->loader();
#if !LOG_DISABLED
- if (m_frame->document())
- LOG(History, "WebCoreHistory: Updating History for commit in frame %s", m_frame->document()->title().utf8().data());
+ if (frameLoader->documentLoader())
+ LOG(History, "WebCoreHistory: Updating History for commit in frame %s", frameLoader->documentLoader()->title().string().utf8().data());
#endif
FrameLoadType type = frameLoader->loadType();
if (isBackForwardLoadType(type) || (isReloadTypeWithProvisionalItem(type) && !frameLoader->documentLoader()->unreachableURL().isEmpty())) {
@@ -487,12 +495,13 @@ void HistoryController::initializeItem(HistoryItem* item)
Frame* parentFrame = m_frame->tree()->parent();
String parent = parentFrame ? parentFrame->tree()->uniqueName() : "";
+ StringWithDirection title = documentLoader->title();
item->setURL(url);
item->setTarget(m_frame->tree()->uniqueName());
item->setParent(parent);
// FIXME: should store title directionality in history as well.
- item->setTitle(m_frame->document()->title());
+ item->setTitle(title.string());
item->setOriginalURLString(originalURL.string());
// Save form state if this is a POST
@@ -695,6 +704,7 @@ void HistoryController::pushState(PassRefPtr<SerializedScriptValue> stateObject,
m_currentItem->setTitle(title);
m_currentItem->setStateObject(stateObject);
m_currentItem->setURLString(urlString);
+
page->backForward()->addItem(topItem.release());
}
diff --git a/chromium/third_party/WebKit/Source/core/loader/ImageLoader.cpp b/chromium/third_party/WebKit/Source/core/loader/ImageLoader.cpp
index 84132cfbb8b..668cb97f3ec 100644
--- a/chromium/third_party/WebKit/Source/core/loader/ImageLoader.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/ImageLoader.cpp
@@ -27,12 +27,12 @@
#include "core/dom/Element.h"
#include "core/dom/Event.h"
#include "core/dom/EventSender.h"
-#include "core/fetch/FetchRequest.h"
-#include "core/fetch/ImageResource.h"
-#include "core/fetch/ResourceFetcher.h"
#include "core/html/HTMLObjectElement.h"
#include "core/html/parser/HTMLParserIdioms.h"
#include "core/loader/CrossOriginAccessControl.h"
+#include "core/loader/cache/FetchRequest.h"
+#include "core/loader/cache/ImageResource.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/page/Frame.h"
#include "core/rendering/RenderImage.h"
#include "core/rendering/RenderVideo.h"
@@ -61,7 +61,8 @@ static ImageEventSender& errorEventSender()
static inline bool pageIsBeingDismissed(Document* document)
{
- return document->pageDismissalEventBeingDispatched() != Document::NoDismissal;
+ Frame* frame = document->frame();
+ return frame && frame->loader()->pageDismissalEventBeingDispatched() != FrameLoader::NoDismissal;
}
ImageLoader::ImageLoader(Element* element)
@@ -394,7 +395,7 @@ void ImageLoader::dispatchPendingBeforeLoadEvent()
m_hasPendingLoadEvent = false;
if (m_element->hasTagName(HTMLNames::objectTag))
- toHTMLObjectElement(m_element)->renderFallbackContent();
+ static_cast<HTMLObjectElement*>(m_element)->renderFallbackContent();
// Only consider updating the protection ref-count of the Element immediately before returning
// from this function as doing so might result in the destruction of this ImageLoader.
diff --git a/chromium/third_party/WebKit/Source/core/loader/ImageLoader.h b/chromium/third_party/WebKit/Source/core/loader/ImageLoader.h
index 6c1274fd3a6..dfb6ad0ddeb 100644
--- a/chromium/third_party/WebKit/Source/core/loader/ImageLoader.h
+++ b/chromium/third_party/WebKit/Source/core/loader/ImageLoader.h
@@ -23,9 +23,9 @@
#ifndef ImageLoader_h
#define ImageLoader_h
-#include "core/fetch/ImageResource.h"
-#include "core/fetch/ImageResourceClient.h"
-#include "core/fetch/ResourcePtr.h"
+#include "core/loader/cache/ImageResource.h"
+#include "core/loader/cache/ImageResourceClient.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "wtf/HashSet.h"
#include "wtf/text/AtomicString.h"
diff --git a/chromium/third_party/WebKit/Source/core/loader/LinkLoader.cpp b/chromium/third_party/WebKit/Source/core/loader/LinkLoader.cpp
index c487098ea88..256de17e5a2 100644
--- a/chromium/third_party/WebKit/Source/core/loader/LinkLoader.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/LinkLoader.cpp
@@ -34,10 +34,10 @@
#include "FetchInitiatorTypeNames.h"
#include "core/dom/Document.h"
-#include "core/fetch/FetchRequest.h"
-#include "core/fetch/ResourceFetcher.h"
#include "core/html/LinkRelAttribute.h"
#include "core/loader/Prerenderer.h"
+#include "core/loader/cache/FetchRequest.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/page/Settings.h"
#include "core/platform/PrerenderHandle.h"
#include "core/platform/network/DNS.h"
diff --git a/chromium/third_party/WebKit/Source/core/loader/LinkLoader.h b/chromium/third_party/WebKit/Source/core/loader/LinkLoader.h
index 086be49e4bc..21a6281fa09 100644
--- a/chromium/third_party/WebKit/Source/core/loader/LinkLoader.h
+++ b/chromium/third_party/WebKit/Source/core/loader/LinkLoader.h
@@ -32,9 +32,9 @@
#ifndef LinkLoader_h
#define LinkLoader_h
-#include "core/fetch/ResourceClient.h"
-#include "core/fetch/ResourcePtr.h"
#include "core/loader/LinkLoaderClient.h"
+#include "core/loader/cache/ResourceClient.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "core/platform/PrerenderClient.h"
#include "core/platform/Timer.h"
#include "wtf/RefPtr.h"
diff --git a/chromium/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp b/chromium/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp
index ac812e0edf8..707de33b695 100644
--- a/chromium/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp
@@ -91,7 +91,7 @@ bool MixedContentChecker::canRunInsecureContent(SecurityOrigin* securityOrigin,
void MixedContentChecker::logWarning(bool allowed, const String& action, const KURL& target) const
{
- String message = String(allowed ? "" : "[blocked] ") + "The page at '" + m_frame->document()->url().elidedString() + "' was loaded over HTTPS, but " + action + " insecure content from '" + target.elidedString() + "': this content should also be loaded over HTTPS.\n";
+ String message = String(allowed ? "" : "[blocked] ") + "The page at " + m_frame->document()->url().elidedString() + " " + action + " insecure content from " + target.elidedString() + ".\n";
m_frame->document()->addConsoleMessage(SecurityMessageSource, WarningMessageLevel, message);
}
diff --git a/chromium/third_party/WebKit/Source/core/loader/NavigationScheduler.cpp b/chromium/third_party/WebKit/Source/core/loader/NavigationScheduler.cpp
index 700d036e14a..9547744fdf6 100644
--- a/chromium/third_party/WebKit/Source/core/loader/NavigationScheduler.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/NavigationScheduler.cpp
@@ -437,8 +437,7 @@ void NavigationScheduler::schedule(PassOwnPtr<ScheduledNavigation> redirect)
if (redirect->wasDuringLoad()) {
if (DocumentLoader* provisionalDocumentLoader = m_frame->loader()->provisionalDocumentLoader())
provisionalDocumentLoader->stopLoading();
- m_frame->document()->dispatchUnloadEvents();
- m_frame->loader()->stopLoading();
+ m_frame->loader()->stopLoading(UnloadEventPolicyUnloadAndPageHide);
}
cancel();
diff --git a/chromium/third_party/WebKit/Source/core/loader/PingLoader.h b/chromium/third_party/WebKit/Source/core/loader/PingLoader.h
index 80f7070aef7..a25a5c68eb0 100644
--- a/chromium/third_party/WebKit/Source/core/loader/PingLoader.h
+++ b/chromium/third_party/WebKit/Source/core/loader/PingLoader.h
@@ -32,7 +32,7 @@
#ifndef PingLoader_h
#define PingLoader_h
-#include "core/fetch/ResourceLoaderOptions.h"
+#include "core/loader/ResourceLoaderOptions.h"
#include "core/platform/Timer.h"
#include "public/platform/WebURLLoaderClient.h"
#include "wtf/Noncopyable.h"
diff --git a/chromium/third_party/WebKit/Source/core/fetch/ResourceLoadNotifier.cpp b/chromium/third_party/WebKit/Source/core/loader/ResourceLoadNotifier.cpp
index 1aca1a9204d..2804a0d565a 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/ResourceLoadNotifier.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/ResourceLoadNotifier.cpp
@@ -29,7 +29,7 @@
*/
#include "config.h"
-#include "core/fetch/ResourceLoadNotifier.h"
+#include "core/loader/ResourceLoadNotifier.h"
#include "core/inspector/InspectorInstrumentation.h"
#include "core/loader/DocumentLoader.h"
diff --git a/chromium/third_party/WebKit/Source/core/fetch/ResourceLoadNotifier.h b/chromium/third_party/WebKit/Source/core/loader/ResourceLoadNotifier.h
index 65d0f7b9e99..5e1c5a4dac1 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/ResourceLoadNotifier.h
+++ b/chromium/third_party/WebKit/Source/core/loader/ResourceLoadNotifier.h
@@ -30,7 +30,7 @@
#ifndef ResourceLoadNotifier_h
#define ResourceLoadNotifier_h
-#include "core/fetch/FetchInitiatorInfo.h"
+#include "core/loader/cache/FetchInitiatorInfo.h"
#include "wtf/Noncopyable.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp b/chromium/third_party/WebKit/Source/core/loader/ResourceLoader.cpp
index 987cbc50b51..389cab47d95 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/ResourceLoader.cpp
@@ -28,11 +28,11 @@
*/
#include "config.h"
-#include "core/fetch/ResourceLoader.h"
+#include "core/loader/ResourceLoader.h"
-#include "core/fetch/Resource.h"
-#include "core/fetch/ResourceLoaderHost.h"
-#include "core/fetch/ResourcePtr.h"
+#include "core/loader/ResourceLoaderHost.h"
+#include "core/loader/cache/Resource.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "core/platform/Logging.h"
#include "core/platform/SharedBuffer.h"
#include "core/platform/chromium/support/WrappedResourceRequest.h"
diff --git a/chromium/third_party/WebKit/Source/core/fetch/ResourceLoader.h b/chromium/third_party/WebKit/Source/core/loader/ResourceLoader.h
index d298e950ba4..f7615bb2e2e 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/ResourceLoader.h
+++ b/chromium/third_party/WebKit/Source/core/loader/ResourceLoader.h
@@ -29,7 +29,7 @@
#ifndef ResourceLoader_h
#define ResourceLoader_h
-#include "core/fetch/ResourceLoaderOptions.h"
+#include "core/loader/ResourceLoaderOptions.h"
#include "core/platform/network/ResourceRequest.h"
#include "public/platform/WebURLLoader.h"
#include "public/platform/WebURLLoaderClient.h"
diff --git a/chromium/third_party/WebKit/Source/core/fetch/ResourceLoaderHost.h b/chromium/third_party/WebKit/Source/core/loader/ResourceLoaderHost.h
index 5860b9650bd..5860b9650bd 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/ResourceLoaderHost.h
+++ b/chromium/third_party/WebKit/Source/core/loader/ResourceLoaderHost.h
diff --git a/chromium/third_party/WebKit/Source/core/fetch/ResourceLoaderOptions.h b/chromium/third_party/WebKit/Source/core/loader/ResourceLoaderOptions.h
index 187efc3ac96..423519b63f4 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/ResourceLoaderOptions.h
+++ b/chromium/third_party/WebKit/Source/core/loader/ResourceLoaderOptions.h
@@ -31,7 +31,7 @@
#ifndef ResourceLoaderOptions_h
#define ResourceLoaderOptions_h
-#include "core/fetch/FetchInitiatorInfo.h"
+#include "core/loader/cache/FetchInitiatorInfo.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/loader/TextTrackLoader.cpp b/chromium/third_party/WebKit/Source/core/loader/TextTrackLoader.cpp
index a8e1b70155a..9c548ebb140 100644
--- a/chromium/third_party/WebKit/Source/core/loader/TextTrackLoader.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/TextTrackLoader.cpp
@@ -29,11 +29,11 @@
#include "FetchInitiatorTypeNames.h"
#include "core/dom/Document.h"
-#include "core/fetch/FetchRequest.h"
-#include "core/fetch/ResourceFetcher.h"
-#include "core/fetch/TextTrackResource.h"
#include "core/html/track/WebVTTParser.h"
#include "core/loader/CrossOriginAccessControl.h"
+#include "core/loader/cache/FetchRequest.h"
+#include "core/loader/cache/ResourceFetcher.h"
+#include "core/loader/cache/TextTrackResource.h"
#include "core/platform/Logging.h"
#include "core/platform/SharedBuffer.h"
#include "weborigin/SecurityOrigin.h"
diff --git a/chromium/third_party/WebKit/Source/core/loader/TextTrackLoader.h b/chromium/third_party/WebKit/Source/core/loader/TextTrackLoader.h
index 4eb68a81aa6..dd2feeb8293 100644
--- a/chromium/third_party/WebKit/Source/core/loader/TextTrackLoader.h
+++ b/chromium/third_party/WebKit/Source/core/loader/TextTrackLoader.h
@@ -26,10 +26,10 @@
#ifndef TextTrackLoader_h
#define TextTrackLoader_h
-#include "core/fetch/ResourceClient.h"
-#include "core/fetch/ResourcePtr.h"
-#include "core/fetch/TextTrackResource.h"
#include "core/html/track/WebVTTParser.h"
+#include "core/loader/cache/ResourceClient.h"
+#include "core/loader/cache/ResourcePtr.h"
+#include "core/loader/cache/TextTrackResource.h"
#include "core/platform/Timer.h"
#include "wtf/OwnPtr.h"
diff --git a/chromium/third_party/WebKit/Source/core/loader/ThreadableLoader.h b/chromium/third_party/WebKit/Source/core/loader/ThreadableLoader.h
index a2afdd11b6b..6df1a5ce0a0 100644
--- a/chromium/third_party/WebKit/Source/core/loader/ThreadableLoader.h
+++ b/chromium/third_party/WebKit/Source/core/loader/ThreadableLoader.h
@@ -31,7 +31,7 @@
#ifndef ThreadableLoader_h
#define ThreadableLoader_h
-#include "core/fetch/ResourceLoaderOptions.h"
+#include "core/loader/ResourceLoaderOptions.h"
#include "weborigin/SecurityOrigin.h"
#include "wtf/Noncopyable.h"
#include "wtf/PassRefPtr.h"
diff --git a/chromium/third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp b/chromium/third_party/WebKit/Source/core/loader/cache/CSSStyleSheetResource.cpp
index 20be5179f25..53398a20d92 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/CSSStyleSheetResource.cpp
@@ -25,12 +25,12 @@
*/
#include "config.h"
-#include "core/fetch/CSSStyleSheetResource.h"
+#include "core/loader/cache/CSSStyleSheetResource.h"
#include "core/css/StyleSheetContents.h"
-#include "core/fetch/ResourceClientWalker.h"
-#include "core/fetch/StyleSheetResourceClient.h"
#include "core/loader/TextResourceDecoder.h"
+#include "core/loader/cache/ResourceClientWalker.h"
+#include "core/loader/cache/StyleSheetResourceClient.h"
#include "core/platform/SharedBuffer.h"
#include "core/platform/network/HTTPParsers.h"
#include "wtf/CurrentTime.h"
diff --git a/chromium/third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.h b/chromium/third_party/WebKit/Source/core/loader/cache/CSSStyleSheetResource.h
index 3ecf34ba82e..b01fa8667f3 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.h
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/CSSStyleSheetResource.h
@@ -26,7 +26,7 @@
#ifndef CSSStyleSheetResource_h
#define CSSStyleSheetResource_h
-#include "core/fetch/Resource.h"
+#include "core/loader/cache/Resource.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/fetch/CachePolicy.h b/chromium/third_party/WebKit/Source/core/loader/cache/CachePolicy.h
index bffddfe1d96..a44c32d26cc 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/CachePolicy.h
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/CachePolicy.h
@@ -28,13 +28,13 @@
namespace WebCore {
-enum CachePolicy {
- CachePolicyCache,
- CachePolicyVerify,
- CachePolicyRevalidate,
- CachePolicyReload,
- CachePolicyHistoryBuffer
-};
+ enum CachePolicy {
+ CachePolicyCache,
+ CachePolicyVerify,
+ CachePolicyRevalidate,
+ CachePolicyReload,
+ CachePolicyHistoryBuffer
+ };
}
diff --git a/chromium/third_party/WebKit/Source/core/fetch/DocumentResource.cpp b/chromium/third_party/WebKit/Source/core/loader/cache/DocumentResource.cpp
index 5c18d847e45..27503416f14 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/DocumentResource.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/DocumentResource.cpp
@@ -22,10 +22,10 @@
#include "config.h"
-#include "core/fetch/DocumentResource.h"
+#include "core/loader/cache/DocumentResource.h"
-#include "core/fetch/ResourceClient.h"
-#include "core/fetch/ResourcePtr.h"
+#include "core/loader/cache/ResourceClient.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "core/platform/SharedBuffer.h"
#include "core/svg/SVGDocument.h"
#include "wtf/text/StringBuilder.h"
diff --git a/chromium/third_party/WebKit/Source/core/fetch/DocumentResource.h b/chromium/third_party/WebKit/Source/core/loader/cache/DocumentResource.h
index 58b8ac0621f..62379d70925 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/DocumentResource.h
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/DocumentResource.h
@@ -23,10 +23,10 @@
#ifndef DocumentResource_h
#define DocumentResource_h
-#include "core/fetch/Resource.h"
-#include "core/fetch/ResourceClient.h"
-#include "core/fetch/ResourcePtr.h"
#include "core/loader/TextResourceDecoder.h"
+#include "core/loader/cache/Resource.h"
+#include "core/loader/cache/ResourceClient.h"
+#include "core/loader/cache/ResourcePtr.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/fetch/DocumentResourceReference.h b/chromium/third_party/WebKit/Source/core/loader/cache/DocumentResourceReference.h
index 9e8433583f9..4d7009cb434 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/DocumentResourceReference.h
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/DocumentResourceReference.h
@@ -26,8 +26,8 @@
#ifndef DocumentResourceReference_h
#define DocumentResourceReference_h
-#include "core/fetch/DocumentResource.h"
-#include "core/fetch/ResourcePtr.h"
+#include "core/loader/cache/DocumentResource.h"
+#include "core/loader/cache/ResourcePtr.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/fetch/FetchInitiatorInfo.h b/chromium/third_party/WebKit/Source/core/loader/cache/FetchInitiatorInfo.h
index c5e9b3a67b8..c5e9b3a67b8 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/FetchInitiatorInfo.h
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/FetchInitiatorInfo.h
diff --git a/chromium/third_party/WebKit/Source/core/fetch/FetchInitiatorTypeNames.in b/chromium/third_party/WebKit/Source/core/loader/cache/FetchInitiatorTypeNames.in
index 7356271ceb4..7356271ceb4 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/FetchInitiatorTypeNames.in
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/FetchInitiatorTypeNames.in
diff --git a/chromium/third_party/WebKit/Source/core/fetch/FetchRequest.cpp b/chromium/third_party/WebKit/Source/core/loader/cache/FetchRequest.cpp
index ba22c78bcb1..57268b2979e 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/FetchRequest.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/FetchRequest.cpp
@@ -24,12 +24,12 @@
*/
#include "config.h"
-#include "core/fetch/FetchRequest.h"
+#include "core/loader/cache/FetchRequest.h"
#include "core/dom/Element.h"
-#include "core/fetch/FetchInitiatorInfo.h"
-#include "core/fetch/ResourceFetcher.h"
#include "core/loader/CrossOriginAccessControl.h"
+#include "core/loader/cache/FetchInitiatorInfo.h"
+#include "core/loader/cache/ResourceFetcher.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/fetch/FetchRequest.h b/chromium/third_party/WebKit/Source/core/loader/cache/FetchRequest.h
index b9d5fec3978..974fff2b36b 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/FetchRequest.h
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/FetchRequest.h
@@ -27,8 +27,8 @@
#define FetchRequest_h
#include "core/dom/Element.h"
-#include "core/fetch/FetchInitiatorInfo.h"
-#include "core/fetch/ResourceLoaderOptions.h"
+#include "core/loader/ResourceLoaderOptions.h"
+#include "core/loader/cache/FetchInitiatorInfo.h"
#include "core/platform/network/ResourceLoadPriority.h"
#include "core/platform/network/ResourceRequest.h"
#include "wtf/text/AtomicString.h"
diff --git a/chromium/third_party/WebKit/Source/core/fetch/FontResource.cpp b/chromium/third_party/WebKit/Source/core/loader/cache/FontResource.cpp
index 7fe82f41691..90b527783bf 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/FontResource.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/FontResource.cpp
@@ -25,11 +25,11 @@
*/
#include "config.h"
-#include "core/fetch/FontResource.h"
+#include "core/loader/cache/FontResource.h"
-#include "core/fetch/ResourceClient.h"
-#include "core/fetch/ResourceClientWalker.h"
#include "core/loader/TextResourceDecoder.h"
+#include "core/loader/cache/ResourceClient.h"
+#include "core/loader/cache/ResourceClientWalker.h"
#include "core/platform/SharedBuffer.h"
#include "core/platform/graphics/FontCustomPlatformData.h"
#include "core/platform/graphics/FontPlatformData.h"
diff --git a/chromium/third_party/WebKit/Source/core/fetch/FontResource.h b/chromium/third_party/WebKit/Source/core/loader/cache/FontResource.h
index 42b4f7029d5..5997f1e9b98 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/FontResource.h
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/FontResource.h
@@ -26,8 +26,8 @@
#ifndef FontResource_h
#define FontResource_h
-#include "core/fetch/Resource.h"
-#include "core/fetch/ResourceClient.h"
+#include "core/loader/cache/Resource.h"
+#include "core/loader/cache/ResourceClient.h"
#include "core/platform/graphics/FontOrientation.h"
#include "core/platform/graphics/FontWidthVariant.h"
#include "wtf/OwnPtr.h"
diff --git a/chromium/third_party/WebKit/Source/core/fetch/ImageResource.cpp b/chromium/third_party/WebKit/Source/core/loader/cache/ImageResource.cpp
index 1fec3b78035..c07d864d850 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/ImageResource.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/ImageResource.cpp
@@ -22,13 +22,13 @@
*/
#include "config.h"
-#include "core/fetch/ImageResource.h"
+#include "core/loader/cache/ImageResource.h"
-#include "core/fetch/ImageResourceClient.h"
-#include "core/fetch/MemoryCache.h"
-#include "core/fetch/ResourceClient.h"
-#include "core/fetch/ResourceClientWalker.h"
-#include "core/fetch/ResourceFetcher.h"
+#include "core/loader/cache/ImageResourceClient.h"
+#include "core/loader/cache/MemoryCache.h"
+#include "core/loader/cache/ResourceClient.h"
+#include "core/loader/cache/ResourceClientWalker.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/page/FrameView.h"
#include "core/platform/SharedBuffer.h"
#include "core/platform/graphics/BitmapImage.h"
diff --git a/chromium/third_party/WebKit/Source/core/fetch/ImageResource.h b/chromium/third_party/WebKit/Source/core/loader/cache/ImageResource.h
index 0ae33ff434e..5bee694c78c 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/ImageResource.h
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/ImageResource.h
@@ -23,7 +23,7 @@
#ifndef ImageResource_h
#define ImageResource_h
-#include "core/fetch/Resource.h"
+#include "core/loader/cache/Resource.h"
#include "core/platform/graphics/ImageObserver.h"
#include "core/platform/graphics/IntRect.h"
#include "core/platform/graphics/IntSizeHash.h"
diff --git a/chromium/third_party/WebKit/Source/core/fetch/ImageResourceClient.h b/chromium/third_party/WebKit/Source/core/loader/cache/ImageResourceClient.h
index 900550e618e..4cea375612c 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/ImageResourceClient.h
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/ImageResourceClient.h
@@ -23,7 +23,7 @@
#ifndef ImageResourceClient_h
#define ImageResourceClient_h
-#include "core/fetch/ResourceClient.h"
+#include "core/loader/cache/ResourceClient.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp b/chromium/third_party/WebKit/Source/core/loader/cache/ImageResourceTest.cpp
index f1a269a5478..37d558b8d57 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/ImageResourceTest.cpp
@@ -29,15 +29,15 @@
*/
#include "config.h"
-#include "core/fetch/ImageResource.h"
+#include "core/loader/cache/ImageResource.h"
-#include "core/fetch/ImageResourceClient.h"
-#include "core/fetch/MemoryCache.h"
-#include "core/fetch/MockImageResourceClient.h"
-#include "core/fetch/ResourceFetcher.h"
-#include "core/fetch/ResourcePtr.h"
#include "core/loader/DocumentLoader.h"
#include "core/loader/EmptyClients.h"
+#include "core/loader/cache/ImageResourceClient.h"
+#include "core/loader/cache/MemoryCache.h"
+#include "core/loader/cache/MockImageResourceClient.h"
+#include "core/loader/cache/ResourceFetcher.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "core/page/Frame.h"
#include "core/page/FrameView.h"
#include "core/page/Page.h"
diff --git a/chromium/third_party/WebKit/Source/core/fetch/MemoryCache.cpp b/chromium/third_party/WebKit/Source/core/loader/cache/MemoryCache.cpp
index 8024b2073b7..c51f5446e3c 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/MemoryCache.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/MemoryCache.cpp
@@ -21,18 +21,19 @@
*/
#include "config.h"
-#include "core/fetch/MemoryCache.h"
+#include "core/loader/cache/MemoryCache.h"
+#include <stdio.h>
#include "core/dom/CrossThreadTask.h"
#include "core/dom/Document.h"
-#include "core/fetch/Resource.h"
-#include "core/fetch/ResourcePtr.h"
+#include "core/loader/cache/Resource.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "core/page/FrameView.h"
#include "core/platform/Logging.h"
+#include "core/platform/chromium/TraceEvent.h"
#include "core/workers/WorkerGlobalScope.h"
#include "core/workers/WorkerLoaderProxy.h"
#include "core/workers/WorkerThread.h"
-#include "public/platform/Platform.h"
#include "weborigin/SecurityOrigin.h"
#include "weborigin/SecurityOriginHash.h"
#include "wtf/Assertions.h"
@@ -40,7 +41,6 @@
#include "wtf/MathExtras.h"
#include "wtf/TemporaryChange.h"
#include "wtf/text/CString.h"
-#include <stdio.h>
using namespace std;
@@ -297,9 +297,8 @@ void MemoryCache::evict(Resource* resource)
removeFromLRUList(resource);
removeFromLiveDecodedResourcesList(resource);
adjustSize(resource->hasClients(), -static_cast<int>(resource->size()));
- } else {
+ } else
ASSERT(m_resources.get(resource->url()) != resource);
- }
resource->deleteIfPossible();
}
@@ -319,7 +318,7 @@ MemoryCache::LRUList* MemoryCache::lruListFor(Resource* resource)
void MemoryCache::removeFromLRUList(Resource* resource)
{
// If we've never been accessed, then we're brand new and not in any list.
- if (!resource->accessCount())
+ if (resource->accessCount() == 0)
return;
#if !ASSERT_DISABLED
@@ -346,7 +345,7 @@ void MemoryCache::removeFromLRUList(Resource* resource)
Resource* next = resource->m_nextInAllResourcesList;
Resource* prev = resource->m_prevInAllResourcesList;
- if (!next && !prev && list->m_head != resource)
+ if (next == 0 && prev == 0 && list->m_head != resource)
return;
resource->m_nextInAllResourcesList = 0;
@@ -561,8 +560,7 @@ void MemoryCache::evictResources()
void MemoryCache::prune()
{
- ASSERT(WebKit::Platform::current()); // This method should not be called after WebKit::shutdown().
-
+ TRACE_EVENT0("renderer", "MemoryCache::prune()");
if (m_liveSize + m_deadSize <= m_capacity && m_maxDeadCapacity && m_deadSize <= m_maxDeadCapacity) // Fast path.
return;
if (m_inPruneResources)
diff --git a/chromium/third_party/WebKit/Source/core/fetch/MemoryCache.h b/chromium/third_party/WebKit/Source/core/loader/cache/MemoryCache.h
index d4aad799bbf..f174a11b9bf 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/MemoryCache.h
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/MemoryCache.h
@@ -22,10 +22,10 @@
pages from the web. It has a memory cache for these objects.
*/
-#ifndef MemoryCache_h
-#define MemoryCache_h
+#ifndef Cache_h
+#define Cache_h
-#include "core/fetch/Resource.h"
+#include "core/loader/cache/Resource.h"
#include "wtf/HashMap.h"
#include "wtf/Noncopyable.h"
#include "wtf/Vector.h"
@@ -181,7 +181,7 @@ private:
unsigned m_liveSize; // The number of bytes currently consumed by "live" resources in the cache.
unsigned m_deadSize; // The number of bytes currently consumed by "dead" resources in the cache.
- // Size-adjusted and popularity-aware LRU list collection for cache objects. This collection can hold
+ // Size-adjusted and popularity-aware LRU list collection for cache objects. This collection can hold
// more resources than the cached resource map, since it can also hold "stale" multiple versions of objects that are
// waiting to die when the clients referencing them go away.
Vector<LRUList, 32> m_allResources;
diff --git a/chromium/third_party/WebKit/Source/core/fetch/MemoryCacheTest.cpp b/chromium/third_party/WebKit/Source/core/loader/cache/MemoryCacheTest.cpp
index 842bddbd928..1a365179772 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/MemoryCacheTest.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/MemoryCacheTest.cpp
@@ -29,11 +29,11 @@
*/
#include "config.h"
-#include "core/fetch/MemoryCache.h"
+#include "core/loader/cache/MemoryCache.h"
-#include "core/fetch/MockImageResourceClient.h"
-#include "core/fetch/RawResource.h"
-#include "core/fetch/ResourcePtr.h"
+#include "core/loader/cache/MockImageResourceClient.h"
+#include "core/loader/cache/RawResource.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "core/platform/network/ResourceRequest.h"
#include "wtf/OwnPtr.h"
diff --git a/chromium/third_party/WebKit/Source/core/fetch/MockImageResourceClient.h b/chromium/third_party/WebKit/Source/core/loader/cache/MockImageResourceClient.h
index 676c95ac5cf..adaa90f527a 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/MockImageResourceClient.h
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/MockImageResourceClient.h
@@ -31,7 +31,7 @@
#ifndef MockImageResourceClient_h
#define MockImageResourceClient_h
-#include "core/fetch/ImageResourceClient.h"
+#include "core/loader/cache/ImageResourceClient.h"
#include "core/page/Frame.h"
#include "core/platform/graphics/Image.h"
diff --git a/chromium/third_party/WebKit/Source/core/fetch/RawResource.cpp b/chromium/third_party/WebKit/Source/core/loader/cache/RawResource.cpp
index 5745d93c470..a2a0dc4eacd 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/RawResource.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/RawResource.cpp
@@ -24,12 +24,12 @@
*/
#include "config.h"
-#include "core/fetch/RawResource.h"
+#include "core/loader/cache/RawResource.h"
-#include "core/fetch/ResourceClient.h"
-#include "core/fetch/ResourceClientWalker.h"
-#include "core/fetch/ResourceFetcher.h"
-#include "core/fetch/ResourceLoader.h"
+#include "core/loader/ResourceLoader.h"
+#include "core/loader/cache/ResourceClient.h"
+#include "core/loader/cache/ResourceClientWalker.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/platform/SharedBuffer.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/fetch/RawResource.h b/chromium/third_party/WebKit/Source/core/loader/cache/RawResource.h
index 0ed0bc08ce1..05cf3f4d8bf 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/RawResource.h
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/RawResource.h
@@ -23,8 +23,8 @@
#ifndef RawResource_h
#define RawResource_h
-#include "core/fetch/Resource.h"
-#include "core/fetch/ResourceClient.h"
+#include "core/loader/cache/Resource.h"
+#include "core/loader/cache/ResourceClient.h"
namespace WebCore {
class RawResourceCallback;
diff --git a/chromium/third_party/WebKit/Source/core/fetch/Resource.cpp b/chromium/third_party/WebKit/Source/core/loader/cache/Resource.cpp
index 3c7eaab2a98..ae832e127d3 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/Resource.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/Resource.cpp
@@ -22,17 +22,17 @@
*/
#include "config.h"
-#include "core/fetch/Resource.h"
-
-#include "core/fetch/MemoryCache.h"
-#include "core/fetch/ResourceClient.h"
-#include "core/fetch/ResourceClientWalker.h"
-#include "core/fetch/ResourceFetcher.h"
-#include "core/fetch/ResourceLoader.h"
-#include "core/fetch/ResourcePtr.h"
+#include "core/loader/cache/Resource.h"
+
#include "core/inspector/InspectorInstrumentation.h"
#include "core/loader/CachedMetadata.h"
#include "core/loader/CrossOriginAccessControl.h"
+#include "core/loader/ResourceLoader.h"
+#include "core/loader/cache/MemoryCache.h"
+#include "core/loader/cache/ResourceClient.h"
+#include "core/loader/cache/ResourceClientWalker.h"
+#include "core/loader/cache/ResourceFetcher.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "core/platform/Logging.h"
#include "core/platform/PurgeableBuffer.h"
#include "core/platform/SharedBuffer.h"
diff --git a/chromium/third_party/WebKit/Source/core/fetch/Resource.h b/chromium/third_party/WebKit/Source/core/loader/cache/Resource.h
index 0f6759218b6..dd092e3e9f9 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/Resource.h
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/Resource.h
@@ -23,8 +23,8 @@
#ifndef Resource_h
#define Resource_h
-#include "core/fetch/CachePolicy.h"
-#include "core/fetch/ResourceLoaderOptions.h"
+#include "core/loader/ResourceLoaderOptions.h"
+#include "core/loader/cache/CachePolicy.h"
#include "core/platform/Timer.h"
#include "core/platform/network/ResourceError.h"
#include "core/platform/network/ResourceLoadPriority.h"
diff --git a/chromium/third_party/WebKit/Source/core/fetch/ResourceClient.h b/chromium/third_party/WebKit/Source/core/loader/cache/ResourceClient.h
index ae7b7bbcf0c..ae7b7bbcf0c 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/ResourceClient.h
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/ResourceClient.h
diff --git a/chromium/third_party/WebKit/Source/core/fetch/ResourceClientWalker.h b/chromium/third_party/WebKit/Source/core/loader/cache/ResourceClientWalker.h
index cd24b821dfe..aff5f1dcd0b 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/ResourceClientWalker.h
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/ResourceClientWalker.h
@@ -25,7 +25,7 @@
#ifndef ResourceClientWalker_h
#define ResourceClientWalker_h
-#include "core/fetch/ResourceClient.h"
+#include "core/loader/cache/ResourceClient.h"
#include "wtf/HashCountedSet.h"
#include "wtf/Vector.h"
diff --git a/chromium/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp b/chromium/third_party/WebKit/Source/core/loader/cache/ResourceFetcher.cpp
index 65f5e86d0aa..28d7c8ced74 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/ResourceFetcher.cpp
@@ -25,21 +25,10 @@
*/
#include "config.h"
-#include "core/fetch/ResourceFetcher.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "bindings/v8/ScriptController.h"
#include "core/dom/Document.h"
-#include "core/fetch/CSSStyleSheetResource.h"
-#include "core/fetch/DocumentResource.h"
-#include "core/fetch/FetchRequest.h"
-#include "core/fetch/FontResource.h"
-#include "core/fetch/ImageResource.h"
-#include "core/fetch/MemoryCache.h"
-#include "core/fetch/RawResource.h"
-#include "core/fetch/ScriptResource.h"
-#include "core/fetch/ShaderResource.h"
-#include "core/fetch/TextTrackResource.h"
-#include "core/fetch/XSLStyleSheetResource.h"
#include "core/html/HTMLElement.h"
#include "core/html/HTMLFrameOwnerElement.h"
#include "core/html/HTMLImport.h"
@@ -50,6 +39,17 @@
#include "core/loader/PingLoader.h"
#include "core/loader/UniqueIdentifier.h"
#include "core/loader/appcache/ApplicationCacheHost.h"
+#include "core/loader/cache/CSSStyleSheetResource.h"
+#include "core/loader/cache/DocumentResource.h"
+#include "core/loader/cache/FetchRequest.h"
+#include "core/loader/cache/FontResource.h"
+#include "core/loader/cache/ImageResource.h"
+#include "core/loader/cache/MemoryCache.h"
+#include "core/loader/cache/RawResource.h"
+#include "core/loader/cache/ScriptResource.h"
+#include "core/loader/cache/ShaderResource.h"
+#include "core/loader/cache/TextTrackResource.h"
+#include "core/loader/cache/XSLStyleSheetResource.h"
#include "core/page/ContentSecurityPolicy.h"
#include "core/page/DOMWindow.h"
#include "core/page/Frame.h"
@@ -204,7 +204,7 @@ Frame* ResourceFetcher::frame() const
ResourcePtr<ImageResource> ResourceFetcher::requestImage(FetchRequest& request)
{
if (Frame* f = frame()) {
- if (f->document()->pageDismissalEventBeingDispatched() != Document::NoDismissal) {
+ if (f->loader()->pageDismissalEventBeingDispatched() != FrameLoader::NoDismissal) {
KURL requestURL = request.resourceRequest().url();
if (requestURL.isValid() && canRequest(Resource::Image, requestURL, request.options(), request.forPreload()))
PingLoader::loadImage(f, requestURL);
diff --git a/chromium/third_party/WebKit/Source/core/fetch/ResourceFetcher.h b/chromium/third_party/WebKit/Source/core/loader/cache/ResourceFetcher.h
index 4f4671011cf..c2ffa7ade12 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/ResourceFetcher.h
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/ResourceFetcher.h
@@ -26,12 +26,12 @@
#ifndef ResourceFetcher_h
#define ResourceFetcher_h
-#include "core/fetch/CachePolicy.h"
-#include "core/fetch/FetchInitiatorInfo.h"
-#include "core/fetch/FetchRequest.h"
-#include "core/fetch/Resource.h"
-#include "core/fetch/ResourceLoaderHost.h"
-#include "core/fetch/ResourcePtr.h"
+#include "core/loader/ResourceLoaderHost.h"
+#include "core/loader/cache/CachePolicy.h"
+#include "core/loader/cache/FetchInitiatorInfo.h"
+#include "core/loader/cache/FetchRequest.h"
+#include "core/loader/cache/Resource.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "core/platform/Timer.h"
#include "wtf/Deque.h"
#include "wtf/HashMap.h"
diff --git a/chromium/third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp b/chromium/third_party/WebKit/Source/core/loader/cache/ResourceFetcherTest.cpp
index 951dbfb0f16..977f519ee80 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/ResourceFetcherTest.cpp
@@ -29,14 +29,14 @@
*/
#include "config.h"
-#include "core/fetch/ResourceFetcher.h"
+#include "core/loader/cache/ResourceFetcher.h"
-#include "core/fetch/FetchInitiatorInfo.h"
-#include "core/fetch/FetchRequest.h"
-#include "core/fetch/MemoryCache.h"
-#include "core/fetch/ResourcePtr.h"
#include "core/html/HTMLDocument.h"
#include "core/loader/DocumentLoader.h"
+#include "core/loader/cache/FetchInitiatorInfo.h"
+#include "core/loader/cache/FetchRequest.h"
+#include "core/loader/cache/MemoryCache.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "core/platform/network/ResourceRequest.h"
#include <gtest/gtest.h>
diff --git a/chromium/third_party/WebKit/Source/core/fetch/ResourcePtr.cpp b/chromium/third_party/WebKit/Source/core/loader/cache/ResourcePtr.cpp
index 4ae11a549b6..bbb43520d88 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/ResourcePtr.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/ResourcePtr.cpp
@@ -24,7 +24,7 @@
*/
#include "config.h"
-#include "core/fetch/ResourcePtr.h"
+#include "core/loader/cache/ResourcePtr.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/fetch/ResourcePtr.h b/chromium/third_party/WebKit/Source/core/loader/cache/ResourcePtr.h
index a9bdd5fcd79..dda4d2d748b 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/ResourcePtr.h
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/ResourcePtr.h
@@ -26,7 +26,7 @@
#ifndef ResourcePtr_h
#define ResourcePtr_h
-#include "core/fetch/Resource.h"
+#include "core/loader/cache/Resource.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/fetch/ScriptResource.cpp b/chromium/third_party/WebKit/Source/core/loader/cache/ScriptResource.cpp
index 330a1bf5779..b6e9189bc26 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/ScriptResource.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/ScriptResource.cpp
@@ -25,7 +25,7 @@
*/
#include "config.h"
-#include "core/fetch/ScriptResource.h"
+#include "core/loader/cache/ScriptResource.h"
#include "core/loader/TextResourceDecoder.h"
#include "core/platform/MIMETypeRegistry.h"
diff --git a/chromium/third_party/WebKit/Source/core/fetch/ScriptResource.h b/chromium/third_party/WebKit/Source/core/loader/cache/ScriptResource.h
index 441a3b06099..02d90ca986b 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/ScriptResource.h
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/ScriptResource.h
@@ -26,7 +26,7 @@
#ifndef ScriptResource_h
#define ScriptResource_h
-#include "core/fetch/Resource.h"
+#include "core/loader/cache/Resource.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/fetch/ShaderResource.cpp b/chromium/third_party/WebKit/Source/core/loader/cache/ShaderResource.cpp
index bacaef99c9a..ec60ae11bef 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/ShaderResource.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/ShaderResource.cpp
@@ -28,7 +28,7 @@
*/
#include "config.h"
-#include "core/fetch/ShaderResource.h"
+#include "core/loader/cache/ShaderResource.h"
#include "core/loader/TextResourceDecoder.h"
#include "core/platform/SharedBuffer.h"
diff --git a/chromium/third_party/WebKit/Source/core/fetch/ShaderResource.h b/chromium/third_party/WebKit/Source/core/loader/cache/ShaderResource.h
index 94856638aa8..f7d2ffe7fbb 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/ShaderResource.h
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/ShaderResource.h
@@ -30,7 +30,7 @@
#ifndef ShaderResource_h
#define ShaderResource_h
-#include "core/fetch/Resource.h"
+#include "core/loader/cache/Resource.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/fetch/StyleSheetResourceClient.h b/chromium/third_party/WebKit/Source/core/loader/cache/StyleSheetResourceClient.h
index 6c12bf39a0c..02dc5bcabc6 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/StyleSheetResourceClient.h
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/StyleSheetResourceClient.h
@@ -26,7 +26,7 @@
#ifndef StyleSheetResourceClient_h
#define StyleSheetResourceClient_h
-#include "core/fetch/ResourceClient.h"
+#include "core/loader/cache/ResourceClient.h"
#include "weborigin/KURL.h"
#include "wtf/Forward.h"
diff --git a/chromium/third_party/WebKit/Source/core/fetch/TextTrackResource.cpp b/chromium/third_party/WebKit/Source/core/loader/cache/TextTrackResource.cpp
index 5093d7e26d3..cf5e4a13f07 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/TextTrackResource.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/TextTrackResource.cpp
@@ -25,10 +25,10 @@
#include "config.h"
-#include "core/fetch/TextTrackResource.h"
+#include "core/loader/cache/TextTrackResource.h"
-#include "core/fetch/ResourceClient.h"
-#include "core/fetch/ResourceClientWalker.h"
+#include "core/loader/cache/ResourceClient.h"
+#include "core/loader/cache/ResourceClientWalker.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/fetch/TextTrackResource.h b/chromium/third_party/WebKit/Source/core/loader/cache/TextTrackResource.h
index 3599f0bfa4d..c3c0eba0955 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/TextTrackResource.h
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/TextTrackResource.h
@@ -26,7 +26,7 @@
#ifndef TextTrackResource_h
#define TextTrackResource_h
-#include "core/fetch/Resource.h"
+#include "core/loader/cache/Resource.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/fetch/XSLStyleSheetResource.cpp b/chromium/third_party/WebKit/Source/core/loader/cache/XSLStyleSheetResource.cpp
index 5787631d1cd..9d9a014b78e 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/XSLStyleSheetResource.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/XSLStyleSheetResource.cpp
@@ -25,11 +25,11 @@
*/
#include "config.h"
-#include "core/fetch/XSLStyleSheetResource.h"
+#include "core/loader/cache/XSLStyleSheetResource.h"
-#include "core/fetch/ResourceClientWalker.h"
-#include "core/fetch/StyleSheetResourceClient.h"
#include "core/loader/TextResourceDecoder.h"
+#include "core/loader/cache/ResourceClientWalker.h"
+#include "core/loader/cache/StyleSheetResourceClient.h"
#include "core/platform/SharedBuffer.h"
#include "wtf/Vector.h"
diff --git a/chromium/third_party/WebKit/Source/core/fetch/XSLStyleSheetResource.h b/chromium/third_party/WebKit/Source/core/loader/cache/XSLStyleSheetResource.h
index 52e6814f635..4cab515a463 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/XSLStyleSheetResource.h
+++ b/chromium/third_party/WebKit/Source/core/loader/cache/XSLStyleSheetResource.h
@@ -26,7 +26,7 @@
#ifndef XSLStyleSheetResource_h
#define XSLStyleSheetResource_h
-#include "core/fetch/Resource.h"
+#include "core/loader/cache/Resource.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/page/AutoscrollController.cpp b/chromium/third_party/WebKit/Source/core/page/AutoscrollController.cpp
index c7174c11bf0..71f922e4d16 100644
--- a/chromium/third_party/WebKit/Source/core/page/AutoscrollController.cpp
+++ b/chromium/third_party/WebKit/Source/core/page/AutoscrollController.cpp
@@ -132,14 +132,11 @@ void AutoscrollController::updateAutoscrollRenderer()
void AutoscrollController::updateDragAndDrop(Node* dropTargetNode, const IntPoint& eventPosition, double eventTime)
{
- if (!dropTargetNode || !dropTargetNode->renderer()) {
+ if (!dropTargetNode) {
stopAutoscrollTimer();
return;
}
- if (m_autoscrollRenderer && m_autoscrollRenderer->frame() != dropTargetNode->renderer()->frame())
- return;
-
RenderBox* scrollable = RenderBox::findAutoscrollable(dropTargetNode->renderer());
if (!scrollable) {
stopAutoscrollTimer();
diff --git a/chromium/third_party/WebKit/Source/core/page/Chrome.cpp b/chromium/third_party/WebKit/Source/core/page/Chrome.cpp
index 8c37e2741a0..9fed91c3719 100644
--- a/chromium/third_party/WebKit/Source/core/page/Chrome.cpp
+++ b/chromium/third_party/WebKit/Source/core/page/Chrome.cpp
@@ -159,8 +159,8 @@ bool Chrome::canRunModal() const
static bool canRunModalIfDuringPageDismissal(Page* page, ChromeClient::DialogType dialog, const String& message)
{
for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
- Document::PageDismissalType dismissal = frame->document()->pageDismissalEventBeingDispatched();
- if (dismissal != Document::NoDismissal)
+ FrameLoader::PageDismissalType dismissal = frame->loader()->pageDismissalEventBeingDispatched();
+ if (dismissal != FrameLoader::NoDismissal)
return page->chrome().client()->shouldRunModalDialogDuringPageDismissal(dialog, message, dismissal);
}
return true;
diff --git a/chromium/third_party/WebKit/Source/core/page/ChromeClient.h b/chromium/third_party/WebKit/Source/core/page/ChromeClient.h
index 9ae397b19e2..d97cbff82dd 100644
--- a/chromium/third_party/WebKit/Source/core/page/ChromeClient.h
+++ b/chromium/third_party/WebKit/Source/core/page/ChromeClient.h
@@ -255,7 +255,7 @@ public:
PromptDialog = 2,
HTMLDialog = 3
};
- virtual bool shouldRunModalDialogDuringPageDismissal(const DialogType&, const String& dialogMessage, Document::PageDismissalType) const { UNUSED_PARAM(dialogMessage); return true; }
+ virtual bool shouldRunModalDialogDuringPageDismissal(const DialogType&, const String& dialogMessage, FrameLoader::PageDismissalType) const { UNUSED_PARAM(dialogMessage); return true; }
virtual void numWheelEventHandlersChanged(unsigned) = 0;
diff --git a/chromium/third_party/WebKit/Source/core/page/ContextMenuClient.h b/chromium/third_party/WebKit/Source/core/page/ContextMenuClient.h
index 76a2ee46b01..964924ba5fd 100644
--- a/chromium/third_party/WebKit/Source/core/page/ContextMenuClient.h
+++ b/chromium/third_party/WebKit/Source/core/page/ContextMenuClient.h
@@ -34,7 +34,6 @@ class ContextMenuClient {
public:
virtual ~ContextMenuClient() { }
virtual void showContextMenu(const ContextMenu*) = 0;
- virtual void clearContextMenu() = 0;
};
}
diff --git a/chromium/third_party/WebKit/Source/core/page/ContextMenuController.cpp b/chromium/third_party/WebKit/Source/core/page/ContextMenuController.cpp
index 77797e389c8..c12a904cd04 100644
--- a/chromium/third_party/WebKit/Source/core/page/ContextMenuController.cpp
+++ b/chromium/third_party/WebKit/Source/core/page/ContextMenuController.cpp
@@ -64,17 +64,6 @@ void ContextMenuController::clearContextMenu()
if (m_menuProvider)
m_menuProvider->contextMenuCleared();
m_menuProvider = 0;
- m_hitTestResult = HitTestResult();
- m_client->clearContextMenu();
-}
-
-void ContextMenuController::documentDetached(Document* document)
-{
- if (Node* innerNode = m_hitTestResult.innerNode()) {
- // Invalidate the context menu info if its target document is detached.
- if (innerNode->document() == document)
- clearContextMenu();
- }
}
void ContextMenuController::handleContextMenuEvent(Event* event)
diff --git a/chromium/third_party/WebKit/Source/core/page/ContextMenuController.h b/chromium/third_party/WebKit/Source/core/page/ContextMenuController.h
index e36bedbd666..a2b6ae6f6f6 100644
--- a/chromium/third_party/WebKit/Source/core/page/ContextMenuController.h
+++ b/chromium/third_party/WebKit/Source/core/page/ContextMenuController.h
@@ -38,7 +38,6 @@ namespace WebCore {
class ContextMenuClient;
class ContextMenuItem;
class ContextMenuProvider;
- class Document;
class Event;
class Page;
@@ -52,8 +51,6 @@ namespace WebCore {
ContextMenu* contextMenu() const { return m_contextMenu.get(); }
void clearContextMenu();
- void documentDetached(Document*);
-
void handleContextMenuEvent(Event*);
void showContextMenu(Event*, PassRefPtr<ContextMenuProvider>);
diff --git a/chromium/third_party/WebKit/Source/core/page/DOMWindow.cpp b/chromium/third_party/WebKit/Source/core/page/DOMWindow.cpp
index 6d15a99982a..aac917c7d46 100644
--- a/chromium/third_party/WebKit/Source/core/page/DOMWindow.cpp
+++ b/chromium/third_party/WebKit/Source/core/page/DOMWindow.cpp
@@ -70,7 +70,6 @@
#include "core/page/Console.h"
#include "core/page/CreateWindow.h"
#include "core/page/DOMPoint.h"
-#include "core/page/DOMWindowLifecycleNotifier.h"
#include "core/page/EventHandler.h"
#include "core/page/Frame.h"
#include "core/page/FrameTree.h"
@@ -639,20 +638,14 @@ Storage* DOMWindow::sessionStorage(ExceptionState& es) const
if (!document)
return 0;
- String accessDeniedMessage = "Access to 'sessionStorage' is denied for this document.";
if (!document->securityOrigin()->canAccessLocalStorage()) {
- if (document->isSandboxed(SandboxOrigin))
- es.throwDOMException(SecurityError, accessDeniedMessage + " The document is sandboxed and lacks the \"allow-same-origin\" flag.");
- else if (document->url().protocolIs("data"))
- es.throwDOMException(SecurityError, accessDeniedMessage + " Storage is disabled inside 'data:' URLs.");
- else
- es.throwDOMException(SecurityError, accessDeniedMessage);
+ es.throwDOMException(SecurityError);
return 0;
}
if (m_sessionStorage) {
if (!m_sessionStorage->area()->canAccessStorage(m_frame)) {
- es.throwDOMException(SecurityError, accessDeniedMessage);
+ es.throwDOMException(SecurityError);
return 0;
}
return m_sessionStorage.get();
@@ -664,7 +657,7 @@ Storage* DOMWindow::sessionStorage(ExceptionState& es) const
OwnPtr<StorageArea> storageArea = page->sessionStorage()->storageArea(document->securityOrigin());
if (!storageArea->canAccessStorage(m_frame)) {
- es.throwDOMException(SecurityError, accessDeniedMessage);
+ es.throwDOMException(SecurityError);
return 0;
}
@@ -681,20 +674,14 @@ Storage* DOMWindow::localStorage(ExceptionState& es) const
if (!document)
return 0;
- String accessDeniedMessage = "Access to 'localStorage' is denied for this document.";
if (!document->securityOrigin()->canAccessLocalStorage()) {
- if (document->isSandboxed(SandboxOrigin))
- es.throwDOMException(SecurityError, accessDeniedMessage + " The document is sandboxed and lacks the \"allow-same-origin\" flag.");
- else if (document->url().protocolIs("data"))
- es.throwDOMException(SecurityError, accessDeniedMessage + " Storage is disabled inside 'data:' URLs.");
- else
- es.throwDOMException(SecurityError, accessDeniedMessage);
+ es.throwDOMException(SecurityError);
return 0;
}
if (m_localStorage) {
if (!m_localStorage->area()->canAccessStorage(m_frame)) {
- es.throwDOMException(SecurityError, accessDeniedMessage);
+ es.throwDOMException(SecurityError);
return 0;
}
return m_localStorage.get();
@@ -709,7 +696,7 @@ Storage* DOMWindow::localStorage(ExceptionState& es) const
OwnPtr<StorageArea> storageArea = StorageNamespace::localStorageArea(document->securityOrigin());
if (!storageArea->canAccessStorage(m_frame)) {
- es.throwDOMException(SecurityError, accessDeniedMessage);
+ es.throwDOMException(SecurityError);
return 0;
}
@@ -736,7 +723,7 @@ void DOMWindow::postMessage(PassRefPtr<SerializedScriptValue> message, const Mes
// It doesn't make sense target a postMessage at a unique origin
// because there's no way to represent a unique origin in a string.
if (target->isUnique()) {
- es.throwDOMException(SyntaxError, "Invalid target origin '" + targetOrigin + "' in a call to 'postMessage'.");
+ es.throwDOMException(SyntaxError);
return;
}
}
@@ -1254,7 +1241,11 @@ double DOMWindow::devicePixelRatio() const
if (!m_frame)
return 0.0;
- return m_frame->devicePixelRatio();
+ Page* page = m_frame->page();
+ if (!page)
+ return 0.0;
+
+ return page->deviceScaleFactor();
}
void DOMWindow::scrollBy(int x, int y) const
@@ -1513,7 +1504,8 @@ void DOMWindow::removeAllEventListeners()
{
EventTarget::removeAllEventListeners();
- lifecycleNotifier()->notifyRemoveAllEventListeners();
+ if (DeviceMotionController* controller = DeviceMotionController::from(document()))
+ controller->stopUpdating();
if (DeviceOrientationController* controller = DeviceOrientationController::from(page()))
controller->removeAllDeviceEventListeners(this);
if (Document* document = this->document())
@@ -1738,15 +1730,5 @@ DOMWindow* DOMWindow::anonymousIndexedGetter(uint32_t index)
return 0;
}
-DOMWindowLifecycleNotifier* DOMWindow::lifecycleNotifier()
-{
- return static_cast<DOMWindowLifecycleNotifier*>(LifecycleContext::lifecycleNotifier());
-}
-
-PassOwnPtr<LifecycleNotifier> DOMWindow::createLifecycleNotifier()
-{
- return DOMWindowLifecycleNotifier::create(this);
-}
-
} // namespace WebCore
diff --git a/chromium/third_party/WebKit/Source/core/page/DOMWindow.h b/chromium/third_party/WebKit/Source/core/page/DOMWindow.h
index 8a1df0ed226..ae98cf0a1fb 100644
--- a/chromium/third_party/WebKit/Source/core/page/DOMWindow.h
+++ b/chromium/third_party/WebKit/Source/core/page/DOMWindow.h
@@ -30,7 +30,6 @@
#include "bindings/v8/ScriptWrappable.h"
#include "core/dom/EventTarget.h"
#include "core/page/FrameDestructionObserver.h"
-#include "core/platform/LifecycleContext.h"
#include "core/platform/Supplementable.h"
#include "wtf/Forward.h"
@@ -48,7 +47,6 @@ namespace WebCore {
class Database;
class DatabaseCallback;
class Document;
- class DOMWindowLifecycleNotifier;
class Element;
class EventListener;
class ExceptionState;
@@ -81,7 +79,7 @@ namespace WebCore {
enum SetLocationLocking { LockHistoryBasedOnGestureState, LockHistoryAndBackForwardList };
- class DOMWindow : public RefCounted<DOMWindow>, public ScriptWrappable, public EventTarget, public FrameDestructionObserver, public Supplementable<DOMWindow>, public LifecycleContext {
+ class DOMWindow : public RefCounted<DOMWindow>, public ScriptWrappable, public EventTarget, public FrameDestructionObserver, public Supplementable<DOMWindow> {
public:
static PassRefPtr<DOMWindow> create(Frame* frame) { return adoptRef(new DOMWindow(frame)); }
virtual ~DOMWindow();
@@ -374,16 +372,11 @@ namespace WebCore {
bool isInsecureScriptAccess(DOMWindow* activeWindow, const String& urlString);
- protected:
- DOMWindowLifecycleNotifier* lifecycleNotifier();
-
private:
explicit DOMWindow(Frame*);
Page* page();
- virtual PassOwnPtr<LifecycleNotifier> createLifecycleNotifier() OVERRIDE;
-
virtual void frameDestroyed() OVERRIDE;
virtual void willDetachPage() OVERRIDE;
diff --git a/chromium/third_party/WebKit/Source/core/page/DOMWindowBase64.cpp b/chromium/third_party/WebKit/Source/core/page/DOMWindowBase64.cpp
index 6411d142135..78c0ea1a51a 100644
--- a/chromium/third_party/WebKit/Source/core/page/DOMWindowBase64.cpp
+++ b/chromium/third_party/WebKit/Source/core/page/DOMWindowBase64.cpp
@@ -65,7 +65,7 @@ String atob(void*, const String& encodedString, ExceptionState& es)
}
Vector<char> out;
- if (!base64Decode(encodedString, out, Base64FailOnInvalidCharacterOrExcessPadding)) {
+ if (!base64Decode(encodedString, out, Base64FailOnInvalidCharacter, Base64StrictPaddingValidation)) {
es.throwDOMException(InvalidCharacterError, "'atob' failed: The string to be decoded is not correctly encoded.");
return String();
}
diff --git a/chromium/third_party/WebKit/Source/core/page/DOMWindowLifecycleNotifier.cpp b/chromium/third_party/WebKit/Source/core/page/DOMWindowLifecycleNotifier.cpp
deleted file mode 100644
index 782198aa503..00000000000
--- a/chromium/third_party/WebKit/Source/core/page/DOMWindowLifecycleNotifier.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-#include "config.h"
-#include "core/page/DOMWindowLifecycleNotifier.h"
-
-namespace WebCore {
-
-DOMWindowLifecycleNotifier::DOMWindowLifecycleNotifier(LifecycleContext* context)
- : LifecycleNotifier(context)
-{
-}
-
-void DOMWindowLifecycleNotifier::addObserver(LifecycleObserver* observer, LifecycleObserver::Type type)
-{
- if (type == LifecycleObserver::DOMWindowLifecycleObserverType) {
- RELEASE_ASSERT(m_iterating != IteratingOverDOMWindowObservers);
- m_windowObservers.add(static_cast<DOMWindowLifecycleObserver*>(observer));
- }
-
- LifecycleNotifier::addObserver(observer, type);
-}
-
-void DOMWindowLifecycleNotifier::removeObserver(LifecycleObserver* observer, LifecycleObserver::Type type)
-{
- if (type == LifecycleObserver::DOMWindowLifecycleObserverType) {
- RELEASE_ASSERT(m_iterating != IteratingOverDOMWindowObservers);
- m_windowObservers.remove(static_cast<DOMWindowLifecycleObserver*>(observer));
- }
-
- LifecycleNotifier::removeObserver(observer, type);
-}
-
-} // namespace WebCore
diff --git a/chromium/third_party/WebKit/Source/core/page/DOMWindowLifecycleNotifier.h b/chromium/third_party/WebKit/Source/core/page/DOMWindowLifecycleNotifier.h
deleted file mode 100644
index 49e1aa04036..00000000000
--- a/chromium/third_party/WebKit/Source/core/page/DOMWindowLifecycleNotifier.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef DOMWindowLifecycleNotifier_h
-#define DOMWindowLifecycleNotifier_h
-
-#include "core/page/DOMWindowLifecycleObserver.h"
-#include "core/platform/LifecycleNotifier.h"
-#include "wtf/PassOwnPtr.h"
-#include "wtf/TemporaryChange.h"
-
-namespace WebCore {
-
-class DOMWindow;
-
-class DOMWindowLifecycleNotifier : public LifecycleNotifier {
-public:
- static PassOwnPtr<DOMWindowLifecycleNotifier> create(LifecycleContext*);
-
- void notifyRemoveAllEventListeners();
-
- virtual void addObserver(LifecycleObserver*, LifecycleObserver::Type) OVERRIDE;
- virtual void removeObserver(LifecycleObserver*, LifecycleObserver::Type) OVERRIDE;
-
-private:
- explicit DOMWindowLifecycleNotifier(LifecycleContext*);
-
- typedef HashSet<DOMWindowLifecycleObserver*> DOMWindowObserverSet;
- DOMWindowObserverSet m_windowObservers;
-};
-
-inline PassOwnPtr<DOMWindowLifecycleNotifier> DOMWindowLifecycleNotifier::create(LifecycleContext* context)
-{
- return adoptPtr(new DOMWindowLifecycleNotifier(context));
-}
-
-inline void DOMWindowLifecycleNotifier::notifyRemoveAllEventListeners()
-{
- TemporaryChange<IterationType> scope(this->m_iterating, IteratingOverDOMWindowObservers);
- for (DOMWindowObserverSet::iterator it = m_windowObservers.begin(); it != m_windowObservers.end(); ++it)
- (*it)->removeAllEventListeners();
-}
-
-} // namespace WebCore
-
-#endif // DOMWindowLifecycleNotifier_h
diff --git a/chromium/third_party/WebKit/Source/core/page/DOMWindowLifecycleObserver.cpp b/chromium/third_party/WebKit/Source/core/page/DOMWindowLifecycleObserver.cpp
deleted file mode 100644
index bd939d2dcc9..00000000000
--- a/chromium/third_party/WebKit/Source/core/page/DOMWindowLifecycleObserver.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-#include "config.h"
-#include "core/page/DOMWindowLifecycleObserver.h"
-
-#include "core/page/DOMWindow.h"
-
-namespace WebCore {
-
-DOMWindowLifecycleObserver::DOMWindowLifecycleObserver(DOMWindow* window)
- : LifecycleObserver(window, DOMWindowLifecycleObserverType)
-{
-}
-
-DOMWindowLifecycleObserver::~DOMWindowLifecycleObserver()
-{
- observeContext(0, DOMWindowLifecycleObserverType);
-}
-
-DOMWindow* DOMWindowLifecycleObserver::window() const
-{
- return static_cast<DOMWindow*>(lifecycleContext());
-}
-
-} // namespace WebCore
diff --git a/chromium/third_party/WebKit/Source/core/page/DOMWindowLifecycleObserver.h b/chromium/third_party/WebKit/Source/core/page/DOMWindowLifecycleObserver.h
deleted file mode 100644
index 79aa15369d0..00000000000
--- a/chromium/third_party/WebKit/Source/core/page/DOMWindowLifecycleObserver.h
+++ /dev/null
@@ -1,48 +0,0 @@
-
-/*
- * Copyright (C) 2013 Google Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef DOMWindowLifecycleObserver_h
-#define DOMWindowLifecycleObserver_h
-
-#include "core/platform/LifecycleObserver.h"
-
-namespace WebCore {
-
-class DOMWindow;
-
-class DOMWindowLifecycleObserver : public LifecycleObserver {
-public:
- explicit DOMWindowLifecycleObserver(DOMWindow*);
- virtual ~DOMWindowLifecycleObserver();
-
- DOMWindow* window() const;
-
- virtual void removeAllEventListeners() { }
-};
-
-} // namespace WebCore
-
-#endif // DOMWindowLifecycleObserver_h
diff --git a/chromium/third_party/WebKit/Source/core/page/DragController.cpp b/chromium/third_party/WebKit/Source/core/page/DragController.cpp
index b2c61293e7d..bf38105b806 100644
--- a/chromium/third_party/WebKit/Source/core/page/DragController.cpp
+++ b/chromium/third_party/WebKit/Source/core/page/DragController.cpp
@@ -44,14 +44,14 @@
#include "core/editing/ReplaceSelectionCommand.h"
#include "core/editing/htmlediting.h"
#include "core/editing/markup.h"
-#include "core/fetch/ImageResource.h"
-#include "core/fetch/ResourceFetcher.h"
#include "core/html/HTMLAnchorElement.h"
#include "core/html/HTMLFormElement.h"
#include "core/html/HTMLInputElement.h"
#include "core/html/HTMLPlugInElement.h"
#include "core/loader/FrameLoadRequest.h"
#include "core/loader/FrameLoader.h"
+#include "core/loader/cache/ImageResource.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/page/DragActions.h"
#include "core/page/DragClient.h"
#include "core/page/DragSession.h"
diff --git a/chromium/third_party/WebKit/Source/core/page/EventHandler.cpp b/chromium/third_party/WebKit/Source/core/page/EventHandler.cpp
index 6adea5a3b6a..8ab18afae21 100644
--- a/chromium/third_party/WebKit/Source/core/page/EventHandler.cpp
+++ b/chromium/third_party/WebKit/Source/core/page/EventHandler.cpp
@@ -50,12 +50,12 @@
#include "core/editing/FrameSelection.h"
#include "core/editing/TextIterator.h"
#include "core/editing/htmlediting.h"
-#include "core/fetch/ImageResource.h"
#include "core/history/BackForwardController.h"
#include "core/html/HTMLFrameElementBase.h"
#include "core/html/HTMLFrameSetElement.h"
#include "core/html/HTMLInputElement.h"
#include "core/loader/FrameLoader.h"
+#include "core/loader/cache/ImageResource.h"
#include "core/page/Chrome.h"
#include "core/page/DragController.h"
#include "core/page/DragState.h"
diff --git a/chromium/third_party/WebKit/Source/core/page/Frame.cpp b/chromium/third_party/WebKit/Source/core/page/Frame.cpp
index adbe6d3cb02..a3e42b6f9d5 100644
--- a/chromium/third_party/WebKit/Source/core/page/Frame.cpp
+++ b/chromium/third_party/WebKit/Source/core/page/Frame.cpp
@@ -39,10 +39,10 @@
#include "core/editing/InputMethodController.h"
#include "core/editing/htmlediting.h"
#include "core/editing/markup.h"
-#include "core/fetch/ResourceFetcher.h"
#include "core/html/HTMLFrameElementBase.h"
#include "core/loader/FrameLoader.h"
#include "core/loader/FrameLoaderClient.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/page/Chrome.h"
#include "core/page/ChromeClient.h"
#include "core/page/DOMWindow.h"
@@ -709,15 +709,4 @@ PassOwnPtr<DragImage> Frame::dragImageForSelection()
return DragImage::create(image.get());
}
-double Frame::devicePixelRatio() const
-{
- if (!m_page)
- return 0;
-
- double ratio = m_page->deviceScaleFactor();
- if (RuntimeEnabledFeatures::devicePixelRatioIncludesZoomEnabled())
- ratio *= pageZoomFactor();
- return ratio;
-}
-
} // namespace WebCore
diff --git a/chromium/third_party/WebKit/Source/core/page/Frame.h b/chromium/third_party/WebKit/Source/core/page/Frame.h
index 3590900ccc9..47fdc5a1275 100644
--- a/chromium/third_party/WebKit/Source/core/page/Frame.h
+++ b/chromium/third_party/WebKit/Source/core/page/Frame.h
@@ -135,7 +135,6 @@ namespace WebCore {
void setPageAndTextZoomFactors(float pageZoomFactor, float textZoomFactor);
void deviceOrPageScaleFactorChanged();
- double devicePixelRatio() const;
#if ENABLE(ORIENTATION_EVENTS)
// Orientation is the interface orientation in degrees. Some examples are:
diff --git a/chromium/third_party/WebKit/Source/core/page/FrameView.cpp b/chromium/third_party/WebKit/Source/core/page/FrameView.cpp
index 8f0cb6b8f1c..72c0b0293a3 100644
--- a/chromium/third_party/WebKit/Source/core/page/FrameView.cpp
+++ b/chromium/third_party/WebKit/Source/core/page/FrameView.cpp
@@ -36,7 +36,6 @@
#include "core/dom/DocumentMarkerController.h"
#include "core/dom/OverflowEvent.h"
#include "core/editing/FrameSelection.h"
-#include "core/fetch/ResourceFetcher.h"
#include "core/html/HTMLFrameElement.h"
#include "core/html/HTMLHtmlElement.h"
#include "core/html/HTMLPlugInImageElement.h"
@@ -44,6 +43,7 @@
#include "core/loader/FrameLoader.h"
#include "core/loader/FrameLoaderClient.h"
#include "core/loader/TextResourceDecoder.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/page/Chrome.h"
#include "core/page/ChromeClient.h"
#include "core/page/EventHandler.h"
diff --git a/chromium/third_party/WebKit/Source/core/page/ImageBitmap.cpp b/chromium/third_party/WebKit/Source/core/page/ImageBitmap.cpp
index 006594a9c0d..a4301c031e9 100644
--- a/chromium/third_party/WebKit/Source/core/page/ImageBitmap.cpp
+++ b/chromium/third_party/WebKit/Source/core/page/ImageBitmap.cpp
@@ -124,17 +124,6 @@ ImageBitmap::ImageBitmap(ImageBitmap* bitmap, const IntRect& cropRect)
ScriptWrappable::init(this);
}
-ImageBitmap::ImageBitmap(Image* image, const IntRect& cropRect)
- : m_cropRect(cropRect)
- , m_imageElement(0)
-{
- IntRect srcRect = intersection(cropRect, IntRect(IntPoint(), image->size()));
- m_bitmap = cropImage(image, cropRect);
- m_bitmapRect = IntRect(IntPoint(max(0, -cropRect.x()), max(0, -cropRect.y())), srcRect.size());
-
- ScriptWrappable::init(this);
-}
-
ImageBitmap::~ImageBitmap()
{
if (m_imageElement)
@@ -144,37 +133,36 @@ ImageBitmap::~ImageBitmap()
PassRefPtr<ImageBitmap> ImageBitmap::create(HTMLImageElement* image, const IntRect& cropRect)
{
IntRect normalizedCropRect = normalizeRect(cropRect);
- return adoptRef(new ImageBitmap(image, normalizedCropRect));
+ RefPtr<ImageBitmap> imageBitmap(adoptRef(new ImageBitmap(image, normalizedCropRect)));
+ return imageBitmap.release();
}
PassRefPtr<ImageBitmap> ImageBitmap::create(HTMLVideoElement* video, const IntRect& cropRect)
{
IntRect normalizedCropRect = normalizeRect(cropRect);
- return adoptRef(new ImageBitmap(video, normalizedCropRect));
+ RefPtr<ImageBitmap> imageBitmap(adoptRef(new ImageBitmap(video, normalizedCropRect)));
+ return imageBitmap.release();
}
PassRefPtr<ImageBitmap> ImageBitmap::create(HTMLCanvasElement* canvas, const IntRect& cropRect)
{
IntRect normalizedCropRect = normalizeRect(cropRect);
- return adoptRef(new ImageBitmap(canvas, normalizedCropRect));
+ RefPtr<ImageBitmap> imageBitmap(adoptRef(new ImageBitmap(canvas, normalizedCropRect)));
+ return imageBitmap.release();
}
PassRefPtr<ImageBitmap> ImageBitmap::create(ImageData* data, const IntRect& cropRect)
{
IntRect normalizedCropRect = normalizeRect(cropRect);
- return adoptRef(new ImageBitmap(data, normalizedCropRect));
+ RefPtr<ImageBitmap> imageBitmap(adoptRef(new ImageBitmap(data, normalizedCropRect)));
+ return imageBitmap.release();
}
PassRefPtr<ImageBitmap> ImageBitmap::create(ImageBitmap* bitmap, const IntRect& cropRect)
{
IntRect normalizedCropRect = normalizeRect(cropRect);
- return adoptRef(new ImageBitmap(bitmap, normalizedCropRect));
-}
-
-PassRefPtr<ImageBitmap> ImageBitmap::create(Image* image, const IntRect& cropRect)
-{
- IntRect normalizedCropRect = normalizeRect(cropRect);
- return adoptRef(new ImageBitmap(image, normalizedCropRect));
+ RefPtr<ImageBitmap> imageBitmap(adoptRef(new ImageBitmap(bitmap, normalizedCropRect)));
+ return imageBitmap.release();
}
void ImageBitmap::notifyImageSourceChanged()
diff --git a/chromium/third_party/WebKit/Source/core/page/ImageBitmap.h b/chromium/third_party/WebKit/Source/core/page/ImageBitmap.h
index 2182f166d15..9ad5e765a37 100644
--- a/chromium/third_party/WebKit/Source/core/page/ImageBitmap.h
+++ b/chromium/third_party/WebKit/Source/core/page/ImageBitmap.h
@@ -27,7 +27,6 @@ public:
static PassRefPtr<ImageBitmap> create(HTMLCanvasElement*, const IntRect&);
static PassRefPtr<ImageBitmap> create(ImageData*, const IntRect&);
static PassRefPtr<ImageBitmap> create(ImageBitmap*, const IntRect&);
- static PassRefPtr<ImageBitmap> create(Image*, const IntRect&);
PassRefPtr<Image> bitmapImage() const;
PassRefPtr<HTMLImageElement> imageElement() const { return m_imageElement; }
@@ -47,7 +46,6 @@ private:
ImageBitmap(HTMLCanvasElement*, const IntRect&);
ImageBitmap(ImageData*, const IntRect&);
ImageBitmap(ImageBitmap*, const IntRect&);
- ImageBitmap(Image*, const IntRect&);
// ImageLoaderClient
virtual void notifyImageSourceChanged();
diff --git a/chromium/third_party/WebKit/Source/core/page/ImageBitmapFactories.cpp b/chromium/third_party/WebKit/Source/core/page/ImageBitmapFactories.cpp
new file mode 100644
index 00000000000..a68e94e4eae
--- /dev/null
+++ b/chromium/third_party/WebKit/Source/core/page/ImageBitmapFactories.cpp
@@ -0,0 +1,223 @@
+/*
+ * Copyright (c) 2013, Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "core/page/ImageBitmapFactories.h"
+
+#include "RuntimeEnabledFeatures.h"
+#include "V8ImageBitmap.h"
+#include "bindings/v8/ExceptionState.h"
+#include "core/dom/ExceptionCode.h"
+#include "core/html/HTMLCanvasElement.h"
+#include "core/html/HTMLImageElement.h"
+#include "core/html/HTMLVideoElement.h"
+#include "core/html/ImageData.h"
+#include "core/html/canvas/CanvasRenderingContext2D.h"
+#include "core/page/DOMWindow.h"
+#include "core/page/ImageBitmap.h"
+
+namespace WebCore {
+
+namespace ImageBitmapFactories {
+
+static LayoutSize sizeFor(HTMLImageElement* image)
+{
+ if (ImageResource* cachedImage = image->cachedImage())
+ return cachedImage->imageSizeForRenderer(image->renderer(), 1.0f); // FIXME: Not sure about this.
+ return IntSize();
+}
+
+static IntSize sizeFor(HTMLVideoElement* video)
+{
+ if (MediaPlayer* player = video->player())
+ return player->naturalSize();
+ return IntSize();
+}
+
+static ScriptObject resolveImageBitmap(PassRefPtr<ImageBitmap> imageBitmap)
+{
+ // Promises must be enabled.
+ ASSERT(RuntimeEnabledFeatures::promiseEnabled());
+
+ RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create();
+ resolver->fulfill(imageBitmap);
+ return resolver->promise();
+}
+
+ScriptObject createImageBitmap(EventTarget* eventTarget, HTMLImageElement* image, ExceptionState& es)
+{
+ LayoutSize s = sizeFor(image);
+ return createImageBitmap(eventTarget, image, 0, 0, s.width(), s.height(), es);
+}
+
+ScriptObject createImageBitmap(EventTarget* eventTarget, HTMLImageElement* image, int sx, int sy, int sw, int sh, ExceptionState& es)
+{
+ if (!image) {
+ es.throwTypeError();
+ return ScriptObject();
+ }
+ if (!image->cachedImage()) {
+ es.throwDOMException(InvalidStateError);
+ return ScriptObject();
+ }
+ if (image->cachedImage()->image()->isSVGImage()) {
+ es.throwDOMException(InvalidStateError);
+ return ScriptObject();
+ }
+ if (!sw || !sh) {
+ es.throwDOMException(IndexSizeError);
+ return ScriptObject();
+ }
+ if (!image->cachedImage()->image()->hasSingleSecurityOrigin()) {
+ es.throwDOMException(SecurityError);
+ return ScriptObject();
+ }
+ if (!image->cachedImage()->passesAccessControlCheck(eventTarget->toDOMWindow()->document()->securityOrigin())
+ && eventTarget->toDOMWindow()->document()->securityOrigin()->taintsCanvas(image->src())) {
+ es.throwDOMException(SecurityError);
+ return ScriptObject();
+ }
+ // FIXME: make ImageBitmap creation asynchronous crbug.com/258082
+ return resolveImageBitmap(ImageBitmap::create(image, IntRect(sx, sy, sw, sh)));
+}
+
+ScriptObject createImageBitmap(EventTarget* eventTarget, HTMLVideoElement* video, ExceptionState& es)
+{
+ IntSize s = sizeFor(video);
+ return createImageBitmap(eventTarget, video, 0, 0, s.width(), s.height(), es);
+}
+
+ScriptObject createImageBitmap(EventTarget* eventTarget, HTMLVideoElement* video, int sx, int sy, int sw, int sh, ExceptionState& es)
+{
+ if (!video) {
+ es.throwTypeError();
+ return ScriptObject();
+ }
+ if (!video->player()) {
+ es.throwDOMException(InvalidStateError);
+ return ScriptObject();
+ }
+ if (video->networkState() == HTMLMediaElement::NETWORK_EMPTY) {
+ es.throwDOMException(InvalidStateError);
+ return ScriptObject();
+ }
+ if (video->player()->readyState() <= MediaPlayer::HaveMetadata) {
+ es.throwDOMException(InvalidStateError);
+ return ScriptObject();
+ }
+ if (!sw || !sh) {
+ es.throwDOMException(IndexSizeError);
+ return ScriptObject();
+ }
+ if (!video->hasSingleSecurityOrigin()) {
+ es.throwDOMException(SecurityError);
+ return ScriptObject();
+ }
+ if (!video->player()->didPassCORSAccessCheck() && eventTarget->toDOMWindow()->document()->securityOrigin()->taintsCanvas(video->currentSrc())) {
+ es.throwDOMException(SecurityError);
+ return ScriptObject();
+ }
+ // FIXME: make ImageBitmap creation asynchronous crbug.com/258082
+ return resolveImageBitmap(ImageBitmap::create(video, IntRect(sx, sy, sw, sh)));
+}
+
+ScriptObject createImageBitmap(EventTarget* eventTarget, CanvasRenderingContext2D* context, ExceptionState& es)
+{
+ return createImageBitmap(eventTarget, context->canvas(), es);
+}
+
+ScriptObject createImageBitmap(EventTarget* eventTarget, CanvasRenderingContext2D* context, int sx, int sy, int sw, int sh, ExceptionState& es)
+{
+ return createImageBitmap(eventTarget, context->canvas(), sx, sy, sw, sh, es);
+}
+
+ScriptObject createImageBitmap(EventTarget* eventTarget, HTMLCanvasElement* canvas, ExceptionState& es)
+{
+ return createImageBitmap(eventTarget, canvas, 0, 0, canvas->width(), canvas->height(), es);
+}
+
+ScriptObject createImageBitmap(EventTarget* eventTarget, HTMLCanvasElement* canvas, int sx, int sy, int sw, int sh, ExceptionState& es)
+{
+ if (!canvas) {
+ es.throwTypeError();
+ return ScriptObject();
+ }
+ if (!canvas->originClean()) {
+ es.throwDOMException(InvalidStateError);
+ return ScriptObject();
+ }
+ if (!sw || !sh) {
+ es.throwDOMException(IndexSizeError);
+ return ScriptObject();
+ }
+ // FIXME: make ImageBitmap creation asynchronous crbug.com/258082
+ return resolveImageBitmap(ImageBitmap::create(canvas, IntRect(sx, sy, sw, sh)));
+}
+
+ScriptObject createImageBitmap(EventTarget* eventTarget, ImageData* data, ExceptionState& es)
+{
+ return createImageBitmap(eventTarget, data, 0, 0, data->width(), data->height(), es);
+}
+
+ScriptObject createImageBitmap(EventTarget* eventTarget, ImageData* data, int sx, int sy, int sw, int sh, ExceptionState& es)
+{
+ if (!data) {
+ es.throwTypeError();
+ return ScriptObject();
+ }
+ if (!sw || !sh) {
+ es.throwDOMException(IndexSizeError);
+ return ScriptObject();
+ }
+ // FIXME: make ImageBitmap creation asynchronous crbug.com/258082
+ return resolveImageBitmap(ImageBitmap::create(data, IntRect(sx, sy, sw, sh)));
+}
+
+ScriptObject createImageBitmap(EventTarget* eventTarget, ImageBitmap* bitmap, ExceptionState& es)
+{
+ return createImageBitmap(eventTarget, bitmap, 0, 0, bitmap->width(), bitmap->height(), es);
+}
+
+ScriptObject createImageBitmap(EventTarget* eventTarget, ImageBitmap* bitmap, int sx, int sy, int sw, int sh, ExceptionState& es)
+{
+ if (!bitmap) {
+ es.throwTypeError();
+ return ScriptObject();
+ }
+ if (!sw || !sh) {
+ es.throwDOMException(IndexSizeError);
+ return ScriptObject();
+ }
+ // FIXME: make ImageBitmap creation asynchronous crbug.com/258082
+ return resolveImageBitmap(ImageBitmap::create(bitmap, IntRect(sx, sy, sw, sh)));
+}
+
+} // namespace ImageBitmapFactories
+} // namespace WebCore
diff --git a/chromium/third_party/WebKit/Source/core/page/ImageBitmapFactories.h b/chromium/third_party/WebKit/Source/core/page/ImageBitmapFactories.h
new file mode 100644
index 00000000000..05feca4ffc1
--- /dev/null
+++ b/chromium/third_party/WebKit/Source/core/page/ImageBitmapFactories.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2013, Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ImageBitmapFactories_h
+#define ImageBitmapFactories_h
+
+#include "bindings/v8/ScriptPromiseResolver.h"
+
+namespace WebCore {
+
+class CanvasRenderingContext2D;
+class EventTarget;
+class ExceptionState;
+class HTMLCanvasElement;
+class HTMLImageElement;
+class HTMLVideoElement;
+class ImageBitmap;
+class ImageData;
+
+namespace ImageBitmapFactories {
+
+ScriptObject createImageBitmap(EventTarget*, HTMLImageElement*, ExceptionState&);
+ScriptObject createImageBitmap(EventTarget*, HTMLImageElement*, int sx, int sy, int sw, int sh, ExceptionState&);
+ScriptObject createImageBitmap(EventTarget*, HTMLVideoElement*, ExceptionState&);
+ScriptObject createImageBitmap(EventTarget*, HTMLVideoElement*, int sx, int sy, int sw, int sh, ExceptionState&);
+ScriptObject createImageBitmap(EventTarget*, CanvasRenderingContext2D*, ExceptionState&);
+ScriptObject createImageBitmap(EventTarget*, CanvasRenderingContext2D*, int sx, int sy, int sw, int sh, ExceptionState&);
+ScriptObject createImageBitmap(EventTarget*, HTMLCanvasElement*, ExceptionState&);
+ScriptObject createImageBitmap(EventTarget*, HTMLCanvasElement*, int sx, int sy, int sw, int sh, ExceptionState&);
+ScriptObject createImageBitmap(EventTarget*, ImageData*, ExceptionState&);
+ScriptObject createImageBitmap(EventTarget*, ImageData*, int sx, int sy, int sw, int sh, ExceptionState&);
+ScriptObject createImageBitmap(EventTarget*, ImageBitmap*, ExceptionState&);
+ScriptObject createImageBitmap(EventTarget*, ImageBitmap*, int sx, int sy, int sw, int sh, ExceptionState&);
+
+} // namesapce ImageBitmapFactories
+} // namespace WebCore
+
+#endif // ImageBitmapFactories_h
diff --git a/chromium/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapFactories.idl b/chromium/third_party/WebKit/Source/core/page/ImageBitmapFactories.idl
index d704ba00764..65c0dc6c549 100644
--- a/chromium/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapFactories.idl
+++ b/chromium/third_party/WebKit/Source/core/page/ImageBitmapFactories.idl
@@ -41,8 +41,6 @@
[RaisesException] any createImageBitmap(CanvasRenderingContext2D context, long sx, long sy, long sw, long sh);
[RaisesException] any createImageBitmap(HTMLCanvasElement canvas);
[RaisesException] any createImageBitmap(HTMLCanvasElement canvas, long sx, long sy, long sw, long sh);
- [RaisesException] any createImageBitmap(Blob blob);
- [RaisesException] any createImageBitmap(Blob blob, long sx, long sy, long sw, long sh);
[RaisesException] any createImageBitmap(ImageData data);
[RaisesException] any createImageBitmap(ImageData data, long sx, long sy, long sw, long sh);
[RaisesException] any createImageBitmap(ImageBitmap bitmap);
diff --git a/chromium/third_party/WebKit/Source/core/page/ImageBitmapTest.cpp b/chromium/third_party/WebKit/Source/core/page/ImageBitmapTest.cpp
index ab7c68ba7b4..91b363bd623 100644
--- a/chromium/third_party/WebKit/Source/core/page/ImageBitmapTest.cpp
+++ b/chromium/third_party/WebKit/Source/core/page/ImageBitmapTest.cpp
@@ -32,8 +32,8 @@
#include "core/page/ImageBitmap.h"
#include "core/dom/Document.h"
-#include "core/fetch/ImageResource.h"
#include "core/html/HTMLImageElement.h"
+#include "core/loader/cache/ImageResource.h"
#include "core/platform/graphics/BitmapImage.h"
#include "core/platform/graphics/skia/NativeImageSkia.h"
diff --git a/chromium/third_party/WebKit/Source/core/page/Page.cpp b/chromium/third_party/WebKit/Source/core/page/Page.cpp
index 999dd82da33..06315554fb2 100644
--- a/chromium/third_party/WebKit/Source/core/page/Page.cpp
+++ b/chromium/third_party/WebKit/Source/core/page/Page.cpp
@@ -47,7 +47,6 @@
#include "core/page/PageLifecycleNotifier.h"
#include "core/page/PointerLockController.h"
#include "core/page/Settings.h"
-#include "core/page/ValidationMessageClient.h"
#include "core/page/scrolling/ScrollingCoordinator.h"
#include "core/platform/network/NetworkStateNotifier.h"
#include "core/plugins/PluginData.h"
@@ -157,6 +156,8 @@ Page::~Page()
if (m_scrollingCoordinator)
m_scrollingCoordinator->pageDestroyed();
+ backForward()->close();
+
#ifndef NDEBUG
pageCounter.decrement();
#endif
@@ -261,14 +262,6 @@ void Page::setMainFrame(PassRefPtr<Frame> mainFrame)
m_mainFrame = mainFrame;
}
-void Page::documentDetached(Document* document)
-{
- m_pointerLockController->documentDetached(document);
- m_contextMenuController->documentDetached(document);
- if (m_validationMessageClient)
- m_validationMessageClient->documentDetached(*document);
-}
-
bool Page::openedByDOM() const
{
return m_openedByDOM;
diff --git a/chromium/third_party/WebKit/Source/core/page/Page.h b/chromium/third_party/WebKit/Source/core/page/Page.h
index 10a9a69d09a..2b85d1b4875 100644
--- a/chromium/third_party/WebKit/Source/core/page/Page.h
+++ b/chromium/third_party/WebKit/Source/core/page/Page.h
@@ -118,8 +118,6 @@ public:
void setMainFrame(PassRefPtr<Frame>);
Frame* mainFrame() const { return m_mainFrame.get(); }
- void documentDetached(Document*);
-
bool openedByDOM() const;
void setOpenedByDOM();
@@ -145,9 +143,9 @@ public:
DragCaretController& dragCaretController() const { return *m_dragCaretController; }
DragController& dragController() const { return *m_dragController; }
FocusController& focusController() const { return *m_focusController; }
- ContextMenuController& contextMenuController() const { return *m_contextMenuController; }
+ ContextMenuController* contextMenuController() const { return m_contextMenuController.get(); }
InspectorController* inspectorController() const { return m_inspectorController.get(); }
- PointerLockController& pointerLockController() const { return *m_pointerLockController; }
+ PointerLockController* pointerLockController() const { return m_pointerLockController.get(); }
ValidationMessageClient* validationMessageClient() const { return m_validationMessageClient; }
void setValidationMessageClient(ValidationMessageClient* client) { m_validationMessageClient = client; }
@@ -268,9 +266,9 @@ private:
const OwnPtr<DragCaretController> m_dragCaretController;
const OwnPtr<DragController> m_dragController;
OwnPtr<FocusController> m_focusController;
- const OwnPtr<ContextMenuController> m_contextMenuController;
+ OwnPtr<ContextMenuController> m_contextMenuController;
OwnPtr<InspectorController> m_inspectorController;
- const OwnPtr<PointerLockController> m_pointerLockController;
+ OwnPtr<PointerLockController> m_pointerLockController;
RefPtr<ScrollingCoordinator> m_scrollingCoordinator;
OwnPtr<Settings> m_settings;
diff --git a/chromium/third_party/WebKit/Source/core/page/PageSerializer.cpp b/chromium/third_party/WebKit/Source/core/page/PageSerializer.cpp
index 730f5fd7d41..16ed1028411 100644
--- a/chromium/third_party/WebKit/Source/core/page/PageSerializer.cpp
+++ b/chromium/third_party/WebKit/Source/core/page/PageSerializer.cpp
@@ -42,13 +42,13 @@
#include "core/dom/Element.h"
#include "core/dom/Text.h"
#include "core/editing/MarkupAccumulator.h"
-#include "core/fetch/ImageResource.h"
#include "core/html/HTMLFrameOwnerElement.h"
#include "core/html/HTMLImageElement.h"
#include "core/html/HTMLInputElement.h"
#include "core/html/HTMLLinkElement.h"
#include "core/html/HTMLStyleElement.h"
#include "core/html/parser/HTMLMetaCharsetParser.h"
+#include "core/loader/cache/ImageResource.h"
#include "core/page/Frame.h"
#include "core/page/Page.h"
#include "core/platform/SerializedResource.h"
diff --git a/chromium/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in b/chromium/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in
index 7890c03ab19..85faaec6975 100644
--- a/chromium/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in
+++ b/chromium/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in
@@ -19,7 +19,6 @@ AnimatedWebP status=experimental
ApplicationCache status=stable
AuthorShadowDOMForAnyElement
Crypto status=test
-CSSAnimationUnprefixed status=experimental
CSSCompositing status=experimental
CSSExclusions status=experimental
CSSGridLayout status=experimental
@@ -33,7 +32,6 @@ Database status=stable
DataListElement status=stable
DeviceMotion status=test
DeviceOrientation status=stable
-DevicePixelRatioIncludesZoom status=experimental
DialogElement status=experimental
DirectoryUpload status=stable
EncodingAPI status=experimental
diff --git a/chromium/third_party/WebKit/Source/core/page/Settings.cpp b/chromium/third_party/WebKit/Source/core/page/Settings.cpp
index 52ce9537243..68a69d3e566 100644
--- a/chromium/third_party/WebKit/Source/core/page/Settings.cpp
+++ b/chromium/third_party/WebKit/Source/core/page/Settings.cpp
@@ -28,8 +28,8 @@
#include <limits>
#include "core/dom/Document.h"
-#include "core/fetch/ResourceFetcher.h"
#include "core/inspector/InspectorInstrumentation.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/page/Chrome.h"
#include "core/page/Frame.h"
#include "core/page/FrameTree.h"
diff --git a/chromium/third_party/WebKit/Source/core/page/UseCounter.cpp b/chromium/third_party/WebKit/Source/core/page/UseCounter.cpp
index 2050d35e832..7737be9df79 100644
--- a/chromium/third_party/WebKit/Source/core/page/UseCounter.cpp
+++ b/chromium/third_party/WebKit/Source/core/page/UseCounter.cpp
@@ -469,7 +469,9 @@ int UseCounter::mapCSSPropertyIdToCSSSampleIdForHistogram(int id)
case CSSPropertyMinZoom: return 407;
case CSSPropertyOrientation: return 408;
case CSSPropertyUserZoom: return 409;
- // CSSPropertyWebkitDashboardRegion was 410.
+#if defined(ENABLE_DASHBOARD_SUPPORT) && ENABLE_DASHBOARD_SUPPORT
+ case CSSPropertyWebkitDashboardRegion: return 410;
+#endif
// CSSPropertyWebkitOverflowScrolling was 411.
case CSSPropertyWebkitAppRegion: return 412;
case CSSPropertyWebkitFilter: return 413;
@@ -483,15 +485,6 @@ int UseCounter::mapCSSPropertyIdToCSSSampleIdForHistogram(int id)
case CSSPropertyTouchAction: return 421;
case CSSPropertyGridArea: return 422;
case CSSPropertyGridTemplate: return 423;
- case CSSPropertyAnimation: return 424;
- case CSSPropertyAnimationDelay: return 425;
- case CSSPropertyAnimationDirection: return 426;
- case CSSPropertyAnimationDuration: return 427;
- case CSSPropertyAnimationFillMode: return 428;
- case CSSPropertyAnimationIterationCount: return 429;
- case CSSPropertyAnimationName: return 430;
- case CSSPropertyAnimationPlayState: return 431;
- case CSSPropertyAnimationTimingFunction: return 432;
// Add new features above this line (don't change the assigned numbers of the existing
// items) and update maximumCSSSampleId() with the new maximum value.
@@ -506,7 +499,7 @@ int UseCounter::mapCSSPropertyIdToCSSSampleIdForHistogram(int id)
return 0;
}
-static int maximumCSSSampleId() { return 432; }
+static int maximumCSSSampleId() { return 423; }
UseCounter::UseCounter()
{
diff --git a/chromium/third_party/WebKit/Source/core/page/UseCounter.h b/chromium/third_party/WebKit/Source/core/page/UseCounter.h
index 6045a6fbf13..fdfd8304bba 100644
--- a/chromium/third_party/WebKit/Source/core/page/UseCounter.h
+++ b/chromium/third_party/WebKit/Source/core/page/UseCounter.h
@@ -163,24 +163,6 @@ public:
PrefixedShadowRootConstructor,
ConsoleMarkTimeline,
CSSPseudoElementUserAgentCustomPseudo,
- DocumentTypeEntities, // Removed from DOM4.
- DocumentTypeInternalSubset, // Removed from DOM4.
- DocumentTypeNotations, // Removed from DOM4.
- ElementGetAttributeNode, // Removed from DOM4.
- ElementSetAttributeNode, // Removed from DOM4.
- ElementRemoveAttributeNode, // Removed from DOM4.
- ElementGetAttributeNodeNS, // Removed from DOM4.
- DocumentCreateAttribute, // Removed from DOM4.
- DocumentCreateAttributeNS, // Removed from DOM4.
- DocumentCreateCDATASection, // Removed from DOM4.
- DocumentInputEncoding, // Removed from DOM4.
- DocumentXMLEncoding, // Removed from DOM4.
- DocumentXMLStandalone, // Removed from DOM4.
- DocumentXMLVersion, // Removed from DOM4.
- NodeIsSameNode, // Removed from DOM4.
- NodeIsSupported, // Removed from DOM4.
- NodeNamespaceURI, // Removed from DOM4.
- NodePrefix, // Removed from DOM4.
// Add new features immediately above this line. Don't change assigned
// numbers of each items, and don't reuse unused slots.
NumberOfFeatures, // This enum value must be last.
diff --git a/chromium/third_party/WebKit/Source/core/page/animation/CSSPropertyAnimation.cpp b/chromium/third_party/WebKit/Source/core/page/animation/CSSPropertyAnimation.cpp
index a0f8894e81e..5bf3bb667b5 100644
--- a/chromium/third_party/WebKit/Source/core/page/animation/CSSPropertyAnimation.cpp
+++ b/chromium/third_party/WebKit/Source/core/page/animation/CSSPropertyAnimation.cpp
@@ -36,7 +36,7 @@
#include "core/css/CSSCrossfadeValue.h"
#include "core/css/CSSImageValue.h"
#include "core/css/CSSPrimitiveValue.h"
-#include "core/fetch/ImageResource.h"
+#include "core/loader/cache/ImageResource.h"
#include "core/page/animation/AnimationBase.h"
#include "core/platform/FloatConversion.h"
#include "core/rendering/ClipPathOperation.h"
diff --git a/chromium/third_party/WebKit/Source/core/page/animation/KeyframeAnimation.cpp b/chromium/third_party/WebKit/Source/core/page/animation/KeyframeAnimation.cpp
index ec8ea2e938a..d298f152a8f 100644
--- a/chromium/third_party/WebKit/Source/core/page/animation/KeyframeAnimation.cpp
+++ b/chromium/third_party/WebKit/Source/core/page/animation/KeyframeAnimation.cpp
@@ -108,7 +108,7 @@ void KeyframeAnimation::fetchIntervalEndpointsForProperty(CSSPropertyID property
// Find keyframe that is closest to elapsed time.
while (distance > 1) {
currentIndex = (lastIndex + firstIndex) >> 1;
- double key = m_keyframes[currentIndex].key();
+ float key = m_keyframes[currentIndex].key();
distance = lastIndex - currentIndex;
if (key < fractionalTime) {
diff --git a/chromium/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp b/chromium/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
index d56ef60ceb1..30975d125cc 100644
--- a/chromium/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/chromium/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -366,6 +366,11 @@ void ScrollingCoordinator::setTouchEventTargetRects(const LayerHitTestRects& lay
LayerHitTestRects compositorRects;
convertLayerRectsToEnclosingCompositedLayer(layerRects, compositorRects);
+ // Inform any observers (i.e. for testing) of these new rects.
+ HashSet<TouchEventTargetRectsObserver*>::iterator stop = m_touchEventTargetRectsObservers.end();
+ for (HashSet<TouchEventTargetRectsObserver*>::iterator it = m_touchEventTargetRectsObservers.begin(); it != stop; ++it)
+ (*it)->touchEventTargetRectsChanged(compositorRects);
+
// Note that ideally we'd clear the touch event handler region on all layers first,
// in case there are others that no longer have any handlers. But it's unlikely to
// matter much in practice (just makes us more conservative).
@@ -493,6 +498,16 @@ Region ScrollingCoordinator::computeShouldHandleScrollGestureOnMainThreadRegion(
return shouldHandleScrollGestureOnMainThreadRegion;
}
+void ScrollingCoordinator::addTouchEventTargetRectsObserver(TouchEventTargetRectsObserver* observer)
+{
+ m_touchEventTargetRectsObservers.add(observer);
+}
+
+void ScrollingCoordinator::removeTouchEventTargetRectsObserver(TouchEventTargetRectsObserver* observer)
+{
+ m_touchEventTargetRectsObservers.remove(observer);
+}
+
static void accumulateDocumentTouchEventTargetRects(LayerHitTestRects& rects, const Document* document)
{
ASSERT(document);
diff --git a/chromium/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.h b/chromium/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.h
index f5764548e7b..acb13c67a58 100644
--- a/chromium/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.h
+++ b/chromium/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.h
@@ -102,6 +102,14 @@ public:
String mainThreadScrollingReasonsAsText() const;
Region computeShouldHandleScrollGestureOnMainThreadRegion(const Frame*, const IntPoint& frameLocation) const;
+ class TouchEventTargetRectsObserver {
+ public:
+ virtual void touchEventTargetRectsChanged(const LayerHitTestRects&) = 0;
+ };
+
+ void addTouchEventTargetRectsObserver(TouchEventTargetRectsObserver*);
+ void removeTouchEventTargetRectsObserver(TouchEventTargetRectsObserver*);
+
protected:
explicit ScrollingCoordinator(Page*);
@@ -139,6 +147,8 @@ private:
typedef HashMap<ScrollableArea*, OwnPtr<WebKit::WebScrollbarLayer> > ScrollbarMap;
ScrollbarMap m_horizontalScrollbars;
ScrollbarMap m_verticalScrollbars;
+
+ HashSet<TouchEventTargetRectsObserver*> m_touchEventTargetRectsObservers;
};
} // namespace WebCore
diff --git a/chromium/third_party/WebKit/Source/core/platform/AsyncFileSystem.h b/chromium/third_party/WebKit/Source/core/platform/AsyncFileSystem.h
index d260af8b65d..2a408f80a15 100644
--- a/chromium/third_party/WebKit/Source/core/platform/AsyncFileSystem.h
+++ b/chromium/third_party/WebKit/Source/core/platform/AsyncFileSystem.h
@@ -54,7 +54,7 @@ public:
// Subclass must implement this if it supports synchronous operations.
// This should return false if there are no pending operations.
- virtual bool waitForOperationToComplete() { return true; }
+ virtual bool waitForOperationToComplete() { return false; }
// Creates and returns a new platform-specific AsyncFileSystem instance if the platform has its own implementation.
static PassOwnPtr<AsyncFileSystem> create();
diff --git a/chromium/third_party/WebKit/Source/core/platform/DEPS b/chromium/third_party/WebKit/Source/core/platform/DEPS
index cfd697d11ac..f1e4fe8f090 100644
--- a/chromium/third_party/WebKit/Source/core/platform/DEPS
+++ b/chromium/third_party/WebKit/Source/core/platform/DEPS
@@ -17,7 +17,7 @@ include_rules = [
"!core/fileapi",
"!core/html",
"!core/inspector",
- "!core/fetch",
+ "!core/loader/cache",
"!core/page",
"!core/plugins",
"!core/rendering",
diff --git a/chromium/third_party/WebKit/Source/core/platform/LifecycleNotifier.h b/chromium/third_party/WebKit/Source/core/platform/LifecycleNotifier.h
index cc12be21144..fd4835383eb 100644
--- a/chromium/third_party/WebKit/Source/core/platform/LifecycleNotifier.h
+++ b/chromium/third_party/WebKit/Source/core/platform/LifecycleNotifier.h
@@ -55,8 +55,7 @@ protected:
IteratingOverActiveDOMObjects,
IteratingOverContextObservers,
IteratingOverDocumentObservers,
- IteratingOverPageObservers,
- IteratingOverDOMWindowObservers
+ IteratingOverPageObservers
};
IterationType m_iterating;
diff --git a/chromium/third_party/WebKit/Source/core/platform/LifecycleObserver.h b/chromium/third_party/WebKit/Source/core/platform/LifecycleObserver.h
index 3e2d0a47cab..5e3ca2ccc25 100644
--- a/chromium/third_party/WebKit/Source/core/platform/LifecycleObserver.h
+++ b/chromium/third_party/WebKit/Source/core/platform/LifecycleObserver.h
@@ -37,8 +37,7 @@ public:
ActiveDOMObjectType,
DocumentLifecycleObserverType,
GenericType,
- PageLifecycleObserverType,
- DOMWindowLifecycleObserverType
+ PageLifecycleObserverType
};
explicit LifecycleObserver(LifecycleContext*, Type = GenericType);
diff --git a/chromium/third_party/WebKit/Source/core/platform/animation/CSSAnimationData.h b/chromium/third_party/WebKit/Source/core/platform/animation/CSSAnimationData.h
index a8ab4598cbf..f8c441cd5a4 100644
--- a/chromium/third_party/WebKit/Source/core/platform/animation/CSSAnimationData.h
+++ b/chromium/third_party/WebKit/Source/core/platform/animation/CSSAnimationData.h
@@ -148,7 +148,7 @@ public:
private:
CSSAnimationData();
- explicit CSSAnimationData(const CSSAnimationData&);
+ CSSAnimationData(const CSSAnimationData& o);
AtomicString m_name;
CSSPropertyID m_property;
diff --git a/chromium/third_party/WebKit/Source/core/platform/animation/CSSAnimationDataList.h b/chromium/third_party/WebKit/Source/core/platform/animation/CSSAnimationDataList.h
index 48d855674f0..bd7d942ae82 100644
--- a/chromium/third_party/WebKit/Source/core/platform/animation/CSSAnimationDataList.h
+++ b/chromium/third_party/WebKit/Source/core/platform/animation/CSSAnimationDataList.h
@@ -35,7 +35,7 @@ class CSSAnimationDataList {
WTF_MAKE_FAST_ALLOCATED;
public:
CSSAnimationDataList() { }
- explicit CSSAnimationDataList(const CSSAnimationDataList&);
+ CSSAnimationDataList(const CSSAnimationDataList&);
void fillUnsetProperties();
bool operator==(const CSSAnimationDataList& o) const;
diff --git a/chromium/third_party/WebKit/Source/core/platform/chromium/ChromiumDataObject.cpp b/chromium/third_party/WebKit/Source/core/platform/chromium/ChromiumDataObject.cpp
index a9a536dfcfa..2c7fa1601a4 100644
--- a/chromium/third_party/WebKit/Source/core/platform/chromium/ChromiumDataObject.cpp
+++ b/chromium/third_party/WebKit/Source/core/platform/chromium/ChromiumDataObject.cpp
@@ -90,24 +90,18 @@ void ChromiumDataObject::clearAll()
m_itemList.clear();
}
-PassRefPtr<ChromiumDataObjectItem> ChromiumDataObject::add(const String& data, const String& type, ExceptionState& es)
+void ChromiumDataObject::add(const String& data, const String& type, ExceptionState& es)
{
- RefPtr<ChromiumDataObjectItem> item = ChromiumDataObjectItem::createFromString(type, data);
- if (!internalAddStringItem(item)) {
+ if (!internalAddStringItem(ChromiumDataObjectItem::createFromString(type, data)))
es.throwDOMException(NotSupportedError);
- return 0;
- }
- return item;
}
-PassRefPtr<ChromiumDataObjectItem> ChromiumDataObject::add(PassRefPtr<File> file, ScriptExecutionContext* context)
+void ChromiumDataObject::add(PassRefPtr<File> file, ScriptExecutionContext* context)
{
if (!file)
- return 0;
+ return;
- RefPtr<ChromiumDataObjectItem> item = ChromiumDataObjectItem::createFromFile(file);
- m_itemList.append(item);
- return item;
+ m_itemList.append(ChromiumDataObjectItem::createFromFile(file));
}
void ChromiumDataObject::clearData(const String& type)
diff --git a/chromium/third_party/WebKit/Source/core/platform/chromium/ChromiumDataObject.h b/chromium/third_party/WebKit/Source/core/platform/chromium/ChromiumDataObject.h
index dfb9a75d207..04063170119 100644
--- a/chromium/third_party/WebKit/Source/core/platform/chromium/ChromiumDataObject.h
+++ b/chromium/third_party/WebKit/Source/core/platform/chromium/ChromiumDataObject.h
@@ -62,8 +62,8 @@ public:
// FIXME: Implement V8DataTransferItemList::indexedPropertyDeleter to get this called.
void deleteItem(unsigned long index);
void clearAll();
- PassRefPtr<ChromiumDataObjectItem> add(const String& data, const String& type, ExceptionState&);
- PassRefPtr<ChromiumDataObjectItem> add(PassRefPtr<File>, ScriptExecutionContext*);
+ void add(const String& data, const String& type, ExceptionState&);
+ void add(PassRefPtr<File>, ScriptExecutionContext*);
// WebCore helpers.
void clearData(const String& type);
diff --git a/chromium/third_party/WebKit/Source/core/platform/chromium/ClipboardChromium.cpp b/chromium/third_party/WebKit/Source/core/platform/chromium/ClipboardChromium.cpp
index 48b258c7a0d..50e69e505e9 100644
--- a/chromium/third_party/WebKit/Source/core/platform/chromium/ClipboardChromium.cpp
+++ b/chromium/third_party/WebKit/Source/core/platform/chromium/ClipboardChromium.cpp
@@ -35,9 +35,9 @@
#include "core/dom/ExceptionCode.h"
#include "core/dom/StringCallback.h"
#include "core/editing/markup.h"
-#include "core/fetch/ImageResource.h"
#include "core/fileapi/File.h"
#include "core/fileapi/FileList.h"
+#include "core/loader/cache/ImageResource.h"
#include "core/page/Frame.h"
#include "core/platform/DragData.h"
#include "core/platform/MIMETypeRegistry.h"
@@ -64,8 +64,8 @@ public:
virtual PassRefPtr<DataTransferItem> item(unsigned long index) OVERRIDE;
virtual void deleteItem(unsigned long index, ExceptionState&) OVERRIDE;
virtual void clear() OVERRIDE;
- virtual PassRefPtr<DataTransferItem> add(const String& data, const String& type, ExceptionState&) OVERRIDE;
- virtual PassRefPtr<DataTransferItem> add(PassRefPtr<File>) OVERRIDE;
+ virtual void add(const String& data, const String& type, ExceptionState&) OVERRIDE;
+ virtual void add(PassRefPtr<File>) OVERRIDE;
private:
DataTransferItemListPolicyWrapper(PassRefPtr<ClipboardChromium>, PassRefPtr<ChromiumDataObject>);
@@ -119,24 +119,18 @@ void DataTransferItemListPolicyWrapper::clear()
m_dataObject->clearAll();
}
-PassRefPtr<DataTransferItem> DataTransferItemListPolicyWrapper::add(const String& data, const String& type, ExceptionState& es)
+void DataTransferItemListPolicyWrapper::add(const String& data, const String& type, ExceptionState& es)
{
if (!m_clipboard->canWriteData())
- return 0;
- RefPtr<ChromiumDataObjectItem> item = m_dataObject->add(data, type, es);
- if (!item)
- return 0;
- return DataTransferItemPolicyWrapper::create(m_clipboard, item);
+ return;
+ m_dataObject->add(data, type, es);
}
-PassRefPtr<DataTransferItem> DataTransferItemListPolicyWrapper::add(PassRefPtr<File> file)
+void DataTransferItemListPolicyWrapper::add(PassRefPtr<File> file)
{
if (!m_clipboard->canWriteData())
- return 0;
- RefPtr<ChromiumDataObjectItem> item = m_dataObject->add(file, m_clipboard->frame()->document()->scriptExecutionContext());
- if (!item)
- return 0;
- return DataTransferItemPolicyWrapper::create(m_clipboard, item);
+ return;
+ m_dataObject->add(file, m_clipboard->frame()->document()->scriptExecutionContext());
}
DataTransferItemListPolicyWrapper::DataTransferItemListPolicyWrapper(
diff --git a/chromium/third_party/WebKit/Source/core/platform/chromium/ClipboardChromium.h b/chromium/third_party/WebKit/Source/core/platform/chromium/ClipboardChromium.h
index 4cc14168802..980a22dea67 100644
--- a/chromium/third_party/WebKit/Source/core/platform/chromium/ClipboardChromium.h
+++ b/chromium/third_party/WebKit/Source/core/platform/chromium/ClipboardChromium.h
@@ -32,7 +32,7 @@
#include "core/dom/Clipboard.h"
#include "core/dom/DataTransferItem.h"
-#include "core/fetch/ImageResourceClient.h"
+#include "core/loader/cache/ImageResourceClient.h"
#include "core/platform/chromium/ChromiumDataObject.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/platform/chromium/PasteboardChromium.cpp b/chromium/third_party/WebKit/Source/core/platform/chromium/PasteboardChromium.cpp
index 61c2dc9608a..d06f207a9ef 100644
--- a/chromium/third_party/WebKit/Source/core/platform/chromium/PasteboardChromium.cpp
+++ b/chromium/third_party/WebKit/Source/core/platform/chromium/PasteboardChromium.cpp
@@ -39,8 +39,8 @@
#include "core/dom/Element.h"
#include "core/dom/Range.h"
#include "core/editing/markup.h"
-#include "core/fetch/ImageResource.h"
#include "core/html/parser/HTMLParserIdioms.h"
+#include "core/loader/cache/ImageResource.h"
#include "core/page/Frame.h"
#include "core/platform/chromium/ClipboardChromium.h"
#include "core/platform/chromium/ClipboardUtilitiesChromium.h"
diff --git a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeNonMacCommon.cpp b/chromium/third_party/WebKit/Source/core/platform/chromium/ScrollbarThemeChromium.cpp
index 72208ba0493..d44a778a65d 100644
--- a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeNonMacCommon.cpp
+++ b/chromium/third_party/WebKit/Source/core/platform/chromium/ScrollbarThemeChromium.cpp
@@ -25,7 +25,7 @@
*/
#include "config.h"
-#include "core/platform/ScrollbarThemeNonMacCommon.h"
+#include "core/platform/chromium/ScrollbarThemeChromium.h"
#include "core/platform/PlatformMouseEvent.h"
#include "core/platform/ScrollableArea.h"
@@ -33,16 +33,21 @@
#include "core/platform/ScrollbarTheme.h"
#include "core/platform/graphics/GraphicsContextStateSaver.h"
+// -----------------------------------------------------------------------------
+// This file contains scrollbar theme code that is cross platform. Additional
+// members of ScrollbarThemeChromium can be found in the platform specific files
+// -----------------------------------------------------------------------------
+
namespace WebCore {
-bool ScrollbarThemeNonMacCommon::hasThumb(ScrollbarThemeClient* scrollbar)
+bool ScrollbarThemeChromium::hasThumb(ScrollbarThemeClient* scrollbar)
{
// This method is just called as a paint-time optimization to see if
- // painting the thumb can be skipped. We don't have to be exact here.
+ // painting the thumb can be skipped. We don't have to be exact here.
return thumbLength(scrollbar) > 0;
}
-IntRect ScrollbarThemeNonMacCommon::backButtonRect(ScrollbarThemeClient* scrollbar, ScrollbarPart part, bool)
+IntRect ScrollbarThemeChromium::backButtonRect(ScrollbarThemeClient* scrollbar, ScrollbarPart part, bool)
{
// Windows and Linux just have single arrows.
if (part == BackButtonEndPart)
@@ -52,7 +57,7 @@ IntRect ScrollbarThemeNonMacCommon::backButtonRect(ScrollbarThemeClient* scrollb
return IntRect(scrollbar->x(), scrollbar->y(), size.width(), size.height());
}
-IntRect ScrollbarThemeNonMacCommon::forwardButtonRect(ScrollbarThemeClient* scrollbar, ScrollbarPart part, bool)
+IntRect ScrollbarThemeChromium::forwardButtonRect(ScrollbarThemeClient* scrollbar, ScrollbarPart part, bool)
{
// Windows and Linux just have single arrows.
if (part == ForwardButtonStartPart)
@@ -70,7 +75,7 @@ IntRect ScrollbarThemeNonMacCommon::forwardButtonRect(ScrollbarThemeClient* scro
return IntRect(x, y, size.width(), size.height());
}
-IntRect ScrollbarThemeNonMacCommon::trackRect(ScrollbarThemeClient* scrollbar, bool)
+IntRect ScrollbarThemeChromium::trackRect(ScrollbarThemeClient* scrollbar, bool)
{
IntSize bs = buttonSize(scrollbar);
int thickness = scrollbarThickness(scrollbar->controlSize());
@@ -86,20 +91,20 @@ IntRect ScrollbarThemeNonMacCommon::trackRect(ScrollbarThemeClient* scrollbar, b
return IntRect(scrollbar->x(), scrollbar->y() + bs.height(), thickness, scrollbar->height() - 2 * bs.height());
}
-void ScrollbarThemeNonMacCommon::paintTrackBackground(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect)
+void ScrollbarThemeChromium::paintTrackBackground(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect)
{
- // Just assume a forward track part. We only paint the track as a single piece when there is no thumb.
+ // Just assume a forward track part. We only paint the track as a single piece when there is no thumb.
if (!hasThumb(scrollbar))
paintTrackPiece(context, scrollbar, rect, ForwardTrackPart);
}
-void ScrollbarThemeNonMacCommon::paintTickmarks(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect)
+void ScrollbarThemeChromium::paintTickmarks(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect)
{
if (scrollbar->orientation() != VerticalScrollbar)
return;
if (rect.height() <= 0 || rect.width() <= 0)
- return;
+ return; // nothing to draw on.
// Get the tickmarks for the frameview.
Vector<IntRect> tickmarks;
diff --git a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeNonMacCommon.h b/chromium/third_party/WebKit/Source/core/platform/chromium/ScrollbarThemeChromium.h
index 3fc76476037..9866a179693 100644
--- a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeNonMacCommon.h
+++ b/chromium/third_party/WebKit/Source/core/platform/chromium/ScrollbarThemeChromium.h
@@ -28,8 +28,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef ScrollbarThemeNonMacCommon_h
-#define ScrollbarThemeNonMacCommon_h
+#ifndef ScrollbarThemeChromium_h
+#define ScrollbarThemeChromium_h
#include "core/platform/ScrollbarTheme.h"
@@ -37,7 +37,9 @@ namespace WebCore {
class PlatformMouseEvent;
-class ScrollbarThemeNonMacCommon : public ScrollbarTheme {
+// This class contains the scrollbar code which is shared between Chromium
+// Windows and Linux.
+class ScrollbarThemeChromium : public ScrollbarTheme {
protected:
virtual bool hasButtons(ScrollbarThemeClient*) OVERRIDE { return true; }
virtual bool hasThumb(ScrollbarThemeClient*) OVERRIDE;
diff --git a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeAndroid.cpp b/chromium/third_party/WebKit/Source/core/platform/chromium/ScrollbarThemeChromiumAndroid.cpp
index 8ab6b8ca5b6..ca8b507a417 100644
--- a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeAndroid.cpp
+++ b/chromium/third_party/WebKit/Source/core/platform/chromium/ScrollbarThemeChromiumAndroid.cpp
@@ -24,15 +24,16 @@
*/
#include "config.h"
+
#include "core/platform/ScrollbarTheme.h"
-#include "core/platform/ScrollbarThemeOverlay.h"
+#include "core/platform/chromium/ScrollbarThemeChromiumOverlay.h"
namespace WebCore {
ScrollbarTheme* ScrollbarTheme::nativeTheme()
{
- DEFINE_STATIC_LOCAL(ScrollbarThemeOverlay, theme, ());
+ DEFINE_STATIC_LOCAL(ScrollbarThemeChromiumOverlay, theme, ());
return &theme;
}
diff --git a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeAuraOrGtk.cpp b/chromium/third_party/WebKit/Source/core/platform/chromium/ScrollbarThemeChromiumDefault.cpp
index e3753391115..721870a29c9 100644
--- a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeAuraOrGtk.cpp
+++ b/chromium/third_party/WebKit/Source/core/platform/chromium/ScrollbarThemeChromiumDefault.cpp
@@ -29,38 +29,38 @@
*/
#include "config.h"
-#include "core/platform/ScrollbarThemeAuraOrGtk.h"
+#include "core/platform/chromium/ScrollbarThemeChromiumDefault.h"
#include "RuntimeEnabledFeatures.h"
#include "core/platform/PlatformMouseEvent.h"
#include "core/platform/Scrollbar.h"
-#include "core/platform/ScrollbarThemeOverlay.h"
+#include "core/platform/chromium/ScrollbarThemeChromiumOverlay.h"
#include "core/platform/graphics/GraphicsContext.h"
+#include "public/platform/default/WebThemeEngine.h"
#include "public/platform/Platform.h"
#include "public/platform/WebRect.h"
-#include "public/platform/default/WebThemeEngine.h"
namespace WebCore {
ScrollbarTheme* ScrollbarTheme::nativeTheme()
{
if (RuntimeEnabledFeatures::overlayScrollbarsEnabled()) {
- DEFINE_STATIC_LOCAL(ScrollbarThemeOverlay, theme, ());
+ DEFINE_STATIC_LOCAL(ScrollbarThemeChromiumOverlay, theme, ());
return &theme;
}
- DEFINE_STATIC_LOCAL(ScrollbarThemeAuraOrGtk, theme, ());
+ DEFINE_STATIC_LOCAL(ScrollbarThemeChromiumDefault, theme, ());
return &theme;
}
-int ScrollbarThemeAuraOrGtk::scrollbarThickness(ScrollbarControlSize controlSize)
+int ScrollbarThemeChromiumDefault::scrollbarThickness(ScrollbarControlSize controlSize)
{
// Horiz and Vert scrollbars are the same thickness.
IntSize scrollbarSize = WebKit::Platform::current()->themeEngine()->getSize(WebKit::WebThemeEngine::PartScrollbarVerticalTrack);
return scrollbarSize.width();
}
-void ScrollbarThemeAuraOrGtk::paintTrackPiece(GraphicsContext* gc, ScrollbarThemeClient* scrollbar, const IntRect& rect, ScrollbarPart partType)
+void ScrollbarThemeChromiumDefault::paintTrackPiece(GraphicsContext* gc, ScrollbarThemeClient* scrollbar, const IntRect& rect, ScrollbarPart partType)
{
WebKit::WebThemeEngine::State state = scrollbar->hoveredPart() == partType ? WebKit::WebThemeEngine::StateHover : WebKit::WebThemeEngine::StateNormal;
IntRect alignRect = trackRect(scrollbar, false);
@@ -73,7 +73,7 @@ void ScrollbarThemeAuraOrGtk::paintTrackPiece(GraphicsContext* gc, ScrollbarThem
WebKit::Platform::current()->themeEngine()->paint(canvas, scrollbar->orientation() == HorizontalScrollbar ? WebKit::WebThemeEngine::PartScrollbarHorizontalTrack : WebKit::WebThemeEngine::PartScrollbarVerticalTrack, state, WebKit::WebRect(rect), &extraParams);
}
-void ScrollbarThemeAuraOrGtk::paintButton(GraphicsContext* gc, ScrollbarThemeClient* scrollbar, const IntRect& rect, ScrollbarPart part)
+void ScrollbarThemeChromiumDefault::paintButton(GraphicsContext* gc, ScrollbarThemeClient* scrollbar, const IntRect& rect, ScrollbarPart part)
{
WebKit::WebThemeEngine::Part paintPart;
WebKit::WebThemeEngine::State state = WebKit::WebThemeEngine::StateNormal;
@@ -109,7 +109,7 @@ void ScrollbarThemeAuraOrGtk::paintButton(GraphicsContext* gc, ScrollbarThemeCli
WebKit::Platform::current()->themeEngine()->paint(canvas, paintPart, state, WebKit::WebRect(rect), 0);
}
-void ScrollbarThemeAuraOrGtk::paintThumb(GraphicsContext* gc, ScrollbarThemeClient* scrollbar, const IntRect& rect)
+void ScrollbarThemeChromiumDefault::paintThumb(GraphicsContext* gc, ScrollbarThemeClient* scrollbar, const IntRect& rect)
{
WebKit::WebThemeEngine::State state;
WebKit::WebCanvas* canvas = gc->canvas();
@@ -122,12 +122,12 @@ void ScrollbarThemeAuraOrGtk::paintThumb(GraphicsContext* gc, ScrollbarThemeClie
WebKit::Platform::current()->themeEngine()->paint(canvas, scrollbar->orientation() == HorizontalScrollbar ? WebKit::WebThemeEngine::PartScrollbarHorizontalThumb : WebKit::WebThemeEngine::PartScrollbarVerticalThumb, state, WebKit::WebRect(rect), 0);
}
-bool ScrollbarThemeAuraOrGtk::shouldCenterOnThumb(ScrollbarThemeClient*, const PlatformMouseEvent& evt)
+bool ScrollbarThemeChromiumDefault::shouldCenterOnThumb(ScrollbarThemeClient*, const PlatformMouseEvent& evt)
{
return (evt.shiftKey() && evt.button() == LeftButton) || (evt.button() == MiddleButton);
}
-IntSize ScrollbarThemeAuraOrGtk::buttonSize(ScrollbarThemeClient* scrollbar)
+IntSize ScrollbarThemeChromiumDefault::buttonSize(ScrollbarThemeClient* scrollbar)
{
if (scrollbar->orientation() == VerticalScrollbar) {
IntSize size = WebKit::Platform::current()->themeEngine()->getSize(WebKit::WebThemeEngine::PartScrollbarUpArrow);
@@ -139,7 +139,7 @@ IntSize ScrollbarThemeAuraOrGtk::buttonSize(ScrollbarThemeClient* scrollbar)
return IntSize(scrollbar->width() < 2 * size.width() ? scrollbar->width() / 2 : size.width(), size.height());
}
-int ScrollbarThemeAuraOrGtk::minimumThumbLength(ScrollbarThemeClient* scrollbar)
+int ScrollbarThemeChromiumDefault::minimumThumbLength(ScrollbarThemeClient* scrollbar)
{
if (scrollbar->orientation() == VerticalScrollbar) {
IntSize size = WebKit::Platform::current()->themeEngine()->getSize(WebKit::WebThemeEngine::PartScrollbarVerticalThumb);
diff --git a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeAuraOrGtk.h b/chromium/third_party/WebKit/Source/core/platform/chromium/ScrollbarThemeChromiumDefault.h
index ec37c2c1f78..133dab06edc 100644
--- a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeAuraOrGtk.h
+++ b/chromium/third_party/WebKit/Source/core/platform/chromium/ScrollbarThemeChromiumDefault.h
@@ -28,14 +28,14 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef ScrollbarThemeAuraOrGtk_h
-#define ScrollbarThemeAuraOrGtk_h
+#ifndef ScrollbarThemeChromiumDefault_h
+#define ScrollbarThemeChromiumDefault_h
-#include "core/platform/ScrollbarThemeNonMacCommon.h"
+#include "core/platform/chromium/ScrollbarThemeChromium.h"
namespace WebCore {
-class ScrollbarThemeAuraOrGtk : public ScrollbarThemeNonMacCommon {
+class ScrollbarThemeChromiumDefault : public ScrollbarThemeChromium {
public:
virtual int scrollbarThickness(ScrollbarControlSize);
diff --git a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeOverlay.cpp b/chromium/third_party/WebKit/Source/core/platform/chromium/ScrollbarThemeChromiumOverlay.cpp
index 29b44ba4292..c10c89bbd55 100644
--- a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeOverlay.cpp
+++ b/chromium/third_party/WebKit/Source/core/platform/chromium/ScrollbarThemeChromiumOverlay.cpp
@@ -24,7 +24,7 @@
*/
#include "config.h"
-#include "core/platform/ScrollbarThemeOverlay.h"
+#include "core/platform/chromium/ScrollbarThemeChromiumOverlay.h"
#include "core/platform/PlatformMouseEvent.h"
#include "core/platform/Scrollbar.h"
@@ -40,17 +40,17 @@ namespace WebCore {
static const int scrollbarWidth = 3;
static const int scrollbarMargin = 4;
-int ScrollbarThemeOverlay::scrollbarThickness(ScrollbarControlSize controlSize)
+int ScrollbarThemeChromiumOverlay::scrollbarThickness(ScrollbarControlSize controlSize)
{
return scrollbarWidth + scrollbarMargin;
}
-bool ScrollbarThemeOverlay::usesOverlayScrollbars() const
+bool ScrollbarThemeChromiumOverlay::usesOverlayScrollbars() const
{
return true;
}
-int ScrollbarThemeOverlay::thumbPosition(ScrollbarThemeClient* scrollbar)
+int ScrollbarThemeChromiumOverlay::thumbPosition(ScrollbarThemeClient* scrollbar)
{
if (!scrollbar->totalSize())
return 0;
@@ -60,7 +60,7 @@ int ScrollbarThemeOverlay::thumbPosition(ScrollbarThemeClient* scrollbar)
return round(proportion * trackLen);
}
-int ScrollbarThemeOverlay::thumbLength(ScrollbarThemeClient* scrollbar)
+int ScrollbarThemeChromiumOverlay::thumbLength(ScrollbarThemeClient* scrollbar)
{
int trackLen = trackLength(scrollbar);
@@ -73,22 +73,22 @@ int ScrollbarThemeOverlay::thumbLength(ScrollbarThemeClient* scrollbar)
return length;
}
-bool ScrollbarThemeOverlay::hasThumb(ScrollbarThemeClient* scrollbar)
+bool ScrollbarThemeChromiumOverlay::hasThumb(ScrollbarThemeClient* scrollbar)
{
return true;
}
-IntRect ScrollbarThemeOverlay::backButtonRect(ScrollbarThemeClient*, ScrollbarPart, bool)
+IntRect ScrollbarThemeChromiumOverlay::backButtonRect(ScrollbarThemeClient*, ScrollbarPart, bool)
{
return IntRect();
}
-IntRect ScrollbarThemeOverlay::forwardButtonRect(ScrollbarThemeClient*, ScrollbarPart, bool)
+IntRect ScrollbarThemeChromiumOverlay::forwardButtonRect(ScrollbarThemeClient*, ScrollbarPart, bool)
{
return IntRect();
}
-IntRect ScrollbarThemeOverlay::trackRect(ScrollbarThemeClient* scrollbar, bool)
+IntRect ScrollbarThemeChromiumOverlay::trackRect(ScrollbarThemeClient* scrollbar, bool)
{
IntRect rect = scrollbar->frameRect();
if (scrollbar->orientation() == HorizontalScrollbar)
@@ -98,7 +98,7 @@ IntRect ScrollbarThemeOverlay::trackRect(ScrollbarThemeClient* scrollbar, bool)
return rect;
}
-void ScrollbarThemeOverlay::paintThumb(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect)
+void ScrollbarThemeChromiumOverlay::paintThumb(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect)
{
IntRect thumbRect = rect;
if (scrollbar->orientation() == HorizontalScrollbar)
diff --git a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeOverlay.h b/chromium/third_party/WebKit/Source/core/platform/chromium/ScrollbarThemeChromiumOverlay.h
index 8a8595916d7..291ef8c9baa 100644
--- a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeOverlay.h
+++ b/chromium/third_party/WebKit/Source/core/platform/chromium/ScrollbarThemeChromiumOverlay.h
@@ -23,8 +23,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef ScrollbarThemeOverlay_h
-#define ScrollbarThemeOverlay_h
+#ifndef ScrollbarThemeChromiumOverlay_h
+#define ScrollbarThemeChromiumOverlay_h
#include "core/platform/ScrollbarTheme.h"
@@ -32,7 +32,7 @@ namespace WebCore {
// This scrollbar theme is used to get overlay scrollbar for platforms other
// than Mac. Mac's overlay scrollbars are in ScrollbarThemeMac*.
-class ScrollbarThemeOverlay : public ScrollbarTheme {
+class ScrollbarThemeChromiumOverlay : public ScrollbarTheme {
public:
virtual int scrollbarThickness(ScrollbarControlSize) OVERRIDE;
virtual bool usesOverlayScrollbars() const OVERRIDE;
diff --git a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeWin.cpp b/chromium/third_party/WebKit/Source/core/platform/chromium/ScrollbarThemeChromiumWin.cpp
index d8f51e4e4c0..a41c6b1f524 100644
--- a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeWin.cpp
+++ b/chromium/third_party/WebKit/Source/core/platform/chromium/ScrollbarThemeChromiumWin.cpp
@@ -25,7 +25,7 @@
*/
#include "config.h"
-#include "core/platform/ScrollbarThemeWin.h"
+#include "core/platform/chromium/ScrollbarThemeChromiumWin.h"
#include <windows.h>
#include <vsstyle.h>
@@ -38,27 +38,28 @@
#include "public/platform/Platform.h"
#include "public/platform/WebRect.h"
#include "public/platform/win/WebThemeEngine.h"
+
namespace WebCore {
ScrollbarTheme* ScrollbarTheme::nativeTheme()
{
- static ScrollbarThemeWin theme;
+ static ScrollbarThemeChromiumWin theme;
return &theme;
}
// The scrollbar size in DumpRenderTree on the Mac - so we can match their
-// layout results. Entries are for regular, small, and mini scrollbars.
+// layout results. Entries are for regular, small, and mini scrollbars.
// Metrics obtained using [NSScroller scrollerWidthForControlSize:]
static const int kMacScrollbarSize[3] = { 15, 11, 15 };
// Constants used to figure the drag rect outside which we should snap the
-// scrollbar thumb back to its origin. These calculations are based on
+// scrollbar thumb back to its origin. These calculations are based on
// observing the behavior of the MSVC8 main window scrollbar + some
// guessing/extrapolation.
static const int kOffEndMultiplier = 3;
static const int kOffSideMultiplier = 8;
-int ScrollbarThemeWin::scrollbarThickness(ScrollbarControlSize controlSize)
+int ScrollbarThemeChromiumWin::scrollbarThickness(ScrollbarControlSize controlSize)
{
static int thickness;
if (!thickness) {
@@ -69,12 +70,12 @@ int ScrollbarThemeWin::scrollbarThickness(ScrollbarControlSize controlSize)
return thickness;
}
-bool ScrollbarThemeWin::invalidateOnMouseEnterExit()
+bool ScrollbarThemeChromiumWin::invalidateOnMouseEnterExit()
{
return windowsVersion() >= WindowsVista;
}
-bool ScrollbarThemeWin::shouldSnapBackToDragOrigin(ScrollbarThemeClient* scrollbar, const PlatformMouseEvent& evt)
+bool ScrollbarThemeChromiumWin::shouldSnapBackToDragOrigin(ScrollbarThemeClient* scrollbar, const PlatformMouseEvent& evt)
{
// Find the rect within which we shouldn't snap, by expanding the track rect
// in both dimensions.
@@ -92,7 +93,7 @@ bool ScrollbarThemeWin::shouldSnapBackToDragOrigin(ScrollbarThemeClient* scrollb
return !rect.contains(mousePosition);
}
-void ScrollbarThemeWin::paintTrackPiece(GraphicsContext* gc, ScrollbarThemeClient* scrollbar, const IntRect& rect, ScrollbarPart partType)
+void ScrollbarThemeChromiumWin::paintTrackPiece(GraphicsContext* gc, ScrollbarThemeClient* scrollbar, const IntRect& rect, ScrollbarPart partType)
{
bool horz = scrollbar->orientation() == HorizontalScrollbar;
@@ -109,7 +110,7 @@ void ScrollbarThemeWin::paintTrackPiece(GraphicsContext* gc, ScrollbarThemeClien
WebKit::Platform::current()->themeEngine()->paintScrollbarTrack(canvas, partId, getThemeState(scrollbar, partType), getClassicThemeState(scrollbar, partType), WebKit::WebRect(rect), WebKit::WebRect(alignRect));
}
-void ScrollbarThemeWin::paintButton(GraphicsContext* gc, ScrollbarThemeClient* scrollbar, const IntRect& rect, ScrollbarPart part)
+void ScrollbarThemeChromiumWin::paintButton(GraphicsContext* gc, ScrollbarThemeClient* scrollbar, const IntRect& rect, ScrollbarPart part)
{
bool horz = scrollbar->orientation() == HorizontalScrollbar;
@@ -124,7 +125,7 @@ void ScrollbarThemeWin::paintButton(GraphicsContext* gc, ScrollbarThemeClient* s
WebKit::Platform::current()->themeEngine()->paintScrollbarArrow(canvas, getThemeArrowState(scrollbar, part), partId | getClassicThemeState(scrollbar, part), WebKit::WebRect(rect));
}
-void ScrollbarThemeWin::paintThumb(GraphicsContext* gc, ScrollbarThemeClient* scrollbar, const IntRect& rect)
+void ScrollbarThemeChromiumWin::paintThumb(GraphicsContext* gc, ScrollbarThemeClient* scrollbar, const IntRect& rect)
{
bool horz = scrollbar->orientation() == HorizontalScrollbar;
@@ -136,10 +137,10 @@ void ScrollbarThemeWin::paintThumb(GraphicsContext* gc, ScrollbarThemeClient* sc
WebKit::Platform::current()->themeEngine()->paintScrollbarThumb(canvas, horz ? SBP_GRIPPERHORZ : SBP_GRIPPERVERT, getThemeState(scrollbar, ThumbPart), getClassicThemeState(scrollbar, ThumbPart), WebKit::WebRect(rect));
}
-int ScrollbarThemeWin::getThemeState(ScrollbarThemeClient* scrollbar, ScrollbarPart part) const
+int ScrollbarThemeChromiumWin::getThemeState(ScrollbarThemeClient* scrollbar, ScrollbarPart part) const
{
// When dragging the thumb, draw thumb pressed and other segments normal
- // regardless of where the cursor actually is. See also four places in
+ // regardless of where the cursor actually is. See also four places in
// getThemeArrowState().
if (scrollbar->pressedPart() == ThumbPart) {
if (part == ThumbPart)
@@ -155,7 +156,7 @@ int ScrollbarThemeWin::getThemeState(ScrollbarThemeClient* scrollbar, ScrollbarP
return (scrollbar->pressedPart() == part) ? SCRBS_PRESSED : SCRBS_NORMAL;
}
-int ScrollbarThemeWin::getThemeArrowState(ScrollbarThemeClient* scrollbar, ScrollbarPart part) const
+int ScrollbarThemeChromiumWin::getThemeArrowState(ScrollbarThemeClient* scrollbar, ScrollbarPart part) const
{
// We could take advantage of knowing the values in the state enum to write
// some simpler code, but treating the state enum as a black box seems
@@ -205,7 +206,7 @@ int ScrollbarThemeWin::getThemeArrowState(ScrollbarThemeClient* scrollbar, Scrol
return (scrollbar->pressedPart() == part) ? ABS_DOWNPRESSED : ABS_DOWNNORMAL;
}
-int ScrollbarThemeWin::getClassicThemeState(ScrollbarThemeClient* scrollbar, ScrollbarPart part) const
+int ScrollbarThemeChromiumWin::getClassicThemeState(ScrollbarThemeClient* scrollbar, ScrollbarPart part) const
{
// When dragging the thumb, draw the buttons normal even when hovered.
if (scrollbar->pressedPart() == ThumbPart)
@@ -219,24 +220,24 @@ int ScrollbarThemeWin::getClassicThemeState(ScrollbarThemeClient* scrollbar, Scr
return (scrollbar->pressedPart() == part) ? (DFCS_PUSHED | DFCS_FLAT) : 0;
}
-bool ScrollbarThemeWin::shouldCenterOnThumb(ScrollbarThemeClient*, const PlatformMouseEvent& evt)
+bool ScrollbarThemeChromiumWin::shouldCenterOnThumb(ScrollbarThemeClient*, const PlatformMouseEvent& evt)
{
return evt.shiftKey() && evt.button() == LeftButton;
}
-IntSize ScrollbarThemeWin::buttonSize(ScrollbarThemeClient* scrollbar)
+IntSize ScrollbarThemeChromiumWin::buttonSize(ScrollbarThemeClient* scrollbar)
{
// Our desired rect is essentially thickness by thickness.
// Our actual rect will shrink to half the available space when we have < 2
- // times thickness pixels left. This allows the scrollbar to scale down
+ // times thickness pixels left. This allows the scrollbar to scale down
// and function even at tiny sizes.
int thickness = scrollbarThickness(scrollbar->controlSize());
// In layout test mode, we force the button "girth" (i.e., the length of
// the button along the axis of the scrollbar) to be a fixed size.
- // FIXME: This is retarded! scrollbarThickness is already fixed in layout
+ // FIXME: This is retarded! scrollbarThickness is already fixed in layout
// test mode so that should be enough to result in repeatable results, but
// preserving this hack avoids having to rebaseline pixel tests.
const int kLayoutTestModeGirth = 17;
diff --git a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeWin.h b/chromium/third_party/WebKit/Source/core/platform/chromium/ScrollbarThemeChromiumWin.h
index 5b5ee6e444a..ba8deafefb7 100644
--- a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeWin.h
+++ b/chromium/third_party/WebKit/Source/core/platform/chromium/ScrollbarThemeChromiumWin.h
@@ -28,14 +28,14 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef ScrollbarThemeWin_h
-#define ScrollbarThemeWin_h
+#ifndef ScrollbarThemeChromiumWin_h
+#define ScrollbarThemeChromiumWin_h
-#include "core/platform/ScrollbarThemeNonMacCommon.h"
+#include "core/platform/chromium/ScrollbarThemeChromium.h"
namespace WebCore {
-class ScrollbarThemeWin : public ScrollbarThemeNonMacCommon {
+class ScrollbarThemeChromiumWin : public ScrollbarThemeChromium {
public:
virtual int scrollbarThickness(ScrollbarControlSize) OVERRIDE;
virtual bool invalidateOnMouseEnterExit() OVERRIDE;
diff --git a/chromium/third_party/WebKit/Source/core/platform/graphics/GraphicsLayer.h b/chromium/third_party/WebKit/Source/core/platform/graphics/GraphicsLayer.h
index d9b111b499d..e4bb57822ba 100644
--- a/chromium/third_party/WebKit/Source/core/platform/graphics/GraphicsLayer.h
+++ b/chromium/third_party/WebKit/Source/core/platform/graphics/GraphicsLayer.h
@@ -71,7 +71,7 @@ class TimingFunction;
class AnimationValue {
WTF_MAKE_FAST_ALLOCATED;
public:
- explicit AnimationValue(double keyTime, PassRefPtr<TimingFunction> timingFunction = 0)
+ explicit AnimationValue(float keyTime, PassRefPtr<TimingFunction> timingFunction = 0)
: m_keyTime(keyTime)
, m_timingFunction(timingFunction)
{
@@ -79,12 +79,12 @@ public:
virtual ~AnimationValue() { }
- double keyTime() const { return m_keyTime; }
+ float keyTime() const { return m_keyTime; }
const TimingFunction* timingFunction() const { return m_timingFunction.get(); }
virtual PassOwnPtr<AnimationValue> clone() const = 0;
private:
- double m_keyTime;
+ float m_keyTime;
RefPtr<TimingFunction> m_timingFunction;
};
@@ -92,7 +92,7 @@ private:
// FIXME: Should be moved to its own header file.
class FloatAnimationValue : public AnimationValue {
public:
- FloatAnimationValue(double keyTime, float value, PassRefPtr<TimingFunction> timingFunction = 0)
+ FloatAnimationValue(float keyTime, float value, PassRefPtr<TimingFunction> timingFunction = 0)
: AnimationValue(keyTime, timingFunction)
, m_value(value)
{
@@ -109,7 +109,7 @@ private:
// FIXME: Should be moved to its own header file.
class TransformAnimationValue : public AnimationValue {
public:
- explicit TransformAnimationValue(double keyTime, const TransformOperations* value = 0, PassRefPtr<TimingFunction> timingFunction = 0)
+ explicit TransformAnimationValue(float keyTime, const TransformOperations* value = 0, PassRefPtr<TimingFunction> timingFunction = 0)
: AnimationValue(keyTime, timingFunction)
{
if (value)
@@ -127,7 +127,7 @@ private:
// FIXME: Should be moved to its own header file.
class FilterAnimationValue : public AnimationValue {
public:
- explicit FilterAnimationValue(double keyTime, const FilterOperations* value = 0, PassRefPtr<TimingFunction> timingFunction = 0)
+ explicit FilterAnimationValue(float keyTime, const FilterOperations* value = 0, PassRefPtr<TimingFunction> timingFunction = 0)
: AnimationValue(keyTime, timingFunction)
{
if (value)
diff --git a/chromium/third_party/WebKit/Source/core/platform/graphics/filters/FilterOperation.h b/chromium/third_party/WebKit/Source/core/platform/graphics/filters/FilterOperation.h
index 4e4a31a49c5..3473418b1ac 100644
--- a/chromium/third_party/WebKit/Source/core/platform/graphics/filters/FilterOperation.h
+++ b/chromium/third_party/WebKit/Source/core/platform/graphics/filters/FilterOperation.h
@@ -26,7 +26,7 @@
#ifndef FilterOperation_h
#define FilterOperation_h
-#include "core/fetch/DocumentResourceReference.h"
+#include "core/loader/cache/DocumentResourceReference.h"
#include "core/platform/Length.h"
#include "core/platform/graphics/Color.h"
#include "core/platform/graphics/filters/Filter.h"
diff --git a/chromium/third_party/WebKit/Source/core/platform/graphics/transforms/TransformOperations.cpp b/chromium/third_party/WebKit/Source/core/platform/graphics/transforms/TransformOperations.cpp
index 3ca3d7f462f..bcca50201e8 100644
--- a/chromium/third_party/WebKit/Source/core/platform/graphics/transforms/TransformOperations.cpp
+++ b/chromium/third_party/WebKit/Source/core/platform/graphics/transforms/TransformOperations.cpp
@@ -108,12 +108,4 @@ TransformOperations TransformOperations::blend(const TransformOperations& from,
return blendByUsingMatrixInterpolation(from, progress);
}
-TransformOperations TransformOperations::add(const TransformOperations& addend) const
-{
- TransformOperations result;
- result.m_operations = operations();
- result.m_operations.append(addend.operations());
- return result;
-}
-
} // namespace WebCore
diff --git a/chromium/third_party/WebKit/Source/core/platform/graphics/transforms/TransformOperations.h b/chromium/third_party/WebKit/Source/core/platform/graphics/transforms/TransformOperations.h
index 2f650126189..f40f77f3ce1 100644
--- a/chromium/third_party/WebKit/Source/core/platform/graphics/transforms/TransformOperations.h
+++ b/chromium/third_party/WebKit/Source/core/platform/graphics/transforms/TransformOperations.h
@@ -75,7 +75,6 @@ public:
TransformOperations blendByMatchingOperations(const TransformOperations& from, const double& progress) const;
TransformOperations blendByUsingMatrixInterpolation(const TransformOperations& from, double progress) const;
TransformOperations blend(const TransformOperations& from, double progress) const;
- TransformOperations add(const TransformOperations& addend) const;
private:
Vector<RefPtr<TransformOperation> > m_operations;
diff --git a/chromium/third_party/WebKit/Source/core/platform/mac/ScrollAnimatorMac.mm b/chromium/third_party/WebKit/Source/core/platform/mac/ScrollAnimatorMac.mm
index 9f4dda58b55..a92ab24b9cc 100644
--- a/chromium/third_party/WebKit/Source/core/platform/mac/ScrollAnimatorMac.mm
+++ b/chromium/third_party/WebKit/Source/core/platform/mac/ScrollAnimatorMac.mm
@@ -32,12 +32,12 @@
#include "core/platform/ScrollView.h"
#include "core/platform/ScrollableArea.h"
#include "core/platform/ScrollbarTheme.h"
-#include "core/platform/ScrollbarThemeMacCommon.h"
-#include "core/platform/ScrollbarThemeMacOverlayAPI.h"
#include "core/platform/graphics/FloatPoint.h"
#include "core/platform/mac/BlockExceptions.h"
#include "core/platform/mac/EmptyProtocolDefinitions.h"
#include "core/platform/mac/NSScrollerImpDetails.h"
+#include "core/platform/mac/ScrollbarThemeMac.h"
+#include "core/platform/mac/ScrollbarThemeMacOverlayAPI.h"
#include "wtf/MainThread.h"
#include "wtf/PassOwnPtr.h"
#include "wtf/UnusedParam.h"
diff --git a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeMacCommon.h b/chromium/third_party/WebKit/Source/core/platform/mac/ScrollbarThemeMac.h
index 8a62dd909d2..fac25ecaaf6 100644
--- a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeMacCommon.h
+++ b/chromium/third_party/WebKit/Source/core/platform/mac/ScrollbarThemeMac.h
@@ -23,8 +23,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef ScrollbarThemeMacCommon_h
-#define ScrollbarThemeMacCommon_h
+#ifndef ScrollbarThemeMac_h
+#define ScrollbarThemeMac_h
#include "core/platform/ScrollbarTheme.h"
@@ -63,4 +63,4 @@ protected:
}
-#endif // ScrollbarThemeMacCommon_h
+#endif
diff --git a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeMacCommon.mm b/chromium/third_party/WebKit/Source/core/platform/mac/ScrollbarThemeMac.mm
index 5577f9631bd..6b7975afda3 100644
--- a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeMacCommon.mm
+++ b/chromium/third_party/WebKit/Source/core/platform/mac/ScrollbarThemeMac.mm
@@ -20,18 +20,16 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
-#include "core/platform/ScrollbarThemeMacCommon.h"
+#include "core/platform/mac/ScrollbarThemeMac.h"
#include <Carbon/Carbon.h>
#include "core/page/FrameView.h"
#include "core/platform/PlatformMouseEvent.h"
#include "core/platform/ScrollView.h"
-#include "core/platform/ScrollbarThemeMacNonOverlayAPI.h"
-#include "core/platform/ScrollbarThemeMacOverlayAPI.h"
#include "core/platform/graphics/Gradient.h"
#include "core/platform/graphics/GraphicsContext.h"
#include "core/platform/graphics/GraphicsContextStateSaver.h"
@@ -41,6 +39,8 @@
#include "core/platform/mac/LocalCurrentGraphicsContext.h"
#include "core/platform/mac/NSScrollerImpDetails.h"
#include "core/platform/mac/ScrollAnimatorMac.h"
+#include "core/platform/mac/ScrollbarThemeMacNonOverlayAPI.h"
+#include "core/platform/mac/ScrollbarThemeMacOverlayAPI.h"
#include "public/platform/mac/WebThemeEngine.h"
#include "public/platform/Platform.h"
#include "public/platform/WebRect.h"
diff --git a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeMacNonOverlayAPI.h b/chromium/third_party/WebKit/Source/core/platform/mac/ScrollbarThemeMacNonOverlayAPI.h
index e51380059f4..28066053108 100644
--- a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeMacNonOverlayAPI.h
+++ b/chromium/third_party/WebKit/Source/core/platform/mac/ScrollbarThemeMacNonOverlayAPI.h
@@ -31,7 +31,7 @@
#ifndef ScrollbarThemeMacNonOverlayAPI_h
#define ScrollbarThemeMacNonOverlayAPI_h
-#include "core/platform/ScrollbarThemeMacCommon.h"
+#include "core/platform/mac/ScrollbarThemeMac.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeMacNonOverlayAPI.mm b/chromium/third_party/WebKit/Source/core/platform/mac/ScrollbarThemeMacNonOverlayAPI.mm
index dc8540053d9..62e2db5c1ef 100644
--- a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeMacNonOverlayAPI.mm
+++ b/chromium/third_party/WebKit/Source/core/platform/mac/ScrollbarThemeMacNonOverlayAPI.mm
@@ -29,7 +29,7 @@
*/
#include "config.h"
-#include "core/platform/ScrollbarThemeMacNonOverlayAPI.h"
+#include "core/platform/mac/ScrollbarThemeMacNonOverlayAPI.h"
#include <Carbon/Carbon.h>
#include "core/platform/ScrollbarThemeClient.h"
diff --git a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeMacOverlayAPI.h b/chromium/third_party/WebKit/Source/core/platform/mac/ScrollbarThemeMacOverlayAPI.h
index b0c5aef9eb7..f1712a0d144 100644
--- a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeMacOverlayAPI.h
+++ b/chromium/third_party/WebKit/Source/core/platform/mac/ScrollbarThemeMacOverlayAPI.h
@@ -31,7 +31,7 @@
#ifndef ScrollbarThemeMacOverlayAPI_h
#define ScrollbarThemeMacOverlayAPI_h
-#include "core/platform/ScrollbarThemeMacCommon.h"
+#include "core/platform/mac/ScrollbarThemeMac.h"
typedef id ScrollbarPainter;
diff --git a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeMacOverlayAPI.mm b/chromium/third_party/WebKit/Source/core/platform/mac/ScrollbarThemeMacOverlayAPI.mm
index cac425ed928..a0ad14f2474 100644
--- a/chromium/third_party/WebKit/Source/core/platform/ScrollbarThemeMacOverlayAPI.mm
+++ b/chromium/third_party/WebKit/Source/core/platform/mac/ScrollbarThemeMacOverlayAPI.mm
@@ -29,7 +29,7 @@
*/
#include "config.h"
-#include "core/platform/ScrollbarThemeMacOverlayAPI.h"
+#include "core/platform/mac/ScrollbarThemeMacOverlayAPI.h"
#include "core/platform/graphics/GraphicsContext.h"
#include "core/platform/graphics/GraphicsContextStateSaver.h"
diff --git a/chromium/third_party/WebKit/Source/core/rendering/FilterEffectRenderer.cpp b/chromium/third_party/WebKit/Source/core/rendering/FilterEffectRenderer.cpp
index f5787226fab..ea8f36eda58 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/FilterEffectRenderer.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/FilterEffectRenderer.cpp
@@ -29,8 +29,8 @@
#include "core/rendering/FilterEffectRenderer.h"
#include "core/dom/Document.h"
-#include "core/fetch/DocumentResource.h"
-#include "core/fetch/DocumentResourceReference.h"
+#include "core/loader/cache/DocumentResource.h"
+#include "core/loader/cache/DocumentResourceReference.h"
#include "core/page/Page.h"
#include "core/platform/FloatConversion.h"
#include "core/platform/graphics/ColorSpace.h"
diff --git a/chromium/third_party/WebKit/Source/core/rendering/HitTestLocation.cpp b/chromium/third_party/WebKit/Source/core/rendering/HitTestLocation.cpp
index d09665d7fea..96c55aec951 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/HitTestLocation.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/HitTestLocation.cpp
@@ -27,7 +27,6 @@
#include "XLinkNames.h"
#include "core/dom/DocumentMarkerController.h"
#include "core/editing/FrameSelection.h"
-#include "core/fetch/ImageResource.h"
#include "core/html/HTMLAnchorElement.h"
#include "core/html/HTMLImageElement.h"
#include "core/html/HTMLInputElement.h"
@@ -35,6 +34,7 @@
#include "core/html/HTMLPlugInImageElement.h"
#include "core/html/HTMLVideoElement.h"
#include "core/html/parser/HTMLParserIdioms.h"
+#include "core/loader/cache/ImageResource.h"
#include "core/page/Frame.h"
#include "core/page/FrameTree.h"
#include "core/platform/Scrollbar.h"
diff --git a/chromium/third_party/WebKit/Source/core/rendering/HitTestResult.cpp b/chromium/third_party/WebKit/Source/core/rendering/HitTestResult.cpp
index 58212803b40..393d2cb36dc 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/HitTestResult.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/HitTestResult.cpp
@@ -29,7 +29,6 @@
#include "core/dom/NodeRenderingTraversal.h"
#include "core/dom/shadow/ShadowRoot.h"
#include "core/editing/FrameSelection.h"
-#include "core/fetch/ImageResource.h"
#include "core/html/HTMLAnchorElement.h"
#include "core/html/HTMLAreaElement.h"
#include "core/html/HTMLImageElement.h"
@@ -38,6 +37,7 @@
#include "core/html/HTMLTextAreaElement.h"
#include "core/html/HTMLVideoElement.h"
#include "core/html/parser/HTMLParserIdioms.h"
+#include "core/loader/cache/ImageResource.h"
#include "core/page/Frame.h"
#include "core/page/FrameTree.h"
#include "core/platform/Scrollbar.h"
diff --git a/chromium/third_party/WebKit/Source/core/rendering/PaintInfo.h b/chromium/third_party/WebKit/Source/core/rendering/PaintInfo.h
index 4e348f22380..5ff00c5db8e 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/PaintInfo.h
+++ b/chromium/third_party/WebKit/Source/core/rendering/PaintInfo.h
@@ -61,7 +61,7 @@ struct PaintInfo {
, renderRegion(region)
, outlineObjects(newOutlineObjects)
, overlapTestRequests(overlapTestRequests)
- , m_paintContainer(newPaintContainer)
+ , paintContainer(newPaintContainer)
{
}
@@ -101,7 +101,6 @@ struct PaintInfo {
}
static IntRect infiniteRect() { return IntRect(LayoutRect::infiniteRect()); }
- const RenderLayerModelObject* paintContainer() const { return m_paintContainer; }
// FIXME: Introduce setters/getters at some point. Requires a lot of changes throughout rendering/.
GraphicsContext* context;
@@ -112,10 +111,7 @@ struct PaintInfo {
RenderRegion* renderRegion;
ListHashSet<RenderInline*>* outlineObjects; // used to list outlines that should be painted by a block with inline children
OverlapTestRequestMap* overlapTestRequests;
-
-private:
-
- const RenderLayerModelObject* m_paintContainer; // the layer object that originates the current painting
+ const RenderLayerModelObject* paintContainer; // the layer object that originates the current painting
};
} // namespace WebCore
diff --git a/chromium/third_party/WebKit/Source/core/rendering/RenderBlock.cpp b/chromium/third_party/WebKit/Source/core/rendering/RenderBlock.cpp
index e94a24f4835..d40b5f2007f 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/RenderBlock.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/RenderBlock.cpp
@@ -224,20 +224,18 @@ static void removeBlockFromDescendantAndContainerMaps(RenderBlock* block, Tracke
RenderBlock::~RenderBlock()
{
+ if (m_floatingObjects)
+ deleteAllValues(m_floatingObjects->set());
+
if (hasColumns())
gColumnInfoMap->take(this);
+
if (gPercentHeightDescendantsMap)
removeBlockFromDescendantAndContainerMaps(this, gPercentHeightDescendantsMap, gPercentHeightContainerMap);
if (gPositionedDescendantsMap)
removeBlockFromDescendantAndContainerMaps(this, gPositionedDescendantsMap, gPositionedContainerMap);
}
-RenderBlock::FloatingObjects::~FloatingObjects()
-{
- // FIXME: m_set should use OwnPtr instead.
- deleteAllValues(m_set);
-}
-
RenderBlock* RenderBlock::createAnonymous(Document* document)
{
RenderBlock* renderer = new RenderBlock(0);
@@ -970,20 +968,17 @@ static void getInlineRun(RenderObject* start, RenderObject* boundary,
} while (!sawInline);
}
-void RenderBlock::FloatingObjects::clearLineBoxTreePointers()
-{
- // Clear references to originating lines, since the lines are being deleted
- FloatingObjectSetIterator end = m_set.end();
- for (FloatingObjectSetIterator it = m_set.begin(); it != end; ++it) {
- ASSERT(!((*it)->originatingLine()) || (*it)->originatingLine()->renderer() == m_renderer);
- (*it)->setOriginatingLine(0);
- }
-}
-
void RenderBlock::deleteLineBoxTree()
{
- if (containsFloats())
- m_floatingObjects->clearLineBoxTreePointers();
+ if (containsFloats()) {
+ // Clear references to originating lines, since the lines are being deleted
+ const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
+ FloatingObjectSetIterator end = floatingObjectSet.end();
+ for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
+ ASSERT(!((*it)->m_originatingLine) || (*it)->m_originatingLine->renderer() == this);
+ (*it)->m_originatingLine = 0;
+ }
+ }
m_lineBoxes.deleteLineBoxTree();
if (AXObjectCache* cache = document()->existingAXObjectCache())
@@ -1420,21 +1415,6 @@ void RenderBlock::layout()
invalidateBackgroundObscurationStatus();
}
-void RenderBlock::imageChanged(WrappedImagePtr image, const IntRect*)
-{
- RenderBox::imageChanged(image);
-
- if (!parent())
- return;
-
- ShapeValue* shapeValue = style()->shapeInside();
- if (shapeValue && shapeValue->image() && shapeValue->image()->data() == image) {
- ShapeInsideInfo* shapeInsideInfo = ensureShapeInsideInfo();
- shapeInsideInfo->dirtyShapeSize();
- markShapeInsideDescendantsForLayout();
- }
-}
-
void RenderBlock::updateShapeInsideInfoAfterStyleChange(const ShapeValue* shapeInside, const ShapeValue* oldShapeInside)
{
// FIXME: A future optimization would do a deep comparison for equality.
@@ -1803,7 +1783,7 @@ void RenderBlock::addOverflowFromFloats()
for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
FloatingObject* r = *it;
if (r->isDescendant())
- addOverflowFromChild(r->renderer(), IntSize(xPositionForFloatIncludingMargin(r), yPositionForFloatIncludingMargin(r)));
+ addOverflowFromChild(r->m_renderer, IntSize(xPositionForFloatIncludingMargin(r), yPositionForFloatIncludingMargin(r)));
}
}
@@ -2733,11 +2713,6 @@ bool RenderBlock::simplifiedLayout()
if (needsSimplifiedNormalFlowLayout())
simplifiedNormalFlowLayout();
- // Make sure a forced break is applied after the content if we are a flow thread in a simplified layout.
- // This ensures the size information is correctly computed for the last auto-height region receiving content.
- if (isRenderFlowThread())
- toRenderFlowThread(this)->applyBreakAfterContent(clientLogicalBottom());
-
// Lay out our positioned objects if our positioned child bit is set.
// Also, if an absolute position element inside a relative positioned container moves, and the absolute element has a fixed position
// child, neither the fixed element nor its container learn of the movement since posChildNeedsLayout() is only marked as far as the
@@ -2902,11 +2877,9 @@ void RenderBlock::repaintOverhangingFloats(bool paintAllDescendants)
// Only repaint the object if it is overhanging, is not in its own layer, and
// is our responsibility to paint (m_shouldPaint is set). When paintAllDescendants is true, the latter
// condition is replaced with being a descendant of us.
- if (r->logicalBottom(isHorizontalWritingMode()) > logicalHeight()
- && !r->renderer()->hasSelfPaintingLayer()
- && (r->shouldPaint() || (paintAllDescendants && r->renderer()->isDescendantOf(this)))) {
- r->renderer()->repaint();
- r->renderer()->repaintOverhangingFloats(false);
+ if (logicalBottomForFloat(r) > logicalHeight() && ((paintAllDescendants && r->m_renderer->isDescendantOf(this)) || r->shouldPaint()) && !r->m_renderer->hasSelfPaintingLayer()) {
+ r->m_renderer->repaint();
+ r->m_renderer->repaintOverhangingFloats(false);
}
}
}
@@ -3267,21 +3240,20 @@ void RenderBlock::paintFloats(PaintInfo& paintInfo, const LayoutPoint& paintOffs
for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
FloatingObject* r = *it;
// Only paint the object if our m_shouldPaint flag is set.
- if (r->shouldPaint() && !r->renderer()->hasSelfPaintingLayer()) {
+ if (r->shouldPaint() && !r->m_renderer->hasSelfPaintingLayer()) {
PaintInfo currentPaintInfo(paintInfo);
currentPaintInfo.phase = preservePhase ? paintInfo.phase : PaintPhaseBlockBackground;
- // FIXME: LayoutPoint version of xPositionForFloatIncludingMargin would make this much cleaner.
- LayoutPoint childPoint = flipFloatForWritingModeForChild(r, LayoutPoint(paintOffset.x() + xPositionForFloatIncludingMargin(r) - r->renderer()->x(), paintOffset.y() + yPositionForFloatIncludingMargin(r) - r->renderer()->y()));
- r->renderer()->paint(currentPaintInfo, childPoint);
+ LayoutPoint childPoint = flipFloatForWritingModeForChild(r, LayoutPoint(paintOffset.x() + xPositionForFloatIncludingMargin(r) - r->m_renderer->x(), paintOffset.y() + yPositionForFloatIncludingMargin(r) - r->m_renderer->y()));
+ r->m_renderer->paint(currentPaintInfo, childPoint);
if (!preservePhase) {
currentPaintInfo.phase = PaintPhaseChildBlockBackgrounds;
- r->renderer()->paint(currentPaintInfo, childPoint);
+ r->m_renderer->paint(currentPaintInfo, childPoint);
currentPaintInfo.phase = PaintPhaseFloat;
- r->renderer()->paint(currentPaintInfo, childPoint);
+ r->m_renderer->paint(currentPaintInfo, childPoint);
currentPaintInfo.phase = PaintPhaseForeground;
- r->renderer()->paint(currentPaintInfo, childPoint);
+ r->m_renderer->paint(currentPaintInfo, childPoint);
currentPaintInfo.phase = PaintPhaseOutline;
- r->renderer()->paint(currentPaintInfo, childPoint);
+ r->m_renderer->paint(currentPaintInfo, childPoint);
}
}
}
@@ -3495,7 +3467,7 @@ GapRects RenderBlock::selectionGaps(RenderBlock* rootBlock, const LayoutPoint& r
FloatingObject* r = *it;
LayoutRect floatBox(offsetFromRootBlock.width() + xPositionForFloatIncludingMargin(r),
offsetFromRootBlock.height() + yPositionForFloatIncludingMargin(r),
- r->renderer()->width(), r->renderer()->height());
+ r->m_renderer->width(), r->m_renderer->height());
rootBlock->flipForWritingMode(floatBox);
floatBox.move(rootBlockPhysicalPosition.x(), rootBlockPhysicalPosition.y());
paintInfo->context->clipOut(pixelSnappedIntRect(floatBox));
@@ -3934,14 +3906,14 @@ RenderBlock::FloatingObject* RenderBlock::insertFloatingObject(RenderBox* o)
o->computeAndSetBlockDirectionMargins(this);
}
- newObj->setLogicalWidth(logicalWidthForChild(o) + marginStartForChild(o) + marginEndForChild(o), isHorizontalWritingMode());
+ setLogicalWidthForFloat(newObj, logicalWidthForChild(o) + marginStartForChild(o) + marginEndForChild(o));
if (ShapeOutsideInfo* shapeOutside = o->shapeOutsideInfo())
shapeOutside->setShapeSize(logicalWidthForChild(o), logicalHeightForChild(o));
newObj->setShouldPaint(!o->hasSelfPaintingLayer()); // If a layer exists, the float will paint itself. Otherwise someone else will.
newObj->setIsDescendant(true);
- newObj->setRenderer(o);
+ newObj->m_renderer = o;
m_floatingObjects->add(newObj);
@@ -3956,8 +3928,8 @@ void RenderBlock::removeFloatingObject(RenderBox* o)
if (it != floatingObjectSet.end()) {
FloatingObject* r = *it;
if (childrenInline()) {
- LayoutUnit logicalTop = r->logicalTop(isHorizontalWritingMode());
- LayoutUnit logicalBottom = r->logicalBottom(isHorizontalWritingMode());
+ LayoutUnit logicalTop = logicalTopForFloat(r);
+ LayoutUnit logicalBottom = logicalBottomForFloat(r);
// Fix for https://bugs.webkit.org/show_bug.cgi?id=54995.
if (logicalBottom < 0 || logicalBottom < logicalTop || logicalTop == LayoutUnit::max())
@@ -3968,19 +3940,19 @@ void RenderBlock::removeFloatingObject(RenderBox* o)
// accomplished by pretending they have a height of 1.
logicalBottom = max(logicalBottom, logicalTop + 1);
}
- if (r->originatingLine()) {
+ if (r->m_originatingLine) {
if (!selfNeedsLayout()) {
- ASSERT(r->originatingLine()->renderer() == this);
- r->originatingLine()->markDirty();
+ ASSERT(r->m_originatingLine->renderer() == this);
+ r->m_originatingLine->markDirty();
}
#if !ASSERT_DISABLED
- r->setOriginatingLine(0);
+ r->m_originatingLine = 0;
#endif
}
markLinesDirtyInBlockRange(0, logicalBottom);
}
m_floatingObjects->remove(r);
- ASSERT(!r->originatingLine());
+ ASSERT(!r->m_originatingLine);
delete r;
}
}
@@ -3993,9 +3965,9 @@ void RenderBlock::removeFloatingObjectsBelow(FloatingObject* lastFloat, int logi
const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
FloatingObject* curr = floatingObjectSet.last();
- while (curr != lastFloat && (!curr->isPlaced() || curr->logicalTop(isHorizontalWritingMode()) >= logicalOffset)) {
+ while (curr != lastFloat && (!curr->isPlaced() || logicalTopForFloat(curr) >= logicalOffset)) {
m_floatingObjects->remove(curr);
- ASSERT(!curr->originatingLine());
+ ASSERT(!curr->m_originatingLine);
delete curr;
if (floatingObjectSet.isEmpty())
break;
@@ -4021,7 +3993,7 @@ LayoutPoint RenderBlock::computeLogicalLocationForFloat(const FloatingObject* fl
} else
logicalRightOffset = logicalRightOffsetForContent(logicalTopOffset);
- LayoutUnit floatLogicalWidth = min(floatingObject->logicalWidth(isHorizontalWritingMode()), logicalRightOffset - logicalLeftOffset); // The width we look for.
+ LayoutUnit floatLogicalWidth = min(logicalWidthForFloat(floatingObject), logicalRightOffset - logicalLeftOffset); // The width we look for.
LayoutUnit floatLogicalLeft;
@@ -4038,7 +4010,7 @@ LayoutPoint RenderBlock::computeLogicalLocationForFloat(const FloatingObject* fl
// Have to re-evaluate all of our offsets, since they may have changed.
logicalRightOffset = logicalRightOffsetForContent(logicalTopOffset); // Constant part of right offset.
logicalLeftOffset = logicalLeftOffsetForContent(logicalTopOffset); // Constant part of left offset.
- floatLogicalWidth = min(floatingObject->logicalWidth(isHorizontalWritingMode()), logicalRightOffset - logicalLeftOffset);
+ floatLogicalWidth = min(logicalWidthForFloat(floatingObject), logicalRightOffset - logicalLeftOffset);
}
}
floatLogicalLeft = max(logicalLeftOffset - borderAndPaddingLogicalLeft(), floatLogicalLeft);
@@ -4053,10 +4025,10 @@ LayoutPoint RenderBlock::computeLogicalLocationForFloat(const FloatingObject* fl
// Have to re-evaluate all of our offsets, since they may have changed.
logicalRightOffset = logicalRightOffsetForContent(logicalTopOffset); // Constant part of right offset.
logicalLeftOffset = logicalLeftOffsetForContent(logicalTopOffset); // Constant part of left offset.
- floatLogicalWidth = min(floatingObject->logicalWidth(isHorizontalWritingMode()), logicalRightOffset - logicalLeftOffset);
+ floatLogicalWidth = min(logicalWidthForFloat(floatingObject), logicalRightOffset - logicalLeftOffset);
}
}
- floatLogicalLeft -= floatingObject->logicalWidth(isHorizontalWritingMode()); // Use the original width of the float here, since the local variable
+ floatLogicalLeft -= logicalWidthForFloat(floatingObject); // Use the original width of the float here, since the local variable
// |floatLogicalWidth| was capped to the available line width.
// See fast/block/float/clamped-right-float.html.
}
@@ -4097,7 +4069,7 @@ bool RenderBlock::positionNewFloats()
// The float cannot start above the top position of the last positioned float.
if (lastPlacedFloatingObject)
- logicalTop = max(lastPlacedFloatingObject->logicalTop(isHorizontalWritingMode()), logicalTop);
+ logicalTop = max(logicalTopForFloat(lastPlacedFloatingObject), logicalTop);
FloatingObjectSetIterator end = floatingObjectSet.end();
// Now walk through the set of unpositioned floats and place them.
@@ -4120,7 +4092,7 @@ bool RenderBlock::positionNewFloats()
LayoutPoint floatLogicalLocation = computeLogicalLocationForFloat(floatingObject, logicalTop);
- floatingObject->setLogicalLeft(floatLogicalLocation.x(), isHorizontalWritingMode());
+ setLogicalLeftForFloat(floatingObject, floatLogicalLocation.x());
setLogicalLeftForChild(childBox, floatLogicalLocation.x() + childLogicalLeftMargin);
setLogicalTopForChild(childBox, floatLogicalLocation.y() + marginBeforeForChild(childBox));
@@ -4147,10 +4119,10 @@ bool RenderBlock::positionNewFloats()
}
if (newLogicalTop != floatLogicalLocation.y()) {
- floatingObject->setPaginationStrut(newLogicalTop - floatLogicalLocation.y());
+ floatingObject->m_paginationStrut = newLogicalTop - floatLogicalLocation.y();
floatLogicalLocation = computeLogicalLocationForFloat(floatingObject, newLogicalTop);
- floatingObject->setLogicalLeft(floatLogicalLocation.x(), isHorizontalWritingMode());
+ setLogicalLeftForFloat(floatingObject, floatLogicalLocation.x());
setLogicalLeftForChild(childBox, floatLogicalLocation.x() + childLogicalLeftMargin);
setLogicalTopForChild(childBox, floatLogicalLocation.y() + marginBeforeForChild(childBox));
@@ -4161,9 +4133,9 @@ bool RenderBlock::positionNewFloats()
}
}
- floatingObject->setLogicalTop(floatLogicalLocation.y(), isHorizontalWritingMode());
+ setLogicalTopForFloat(floatingObject, floatLogicalLocation.y());
- floatingObject->setLogicalHeight(logicalHeightForChild(childBox) + marginBeforeForChild(childBox) + marginAfterForChild(childBox), isHorizontalWritingMode());
+ setLogicalHeightForFloat(floatingObject, logicalHeightForChild(childBox) + marginBeforeForChild(childBox) + marginAfterForChild(childBox));
m_floatingObjects->addPlacedObject(floatingObject);
@@ -4254,7 +4226,7 @@ void RenderBlock::clearPercentHeightDescendantsFrom(RenderBox* parent)
}
}
-inline static bool rangesIntersect(int floatTop, int floatBottom, int objectTop, int objectBottom)
+static bool rangesIntersect(int floatTop, int floatBottom, int objectTop, int objectBottom)
{
if (objectTop >= floatBottom || objectBottom < floatTop)
return false;
@@ -4275,48 +4247,41 @@ inline static bool rangesIntersect(int floatTop, int floatBottom, int objectTop,
}
template<>
-inline bool RenderBlock::ComputeFloatOffsetAdapter<RenderBlock::FloatingObject::FloatLeft>::updateOffsetIfNeeded(const FloatingObject* floatingObject)
+bool RenderBlock::FloatIntervalSearchAdapter<RenderBlock::FloatingObject::FloatLeft>::updateOffsetIfNeeded(const FloatingObject* floatingObject) const
{
- LayoutUnit logicalRight = floatingObject->logicalRight(m_renderer->isHorizontalWritingMode());
- if (logicalRight > m_offset) {
- m_offset = logicalRight;
+ if (m_renderer->logicalRightForFloat(floatingObject) > m_offset) {
+ m_offset = m_renderer->logicalRightForFloat(floatingObject);
return true;
}
return false;
}
template<>
-inline bool RenderBlock::ComputeFloatOffsetAdapter<RenderBlock::FloatingObject::FloatRight>::updateOffsetIfNeeded(const FloatingObject* floatingObject)
+bool RenderBlock::FloatIntervalSearchAdapter<RenderBlock::FloatingObject::FloatRight>::updateOffsetIfNeeded(const FloatingObject* floatingObject) const
{
- LayoutUnit logicalLeft = floatingObject->logicalLeft(m_renderer->isHorizontalWritingMode());
- if (logicalLeft < m_offset) {
- m_offset = logicalLeft;
+ if (m_renderer->logicalLeftForFloat(floatingObject) < m_offset) {
+ m_offset = m_renderer->logicalLeftForFloat(floatingObject);
return true;
}
return false;
}
template <RenderBlock::FloatingObject::Type FloatTypeValue>
-inline void RenderBlock::ComputeFloatOffsetAdapter<FloatTypeValue>::collectIfNeeded(const IntervalType& interval)
+inline void RenderBlock::FloatIntervalSearchAdapter<FloatTypeValue>::collectIfNeeded(const IntervalType& interval) const
{
const FloatingObject* floatingObject = interval.data();
- if (floatingObject->type() != FloatTypeValue || !rangesIntersect(interval.low(), interval.high(), m_lineTop, m_lineBottom))
+ if (floatingObject->type() != FloatTypeValue || !rangesIntersect(interval.low(), interval.high(), m_lowValue, m_highValue))
return;
- // Make sure the float hasn't changed since it was added to the placed floats tree.
+ // All the objects returned from the tree should be already placed.
ASSERT(floatingObject->isPlaced());
- ASSERT(interval.low() == floatingObject->pixelSnappedLogicalTop(m_renderer->isHorizontalWritingMode()));
- ASSERT(interval.high() == floatingObject->pixelSnappedLogicalBottom(m_renderer->isHorizontalWritingMode()));
+ ASSERT(rangesIntersect(m_renderer->pixelSnappedLogicalTopForFloat(floatingObject), m_renderer->pixelSnappedLogicalBottomForFloat(floatingObject), m_lowValue, m_highValue));
bool floatIsNewExtreme = updateOffsetIfNeeded(floatingObject);
- if (floatIsNewExtreme)
- m_outermostFloat = floatingObject;
-}
+ if (floatIsNewExtreme && m_heightRemaining)
+ *m_heightRemaining = m_renderer->logicalBottomForFloat(floatingObject) - m_lowValue;
-template <RenderBlock::FloatingObject::Type FloatTypeValue>
-LayoutUnit RenderBlock::ComputeFloatOffsetAdapter<FloatTypeValue>::getHeightRemaining() const
-{
- return m_outermostFloat ? m_outermostFloat->logicalBottom(m_renderer->isHorizontalWritingMode()) - m_lineTop : LayoutUnit(1);
+ m_last = floatingObject;
}
LayoutUnit RenderBlock::textIndentOffset() const
@@ -4353,16 +4318,16 @@ LayoutUnit RenderBlock::logicalLeftFloatOffsetForLine(LayoutUnit logicalTop, Lay
{
LayoutUnit left = fixedOffset;
if (m_floatingObjects && m_floatingObjects->hasLeftObjects()) {
- ComputeFloatOffsetAdapter<FloatingObject::FloatLeft> adapter(this, roundToInt(logicalTop), roundToInt(logicalTop + logicalHeight), left);
- m_floatingObjects->placedFloatsTree().allOverlapsWithAdapter(adapter);
-
if (heightRemaining)
- *heightRemaining = adapter.getHeightRemaining();
+ *heightRemaining = 1;
+
+ FloatIntervalSearchAdapter<FloatingObject::FloatLeft> adapter(this, roundToInt(logicalTop), roundToInt(logicalTop + logicalHeight), left, heightRemaining);
+ m_floatingObjects->placedFloatsTree().allOverlapsWithAdapter(adapter);
- const FloatingObject* outermostFloat = adapter.outermostFloat();
- if (offsetMode == ShapeOutsideFloatShapeOffset && outermostFloat) {
- if (ShapeOutsideInfo* shapeOutside = outermostFloat->renderer()->shapeOutsideInfo()) {
- shapeOutside->computeSegmentsForContainingBlockLine(logicalTop, outermostFloat->logicalTop(isHorizontalWritingMode()), logicalHeight);
+ const FloatingObject* lastFloat = adapter.lastFloat();
+ if (offsetMode == ShapeOutsideFloatShapeOffset && lastFloat) {
+ if (ShapeOutsideInfo* shapeOutside = lastFloat->renderer()->shapeOutsideInfo()) {
+ shapeOutside->computeSegmentsForContainingBlockLine(logicalTop, logicalTopForFloat(lastFloat), logicalHeight);
left += shapeOutside->rightSegmentMarginBoxDelta();
}
}
@@ -4413,17 +4378,17 @@ LayoutUnit RenderBlock::logicalRightFloatOffsetForLine(LayoutUnit logicalTop, La
{
LayoutUnit right = fixedOffset;
if (m_floatingObjects && m_floatingObjects->hasRightObjects()) {
+ if (heightRemaining)
+ *heightRemaining = 1;
+
LayoutUnit rightFloatOffset = fixedOffset;
- ComputeFloatOffsetAdapter<FloatingObject::FloatRight> adapter(this, roundToInt(logicalTop), roundToInt(logicalTop + logicalHeight), rightFloatOffset);
+ FloatIntervalSearchAdapter<FloatingObject::FloatRight> adapter(this, roundToInt(logicalTop), roundToInt(logicalTop + logicalHeight), rightFloatOffset, heightRemaining);
m_floatingObjects->placedFloatsTree().allOverlapsWithAdapter(adapter);
- if (heightRemaining)
- *heightRemaining = adapter.getHeightRemaining();
-
- const FloatingObject* outermostFloat = adapter.outermostFloat();
- if (offsetMode == ShapeOutsideFloatShapeOffset && outermostFloat) {
- if (ShapeOutsideInfo* shapeOutside = outermostFloat->renderer()->shapeOutsideInfo()) {
- shapeOutside->computeSegmentsForContainingBlockLine(logicalTop, outermostFloat->logicalTop(isHorizontalWritingMode()), logicalHeight);
+ const FloatingObject* lastFloat = adapter.lastFloat();
+ if (offsetMode == ShapeOutsideFloatShapeOffset && lastFloat) {
+ if (ShapeOutsideInfo* shapeOutside = lastFloat->renderer()->shapeOutsideInfo()) {
+ shapeOutside->computeSegmentsForContainingBlockLine(logicalTop, logicalTopForFloat(lastFloat), logicalHeight);
rightFloatOffset += shapeOutside->leftSegmentMarginBoxDelta();
}
}
@@ -4481,7 +4446,7 @@ LayoutUnit RenderBlock::nextFloatLogicalBottomBelow(LayoutUnit logicalHeight) co
FloatingObjectSetIterator end = floatingObjectSet.end();
for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
FloatingObject* r = *it;
- LayoutUnit floatBottom = r->logicalBottom(isHorizontalWritingMode());
+ LayoutUnit floatBottom = logicalBottomForFloat(r);
if (floatBottom > logicalHeight)
bottom = min(floatBottom, bottom);
}
@@ -4499,7 +4464,7 @@ LayoutUnit RenderBlock::lowestFloatLogicalBottom(FloatingObject::Type floatType)
for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
FloatingObject* r = *it;
if (r->isPlaced() && r->type() & floatType)
- lowestFloatBottom = max(lowestFloatBottom, r->logicalBottom(isHorizontalWritingMode()));
+ lowestFloatBottom = max(lowestFloatBottom, logicalBottomForFloat(r));
}
return lowestFloatBottom;
}
@@ -4534,7 +4499,7 @@ void RenderBlock::clearFloats()
for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
FloatingObject* floatingObject = *it;
if (!floatingObject->isDescendant())
- oldIntrudingFloatSet.add(floatingObject->renderer());
+ oldIntrudingFloatSet.add(floatingObject->m_renderer);
}
}
@@ -4558,7 +4523,7 @@ void RenderBlock::clearFloats()
FloatingObjectSetIterator end = floatingObjectSet.end();
for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
FloatingObject* f = *it;
- floatMap.add(f->renderer(), f);
+ floatMap.add(f->m_renderer, f);
}
} else {
deleteAllValues(floatingObjectSet);
@@ -4610,11 +4575,11 @@ void RenderBlock::clearFloats()
FloatingObjectSetIterator end = floatingObjectSet.end();
for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
FloatingObject* f = *it;
- FloatingObject* oldFloatingObject = floatMap.get(f->renderer());
- LayoutUnit logicalBottom = f->logicalBottom(isHorizontalWritingMode());
+ FloatingObject* oldFloatingObject = floatMap.get(f->m_renderer);
+ LayoutUnit logicalBottom = logicalBottomForFloat(f);
if (oldFloatingObject) {
- LayoutUnit oldLogicalBottom = oldFloatingObject->logicalBottom(isHorizontalWritingMode());
- if (f->logicalWidth(isHorizontalWritingMode()) != oldFloatingObject->logicalWidth(isHorizontalWritingMode()) || f->logicalLeft(isHorizontalWritingMode()) != oldFloatingObject->logicalLeft(isHorizontalWritingMode())) {
+ LayoutUnit oldLogicalBottom = logicalBottomForFloat(oldFloatingObject);
+ if (logicalWidthForFloat(f) != logicalWidthForFloat(oldFloatingObject) || logicalLeftForFloat(f) != logicalLeftForFloat(oldFloatingObject)) {
changeLogicalTop = 0;
changeLogicalBottom = max(changeLogicalBottom, max(logicalBottom, oldLogicalBottom));
} else {
@@ -4622,18 +4587,18 @@ void RenderBlock::clearFloats()
changeLogicalTop = min(changeLogicalTop, min(logicalBottom, oldLogicalBottom));
changeLogicalBottom = max(changeLogicalBottom, max(logicalBottom, oldLogicalBottom));
}
- LayoutUnit logicalTop = f->logicalTop(isHorizontalWritingMode());
- LayoutUnit oldLogicalTop = oldFloatingObject->logicalTop(isHorizontalWritingMode());
+ LayoutUnit logicalTop = logicalTopForFloat(f);
+ LayoutUnit oldLogicalTop = logicalTopForFloat(oldFloatingObject);
if (logicalTop != oldLogicalTop) {
changeLogicalTop = min(changeLogicalTop, min(logicalTop, oldLogicalTop));
changeLogicalBottom = max(changeLogicalBottom, max(logicalTop, oldLogicalTop));
}
}
- floatMap.remove(f->renderer());
- if (oldFloatingObject->originatingLine() && !selfNeedsLayout()) {
- ASSERT(oldFloatingObject->originatingLine()->renderer() == this);
- oldFloatingObject->originatingLine()->markDirty();
+ floatMap.remove(f->m_renderer);
+ if (oldFloatingObject->m_originatingLine && !selfNeedsLayout()) {
+ ASSERT(oldFloatingObject->m_originatingLine->renderer() == this);
+ oldFloatingObject->m_originatingLine->markDirty();
}
delete oldFloatingObject;
} else {
@@ -4648,7 +4613,7 @@ void RenderBlock::clearFloats()
FloatingObject* floatingObject = (*it).value;
if (!floatingObject->isDescendant()) {
changeLogicalTop = 0;
- changeLogicalBottom = max(changeLogicalBottom, floatingObject->logicalBottom(isHorizontalWritingMode()));
+ changeLogicalBottom = max(changeLogicalBottom, logicalBottomForFloat(floatingObject));
}
}
deleteAllValues(floatMap);
@@ -4663,7 +4628,7 @@ void RenderBlock::clearFloats()
const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
FloatingObjectSetIterator end = floatingObjectSet.end();
for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end && !oldIntrudingFloatSet.isEmpty(); ++it)
- oldIntrudingFloatSet.remove((*it)->renderer());
+ oldIntrudingFloatSet.remove((*it)->m_renderer);
if (!oldIntrudingFloatSet.isEmpty())
markAllDescendantsWithFloatsForLayout();
}
@@ -4685,22 +4650,22 @@ LayoutUnit RenderBlock::addOverhangingFloats(RenderBlock* child, bool makeChildP
FloatingObjectSetIterator childEnd = child->m_floatingObjects->set().end();
for (FloatingObjectSetIterator childIt = child->m_floatingObjects->set().begin(); childIt != childEnd; ++childIt) {
FloatingObject* r = *childIt;
- LayoutUnit logicalBottomForFloat = min(r->logicalBottom(isHorizontalWritingMode()), LayoutUnit::max() - childLogicalTop);
+ LayoutUnit logicalBottomForFloat = min(this->logicalBottomForFloat(r), LayoutUnit::max() - childLogicalTop);
LayoutUnit logicalBottom = childLogicalTop + logicalBottomForFloat;
lowestFloatLogicalBottom = max(lowestFloatLogicalBottom, logicalBottom);
if (logicalBottom > logicalHeight()) {
// If the object is not in the list, we add it now.
- if (!containsFloat(r->renderer())) {
+ if (!containsFloat(r->m_renderer)) {
LayoutSize offset = isHorizontalWritingMode() ? LayoutSize(-childLogicalLeft, -childLogicalTop) : LayoutSize(-childLogicalTop, -childLogicalLeft);
FloatingObject* floatingObj = new FloatingObject(r->type(), LayoutRect(r->frameRect().location() - offset, r->frameRect().size()));
- floatingObj->setRenderer(r->renderer());
+ floatingObj->m_renderer = r->m_renderer;
// The nearest enclosing layer always paints the float (so that zindex and stacking
// behaves properly). We always want to propagate the desire to paint the float as
// far out as we can, to the outermost block that overlaps the float, stopping only
// if we hit a self-painting layer boundary.
- if (r->renderer()->enclosingFloatPaintingLayer() == enclosingFloatPaintingLayer())
+ if (r->m_renderer->enclosingFloatPaintingLayer() == enclosingFloatPaintingLayer())
r->setShouldPaint(false);
else
floatingObj->setShouldPaint(false);
@@ -4713,8 +4678,8 @@ LayoutUnit RenderBlock::addOverhangingFloats(RenderBlock* child, bool makeChildP
m_floatingObjects->add(floatingObj);
}
} else {
- if (makeChildPaintOtherFloats && !r->shouldPaint() && !r->renderer()->hasSelfPaintingLayer()
- && r->renderer()->isDescendantOf(child) && r->renderer()->enclosingFloatPaintingLayer() == child->enclosingFloatPaintingLayer()) {
+ if (makeChildPaintOtherFloats && !r->shouldPaint() && !r->m_renderer->hasSelfPaintingLayer()
+ && r->m_renderer->isDescendantOf(child) && r->m_renderer->enclosingFloatPaintingLayer() == child->enclosingFloatPaintingLayer()) {
// The float is not overhanging from this block, so if it is a descendant of the child, the child should
// paint it (the other case is that it is intruding into the child), unless it has its own layer or enclosing
// layer.
@@ -4726,7 +4691,7 @@ LayoutUnit RenderBlock::addOverhangingFloats(RenderBlock* child, bool makeChildP
// Since the float doesn't overhang, it didn't get put into our list. We need to go ahead and add its overflow in to the
// child now.
if (r->isDescendant())
- child->addOverflowFromChild(r->renderer(), LayoutSize(xPositionForFloatIncludingMargin(r), yPositionForFloatIncludingMargin(r)));
+ child->addOverflowFromChild(r->m_renderer, LayoutSize(xPositionForFloatIncludingMargin(r), yPositionForFloatIncludingMargin(r)));
}
}
return lowestFloatLogicalBottom;
@@ -4742,7 +4707,7 @@ bool RenderBlock::hasOverhangingFloat(RenderBox* renderer)
if (it == floatingObjectSet.end())
return false;
- return (*it)->logicalBottom(isHorizontalWritingMode()) > logicalHeight();
+ return logicalBottomForFloat(*it) > logicalHeight();
}
void RenderBlock::addIntrudingFloats(RenderBlock* prev, LayoutUnit logicalLeftOffset, LayoutUnit logicalTopOffset)
@@ -4759,7 +4724,7 @@ void RenderBlock::addIntrudingFloats(RenderBlock* prev, LayoutUnit logicalLeftOf
FloatingObjectSetIterator prevEnd = prevSet.end();
for (FloatingObjectSetIterator prevIt = prevSet.begin(); prevIt != prevEnd; ++prevIt) {
FloatingObject* r = *prevIt;
- if (r->logicalBottom(isHorizontalWritingMode()) > logicalTopOffset) {
+ if (logicalBottomForFloat(r) > logicalTopOffset) {
if (!m_floatingObjects || !m_floatingObjects->set().contains(r)) {
LayoutSize offset = isHorizontalWritingMode() ? LayoutSize(logicalLeftOffset, logicalTopOffset) : LayoutSize(logicalTopOffset, logicalLeftOffset);
FloatingObject* floatingObj = new FloatingObject(r->type(), LayoutRect(r->frameRect().location() - offset, r->frameRect().size()));
@@ -4777,7 +4742,7 @@ void RenderBlock::addIntrudingFloats(RenderBlock* prev, LayoutUnit logicalLeftOf
}
floatingObj->setShouldPaint(false); // We are not in the direct inheritance chain for this float. We will never paint it.
- floatingObj->setRenderer(r->renderer());
+ floatingObj->m_renderer = r->m_renderer;
// We create the floating object list lazily.
if (!m_floatingObjects)
@@ -5031,11 +4996,11 @@ bool RenderBlock::hitTestFloats(const HitTestRequest& request, HitTestResult& re
for (FloatingObjectSetIterator it = floatingObjectSet.end(); it != begin;) {
--it;
FloatingObject* floatingObject = *it;
- if (floatingObject->shouldPaint() && !floatingObject->renderer()->hasSelfPaintingLayer()) {
- LayoutUnit xOffset = xPositionForFloatIncludingMargin(floatingObject) - floatingObject->renderer()->x();
- LayoutUnit yOffset = yPositionForFloatIncludingMargin(floatingObject) - floatingObject->renderer()->y();
+ if (floatingObject->shouldPaint() && !floatingObject->m_renderer->hasSelfPaintingLayer()) {
+ LayoutUnit xOffset = xPositionForFloatIncludingMargin(floatingObject) - floatingObject->m_renderer->x();
+ LayoutUnit yOffset = yPositionForFloatIncludingMargin(floatingObject) - floatingObject->m_renderer->y();
LayoutPoint childPoint = flipFloatForWritingModeForChild(floatingObject, adjustedLocation + LayoutSize(xOffset, yOffset));
- if (floatingObject->renderer()->hitTest(request, result, locationInContainer, childPoint)) {
+ if (floatingObject->m_renderer->hitTest(request, result, locationInContainer, childPoint)) {
updateHitTestResult(result, locationInContainer.point() - toLayoutSize(childPoint));
return true;
}
@@ -6926,8 +6891,8 @@ void RenderBlock::adjustForBorderFit(LayoutUnit x, LayoutUnit& left, LayoutUnit&
FloatingObject* r = *it;
// Only examine the object if our m_shouldPaint flag is set.
if (r->shouldPaint()) {
- LayoutUnit floatLeft = xPositionForFloatIncludingMargin(r) - r->renderer()->x();
- LayoutUnit floatRight = floatLeft + r->renderer()->width();
+ LayoutUnit floatLeft = xPositionForFloatIncludingMargin(r) - r->m_renderer->x();
+ LayoutUnit floatRight = floatLeft + r->m_renderer->width();
left = min(left, floatLeft);
right = max(right, floatRight);
}
@@ -7695,7 +7660,7 @@ LayoutUnit RenderBlock::offsetFromLogicalTopOfFirstPage() const
// FIXME: Sanity check that the renderer in the layout state is ours, since otherwise the computation will be off.
// Right now this assert gets hit inside computeLogicalHeight for percentage margins, since they're computed using
// widths which can vary in each region. Until we patch that, we can't have this assert.
- // ASSERT(layoutState->renderer() == this);
+ // ASSERT(layoutState->m_renderer == this);
LayoutSize offsetDelta = layoutState->m_layoutOffset - layoutState->m_pageOffset;
return isHorizontalWritingMode() ? offsetDelta.height() : offsetDelta.width();
@@ -7967,9 +7932,6 @@ void RenderBlock::createFloatingObjects()
inline void RenderBlock::FloatingObjects::clear()
{
- // FIXME: This should call deleteAllValues, except RenderBlock::clearFloats
- // like to play fast and loose with ownership of these pointers.
- // If we move to OwnPtr that will fix this ownership oddness.
m_set.clear();
m_placedFloatsTree.clear();
m_leftObjectsCount = 0;
diff --git a/chromium/third_party/WebKit/Source/core/rendering/RenderBlock.h b/chromium/third_party/WebKit/Source/core/rendering/RenderBlock.h
index f124d9dac70..06300e892bb 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/RenderBlock.h
+++ b/chromium/third_party/WebKit/Source/core/rendering/RenderBlock.h
@@ -455,7 +455,6 @@ public:
}
ShapeInsideInfo* layoutShapeInsideInfo() const;
bool allowsShapeInsideInfoSharing() const { return !isInline() && !isFloating(); }
- virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) OVERRIDE;
protected:
virtual void willBeDestroyed();
@@ -655,7 +654,7 @@ private:
bool everHadLayout;
};
- class FloatingObject {
+ struct FloatingObject {
WTF_MAKE_NONCOPYABLE(FloatingObject); WTF_MAKE_FAST_ALLOCATED;
public:
// Note that Type uses bits so you can use FloatLeftRight as a mask to query for both left and right.
@@ -712,12 +711,12 @@ private:
bool isPlaced() const { return m_isPlaced; }
void setIsPlaced(bool placed = true) { m_isPlaced = placed; }
- LayoutUnit x() const { ASSERT(isPlaced()); return m_frameRect.x(); }
- LayoutUnit maxX() const { ASSERT(isPlaced()); return m_frameRect.maxX(); }
- LayoutUnit y() const { ASSERT(isPlaced()); return m_frameRect.y(); }
- LayoutUnit maxY() const { ASSERT(isPlaced()); return m_frameRect.maxY(); }
- LayoutUnit width() const { return m_frameRect.width(); }
- LayoutUnit height() const { return m_frameRect.height(); }
+ inline LayoutUnit x() const { ASSERT(isPlaced()); return m_frameRect.x(); }
+ inline LayoutUnit maxX() const { ASSERT(isPlaced()); return m_frameRect.maxX(); }
+ inline LayoutUnit y() const { ASSERT(isPlaced()); return m_frameRect.y(); }
+ inline LayoutUnit maxY() const { ASSERT(isPlaced()); return m_frameRect.maxY(); }
+ inline LayoutUnit width() const { return m_frameRect.width(); }
+ inline LayoutUnit height() const { return m_frameRect.height(); }
void setX(LayoutUnit x) { ASSERT(!isInPlacedTree()); m_frameRect.setX(x); }
void setY(LayoutUnit y) { ASSERT(!isInPlacedTree()); m_frameRect.setY(y); }
@@ -727,9 +726,6 @@ private:
const LayoutRect& frameRect() const { ASSERT(isPlaced()); return m_frameRect; }
void setFrameRect(const LayoutRect& frameRect) { ASSERT(!isInPlacedTree()); m_frameRect = frameRect; }
- int paginationStrut() const { return m_paginationStrut; }
- void setPaginationStrut(int strut) { m_paginationStrut = strut; }
-
#ifndef NDEBUG
bool isInPlacedTree() const { return m_isInPlacedTree; }
void setIsInPlacedTree(bool value) { m_isInPlacedTree = value; }
@@ -740,57 +736,12 @@ private:
bool isDescendant() const { return m_isDescendant; }
void setIsDescendant(bool isDescendant) { m_isDescendant = isDescendant; }
- // FIXME: Callers of these methods are dangerous and should be whitelisted explicitly or removed.
- void setRenderer(RenderBox* renderer) { m_renderer = renderer; }
- RootInlineBox* originatingLine() const { return m_originatingLine; }
- void setOriginatingLine(RootInlineBox* line) { m_originatingLine = line; }
-
- LayoutUnit logicalTop(bool isHorizontalWritingMode) const { return isHorizontalWritingMode ? y() : x(); }
- LayoutUnit logicalBottom(bool isHorizontalWritingMode) const { return isHorizontalWritingMode ? maxY() : maxX(); }
- LayoutUnit logicalLeft(bool isHorizontalWritingMode) const { return isHorizontalWritingMode ? x() : y(); }
- LayoutUnit logicalRight(bool isHorizontalWritingMode) const { return isHorizontalWritingMode ? maxX() : maxY(); }
- LayoutUnit logicalWidth(bool isHorizontalWritingMode) const { return isHorizontalWritingMode ? width() : height(); }
-
- int pixelSnappedLogicalTop(bool isHorizontalWritingMode) const { return isHorizontalWritingMode ? frameRect().pixelSnappedY() : frameRect().pixelSnappedX(); }
- int pixelSnappedLogicalBottom(bool isHorizontalWritingMode) const { return isHorizontalWritingMode ? frameRect().pixelSnappedMaxY() : frameRect().pixelSnappedMaxX(); }
- int pixelSnappedLogicalLeft(bool isHorizontalWritingMode) const { return isHorizontalWritingMode ? frameRect().pixelSnappedX() : frameRect().pixelSnappedY(); }
- int pixelSnappedLogicalRight(bool isHorizontalWritingMode) const { return isHorizontalWritingMode ? frameRect().pixelSnappedMaxX() : frameRect().pixelSnappedMaxY(); }
-
- void setLogicalTop(LayoutUnit logicalTop, bool isHorizontalWritingMode)
- {
- if (isHorizontalWritingMode)
- setY(logicalTop);
- else
- setX(logicalTop);
- }
- void setLogicalLeft(LayoutUnit logicalLeft, bool isHorizontalWritingMode)
- {
- if (isHorizontalWritingMode)
- setX(logicalLeft);
- else
- setY(logicalLeft);
- }
- void setLogicalHeight(LayoutUnit logicalHeight, bool isHorizontalWritingMode)
- {
- if (isHorizontalWritingMode)
- setHeight(logicalHeight);
- else
- setWidth(logicalHeight);
- }
- void setLogicalWidth(LayoutUnit logicalWidth, bool isHorizontalWritingMode)
- {
- if (isHorizontalWritingMode)
- setWidth(logicalWidth);
- else
- setHeight(logicalWidth);
- }
-
- private:
RenderBox* m_renderer;
RootInlineBox* m_originatingLine;
LayoutRect m_frameRect;
- int m_paginationStrut; // FIXME: Is this class size-sensitive? Does this need 32-bits?
+ int m_paginationStrut;
+ private:
unsigned m_type : 2; // Type (left or right aligned)
unsigned m_shouldPaint : 1;
unsigned m_isDescendant : 1;
@@ -802,6 +753,46 @@ private:
LayoutPoint flipFloatForWritingModeForChild(const FloatingObject*, const LayoutPoint&) const;
+ LayoutUnit logicalTopForFloat(const FloatingObject* child) const { return isHorizontalWritingMode() ? child->y() : child->x(); }
+ LayoutUnit logicalBottomForFloat(const FloatingObject* child) const { return isHorizontalWritingMode() ? child->maxY() : child->maxX(); }
+ LayoutUnit logicalLeftForFloat(const FloatingObject* child) const { return isHorizontalWritingMode() ? child->x() : child->y(); }
+ LayoutUnit logicalRightForFloat(const FloatingObject* child) const { return isHorizontalWritingMode() ? child->maxX() : child->maxY(); }
+ LayoutUnit logicalWidthForFloat(const FloatingObject* child) const { return isHorizontalWritingMode() ? child->width() : child->height(); }
+
+ int pixelSnappedLogicalTopForFloat(const FloatingObject* child) const { return isHorizontalWritingMode() ? child->frameRect().pixelSnappedY() : child->frameRect().pixelSnappedX(); }
+ int pixelSnappedLogicalBottomForFloat(const FloatingObject* child) const { return isHorizontalWritingMode() ? child->frameRect().pixelSnappedMaxY() : child->frameRect().pixelSnappedMaxX(); }
+ int pixelSnappedLogicalLeftForFloat(const FloatingObject* child) const { return isHorizontalWritingMode() ? child->frameRect().pixelSnappedX() : child->frameRect().pixelSnappedY(); }
+ int pixelSnappedLogicalRightForFloat(const FloatingObject* child) const { return isHorizontalWritingMode() ? child->frameRect().pixelSnappedMaxX() : child->frameRect().pixelSnappedMaxY(); }
+
+ void setLogicalTopForFloat(FloatingObject* child, LayoutUnit logicalTop)
+ {
+ if (isHorizontalWritingMode())
+ child->setY(logicalTop);
+ else
+ child->setX(logicalTop);
+ }
+ void setLogicalLeftForFloat(FloatingObject* child, LayoutUnit logicalLeft)
+ {
+ if (isHorizontalWritingMode())
+ child->setX(logicalLeft);
+ else
+ child->setY(logicalLeft);
+ }
+ void setLogicalHeightForFloat(FloatingObject* child, LayoutUnit logicalHeight)
+ {
+ if (isHorizontalWritingMode())
+ child->setHeight(logicalHeight);
+ else
+ child->setWidth(logicalHeight);
+ }
+ void setLogicalWidthForFloat(FloatingObject* child, LayoutUnit logicalWidth)
+ {
+ if (isHorizontalWritingMode())
+ child->setWidth(logicalWidth);
+ else
+ child->setHeight(logicalWidth);
+ }
+
LayoutUnit xPositionForFloatIncludingMargin(const FloatingObject* child) const
{
if (isHorizontalWritingMode())
@@ -1158,13 +1149,13 @@ public:
protected:
struct FloatingObjectHashFunctions {
- static unsigned hash(FloatingObject* key) { return DefaultHash<RenderBox*>::Hash::hash(key->renderer()); }
- static bool equal(FloatingObject* a, FloatingObject* b) { return a->renderer() == b->renderer(); }
+ static unsigned hash(FloatingObject* key) { return DefaultHash<RenderBox*>::Hash::hash(key->m_renderer); }
+ static bool equal(FloatingObject* a, FloatingObject* b) { return a->m_renderer == b->m_renderer; }
static const bool safeToCompareToEmptyOrDeleted = true;
};
struct FloatingObjectHashTranslator {
static unsigned hash(RenderBox* key) { return DefaultHash<RenderBox*>::Hash::hash(key); }
- static bool equal(FloatingObject* a, RenderBox* b) { return a->renderer() == b; }
+ static bool equal(FloatingObject* a, RenderBox* b) { return a->m_renderer == b; }
};
typedef ListHashSet<FloatingObject*, 4, FloatingObjectHashFunctions> FloatingObjectSet;
typedef FloatingObjectSet::const_iterator FloatingObjectSetIterator;
@@ -1173,39 +1164,46 @@ protected:
typedef PODFreeListArena<PODRedBlackTree<FloatingObjectInterval>::Node> IntervalArena;
template <FloatingObject::Type FloatTypeValue>
- class ComputeFloatOffsetAdapter {
+ class FloatIntervalSearchAdapter {
public:
typedef FloatingObjectInterval IntervalType;
- ComputeFloatOffsetAdapter(const RenderBlock* renderer, int lineTop, int lineBottom, LayoutUnit& offset)
+ FloatIntervalSearchAdapter(const RenderBlock* renderer, int lowValue, int highValue, LayoutUnit& offset, LayoutUnit* heightRemaining)
: m_renderer(renderer)
- , m_lineTop(lineTop)
- , m_lineBottom(lineBottom)
+ , m_lowValue(lowValue)
+ , m_highValue(highValue)
, m_offset(offset)
- , m_outermostFloat(0)
+ , m_heightRemaining(heightRemaining)
+ , m_last(0)
{
}
- inline int lowValue() const { return m_lineTop; }
- inline int highValue() const { return m_lineBottom; }
- void collectIfNeeded(const IntervalType&);
+ inline int lowValue() const { return m_lowValue; }
+ inline int highValue() const { return m_highValue; }
+ void collectIfNeeded(const IntervalType&) const;
// When computing the offset caused by the floats on a given line, if
// the outermost float on that line has a shape-outside, the inline
// content that butts up against that float must be positioned using
// the contours of the shape, not the margin box of the float.
- const FloatingObject* outermostFloat() const { return m_outermostFloat; }
-
- LayoutUnit getHeightRemaining() const;
+ // We save the last float encountered so that the offset can be
+ // computed correctly by the code using this adapter.
+ const FloatingObject* lastFloat() const { return m_last; }
private:
- bool updateOffsetIfNeeded(const FloatingObject*);
+ bool updateOffsetIfNeeded(const FloatingObject*) const;
const RenderBlock* m_renderer;
- int m_lineTop;
- int m_lineBottom;
+ int m_lowValue;
+ int m_highValue;
LayoutUnit& m_offset;
- const FloatingObject* m_outermostFloat;
+ LayoutUnit* m_heightRemaining;
+ // This member variable is mutable because the collectIfNeeded method
+ // is declared as const, even though it doesn't actually respect that
+ // contract. It modifies other member variables via loopholes in the
+ // const behavior. Instead of using loopholes, I decided it was better
+ // to make the fact that this is modified in a const method explicit.
+ mutable const FloatingObject* m_last;
};
void createFloatingObjects();
@@ -1215,8 +1213,6 @@ public:
class FloatingObjects {
WTF_MAKE_NONCOPYABLE(FloatingObjects); WTF_MAKE_FAST_ALLOCATED;
public:
- ~FloatingObjects();
-
void clear();
void add(FloatingObject*);
void remove(FloatingObject*);
@@ -1232,7 +1228,6 @@ public:
computePlacedFloatsTreeIfNeeded();
return m_placedFloatsTree;
}
- void clearLineBoxTreePointers();
private:
FloatingObjects(const RenderBlock*, bool horizontalWritingMode);
void computePlacedFloatsTree();
diff --git a/chromium/third_party/WebKit/Source/core/rendering/RenderBlockLineLayout.cpp b/chromium/third_party/WebKit/Source/core/rendering/RenderBlockLineLayout.cpp
index cbe77432e6a..f16fcb63493 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/RenderBlockLineLayout.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/RenderBlockLineLayout.cpp
@@ -161,7 +161,7 @@ inline void LineWidth::updateAvailableWidth(LayoutUnit replacedHeight)
inline void LineWidth::shrinkAvailableWidthForNewFloatIfNeeded(RenderBlock::FloatingObject* newFloat)
{
LayoutUnit height = m_block->logicalHeight();
- if (height < newFloat->logicalTop(m_block->isHorizontalWritingMode()) || height >= newFloat->logicalBottom(m_block->isHorizontalWritingMode()))
+ if (height < m_block->logicalTopForFloat(newFloat) || height >= m_block->logicalBottomForFloat(newFloat))
return;
// When floats with shape outside are stacked, the floats are positioned based on the margin box of the float,
@@ -179,7 +179,7 @@ inline void LineWidth::shrinkAvailableWidthForNewFloatIfNeeded(RenderBlock::Floa
if (previousFloat != newFloat && previousFloat->type() == newFloat->type()) {
previousShapeOutsideInfo = previousFloat->renderer()->shapeOutsideInfo();
if (previousShapeOutsideInfo) {
- previousShapeOutsideInfo->computeSegmentsForContainingBlockLine(m_block->logicalHeight(), previousFloat->logicalTop(m_block->isHorizontalWritingMode()), logicalHeightForLine(m_block, m_isFirstLine));
+ previousShapeOutsideInfo->computeSegmentsForContainingBlockLine(m_block->logicalHeight(), m_block->logicalTopForFloat(previousFloat), logicalHeightForLine(m_block, m_isFirstLine));
}
break;
}
@@ -187,10 +187,10 @@ inline void LineWidth::shrinkAvailableWidthForNewFloatIfNeeded(RenderBlock::Floa
ShapeOutsideInfo* shapeOutsideInfo = newFloat->renderer()->shapeOutsideInfo();
if (shapeOutsideInfo)
- shapeOutsideInfo->computeSegmentsForContainingBlockLine(m_block->logicalHeight(), newFloat->logicalTop(m_block->isHorizontalWritingMode()), logicalHeightForLine(m_block, m_isFirstLine));
+ shapeOutsideInfo->computeSegmentsForContainingBlockLine(m_block->logicalHeight(), m_block->logicalTopForFloat(newFloat), logicalHeightForLine(m_block, m_isFirstLine));
if (newFloat->type() == RenderBlock::FloatingObject::FloatLeft) {
- float newLeft = newFloat->logicalRight(m_block->isHorizontalWritingMode());
+ float newLeft = m_block->logicalRightForFloat(newFloat);
if (previousShapeOutsideInfo)
newLeft -= previousShapeOutsideInfo->rightSegmentMarginBoxDelta();
if (shapeOutsideInfo)
@@ -200,7 +200,7 @@ inline void LineWidth::shrinkAvailableWidthForNewFloatIfNeeded(RenderBlock::Floa
newLeft += floorToInt(m_block->textIndentOffset());
m_left = max<float>(m_left, newLeft);
} else {
- float newRight = newFloat->logicalLeft(m_block->isHorizontalWritingMode());
+ float newRight = m_block->logicalLeftForFloat(newFloat);
if (previousShapeOutsideInfo)
newRight -= previousShapeOutsideInfo->leftSegmentMarginBoxDelta();
if (shapeOutsideInfo)
@@ -1226,8 +1226,8 @@ inline BidiRun* RenderBlock::handleTrailingSpaces(BidiRunList<BidiRun>& bidiRuns
void RenderBlock::appendFloatingObjectToLastLine(FloatingObject* floatingObject)
{
- ASSERT(!floatingObject->originatingLine());
- floatingObject->setOriginatingLine(lastRootBox());
+ ASSERT(!floatingObject->m_originatingLine);
+ floatingObject->m_originatingLine = lastRootBox();
lastRootBox()->appendFloat(floatingObject->renderer());
}
@@ -1881,7 +1881,7 @@ void RenderBlock::layoutRunsAndFloatsInRange(LineLayoutState& layoutState, Inlin
for (; it != end; ++it) {
FloatingObject* f = *it;
appendFloatingObjectToLastLine(f);
- ASSERT(f->renderer() == layoutState.floats()[layoutState.floatIndex()].object);
+ ASSERT(f->m_renderer == layoutState.floats()[layoutState.floatIndex()].object);
// If a float's geometry has changed, give up on syncing with clean lines.
if (layoutState.floats()[layoutState.floatIndex()].rect != f->frameRect())
checkForEndLineMatch = false;
@@ -1975,8 +1975,8 @@ void RenderBlock::linkToEndLineIfNeeded(LineLayoutState& layoutState)
Vector<RenderBox*>::iterator end = cleanLineFloats->end();
for (Vector<RenderBox*>::iterator f = cleanLineFloats->begin(); f != end; ++f) {
FloatingObject* floatingObject = insertFloatingObject(*f);
- ASSERT(!floatingObject->originatingLine());
- floatingObject->setOriginatingLine(line);
+ ASSERT(!floatingObject->m_originatingLine);
+ floatingObject->m_originatingLine = line;
setLogicalHeight(logicalTopForChild(*f) - marginBeforeForChild(*f) + delta);
positionNewFloats();
}
@@ -2266,8 +2266,8 @@ RootInlineBox* RenderBlock::determineStartPosition(LineLayoutState& layoutState,
Vector<RenderBox*>::iterator end = cleanLineFloats->end();
for (Vector<RenderBox*>::iterator f = cleanLineFloats->begin(); f != end; ++f) {
FloatingObject* floatingObject = insertFloatingObject(*f);
- ASSERT(!floatingObject->originatingLine());
- floatingObject->setOriginatingLine(line);
+ ASSERT(!floatingObject->m_originatingLine);
+ floatingObject->m_originatingLine = line;
setLogicalHeight(logicalTopForChild(*f) - marginBeforeForChild(*f));
positionNewFloats();
ASSERT(layoutState.floats()[numCleanFloats].object == *f);
@@ -2374,7 +2374,7 @@ bool RenderBlock::checkPaginationAndFloatsAtEndLine(LineLayoutState& layoutState
FloatingObjectSetIterator end = floatingObjectSet.end();
for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
FloatingObject* f = *it;
- if (f->logicalBottom(isHorizontalWritingMode()) >= logicalTop && f->logicalBottom(isHorizontalWritingMode()) < logicalBottom)
+ if (logicalBottomForFloat(f) >= logicalTop && logicalBottomForFloat(f) < logicalBottom)
return false;
}
@@ -2832,7 +2832,7 @@ InlineIterator RenderBlock::LineBreaker::nextSegmentBreak(InlineBidiResolver& re
// If it does, position it now, otherwise, position
// it after moving to next line (in newLine() func)
// FIXME: Bug 110372: Properly position multiple stacked floats with non-rectangular shape outside.
- if (floatsFitOnLine && width.fitsOnLine(f->logicalWidth(m_block->isHorizontalWritingMode()))) {
+ if (floatsFitOnLine && width.fitsOnLine(m_block->logicalWidthForFloat(f))) {
m_block->positionNewFloatOnLine(f, lastFloatFromPreviousLine, lineInfo, width);
if (lBreak.m_obj == current.m_obj) {
ASSERT(!lBreak.m_pos);
@@ -3401,14 +3401,14 @@ bool RenderBlock::positionNewFloatOnLine(FloatingObject* newFloat, FloatingObjec
// We only connect floats to lines for pagination purposes if the floats occur at the start of
// the line and the previous line had a hard break (so this line is either the first in the block
// or follows a <br>).
- if (!newFloat->paginationStrut() || !lineInfo.previousLineBrokeCleanly() || !lineInfo.isEmpty())
+ if (!newFloat->m_paginationStrut || !lineInfo.previousLineBrokeCleanly() || !lineInfo.isEmpty())
return true;
const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
ASSERT(floatingObjectSet.last() == newFloat);
- LayoutUnit floatLogicalTop = newFloat->logicalTop(isHorizontalWritingMode());
- int paginationStrut = newFloat->paginationStrut();
+ LayoutUnit floatLogicalTop = logicalTopForFloat(newFloat);
+ int paginationStrut = newFloat->m_paginationStrut;
if (floatLogicalTop - paginationStrut != logicalHeight() + lineInfo.floatPaginationStrut())
return true;
@@ -3421,18 +3421,18 @@ bool RenderBlock::positionNewFloatOnLine(FloatingObject* newFloat, FloatingObjec
FloatingObject* f = *it;
if (f == lastFloatFromPreviousLine)
break;
- if (f->logicalTop(isHorizontalWritingMode()) == logicalHeight() + lineInfo.floatPaginationStrut()) {
- f->setPaginationStrut(paginationStrut + f->paginationStrut());
- RenderBox* o = f->renderer();
+ if (logicalTopForFloat(f) == logicalHeight() + lineInfo.floatPaginationStrut()) {
+ f->m_paginationStrut += paginationStrut;
+ RenderBox* o = f->m_renderer;
setLogicalTopForChild(o, logicalTopForChild(o) + marginBeforeForChild(o) + paginationStrut);
if (o->isRenderBlock())
toRenderBlock(o)->setChildNeedsLayout(MarkOnlyThis);
o->layoutIfNeeded();
// Save the old logical top before calling removePlacedObject which will set
// isPlaced to false. Otherwise it will trigger an assert in logicalTopForFloat.
- LayoutUnit oldLogicalTop = f->logicalTop(isHorizontalWritingMode());
+ LayoutUnit oldLogicalTop = logicalTopForFloat(f);
m_floatingObjects->removePlacedObject(f);
- f->setLogicalTop(oldLogicalTop + paginationStrut, isHorizontalWritingMode());
+ setLogicalTopForFloat(f, oldLogicalTop + paginationStrut);
m_floatingObjects->addPlacedObject(f);
}
}
diff --git a/chromium/third_party/WebKit/Source/core/rendering/RenderBox.cpp b/chromium/third_party/WebKit/Source/core/rendering/RenderBox.cpp
index 73e76a60597..bb53fd51cde 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/RenderBox.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/RenderBox.cpp
@@ -808,8 +808,6 @@ IntSize RenderBox::calculateAutoscrollDirection(const IntPoint& windowPoint) con
IntSize offset;
IntPoint point = frameView->windowToContents(windowPoint);
IntRect box(absoluteBoundingBoxRect());
- if (isRenderView())
- box.moveBy(frameView->windowToContents(IntPoint()));
if (point.x() < box.x() + autoscrollBeltSize)
point.move(-autoscrollBeltSize, 0);
diff --git a/chromium/third_party/WebKit/Source/core/rendering/RenderGrid.cpp b/chromium/third_party/WebKit/Source/core/rendering/RenderGrid.cpp
index 0a753c1dea0..9d0d58990de 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/RenderGrid.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/RenderGrid.cpp
@@ -595,9 +595,6 @@ void RenderGrid::resolveContentBasedTrackSizingFunctionsForItems(TrackSizingDire
tracks.append(&track);
}
- if (tracks.isEmpty())
- return;
-
LayoutUnit additionalBreadthSpace = (this->*sizingFunction)(gridItem, direction, columnTracks);
for (size_t trackIndexForSpace = initialTrackIndex; trackIndexForSpace <= finalTrackIndex; ++trackIndexForSpace) {
GridTrack& track = (direction == ForColumns) ? columnTracks[trackIndexForSpace] : rowTracks[trackIndexForSpace];
diff --git a/chromium/third_party/WebKit/Source/core/rendering/RenderImage.cpp b/chromium/third_party/WebKit/Source/core/rendering/RenderImage.cpp
index f9be3be4de0..ce48656440e 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/RenderImage.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/RenderImage.cpp
@@ -30,11 +30,11 @@
#include "HTMLNames.h"
#include "core/editing/FrameSelection.h"
-#include "core/fetch/ImageResource.h"
#include "core/html/HTMLAreaElement.h"
#include "core/html/HTMLImageElement.h"
#include "core/html/HTMLInputElement.h"
#include "core/html/HTMLMapElement.h"
+#include "core/loader/cache/ImageResource.h"
#include "core/page/Frame.h"
#include "core/page/Page.h"
#include "core/platform/graphics/Font.h"
diff --git a/chromium/third_party/WebKit/Source/core/rendering/RenderImageResource.cpp b/chromium/third_party/WebKit/Source/core/rendering/RenderImageResource.cpp
index 61301870230..4a38fdd251d 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/RenderImageResource.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/RenderImageResource.cpp
@@ -28,7 +28,7 @@
#include "config.h"
#include "core/rendering/RenderImageResource.h"
-#include "core/fetch/ImageResource.h"
+#include "core/loader/cache/ImageResource.h"
#include "core/platform/graphics/Image.h"
#include "core/rendering/RenderObject.h"
diff --git a/chromium/third_party/WebKit/Source/core/rendering/RenderImageResource.h b/chromium/third_party/WebKit/Source/core/rendering/RenderImageResource.h
index 6cffb71841d..d222111e4d2 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/RenderImageResource.h
+++ b/chromium/third_party/WebKit/Source/core/rendering/RenderImageResource.h
@@ -26,8 +26,8 @@
#ifndef RenderImageResource_h
#define RenderImageResource_h
-#include "core/fetch/ImageResource.h"
-#include "core/fetch/ResourcePtr.h"
+#include "core/loader/cache/ImageResource.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "core/platform/graphics/Image.h"
#include "core/platform/graphics/LayoutSize.h"
#include "core/rendering/style/StyleImage.h"
diff --git a/chromium/third_party/WebKit/Source/core/rendering/RenderImageResourceStyleImage.cpp b/chromium/third_party/WebKit/Source/core/rendering/RenderImageResourceStyleImage.cpp
index 9c3b03e8062..ec9023582a4 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/RenderImageResourceStyleImage.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/RenderImageResourceStyleImage.cpp
@@ -28,7 +28,7 @@
#include "config.h"
#include "core/rendering/RenderImageResourceStyleImage.h"
-#include "core/fetch/ImageResource.h"
+#include "core/loader/cache/ImageResource.h"
#include "core/rendering/RenderObject.h"
#include "core/rendering/style/StyleFetchedImage.h"
diff --git a/chromium/third_party/WebKit/Source/core/rendering/RenderLayerBacking.cpp b/chromium/third_party/WebKit/Source/core/rendering/RenderLayerBacking.cpp
index 282e6e0568d..c8991f2d933 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/RenderLayerBacking.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/RenderLayerBacking.cpp
@@ -30,11 +30,11 @@
#include "CSSPropertyNames.h"
#include "HTMLNames.h"
#include "RuntimeEnabledFeatures.h"
-#include "core/fetch/ImageResource.h"
#include "core/html/HTMLIFrameElement.h"
#include "core/html/HTMLMediaElement.h"
#include "core/html/canvas/CanvasRenderingContext.h"
#include "core/inspector/InspectorInstrumentation.h"
+#include "core/loader/cache/ImageResource.h"
#include "core/page/Chrome.h"
#include "core/page/FrameView.h"
#include "core/page/Settings.h"
@@ -1708,7 +1708,7 @@ bool RenderLayerBacking::startAnimation(double timeOffset, const CSSAnimationDat
for (size_t i = 0; i < numKeyframes; ++i) {
const KeyframeValue& currentKeyframe = keyframes[i];
const RenderStyle* keyframeStyle = currentKeyframe.style();
- double key = currentKeyframe.key();
+ float key = currentKeyframe.key();
if (!keyframeStyle)
continue;
diff --git a/chromium/third_party/WebKit/Source/core/rendering/RenderLayerFilterInfo.cpp b/chromium/third_party/WebKit/Source/core/rendering/RenderLayerFilterInfo.cpp
index 8a6b4e39b14..abad09d6e25 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/RenderLayerFilterInfo.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/RenderLayerFilterInfo.cpp
@@ -31,8 +31,8 @@
#include "core/rendering/RenderLayerFilterInfo.h"
-#include "core/fetch/DocumentResource.h"
-#include "core/fetch/DocumentResourceReference.h"
+#include "core/loader/cache/DocumentResource.h"
+#include "core/loader/cache/DocumentResourceReference.h"
#include "core/platform/graphics/filters/custom/CustomFilterOperation.h"
#include "core/platform/graphics/filters/custom/CustomFilterProgram.h"
#include "core/rendering/FilterEffectRenderer.h"
diff --git a/chromium/third_party/WebKit/Source/core/rendering/RenderLayerFilterInfo.h b/chromium/third_party/WebKit/Source/core/rendering/RenderLayerFilterInfo.h
index 4e44b3f2f7a..ad29a02d9e2 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/RenderLayerFilterInfo.h
+++ b/chromium/third_party/WebKit/Source/core/rendering/RenderLayerFilterInfo.h
@@ -31,7 +31,7 @@
#define RenderLayerFilterInfo_h
#include "core/dom/Element.h"
-#include "core/fetch/DocumentResource.h"
+#include "core/loader/cache/DocumentResource.h"
#include "core/platform/graphics/LayoutRect.h"
#include "core/platform/graphics/filters/FilterOperation.h"
#include "core/platform/graphics/filters/custom/CustomFilterProgramClient.h"
diff --git a/chromium/third_party/WebKit/Source/core/rendering/RenderListMarker.cpp b/chromium/third_party/WebKit/Source/core/rendering/RenderListMarker.cpp
index c2dea3be02e..d63728e4514 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/RenderListMarker.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/RenderListMarker.cpp
@@ -26,7 +26,7 @@
#include "core/rendering/RenderListMarker.h"
#include "core/dom/Document.h"
-#include "core/fetch/ImageResource.h"
+#include "core/loader/cache/ImageResource.h"
#include "core/platform/graphics/Font.h"
#include "core/platform/graphics/GraphicsContextStateSaver.h"
#include "core/rendering/RenderLayer.h"
diff --git a/chromium/third_party/WebKit/Source/core/rendering/RenderObject.cpp b/chromium/third_party/WebKit/Source/core/rendering/RenderObject.cpp
index 1e4bafeefd2..58bbf327ced 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/RenderObject.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/RenderObject.cpp
@@ -673,11 +673,10 @@ static inline bool objectIsRelayoutBoundary(const RenderObject* object)
return true;
}
-void RenderObject::markContainingBlocksForLayout(bool scheduleRelayout, RenderObject* newRoot, SubtreeLayoutScope* layouter)
+void RenderObject::markContainingBlocksForLayout(bool scheduleRelayout, RenderObject* newRoot)
{
ASSERT(!scheduleRelayout || !newRoot);
ASSERT(!isSetNeedsLayoutForbidden());
- ASSERT(!layouter || this != layouter->root());
RenderObject* object = container();
RenderObject* last = this;
@@ -723,12 +722,6 @@ void RenderObject::markContainingBlocksForLayout(bool scheduleRelayout, RenderOb
ASSERT(!object->isSetNeedsLayoutForbidden());
}
- if (layouter) {
- layouter->addRendererToLayout(object);
- if (object == layouter->root())
- return;
- }
-
if (object == newRoot)
return;
@@ -1128,7 +1121,7 @@ void RenderObject::drawLineForBoxSide(GraphicsContext* graphicsContext, int x1,
void RenderObject::paintFocusRing(PaintInfo& paintInfo, const LayoutPoint& paintOffset, RenderStyle* style)
{
Vector<IntRect> focusRingRects;
- addFocusRingRects(focusRingRects, paintOffset, paintInfo.paintContainer());
+ addFocusRingRects(focusRingRects, paintOffset, paintInfo.paintContainer);
if (style->outlineStyleIsAuto())
paintInfo.context->drawFocusRing(focusRingRects, style->outlineWidth(), style->outlineOffset(), resolveColor(style, CSSPropertyOutlineColor));
else
@@ -1871,8 +1864,6 @@ void RenderObject::setStyle(PassRefPtr<RenderStyle> style)
updateImage(oldStyle ? oldStyle->borderImage().image() : 0, m_style ? m_style->borderImage().image() : 0);
updateImage(oldStyle ? oldStyle->maskBoxImage().image() : 0, m_style ? m_style->maskBoxImage().image() : 0);
- updateShapeImage(oldStyle ? oldStyle->shapeInside() : 0, m_style ? m_style->shapeInside() : 0);
-
// We need to ensure that view->maximalOutlineSize() is valid for any repaints that happen
// during styleDidChange (it's used by clippedOverflowRectForRepaint()).
if (m_style->outlineWidth() > 0 && m_style->outlineSize() > maximalOutlineSize(PaintPhaseOutline))
@@ -2114,12 +2105,6 @@ void RenderObject::updateImage(StyleImage* oldImage, StyleImage* newImage)
}
}
-void RenderObject::updateShapeImage(const ShapeValue* oldShapeValue, const ShapeValue* newShapeValue)
-{
- if (oldShapeValue || newShapeValue)
- updateImage(oldShapeValue ? oldShapeValue->image() : 0, newShapeValue ? newShapeValue->image() : 0);
-}
-
LayoutRect RenderObject::viewRect() const
{
return view()->viewRect();
@@ -2671,14 +2656,6 @@ void RenderObject::destroyAndCleanupAnonymousWrappers()
// WARNING: |this| is deleted here.
}
-void RenderObject::removeShapeImageClient(ShapeValue* shapeValue)
-{
- if (!shapeValue)
- return;
- if (StyleImage* shapeImage = shapeValue->image())
- shapeImage->removeClient(this);
-}
-
void RenderObject::destroy()
{
willBeDestroyed();
@@ -2704,8 +2681,6 @@ void RenderObject::postDestroy()
if (StyleImage* maskBoxImage = m_style->maskBoxImage().image())
maskBoxImage->removeClient(this);
-
- removeShapeImageClient(m_style->shapeInside());
}
delete this;
diff --git a/chromium/third_party/WebKit/Source/core/rendering/RenderObject.h b/chromium/third_party/WebKit/Source/core/rendering/RenderObject.h
index 451e9587e61..4d34112f885 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/RenderObject.h
+++ b/chromium/third_party/WebKit/Source/core/rendering/RenderObject.h
@@ -29,14 +29,13 @@
#include "core/dom/DocumentStyleSheetCollection.h"
#include "core/dom/Element.h"
#include "core/dom/Position.h"
-#include "core/fetch/ImageResourceClient.h"
+#include "core/loader/cache/ImageResourceClient.h"
#include "core/platform/graphics/FloatQuad.h"
#include "core/platform/graphics/LayoutRect.h"
#include "core/platform/graphics/transforms/TransformationMatrix.h"
#include "core/rendering/PaintPhase.h"
#include "core/rendering/RenderObjectChildList.h"
#include "core/rendering/ScrollBehavior.h"
-#include "core/rendering/SubtreeLayoutScope.h"
#include "core/rendering/style/RenderStyle.h"
#include "core/rendering/style/StyleInheritedData.h"
#include "wtf/HashSet.h"
@@ -622,10 +621,10 @@ public:
Element* offsetParent() const;
- void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObject* newRoot = 0, SubtreeLayoutScope* = 0);
- void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayoutScope* = 0);
+ void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObject* newRoot = 0);
+ void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain);
void clearNeedsLayout();
- void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayoutScope* = 0);
+ void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain);
void setNeedsPositionedMovementLayout();
void setNeedsSimplifiedNormalFlowLayout();
void setPreferredLogicalWidthsDirty(bool, MarkingBehavior = MarkContainingBlockChain);
@@ -664,7 +663,6 @@ public:
void updateFillImages(const FillLayer*, const FillLayer*);
void updateImage(StyleImage*, StyleImage*);
- void updateShapeImage(const ShapeValue*, const ShapeValue*);
virtual void paint(PaintInfo&, const LayoutPoint&);
@@ -1072,8 +1070,6 @@ private:
return styleColor;
}
- void removeShapeImageClient(ShapeValue*);
-
#ifndef NDEBUG
void checkBlockPositionedObjectsNeedLayout();
#endif
@@ -1244,14 +1240,14 @@ inline bool RenderObject::isBeforeOrAfterContent() const
return isBeforeContent() || isAfterContent();
}
-inline void RenderObject::setNeedsLayout(MarkingBehavior markParents, SubtreeLayoutScope* layouter)
+inline void RenderObject::setNeedsLayout(MarkingBehavior markParents)
{
ASSERT(!isSetNeedsLayoutForbidden());
bool alreadyNeededLayout = m_bitfields.needsLayout();
m_bitfields.setNeedsLayout(true);
if (!alreadyNeededLayout) {
- if (markParents == MarkContainingBlockChain && (!layouter || layouter->root() != this))
- markContainingBlocksForLayout(true, 0, layouter);
+ if (markParents == MarkContainingBlockChain)
+ markContainingBlocksForLayout();
if (hasLayer())
setLayerNeedsFullRepaint();
}
@@ -1271,14 +1267,13 @@ inline void RenderObject::clearNeedsLayout()
#endif
}
-inline void RenderObject::setChildNeedsLayout(MarkingBehavior markParents, SubtreeLayoutScope* layouter)
+inline void RenderObject::setChildNeedsLayout(MarkingBehavior markParents)
{
ASSERT(!isSetNeedsLayoutForbidden());
bool alreadyNeededLayout = normalChildNeedsLayout();
setNormalChildNeedsLayout(true);
- // FIXME: Replace MarkOnlyThis with the SubtreeLayoutScope code path and remove the MarkingBehavior argument entirely.
- if (!alreadyNeededLayout && markParents == MarkContainingBlockChain && (!layouter || layouter->root() != this))
- markContainingBlocksForLayout(true, 0, layouter);
+ if (!alreadyNeededLayout && markParents == MarkContainingBlockChain)
+ markContainingBlocksForLayout();
}
inline void RenderObject::setNeedsPositionedMovementLayout()
diff --git a/chromium/third_party/WebKit/Source/core/rendering/RenderSearchField.cpp b/chromium/third_party/WebKit/Source/core/rendering/RenderSearchField.cpp
index ab322b8902a..4e4244c7b7f 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/RenderSearchField.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/RenderSearchField.cpp
@@ -24,7 +24,6 @@
#include "config.h"
#include "core/rendering/RenderSearchField.h"
-#include "core/dom/shadow/ShadowRoot.h"
#include "core/html/HTMLInputElement.h"
#include "core/html/shadow/ShadowElementNames.h"
@@ -48,12 +47,12 @@ RenderSearchField::~RenderSearchField()
inline Element* RenderSearchField::searchDecorationElement() const
{
- return inputElement()->userAgentShadowRoot()->getElementById(ShadowElementNames::searchDecoration());
+ return inputElement()->uaShadowElementById(ShadowElementNames::searchDecoration());
}
inline Element* RenderSearchField::cancelButtonElement() const
{
- return inputElement()->userAgentShadowRoot()->getElementById(ShadowElementNames::clearButton());
+ return inputElement()->uaShadowElementById(ShadowElementNames::clearButton());
}
LayoutUnit RenderSearchField::computeControlLogicalHeight(LayoutUnit lineHeight, LayoutUnit nonContentHeight) const
diff --git a/chromium/third_party/WebKit/Source/core/rendering/RenderTable.cpp b/chromium/third_party/WebKit/Source/core/rendering/RenderTable.cpp
index 7ea9fa2f72d..12ea553e69d 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/RenderTable.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/RenderTable.cpp
@@ -40,7 +40,6 @@
#include "core/rendering/RenderTableCol.h"
#include "core/rendering/RenderTableSection.h"
#include "core/rendering/RenderView.h"
-#include "core/rendering/SubtreeLayoutScope.h"
#include "core/rendering/style/CollapsedBorderValue.h"
#include "core/rendering/style/StyleInheritedData.h"
@@ -423,11 +422,9 @@ void RenderTable::layout()
LayoutUnit oldLogicalWidth = logicalWidth();
updateLogicalWidth();
- SubtreeLayoutScope layouter(this);
-
if (logicalWidth() != oldLogicalWidth) {
for (unsigned i = 0; i < m_captions.size(); i++)
- layouter.setNeedsLayout(m_captions[i]);
+ m_captions[i]->setNeedsLayout(MarkOnlyThis);
}
// FIXME: The optimisation below doesn't work since the internal table
// layout could have changed. we need to add a flag to the table
@@ -447,7 +444,7 @@ void RenderTable::layout()
if (child->isTableSection()) {
RenderTableSection* section = toRenderTableSection(child);
if (m_columnLogicalWidthChanged)
- layouter.setChildNeedsLayout(section);
+ section->setChildNeedsLayout(MarkOnlyThis);
section->layoutIfNeeded();
totalSectionLogicalHeight += section->calcRowLogicalHeight();
if (collapsing)
diff --git a/chromium/third_party/WebKit/Source/core/rendering/RenderTableCell.cpp b/chromium/third_party/WebKit/Source/core/rendering/RenderTableCell.cpp
index 25ae144ebb6..b67203d5d16 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/RenderTableCell.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/RenderTableCell.cpp
@@ -34,7 +34,6 @@
#include "core/rendering/PaintInfo.h"
#include "core/rendering/RenderTableCol.h"
#include "core/rendering/RenderView.h"
-#include "core/rendering/SubtreeLayoutScope.h"
#include "core/rendering/style/CollapsedBorderValue.h"
using namespace std;
@@ -163,7 +162,7 @@ void RenderTableCell::computePreferredLogicalWidths()
}
}
-void RenderTableCell::computeIntrinsicPadding(int rowHeight, SubtreeLayoutScope& layouter)
+void RenderTableCell::computeIntrinsicPadding(int rowHeight)
{
int oldIntrinsicPaddingBefore = intrinsicPaddingBefore();
int oldIntrinsicPaddingAfter = intrinsicPaddingAfter();
@@ -201,19 +200,20 @@ void RenderTableCell::computeIntrinsicPadding(int rowHeight, SubtreeLayoutScope&
// FIXME: Changing an intrinsic padding shouldn't trigger a relayout as it only shifts the cell inside the row but
// doesn't change the logical height.
if (intrinsicPaddingBefore != oldIntrinsicPaddingBefore || intrinsicPaddingAfter != oldIntrinsicPaddingAfter)
- layouter.setNeedsLayout(this);
+ setNeedsLayout(MarkOnlyThis);
}
void RenderTableCell::updateLogicalWidth()
{
}
-void RenderTableCell::setCellLogicalWidth(int tableLayoutLogicalWidth, SubtreeLayoutScope& layouter)
+void RenderTableCell::setCellLogicalWidth(int tableLayoutLogicalWidth)
{
if (tableLayoutLogicalWidth == logicalWidth())
return;
- layouter.setNeedsLayout(this);
+ setNeedsLayout(MarkOnlyThis);
+ row()->setChildNeedsLayout(MarkOnlyThis);
if (!table()->selfNeedsLayout() && checkForRepaintDuringLayout())
repaint();
@@ -224,8 +224,6 @@ void RenderTableCell::setCellLogicalWidth(int tableLayoutLogicalWidth, SubtreeLa
void RenderTableCell::layout()
{
- ASSERT(needsLayout());
-
StackStats::LayoutCheckPoint layoutCheckPoint;
updateFirstLetter();
@@ -239,8 +237,7 @@ void RenderTableCell::layout()
if (isBaselineAligned() && section()->rowBaseline(rowIndex()) && cellBaselinePosition() > section()->rowBaseline(rowIndex())) {
int newIntrinsicPaddingBefore = max<LayoutUnit>(0, intrinsicPaddingBefore() - max<LayoutUnit>(0, cellBaselinePosition() - oldCellBaseline));
setIntrinsicPaddingBefore(newIntrinsicPaddingBefore);
- SubtreeLayoutScope layouter(this);
- layouter.setNeedsLayout(this);
+ setNeedsLayout(MarkOnlyThis);
layoutBlock(cellWidthChanged());
}
diff --git a/chromium/third_party/WebKit/Source/core/rendering/RenderTableCell.h b/chromium/third_party/WebKit/Source/core/rendering/RenderTableCell.h
index 9a0da52dfc8..14dac6000f4 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/RenderTableCell.h
+++ b/chromium/third_party/WebKit/Source/core/rendering/RenderTableCell.h
@@ -35,8 +35,6 @@ static const unsigned maxColumnIndex = 0x1FFFFFFE; // 536,870,910
enum IncludeBorderColorOrNot { DoNotIncludeBorderColor, IncludeBorderColor };
-class SubtreeLayoutScope;
-
class RenderTableCell FINAL : public RenderBlock {
public:
explicit RenderTableCell(Element*);
@@ -105,7 +103,7 @@ public:
}
- void setCellLogicalWidth(int constrainedLogicalWidth, SubtreeLayoutScope&);
+ void setCellLogicalWidth(int constrainedLogicalWidth);
virtual int borderLeft() const;
virtual int borderRight() const;
@@ -133,7 +131,7 @@ public:
return va == BASELINE || va == TEXT_BOTTOM || va == TEXT_TOP || va == SUPER || va == SUB || va == LENGTH;
}
- void computeIntrinsicPadding(int rowHeight, SubtreeLayoutScope&);
+ void computeIntrinsicPadding(int rowHeight);
void clearIntrinsicPadding() { setIntrinsicPadding(0, 0); }
int intrinsicPaddingBefore() const { return m_intrinsicPaddingBefore; }
diff --git a/chromium/third_party/WebKit/Source/core/rendering/RenderTableCol.cpp b/chromium/third_party/WebKit/Source/core/rendering/RenderTableCol.cpp
index 4831a49e1d6..ce0dd03491f 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/RenderTableCol.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/RenderTableCol.cpp
@@ -28,6 +28,7 @@
#include "HTMLNames.h"
#include "core/html/HTMLTableColElement.h"
+#include "core/loader/cache/ImageResource.h"
#include "core/rendering/RenderTable.h"
#include "core/rendering/RenderTableCell.h"
diff --git a/chromium/third_party/WebKit/Source/core/rendering/RenderTableRow.cpp b/chromium/third_party/WebKit/Source/core/rendering/RenderTableRow.cpp
index dc1d16c8f0b..3fae9224901 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/RenderTableRow.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/RenderTableRow.cpp
@@ -27,12 +27,11 @@
#include "HTMLNames.h"
#include "core/dom/Document.h"
-#include "core/fetch/ImageResource.h"
+#include "core/loader/cache/ImageResource.h"
#include "core/rendering/HitTestResult.h"
#include "core/rendering/PaintInfo.h"
#include "core/rendering/RenderTableCell.h"
#include "core/rendering/RenderView.h"
-#include "core/rendering/SubtreeLayoutScope.h"
#include "core/rendering/style/StyleInheritedData.h"
namespace WebCore {
@@ -85,7 +84,7 @@ void RenderTableRow::styleDidChange(StyleDifference diff, const RenderStyle* old
for (RenderBox* childBox = firstChildBox(); childBox; childBox = childBox->nextSiblingBox()) {
if (!childBox->isTableCell())
continue;
- childBox->setChildNeedsLayout();
+ childBox->setChildNeedsLayout(MarkOnlyThis);
}
}
}
@@ -166,10 +165,9 @@ void RenderTableRow::layout()
for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
if (child->isTableCell()) {
- SubtreeLayoutScope layouter(child);
RenderTableCell* cell = toRenderTableCell(child);
if (!cell->needsLayout() && paginated && view()->layoutState()->pageLogicalHeight() && view()->layoutState()->pageLogicalOffset(cell, cell->logicalTop()) != cell->pageLogicalOffset())
- layouter.setChildNeedsLayout(cell);
+ cell->setChildNeedsLayout(MarkOnlyThis);
if (child->needsLayout()) {
cell->computeAndSetBlockDirectionMargins(table());
diff --git a/chromium/third_party/WebKit/Source/core/rendering/RenderTableSection.cpp b/chromium/third_party/WebKit/Source/core/rendering/RenderTableSection.cpp
index d55550b194e..80938ccfce4 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/RenderTableSection.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/RenderTableSection.cpp
@@ -35,7 +35,6 @@
#include "core/rendering/RenderTableCol.h"
#include "core/rendering/RenderTableRow.h"
#include "core/rendering/RenderView.h"
-#include "core/rendering/SubtreeLayoutScope.h"
#include "wtf/HashSet.h"
#include "wtf/Vector.h"
@@ -613,7 +612,6 @@ void RenderTableSection::layout()
const Vector<int>& columnPos = table()->columnPositions();
- SubtreeLayoutScope layouter(this);
for (unsigned r = 0; r < m_grid.size(); ++r) {
Row& row = m_grid[r].row;
unsigned cols = row.size();
@@ -633,7 +631,7 @@ void RenderTableSection::layout()
endCol++;
}
int tableLayoutLogicalWidth = columnPos[endCol] - columnPos[startColumn] - table()->hBorderSpacing();
- cell->setCellLogicalWidth(tableLayoutLogicalWidth, layouter);
+ cell->setCellLogicalWidth(tableLayoutLogicalWidth);
}
if (RenderTableRow* rowRenderer = m_grid[r].rowRenderer)
@@ -738,11 +736,6 @@ int RenderTableSection::distributeExtraLogicalHeightToRows(int extraLogicalHeigh
return extraLogicalHeight - remainingExtraLogicalHeight;
}
-static bool shouldFlexCellChild(RenderObject* cellDescendant)
-{
- return cellDescendant->isReplaced() || (cellDescendant->isBox() && toRenderBox(cellDescendant)->scrollsOverflow());
-}
-
void RenderTableSection::layoutRows()
{
#ifndef NDEBUG
@@ -802,24 +795,33 @@ void RenderTableSection::layoutRows()
bool flexAllChildren = cell->style()->logicalHeight().isFixed()
|| (!table()->style()->logicalHeight().isAuto() && rHeight != cell->logicalHeight());
- for (RenderObject* child = cell->firstChild(); child; child = child->nextSibling()) {
- if (!child->isText() && child->style()->logicalHeight().isPercent()
- && (flexAllChildren || shouldFlexCellChild(child))
- && (!child->isTable() || toRenderTable(child)->hasSections())) {
- cellChildrenFlex = true;
- break;
+ for (RenderObject* o = cell->firstChild(); o; o = o->nextSibling()) {
+ if (!o->isText() && o->style()->logicalHeight().isPercent() && (flexAllChildren || o->isReplaced() || (o->isBox() && toRenderBox(o)->scrollsOverflow()))) {
+ // Tables with no sections do not flex.
+ if (!o->isTable() || toRenderTable(o)->hasSections()) {
+ o->setNeedsLayout(MarkOnlyThis);
+ cellChildrenFlex = true;
+ }
}
}
- if (!cellChildrenFlex) {
- if (TrackedRendererListHashSet* percentHeightDescendants = cell->percentHeightDescendants()) {
- TrackedRendererListHashSet::iterator end = percentHeightDescendants->end();
- for (TrackedRendererListHashSet::iterator it = percentHeightDescendants->begin(); it != end; ++it) {
- if (flexAllChildren || shouldFlexCellChild(*it)) {
- cellChildrenFlex = true;
+ if (TrackedRendererListHashSet* percentHeightDescendants = cell->percentHeightDescendants()) {
+ TrackedRendererListHashSet::iterator end = percentHeightDescendants->end();
+ for (TrackedRendererListHashSet::iterator it = percentHeightDescendants->begin(); it != end; ++it) {
+ RenderBox* box = *it;
+ if (!box->isReplaced() && !box->scrollsOverflow() && !flexAllChildren)
+ continue;
+
+ while (box != cell) {
+ if (box->normalChildNeedsLayout())
+ break;
+ box->setChildNeedsLayout(MarkOnlyThis);
+ box = box->containingBlock();
+ ASSERT(box);
+ if (!box)
break;
- }
}
+ cellChildrenFlex = true;
}
}
@@ -838,15 +840,14 @@ void RenderTableSection::layoutRows()
}
}
- SubtreeLayoutScope layouter(cell);
- cell->computeIntrinsicPadding(rHeight, layouter);
+ cell->computeIntrinsicPadding(rHeight);
LayoutRect oldCellRect = cell->frameRect();
setLogicalPositionForCell(cell, c);
if (!cell->needsLayout() && view()->layoutState()->pageLogicalHeight() && view()->layoutState()->pageLogicalOffset(cell, cell->logicalTop()) != cell->pageLogicalOffset())
- layouter.setChildNeedsLayout(cell);
+ cell->setChildNeedsLayout(MarkOnlyThis);
cell->layoutIfNeeded();
diff --git a/chromium/third_party/WebKit/Source/core/rendering/SubtreeLayoutScope.cpp b/chromium/third_party/WebKit/Source/core/rendering/SubtreeLayoutScope.cpp
deleted file mode 100644
index c3bfefe745a..00000000000
--- a/chromium/third_party/WebKit/Source/core/rendering/SubtreeLayoutScope.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "core/rendering/SubtreeLayoutScope.h"
-
-#include "core/page/FrameView.h"
-#include "core/rendering/RenderObject.h"
-
-namespace WebCore {
-
-SubtreeLayoutScope::SubtreeLayoutScope(RenderObject* root)
- : m_root(root)
-{
- RELEASE_ASSERT(m_root->document()->view()->isInLayout());
-}
-
-SubtreeLayoutScope::~SubtreeLayoutScope()
-{
- RELEASE_ASSERT(!m_root->needsLayout());
-
-#ifndef NDEBUG
- for (HashSet<RenderObject*>::iterator it = m_renderersToLayout.begin(); it != m_renderersToLayout.end(); ++it) {
- RenderObject* renderer = *it;
- // FIXME: Thie patter is really common. Move it into an assertRendererLaidOut function.
- if (renderer->needsLayout())
- showRenderTree(renderer);
- ASSERT(!renderer->needsLayout());
- }
-#endif
-}
-
-void SubtreeLayoutScope::setNeedsLayout(RenderObject* descendant)
-{
- ASSERT(descendant->isDescendantOf(m_root));
- descendant->setNeedsLayout(MarkContainingBlockChain, this);
-}
-
-void SubtreeLayoutScope::setChildNeedsLayout(RenderObject* descendant)
-{
- ASSERT(descendant->isDescendantOf(m_root));
- descendant->setChildNeedsLayout(MarkContainingBlockChain, this);
-}
-
-void SubtreeLayoutScope::addRendererToLayout(RenderObject* renderer)
-{
-#ifndef NDEBUG
- m_renderersToLayout.add(renderer);
-#endif
-}
-
-}
diff --git a/chromium/third_party/WebKit/Source/core/rendering/SubtreeLayoutScope.h b/chromium/third_party/WebKit/Source/core/rendering/SubtreeLayoutScope.h
deleted file mode 100644
index 792fb7f6a1b..00000000000
--- a/chromium/third_party/WebKit/Source/core/rendering/SubtreeLayoutScope.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SubtreeLayoutScope_h
-#define SubtreeLayoutScope_h
-
-#include "wtf/HashSet.h"
-
-// This is the way to mark a subtree as needing layout during layout,
-// e.g. for the purposes of doing a multipass layout.
-//
-// It should only be used during layout. Outside of layout, you should
-// just call renderer->setNeedsLayout() directly.
-//
-// It ensures that you don't accidentally mark part of the tree as
-// needing layout and not actually lay it out.
-
-// FIXME: Assert that this is only used during layout and that
-// MarkOnlyThis is never used outside of layout.
-
-namespace WebCore {
-
-class RenderObject;
-
-class SubtreeLayoutScope {
-public:
- SubtreeLayoutScope(RenderObject* root);
- ~SubtreeLayoutScope();
-
- void setNeedsLayout(RenderObject* descendant);
- void setChildNeedsLayout(RenderObject* descendant);
-
- RenderObject* root() { return m_root; }
- void addRendererToLayout(RenderObject* renderer);
-
-private:
- RenderObject* m_root;
-
-#ifndef NDEBUG
- HashSet<RenderObject*> m_renderersToLayout;
-#endif
-};
-
-}
-
-#endif
diff --git a/chromium/third_party/WebKit/Source/core/rendering/shapes/RasterShape.cpp b/chromium/third_party/WebKit/Source/core/rendering/shapes/RasterShape.cpp
deleted file mode 100644
index a57958071a0..00000000000
--- a/chromium/third_party/WebKit/Source/core/rendering/shapes/RasterShape.cpp
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above
- * copyright notice, this list of conditions and the following
- * disclaimer.
- * 2. Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "core/rendering/shapes/RasterShape.h"
-
-#include "core/rendering/shapes/ShapeInterval.h"
-#include "wtf/MathExtras.h"
-
-namespace WebCore {
-
-IntRect RasterShapeIntervals::bounds() const
-{
- if (!m_bounds)
- m_bounds = adoptPtr(new IntRect(m_region.bounds()));
- return *m_bounds;
-}
-
-void RasterShapeIntervals::addInterval(int y, int x1, int x2)
-{
- m_region.unite(Region(IntRect(x1, y, x2 - x1, 1)));
- m_bounds.clear();
-}
-
-static inline IntRect alignedRect(IntRect r, int y1, int y2)
-{
- return IntRect(r.x(), y1, r.width(), y2 - y1);
-}
-
-void RasterShapeIntervals::getIncludedIntervals(int y1, int y2, SegmentList& result) const
-{
- ASSERT(y2 >= y1);
-
- IntRect lineRect(bounds().x(), y1, bounds().width(), y2 - y1);
- Region lineRegion(lineRect);
- lineRegion.intersect(m_region);
- if (lineRegion.isEmpty())
- return;
-
- Vector<IntRect> lineRects = lineRegion.rects();
- ASSERT(lineRects.size() > 0);
-
- Region segmentsRegion(lineRect);
- Region intervalsRegion;
-
- // The loop below uses Regions to compute the intersection of the horizontal
- // shape intervals that fall within the line's box.
-
- int lineY = lineRects[0].y();
- for (unsigned i = 0; i < lineRects.size(); ++i) {
- if (lineRects[i].y() != lineY) {
- segmentsRegion.intersect(intervalsRegion);
- intervalsRegion = Region();
- }
- intervalsRegion.unite(Region(alignedRect(lineRects[i], y1, y2)));
- lineY = lineRects[i].y();
- }
- if (!intervalsRegion.isEmpty())
- segmentsRegion.intersect(intervalsRegion);
-
- Vector<IntRect> segmentRects = segmentsRegion.rects();
- for (unsigned i = 0; i < segmentRects.size(); ++i)
- result.append(LineSegment(segmentRects[i].x(), segmentRects[i].maxX()));
-}
-
-const RasterShapeIntervals& RasterShape::marginIntervals() const
-{
- ASSERT(shapeMargin() >= 0);
- if (!shapeMargin())
- return *m_intervals;
-
- // FIXME: add support for non-zero margin, see https://code.google.com/p/chromium/issues/detail?id=252737.
- return *m_intervals;
-}
-
-const RasterShapeIntervals& RasterShape::paddingIntervals() const
-{
- ASSERT(shapePadding() >= 0);
- if (!shapePadding())
- return *m_intervals;
-
- // FIXME: add support for non-zero padding, see https://code.google.com/p/chromium/issues/detail?id=252737.
- return *m_intervals;
-}
-
-void RasterShape::getExcludedIntervals(LayoutUnit, LayoutUnit, SegmentList&) const
-{
- // FIXME: this method is only a stub, see https://code.google.com/p/chromium/issues/detail?id=252737.
-}
-
-void RasterShape::getIncludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList& result) const
-{
- const RasterShapeIntervals& intervals = paddingIntervals();
- if (intervals.isEmpty())
- return;
-
- float y1 = logicalTop;
- float y2 = logicalTop + logicalHeight;
-
- if (y1 < intervals.bounds().y() || y2 > intervals.bounds().maxY())
- return;
-
- intervals.getIncludedIntervals(y1, y2, result);
-}
-
-bool RasterShape::firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalTop, const LayoutSize& minLogicalIntervalSize, LayoutUnit& result) const
-{
- float minIntervalTop = minLogicalIntervalTop;
- float minIntervalHeight = minLogicalIntervalSize.height();
- float minIntervalWidth = minLogicalIntervalSize.width();
-
- const RasterShapeIntervals& intervals = paddingIntervals();
- if (intervals.isEmpty() || minIntervalWidth > intervals.bounds().width())
- return false;
-
- float minY = std::max<float>(intervals.bounds().y(), minIntervalTop);
- float maxY = minY + minIntervalHeight;
-
- if (maxY > intervals.bounds().maxY())
- return false;
-
- // FIXME: complete this method, see https://code.google.com/p/chromium/issues/detail?id=252737.
-
- result = minY;
- return true;
-}
-
-} // namespace WebCore
diff --git a/chromium/third_party/WebKit/Source/core/rendering/shapes/RasterShape.h b/chromium/third_party/WebKit/Source/core/rendering/shapes/RasterShape.h
deleted file mode 100644
index 84bed9cf25d..00000000000
--- a/chromium/third_party/WebKit/Source/core/rendering/shapes/RasterShape.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above
- * copyright notice, this list of conditions and the following
- * disclaimer.
- * 2. Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef RasterShape_h
-#define RasterShape_h
-
-#include "core/platform/graphics/FloatRect.h"
-#include "core/platform/graphics/Region.h"
-#include "core/rendering/shapes/Shape.h"
-#include "wtf/Assertions.h"
-#include "wtf/Vector.h"
-
-namespace WebCore {
-
-class RasterShapeIntervals {
-public:
- RasterShapeIntervals() { }
-
- IntRect bounds() const;
- bool isEmpty() const { return m_region.isEmpty(); }
- void addInterval(int y, int x1, int x2);
- void getIncludedIntervals(int y1, int y2, SegmentList&) const;
-
-private:
- Region m_region;
- mutable OwnPtr<IntRect> m_bounds; // Cached value of m_region.bounds().
-};
-
-class RasterShape : public Shape {
- WTF_MAKE_NONCOPYABLE(RasterShape);
-public:
- RasterShape(PassOwnPtr<RasterShapeIntervals> intervals)
- : Shape()
- , m_intervals(intervals)
- {
- }
-
- virtual LayoutRect shapeMarginLogicalBoundingBox() const OVERRIDE { return static_cast<LayoutRect>(marginIntervals().bounds()); }
- virtual LayoutRect shapePaddingLogicalBoundingBox() const OVERRIDE { return static_cast<LayoutRect>(paddingIntervals().bounds()); }
- virtual bool isEmpty() const OVERRIDE { return m_intervals->isEmpty(); }
- virtual void getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList&) const OVERRIDE;
- virtual void getIncludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList&) const OVERRIDE;
- virtual bool firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalTop, const LayoutSize& minLogicalIntervalSize, LayoutUnit&) const OVERRIDE;
-
-private:
- const RasterShapeIntervals& marginIntervals() const;
- const RasterShapeIntervals& paddingIntervals() const;
-
- OwnPtr<RasterShapeIntervals> m_intervals;
-};
-
-} // namespace WebCore
-
-#endif // RasterShape_h
diff --git a/chromium/third_party/WebKit/Source/core/rendering/shapes/Shape.cpp b/chromium/third_party/WebKit/Source/core/rendering/shapes/Shape.cpp
index b325c073aa5..60d003bad86 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/shapes/Shape.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/shapes/Shape.cpp
@@ -31,12 +31,9 @@
#include "core/rendering/shapes/Shape.h"
#include "core/css/LengthFunctions.h"
-#include "core/fetch/ImageResource.h"
#include "core/platform/graphics/FloatSize.h"
-#include "core/platform/graphics/ImageBuffer.h"
#include "core/platform/graphics/WindRule.h"
#include "core/rendering/shapes/PolygonShape.h"
-#include "core/rendering/shapes/RasterShape.h"
#include "core/rendering/shapes/RectangleShape.h"
#include "wtf/MathExtras.h"
#include "wtf/OwnPtr.h"
@@ -201,45 +198,4 @@ PassOwnPtr<Shape> Shape::createShape(const BasicShape* basicShape, const LayoutS
return shape.release();
}
-PassOwnPtr<Shape> Shape::createShape(const StyleImage* styleImage, float threshold, const LayoutSize&, WritingMode writingMode, Length margin, Length padding)
-{
- ASSERT(styleImage && styleImage->isImageResource() && styleImage->cachedImage() && styleImage->cachedImage()->image());
-
- OwnPtr<RasterShapeIntervals> intervals = adoptPtr(new RasterShapeIntervals());
-
- Image* image = styleImage->cachedImage()->image();
- const IntSize& imageSize = image->size();
- OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(imageSize);
- if (imageBuffer) {
- GraphicsContext* graphicsContext = imageBuffer->context();
- graphicsContext->drawImage(image, IntPoint());
-
- RefPtr<Uint8ClampedArray> pixelArray = imageBuffer->getUnmultipliedImageData(IntRect(IntPoint(), imageSize));
- unsigned pixelArrayLength = pixelArray->length();
- unsigned pixelArrayOffset = 3; // Each pixel is four bytes: RGBA.
- uint8_t alphaPixelThreshold = threshold * 255;
-
- ASSERT(static_cast<unsigned>(imageSize.width() * imageSize.height() * 4) == pixelArrayLength);
-
- for (int y = 0; y < imageSize.height(); ++y) {
- int startX = -1;
- for (int x = 0; x < imageSize.width() && pixelArrayOffset < pixelArrayLength; ++x, pixelArrayOffset += 4) {
- uint8_t alpha = pixelArray->item(pixelArrayOffset);
- if ((startX == -1) && alpha > alphaPixelThreshold) {
- startX = x;
- } else if (startX != -1 && (alpha <= alphaPixelThreshold || x == imageSize.width() - 1)) {
- intervals->addInterval(y, startX, x);
- startX = -1;
- }
- }
- }
- }
-
- OwnPtr<RasterShape> rasterShape = adoptPtr(new RasterShape(intervals.release()));
- rasterShape->m_writingMode = writingMode;
- rasterShape->m_margin = floatValueForLength(margin, 0);
- rasterShape->m_padding = floatValueForLength(padding, 0);
- return rasterShape.release();
-}
-
} // namespace WebCore
diff --git a/chromium/third_party/WebKit/Source/core/rendering/shapes/Shape.h b/chromium/third_party/WebKit/Source/core/rendering/shapes/Shape.h
index b1ea954b3fd..6e257c96e54 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/shapes/Shape.h
+++ b/chromium/third_party/WebKit/Source/core/rendering/shapes/Shape.h
@@ -33,7 +33,6 @@
#include "core/platform/graphics/LayoutRect.h"
#include "core/platform/text/WritingMode.h"
#include "core/rendering/style/BasicShapes.h"
-#include "core/rendering/style/StyleImage.h"
#include "wtf/PassOwnPtr.h"
#include "wtf/Vector.h"
@@ -61,7 +60,6 @@ typedef Vector<LineSegment> SegmentList;
class Shape {
public:
static PassOwnPtr<Shape> createShape(const BasicShape*, const LayoutSize& logicalBoxSize, WritingMode, Length margin, Length padding);
- static PassOwnPtr<Shape> createShape(const StyleImage*, float threshold, const LayoutSize& logicalBoxSize, WritingMode, Length margin, Length padding);
virtual ~Shape() { }
diff --git a/chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeInfo.cpp b/chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeInfo.cpp
index 54f97abf40f..78341a38445 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeInfo.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeInfo.cpp
@@ -41,26 +41,12 @@ const Shape* ShapeInfo<RenderType, shapeGetter, intervalGetter>::computedShape()
if (Shape* shape = m_shape.get())
return shape;
- const LayoutSize logicalBoxSize(m_shapeLogicalWidth, m_shapeLogicalHeight);
- WritingMode writingMode = m_renderer->style()->writingMode();
- Length margin = m_renderer->style()->shapeMargin();
- Length padding = m_renderer->style()->shapePadding();
- const ShapeValue* shapeValue = (m_renderer->style()->*shapeGetter)();
- ASSERT(shapeValue);
+ ShapeValue* shapeValue = (m_renderer->style()->*shapeGetter)();
+ BasicShape* shape = (shapeValue && shapeValue->type() == ShapeValue::Shape) ? shapeValue->shape() : 0;
- switch (shapeValue->type()) {
- case ShapeValue::Shape:
- ASSERT(shapeValue->shape());
- m_shape = Shape::createShape(shapeValue->shape(), logicalBoxSize, writingMode, margin, padding);
- break;
- case ShapeValue::Image:
- ASSERT(shapeValue->image());
- m_shape = Shape::createShape(shapeValue->image(), 0, logicalBoxSize, writingMode, margin, padding);
- break;
- default:
- ASSERT_NOT_REACHED();
- }
+ ASSERT(shape);
+ m_shape = Shape::createShape(shape, LayoutSize(m_shapeLogicalWidth, m_shapeLogicalHeight), m_renderer->style()->writingMode(), m_renderer->style()->shapeMargin(), m_renderer->style()->shapePadding());
ASSERT(m_shape);
return m_shape.get();
}
diff --git a/chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeInsideInfo.cpp b/chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeInsideInfo.cpp
index 8c63f6c4d74..01dff4951f8 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeInsideInfo.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeInsideInfo.cpp
@@ -44,19 +44,11 @@ LineSegmentRange::LineSegmentRange(const InlineIterator& start, const InlineIter
bool ShapeInsideInfo::isEnabledFor(const RenderBlock* renderer)
{
ShapeValue* shapeValue = renderer->style()->resolvedShapeInside();
- if (!shapeValue)
+ if (!shapeValue || shapeValue->type() != ShapeValue::Shape)
return false;
- switch (shapeValue->type()) {
- case ShapeValue::Shape:
- return shapeValue->shape() && shapeValue->shape()->type() != BasicShape::BasicShapeInsetRectangleType;
- case ShapeValue::Image:
- return shapeValue->isImageValid();
- case ShapeValue::Outside:
- return false;
- }
-
- return false;
+ BasicShape* shape = shapeValue->shape();
+ return shape && shape->type() != BasicShape::BasicShapeInsetRectangleType;
}
bool ShapeInsideInfo::adjustLogicalLineTop(float minSegmentWidth)
diff --git a/chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeOutsideInfo.cpp b/chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeOutsideInfo.cpp
index ed58e303568..76f52ddc461 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeOutsideInfo.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeOutsideInfo.cpp
@@ -35,20 +35,8 @@
namespace WebCore {
bool ShapeOutsideInfo::isEnabledFor(const RenderBox* box)
{
- ShapeValue* shapeValue = box->style()->shapeOutside();
- if (!box->isFloatingWithShapeOutside() || !shapeValue)
- return false;
-
- switch (shapeValue->type()) {
- case ShapeValue::Shape:
- return shapeValue->shape();
- case ShapeValue::Image:
- return false;
- case ShapeValue::Outside:
- return false;
- }
-
- return false;
+ ShapeValue* value = box->style()->shapeOutside();
+ return box->isFloatingWithShapeOutside() && value->type() == ShapeValue::Shape && value->shape();
}
bool ShapeOutsideInfo::computeSegmentsForContainingBlockLine(LayoutUnit lineTop, LayoutUnit floatTop, LayoutUnit lineHeight)
diff --git a/chromium/third_party/WebKit/Source/core/rendering/style/KeyframeList.cpp b/chromium/third_party/WebKit/Source/core/rendering/style/KeyframeList.cpp
index 093d796b6e7..9d20a1c666a 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/style/KeyframeList.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/style/KeyframeList.cpp
@@ -36,7 +36,7 @@ void KeyframeValue::addProperties(const StylePropertySet* propertySet)
CSSPropertyID property = propertySet->propertyAt(i).id();
// Timing-function within keyframes is special, because it is not animated; it just
// describes the timing function between this keyframe and the next.
- if (property != CSSPropertyWebkitAnimationTimingFunction && property != CSSPropertyAnimationTimingFunction)
+ if (property != CSSPropertyWebkitAnimationTimingFunction)
addProperty(property);
}
}
diff --git a/chromium/third_party/WebKit/Source/core/rendering/style/KeyframeList.h b/chromium/third_party/WebKit/Source/core/rendering/style/KeyframeList.h
index 4d5e207317b..5a5cf92ec04 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/style/KeyframeList.h
+++ b/chromium/third_party/WebKit/Source/core/rendering/style/KeyframeList.h
@@ -40,7 +40,7 @@ class StylePropertySet;
class KeyframeValue {
public:
- KeyframeValue(double key, PassRefPtr<RenderStyle> style)
+ KeyframeValue(float key, PassRefPtr<RenderStyle> style)
: m_key(key)
, m_style(style)
{
@@ -51,14 +51,14 @@ public:
bool containsProperty(CSSPropertyID prop) const { return m_properties.contains(prop); }
const HashSet<CSSPropertyID>& properties() const { return m_properties; }
- double key() const { return m_key; }
- void setKey(double key) { m_key = key; }
+ float key() const { return m_key; }
+ void setKey(float key) { m_key = key; }
const RenderStyle* style() const { return m_style.get(); }
void setStyle(PassRefPtr<RenderStyle> style) { m_style = style; }
private:
- double m_key;
+ float m_key;
HashSet<CSSPropertyID> m_properties; // The properties specified in this keyframe.
RefPtr<RenderStyle> m_style;
};
diff --git a/chromium/third_party/WebKit/Source/core/rendering/style/SVGRenderStyle.cpp b/chromium/third_party/WebKit/Source/core/rendering/style/SVGRenderStyle.cpp
index bc5c3399257..4ec55815a8f 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/style/SVGRenderStyle.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/style/SVGRenderStyle.cpp
@@ -169,10 +169,7 @@ StyleDifference SVGRenderStyle::diff(const SVGRenderStyle* other) const
|| stroke->paintUri != other->stroke->paintUri
|| stroke->miterLimit != other->stroke->miterLimit
|| stroke->dashArray != other->stroke->dashArray
- || stroke->dashOffset != other->stroke->dashOffset
- || stroke->visitedLinkPaintColor != other->stroke->visitedLinkPaintColor
- || stroke->visitedLinkPaintUri != other->stroke->visitedLinkPaintUri
- || stroke->visitedLinkPaintType != other->stroke->visitedLinkPaintType)
+ || stroke->dashOffset != other->stroke->dashOffset)
return StyleDifferenceLayout;
// Only the stroke-opacity case remains, where we only need a repaint.
diff --git a/chromium/third_party/WebKit/Source/core/rendering/style/ShapeValue.h b/chromium/third_party/WebKit/Source/core/rendering/style/ShapeValue.h
index bb71dab440a..b72d2518665 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/style/ShapeValue.h
+++ b/chromium/third_party/WebKit/Source/core/rendering/style/ShapeValue.h
@@ -30,7 +30,6 @@
#ifndef ShapeValue_h
#define ShapeValue_h
-#include "core/fetch/ImageResource.h"
#include "core/rendering/style/BasicShapes.h"
#include "core/rendering/style/StyleImage.h"
#include "wtf/PassRefPtr.h"
@@ -63,12 +62,9 @@ public:
ShapeValueType type() const { return m_type; }
BasicShape* shape() const { return m_shape.get(); }
-
StyleImage* image() const { return m_image.get(); }
- bool isImageValid() const { return image() && image()->cachedImage() && image()->cachedImage()->hasImage(); }
void setImage(PassRefPtr<StyleImage> image)
{
- ASSERT(type() == Image);
if (m_image != image)
m_image = image;
}
diff --git a/chromium/third_party/WebKit/Source/core/rendering/style/StyleCustomFilterProgram.h b/chromium/third_party/WebKit/Source/core/rendering/style/StyleCustomFilterProgram.h
index 18be011b566..167821769ac 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/style/StyleCustomFilterProgram.h
+++ b/chromium/third_party/WebKit/Source/core/rendering/style/StyleCustomFilterProgram.h
@@ -30,9 +30,9 @@
#ifndef StyleCustomFilterProgram_h
#define StyleCustomFilterProgram_h
-#include "core/fetch/ResourceClient.h"
-#include "core/fetch/ResourcePtr.h"
-#include "core/fetch/ShaderResource.h"
+#include "core/loader/cache/ResourceClient.h"
+#include "core/loader/cache/ResourcePtr.h"
+#include "core/loader/cache/ShaderResource.h"
#include "core/platform/graphics/filters/custom/CustomFilterProgram.h"
#include "core/rendering/style/StyleShader.h"
#include "weborigin/KURL.h"
diff --git a/chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedImage.cpp b/chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedImage.cpp
index 31dc65a0452..e09447510e2 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedImage.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedImage.cpp
@@ -24,7 +24,7 @@
#include "config.h"
#include "core/rendering/style/StyleFetchedImage.h"
-#include "core/fetch/ImageResource.h"
+#include "core/loader/cache/ImageResource.h"
#include "core/rendering/RenderObject.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedImage.h b/chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedImage.h
index 9ea82f51778..b9effd9c2cd 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedImage.h
+++ b/chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedImage.h
@@ -24,8 +24,8 @@
#ifndef StyleFetchedImage_h
#define StyleFetchedImage_h
-#include "core/fetch/ImageResourceClient.h"
-#include "core/fetch/ResourcePtr.h"
+#include "core/loader/cache/ImageResourceClient.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "core/rendering/style/StyleImage.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedImageSet.cpp b/chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedImageSet.cpp
index 04a8d9d5961..b9e9d52c190 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedImageSet.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedImageSet.cpp
@@ -27,7 +27,7 @@
#include "core/rendering/style/StyleFetchedImageSet.h"
#include "core/css/CSSImageSetValue.h"
-#include "core/fetch/ImageResource.h"
+#include "core/loader/cache/ImageResource.h"
#include "core/rendering/RenderObject.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedImageSet.h b/chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedImageSet.h
index 178ec3c87b0..3e431e23388 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedImageSet.h
+++ b/chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedImageSet.h
@@ -26,8 +26,8 @@
#ifndef StyleFetchedImageSet_h
#define StyleFetchedImageSet_h
-#include "core/fetch/ImageResourceClient.h"
-#include "core/fetch/ResourcePtr.h"
+#include "core/loader/cache/ImageResourceClient.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "core/platform/graphics/LayoutSize.h"
#include "core/rendering/style/StyleImage.h"
diff --git a/chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedShader.cpp b/chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedShader.cpp
index 13a8b98c36a..2b6c6c24e4e 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedShader.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedShader.cpp
@@ -32,7 +32,7 @@
#include "core/rendering/style/StyleFetchedShader.h"
#include "core/css/CSSPrimitiveValue.h"
-#include "core/fetch/ShaderResource.h"
+#include "core/loader/cache/ShaderResource.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedShader.h b/chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedShader.h
index 104a90cc871..88e54112d14 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedShader.h
+++ b/chromium/third_party/WebKit/Source/core/rendering/style/StyleFetchedShader.h
@@ -30,7 +30,7 @@
#ifndef StyleFetchedShader_h
#define StyleFetchedShader_h
-#include "core/fetch/ResourcePtr.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "core/rendering/style/StyleShader.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/rendering/svg/ReferenceFilterBuilder.cpp b/chromium/third_party/WebKit/Source/core/rendering/svg/ReferenceFilterBuilder.cpp
index b2a9feb84f3..ab598e38444 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/svg/ReferenceFilterBuilder.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/svg/ReferenceFilterBuilder.cpp
@@ -33,8 +33,8 @@
#include "core/css/CSSPrimitiveValue.h"
#include "core/css/CSSPrimitiveValueMappings.h"
#include "core/dom/Element.h"
-#include "core/fetch/DocumentResource.h"
-#include "core/fetch/DocumentResourceReference.h"
+#include "core/loader/cache/DocumentResource.h"
+#include "core/loader/cache/DocumentResourceReference.h"
#include "core/platform/graphics/filters/FilterEffect.h"
#include "core/platform/graphics/filters/SourceAlpha.h"
#include "core/rendering/svg/RenderSVGResourceFilter.h"
diff --git a/chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourceClipper.cpp b/chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourceClipper.cpp
index 9da09f9d9f0..92a96dd3949 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourceClipper.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourceClipper.cpp
@@ -127,7 +127,7 @@ bool RenderSVGResourceClipper::pathOnlyClipping(GraphicsContext* context, const
}
}
// Only one visible shape/path was found. Directly continue clipping and transform the content to userspace if necessary.
- if (toSVGClipPathElement(node())->clipPathUnitsCurrentValue() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
+ if (static_cast<SVGClipPathElement*>(node())->clipPathUnitsCurrentValue() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
AffineTransform transform;
transform.translate(objectBoundingBox.x(), objectBoundingBox.y());
transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.height());
@@ -152,7 +152,7 @@ bool RenderSVGResourceClipper::applyClippingToContext(RenderObject* object, cons
m_clipper.set(object, new ClipperData);
bool shouldCreateClipData = false;
- AffineTransform animatedLocalTransform = toSVGClipPathElement(node())->animatedLocalTransform();
+ AffineTransform animatedLocalTransform = static_cast<SVGClipPathElement*>(node())->animatedLocalTransform();
ClipperData* clipperData = m_clipper.get(object);
if (!clipperData->clipMaskImage) {
if (pathOnlyClipping(context, animatedLocalTransform, objectBoundingBox))
@@ -208,7 +208,8 @@ bool RenderSVGResourceClipper::drawContentIntoMaskImage(ClipperData* clipperData
ASSERT(maskContext);
AffineTransform maskContentTransformation;
- if (toSVGClipPathElement(node())->clipPathUnitsCurrentValue() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
+ SVGClipPathElement* clipPath = static_cast<SVGClipPathElement*>(node());
+ if (clipPath->clipPathUnitsCurrentValue() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
maskContentTransformation.translate(objectBoundingBox.x(), objectBoundingBox.y());
maskContentTransformation.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.height());
maskContext->concatCTM(maskContentTransformation);
@@ -276,7 +277,7 @@ void RenderSVGResourceClipper::calculateClipContentRepaintRect()
continue;
m_clipBoundaries.unite(renderer->localToParentTransform().mapRect(renderer->repaintRectInLocalCoordinates()));
}
- m_clipBoundaries = toSVGClipPathElement(node())->animatedLocalTransform().mapRect(m_clipBoundaries);
+ m_clipBoundaries = static_cast<SVGClipPathElement*>(node())->animatedLocalTransform().mapRect(m_clipBoundaries);
}
bool RenderSVGResourceClipper::hitTestClipContent(const FloatRect& objectBoundingBox, const FloatPoint& nodeAtPoint)
@@ -285,7 +286,7 @@ bool RenderSVGResourceClipper::hitTestClipContent(const FloatRect& objectBoundin
if (!SVGRenderSupport::pointInClippingArea(this, point))
return false;
- SVGClipPathElement* clipPathElement = toSVGClipPathElement(node());
+ SVGClipPathElement* clipPathElement = static_cast<SVGClipPathElement*>(node());
if (clipPathElement->clipPathUnitsCurrentValue() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
AffineTransform transform;
transform.translate(objectBoundingBox.x(), objectBoundingBox.y());
@@ -319,7 +320,7 @@ FloatRect RenderSVGResourceClipper::resourceBoundingBox(RenderObject* object)
if (m_clipBoundaries.isEmpty())
calculateClipContentRepaintRect();
- if (toSVGClipPathElement(node())->clipPathUnitsCurrentValue() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
+ if (static_cast<SVGClipPathElement*>(node())->clipPathUnitsCurrentValue() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
FloatRect objectBoundingBox = object->objectBoundingBox();
AffineTransform transform;
transform.translate(objectBoundingBox.x(), objectBoundingBox.y());
diff --git a/chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourceClipper.h b/chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourceClipper.h
index 69ee9865220..32e4971c9fe 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourceClipper.h
+++ b/chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGResourceClipper.h
@@ -52,7 +52,7 @@ public:
bool hitTestClipContent(const FloatRect&, const FloatPoint&);
- SVGUnitTypes::SVGUnitType clipPathUnits() const { return toSVGClipPathElement(node())->clipPathUnitsCurrentValue(); }
+ SVGUnitTypes::SVGUnitType clipPathUnits() const { return static_cast<SVGClipPathElement*>(node())->clipPathUnitsCurrentValue(); }
static RenderSVGResourceType s_resourceType;
private:
diff --git a/chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGTextPath.cpp b/chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGTextPath.cpp
index f2068b80ac5..a1fbae363e6 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGTextPath.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/svg/RenderSVGTextPath.cpp
@@ -35,7 +35,7 @@ RenderSVGTextPath::RenderSVGTextPath(Element* element)
Path RenderSVGTextPath::layoutPath() const
{
- SVGTextPathElement* textPathElement = toSVGTextPathElement(node());
+ SVGTextPathElement* textPathElement = static_cast<SVGTextPathElement*>(node());
Element* targetElement = SVGURIReference::targetElementFromIRIString(textPathElement->hrefCurrentValue(), textPathElement->document());
if (!targetElement || !targetElement->hasTagName(SVGNames::pathTag))
return Path();
@@ -56,17 +56,17 @@ Path RenderSVGTextPath::layoutPath() const
float RenderSVGTextPath::startOffset() const
{
- return toSVGTextPathElement(node())->startOffsetCurrentValue().valueAsPercentage();
+ return static_cast<SVGTextPathElement*>(node())->startOffsetCurrentValue().valueAsPercentage();
}
bool RenderSVGTextPath::exactAlignment() const
{
- return toSVGTextPathElement(node())->spacingCurrentValue() == SVGTextPathSpacingExact;
+ return static_cast<SVGTextPathElement*>(node())->spacingCurrentValue() == SVGTextPathSpacingExact;
}
bool RenderSVGTextPath::stretchMethod() const
{
- return toSVGTextPathElement(node())->methodCurrentValue() == SVGTextPathMethodStretch;
+ return static_cast<SVGTextPathElement*>(node())->methodCurrentValue() == SVGTextPathMethodStretch;
}
}
diff --git a/chromium/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.h.tmpl b/chromium/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.h.tmpl
index 5ef9febce37..2bf03820d62 100644
--- a/chromium/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.h.tmpl
+++ b/chromium/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.h.tmpl
@@ -70,9 +70,8 @@ private:
{%- set camel_case_name = property.camel_case_name %}
const StylePropertyShorthand& {{ camel_case_name }}Shorthand();
{%- endfor %}
-
-// Returns an empty list if the property is not a shorthand, otherwise the list of longhands for parsing.
-const StylePropertyShorthand& parsingShorthandForProperty(CSSPropertyID);
+const StylePropertyShorthand& borderShorthandForParsing();
+const StylePropertyShorthand& webkitAnimationShorthandForParsing();
// Returns an empty list if the property is not a shorthand.
const StylePropertyShorthand& shorthandForProperty(CSSPropertyID);
diff --git a/chromium/third_party/WebKit/Source/core/storage/Storage.cpp b/chromium/third_party/WebKit/Source/core/storage/Storage.cpp
index c46e9bbdc81..bbeb0a3617b 100644
--- a/chromium/third_party/WebKit/Source/core/storage/Storage.cpp
+++ b/chromium/third_party/WebKit/Source/core/storage/Storage.cpp
@@ -28,8 +28,8 @@
#include "bindings/v8/ExceptionState.h"
#include "wtf/PassOwnPtr.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/text/WTFString.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/text/WTFString.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/storage/Storage.h b/chromium/third_party/WebKit/Source/core/storage/Storage.h
index 825dad39357..4ffefd57ebf 100644
--- a/chromium/third_party/WebKit/Source/core/storage/Storage.h
+++ b/chromium/third_party/WebKit/Source/core/storage/Storage.h
@@ -29,9 +29,9 @@
#include "bindings/v8/ScriptWrappable.h"
#include "core/page/DOMWindowProperty.h"
#include "core/storage/StorageArea.h"
-#include "wtf/Forward.h"
-#include "wtf/RefCounted.h"
-#include "wtf/RefPtr.h"
+#include <wtf/Forward.h>
+#include <wtf/RefCounted.h>
+#include <wtf/RefPtr.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/storage/StorageArea.h b/chromium/third_party/WebKit/Source/core/storage/StorageArea.h
index 00114d5146a..00533e505a0 100644
--- a/chromium/third_party/WebKit/Source/core/storage/StorageArea.h
+++ b/chromium/third_party/WebKit/Source/core/storage/StorageArea.h
@@ -26,8 +26,8 @@
#ifndef StorageArea_h
#define StorageArea_h
-#include "wtf/Forward.h"
-#include "wtf/text/WTFString.h"
+#include <wtf/Forward.h>
+#include <wtf/text/WTFString.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/storage/StorageEvent.h b/chromium/third_party/WebKit/Source/core/storage/StorageEvent.h
index a4e8ffc9a3e..c59471e3d24 100644
--- a/chromium/third_party/WebKit/Source/core/storage/StorageEvent.h
+++ b/chromium/third_party/WebKit/Source/core/storage/StorageEvent.h
@@ -27,7 +27,7 @@
#define StorageEvent_h
#include "core/dom/Event.h"
-#include "wtf/text/WTFString.h"
+#include <wtf/text/WTFString.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/svg/SVGAnimationElement.h b/chromium/third_party/WebKit/Source/core/svg/SVGAnimationElement.h
index a2d9ac4cd82..9108719e484 100644
--- a/chromium/third_party/WebKit/Source/core/svg/SVGAnimationElement.h
+++ b/chromium/third_party/WebKit/Source/core/svg/SVGAnimationElement.h
@@ -237,9 +237,6 @@ private:
AttributeType m_attributeType;
Vector<String> m_values;
- // FIXME: We should probably use doubles for this, but there's no point
- // making such a change unless all SVG logic for sampling animations is
- // changed to use doubles.
Vector<float> m_keyTimes;
Vector<float> m_keyPoints;
Vector<UnitBezier> m_keySplines;
diff --git a/chromium/third_party/WebKit/Source/core/svg/SVGClipPathElement.h b/chromium/third_party/WebKit/Source/core/svg/SVGClipPathElement.h
index 5667aa7dd16..c5bbb882a8c 100644
--- a/chromium/third_party/WebKit/Source/core/svg/SVGClipPathElement.h
+++ b/chromium/third_party/WebKit/Source/core/svg/SVGClipPathElement.h
@@ -21,7 +21,6 @@
#ifndef SVGClipPathElement_h
#define SVGClipPathElement_h
-#include "SVGNames.h"
#include "core/svg/SVGAnimatedBoolean.h"
#include "core/svg/SVGAnimatedEnumeration.h"
#include "core/svg/SVGExternalResourcesRequired.h"
@@ -56,12 +55,6 @@ private:
END_DECLARE_ANIMATED_PROPERTIES
};
-inline SVGClipPathElement* toSVGClipPathElement(Node* node)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(SVGNames::clipPathTag));
- return static_cast<SVGClipPathElement*>(node);
-}
-
}
#endif
diff --git a/chromium/third_party/WebKit/Source/core/svg/SVGFEImageElement.cpp b/chromium/third_party/WebKit/Source/core/svg/SVGFEImageElement.cpp
index cbf76e8f14f..b67789cbb11 100644
--- a/chromium/third_party/WebKit/Source/core/svg/SVGFEImageElement.cpp
+++ b/chromium/third_party/WebKit/Source/core/svg/SVGFEImageElement.cpp
@@ -26,9 +26,9 @@
#include "SVGNames.h"
#include "XLinkNames.h"
#include "core/dom/Document.h"
-#include "core/fetch/FetchRequest.h"
-#include "core/fetch/ImageResource.h"
-#include "core/fetch/ResourceFetcher.h"
+#include "core/loader/cache/FetchRequest.h"
+#include "core/loader/cache/ImageResource.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/platform/graphics/Image.h"
#include "core/rendering/svg/RenderSVGResource.h"
#include "core/svg/SVGElementInstance.h"
@@ -193,8 +193,7 @@ void SVGFEImageElement::notifyFinished(Resource*)
if (!parent->hasTagName(SVGNames::filterTag) || !parent->renderer())
return;
- if (RenderObject* renderer = this->renderer())
- RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer());
}
PassRefPtr<FilterEffect> SVGFEImageElement::build(SVGFilterBuilder*, Filter* filter)
diff --git a/chromium/third_party/WebKit/Source/core/svg/SVGFEImageElement.h b/chromium/third_party/WebKit/Source/core/svg/SVGFEImageElement.h
index 799a8ffb119..64f326ddfef 100644
--- a/chromium/third_party/WebKit/Source/core/svg/SVGFEImageElement.h
+++ b/chromium/third_party/WebKit/Source/core/svg/SVGFEImageElement.h
@@ -21,8 +21,8 @@
#ifndef SVGFEImageElement_h
#define SVGFEImageElement_h
-#include "core/fetch/ImageResource.h"
-#include "core/fetch/ResourcePtr.h"
+#include "core/loader/cache/ImageResource.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "core/platform/graphics/ImageBuffer.h"
#include "core/svg/SVGAnimatedBoolean.h"
#include "core/svg/SVGAnimatedPreserveAspectRatio.h"
diff --git a/chromium/third_party/WebKit/Source/core/svg/SVGFontFaceUriElement.cpp b/chromium/third_party/WebKit/Source/core/svg/SVGFontFaceUriElement.cpp
index d040e432273..569ca30ca0b 100644
--- a/chromium/third_party/WebKit/Source/core/svg/SVGFontFaceUriElement.cpp
+++ b/chromium/third_party/WebKit/Source/core/svg/SVGFontFaceUriElement.cpp
@@ -27,9 +27,9 @@
#include "XLinkNames.h"
#include "core/css/CSSFontFaceSrcValue.h"
#include "core/dom/Document.h"
-#include "core/fetch/FetchRequest.h"
-#include "core/fetch/FontResource.h"
-#include "core/fetch/ResourceFetcher.h"
+#include "core/loader/cache/FetchRequest.h"
+#include "core/loader/cache/FontResource.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/svg/SVGFontFaceElement.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/svg/SVGFontFaceUriElement.h b/chromium/third_party/WebKit/Source/core/svg/SVGFontFaceUriElement.h
index 6101a5c412b..99d10462a30 100644
--- a/chromium/third_party/WebKit/Source/core/svg/SVGFontFaceUriElement.h
+++ b/chromium/third_party/WebKit/Source/core/svg/SVGFontFaceUriElement.h
@@ -21,8 +21,8 @@
#define SVGFontFaceUriElement_h
#if ENABLE(SVG_FONTS)
-#include "core/fetch/FontResource.h"
-#include "core/fetch/ResourcePtr.h"
+#include "core/loader/cache/FontResource.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "core/svg/SVGElement.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/svg/SVGImageLoader.cpp b/chromium/third_party/WebKit/Source/core/svg/SVGImageLoader.cpp
index 85c0fbbd74d..75dd0d4e21c 100644
--- a/chromium/third_party/WebKit/Source/core/svg/SVGImageLoader.cpp
+++ b/chromium/third_party/WebKit/Source/core/svg/SVGImageLoader.cpp
@@ -24,8 +24,8 @@
#include "core/dom/Event.h"
#include "core/dom/EventNames.h"
-#include "core/fetch/ImageResource.h"
#include "core/html/parser/HTMLParserIdioms.h"
+#include "core/loader/cache/ImageResource.h"
#include "core/svg/SVGImageElement.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp b/chromium/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
index d10c7525957..d6958837e17 100644
--- a/chromium/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
+++ b/chromium/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
@@ -718,7 +718,7 @@ void SVGSVGElement::setupInitialView(const String& fragmentIdentifier, Element*
if (SVGViewElement* viewElement = anchorNode->hasTagName(SVGNames::viewTag) ? static_cast<SVGViewElement*>(anchorNode) : 0) {
SVGElement* element = SVGLocatable::nearestViewportElement(viewElement);
if (element->hasTagName(SVGNames::svgTag)) {
- SVGSVGElement* svg = toSVGSVGElement(element);
+ SVGSVGElement* svg = static_cast<SVGSVGElement*>(element);
svg->inheritViewAttributes(viewElement);
if (RenderObject* renderer = svg->renderer())
diff --git a/chromium/third_party/WebKit/Source/core/svg/SVGTextContentElement.cpp b/chromium/third_party/WebKit/Source/core/svg/SVGTextContentElement.cpp
index 48c806af588..532b74b7f23 100644
--- a/chromium/third_party/WebKit/Source/core/svg/SVGTextContentElement.cpp
+++ b/chromium/third_party/WebKit/Source/core/svg/SVGTextContentElement.cpp
@@ -123,9 +123,6 @@ float SVGTextContentElement::getSubStringLength(unsigned charnum, unsigned nchar
return 0.0f;
}
- if (nchars > numberOfChars - charnum)
- nchars = numberOfChars - charnum;
-
return SVGTextQuery(renderer()).subStringLength(charnum, nchars);
}
diff --git a/chromium/third_party/WebKit/Source/core/svg/SVGTextContentElement.idl b/chromium/third_party/WebKit/Source/core/svg/SVGTextContentElement.idl
index f4ce37dc97d..4d693752940 100644
--- a/chromium/third_party/WebKit/Source/core/svg/SVGTextContentElement.idl
+++ b/chromium/third_party/WebKit/Source/core/svg/SVGTextContentElement.idl
@@ -34,13 +34,15 @@ interface SVGTextContentElement : SVGGraphicsElement {
long getNumberOfChars();
float getComputedTextLength();
- [RaisesException] float getSubStringLength(unsigned long offset, unsigned long length);
- [RaisesException] SVGPoint getStartPositionOfChar(unsigned long offset);
- [RaisesException] SVGPoint getEndPositionOfChar(unsigned long offset);
- [RaisesException] SVGRect getExtentOfChar(unsigned long offset);
- [RaisesException] float getRotationOfChar(unsigned long offset);
- long getCharNumAtPosition(SVGPoint point);
- [RaisesException] void selectSubString(unsigned long offset, unsigned long length);
+ [RaisesException] float getSubStringLength([Default=Undefined,IsIndex] optional unsigned long offset,
+ [Default=Undefined,IsIndex] optional unsigned long length);
+ [RaisesException] SVGPoint getStartPositionOfChar([Default=Undefined,IsIndex] optional unsigned long offset);
+ [RaisesException] SVGPoint getEndPositionOfChar([Default=Undefined,IsIndex] optional unsigned long offset);
+ [RaisesException] SVGRect getExtentOfChar([Default=Undefined,IsIndex] optional unsigned long offset);
+ [RaisesException] float getRotationOfChar([Default=Undefined,IsIndex] optional unsigned long offset);
+ long getCharNumAtPosition([Default=Undefined] optional SVGPoint point);
+ [RaisesException] void selectSubString([Default=Undefined,IsIndex] optional unsigned long offset,
+ [Default=Undefined,IsIndex] optional unsigned long length);
};
// FIXME: SVGTextContentElement is not supposed to implement SVGExternalResourcesRequired.
diff --git a/chromium/third_party/WebKit/Source/core/svg/SVGTextPathElement.h b/chromium/third_party/WebKit/Source/core/svg/SVGTextPathElement.h
index 0ad3f96f238..ab6bcb9881b 100644
--- a/chromium/third_party/WebKit/Source/core/svg/SVGTextPathElement.h
+++ b/chromium/third_party/WebKit/Source/core/svg/SVGTextPathElement.h
@@ -20,8 +20,8 @@
#ifndef SVGTextPathElement_h
#define SVGTextPathElement_h
-#include "SVGNames.h"
#include "core/svg/SVGTextContentElement.h"
+
#include "core/svg/SVGURIReference.h"
namespace WebCore {
@@ -140,12 +140,6 @@ private:
END_DECLARE_ANIMATED_PROPERTIES
};
-inline SVGTextPathElement* toSVGTextPathElement(Node* node)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(SVGNames::textPathTag));
- return static_cast<SVGTextPathElement*>(node);
-}
-
} // namespace WebCore
#endif
diff --git a/chromium/third_party/WebKit/Source/core/svg/SVGUseElement.cpp b/chromium/third_party/WebKit/Source/core/svg/SVGUseElement.cpp
index 9589a9f2b8f..9ea02500f09 100644
--- a/chromium/third_party/WebKit/Source/core/svg/SVGUseElement.cpp
+++ b/chromium/third_party/WebKit/Source/core/svg/SVGUseElement.cpp
@@ -34,9 +34,9 @@
#include "core/dom/NodeTraversal.h"
#include "core/dom/shadow/ElementShadow.h"
#include "core/dom/shadow/ShadowRoot.h"
-#include "core/fetch/DocumentResource.h"
-#include "core/fetch/FetchRequest.h"
-#include "core/fetch/ResourceFetcher.h"
+#include "core/loader/cache/DocumentResource.h"
+#include "core/loader/cache/FetchRequest.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/rendering/svg/RenderSVGResource.h"
#include "core/rendering/svg/RenderSVGTransformableContainer.h"
#include "core/svg/SVGElementInstance.h"
diff --git a/chromium/third_party/WebKit/Source/core/svg/SVGUseElement.h b/chromium/third_party/WebKit/Source/core/svg/SVGUseElement.h
index 3216a518244..1540588715b 100644
--- a/chromium/third_party/WebKit/Source/core/svg/SVGUseElement.h
+++ b/chromium/third_party/WebKit/Source/core/svg/SVGUseElement.h
@@ -22,7 +22,7 @@
#define SVGUseElement_h
#include "SVGNames.h"
-#include "core/fetch/DocumentResource.h"
+#include "core/loader/cache/DocumentResource.h"
#include "core/svg/SVGAnimatedBoolean.h"
#include "core/svg/SVGAnimatedLength.h"
#include "core/svg/SVGExternalResourcesRequired.h"
diff --git a/chromium/third_party/WebKit/Source/core/svg/graphics/SVGImageCache.cpp b/chromium/third_party/WebKit/Source/core/svg/graphics/SVGImageCache.cpp
index 81153b3739e..6b5e5a2f3ed 100644
--- a/chromium/third_party/WebKit/Source/core/svg/graphics/SVGImageCache.cpp
+++ b/chromium/third_party/WebKit/Source/core/svg/graphics/SVGImageCache.cpp
@@ -21,7 +21,7 @@
#include "config.h"
#include "core/svg/graphics/SVGImageCache.h"
-#include "core/fetch/ImageResource.h"
+#include "core/loader/cache/ImageResource.h"
#include "core/page/FrameView.h"
#include "core/page/Page.h"
#include "core/platform/graphics/GraphicsContext.h"
diff --git a/chromium/third_party/WebKit/Source/core/testing/InspectorFrontendClientLocal.cpp b/chromium/third_party/WebKit/Source/core/testing/InspectorFrontendClientLocal.cpp
index cec7a00ebe1..a68a070d155 100644
--- a/chromium/third_party/WebKit/Source/core/testing/InspectorFrontendClientLocal.cpp
+++ b/chromium/third_party/WebKit/Source/core/testing/InspectorFrontendClientLocal.cpp
@@ -39,8 +39,8 @@
#include "core/platform/Timer.h"
#include "public/platform/Platform.h"
#include "public/platform/WebThread.h"
-#include "wtf/Deque.h"
-#include "wtf/text/WTFString.h"
+#include <wtf/Deque.h>
+#include <wtf/text/WTFString.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/testing/InspectorFrontendClientLocal.h b/chromium/third_party/WebKit/Source/core/testing/InspectorFrontendClientLocal.h
index e92f6f58e76..ef35ebab8dc 100644
--- a/chromium/third_party/WebKit/Source/core/testing/InspectorFrontendClientLocal.h
+++ b/chromium/third_party/WebKit/Source/core/testing/InspectorFrontendClientLocal.h
@@ -32,9 +32,9 @@
#define InspectorFrontendClientLocal_h
#include "core/inspector/InspectorFrontendClient.h"
-#include "wtf/Forward.h"
-#include "wtf/Noncopyable.h"
-#include "wtf/text/WTFString.h"
+#include <wtf/Forward.h>
+#include <wtf/Noncopyable.h>
+#include <wtf/text/WTFString.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/testing/Internals.cpp b/chromium/third_party/WebKit/Source/core/testing/Internals.cpp
index 63285fab580..dba52a6173c 100644
--- a/chromium/third_party/WebKit/Source/core/testing/Internals.cpp
+++ b/chromium/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -41,7 +41,6 @@
#include "bindings/v8/ExceptionState.h"
#include "bindings/v8/SerializedScriptValue.h"
#include "bindings/v8/V8ThrowException.h"
-#include "core/animation/DocumentTimeline.h"
#include "core/css/StyleSheetContents.h"
#include "core/css/resolver/StyleResolver.h"
#include "core/css/resolver/ViewportStyleResolver.h"
@@ -68,8 +67,6 @@
#include "core/editing/Editor.h"
#include "core/editing/SpellChecker.h"
#include "core/editing/TextIterator.h"
-#include "core/fetch/MemoryCache.h"
-#include "core/fetch/ResourceFetcher.h"
#include "core/history/BackForwardController.h"
#include "core/history/HistoryItem.h"
#include "core/html/FormController.h"
@@ -87,6 +84,8 @@
#include "core/inspector/InspectorOverlay.h"
#include "core/inspector/InstrumentingAgents.h"
#include "core/loader/FrameLoader.h"
+#include "core/loader/cache/MemoryCache.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/page/Chrome.h"
#include "core/page/ChromeClient.h"
#include "core/page/DOMPoint.h"
@@ -110,9 +109,7 @@
#include "core/platform/graphics/filters/FilterOperations.h"
#include "core/platform/graphics/gpu/SharedGraphicsContext3D.h"
#include "core/platform/mock/PlatformSpeechSynthesizerMock.h"
-#include "core/rendering/RenderLayer.h"
#include "core/rendering/RenderLayerBacking.h"
-#include "core/rendering/RenderLayerCompositor.h"
#include "core/rendering/RenderMenuList.h"
#include "core/rendering/RenderObject.h"
#include "core/rendering/RenderTreeAsText.h"
@@ -121,7 +118,6 @@
#include "core/workers/WorkerThread.h"
#include "modules/speech/DOMWindowSpeechSynthesis.h"
#include "modules/speech/SpeechSynthesis.h"
-#include "public/platform/WebLayer.h"
#include "weborigin/SchemeRegistry.h"
#include "wtf/dtoa.h"
#include "wtf/text/StringBuffer.h"
@@ -186,6 +182,9 @@ PassRefPtr<Internals> Internals::create(Document* document)
Internals::~Internals()
{
+ if (m_scrollingCoordinator) {
+ m_scrollingCoordinator->removeTouchEventTargetRectsObserver(this);
+ }
}
void Internals::resetToConsistentState(Page* page)
@@ -211,7 +210,11 @@ Internals::Internals(Document* document)
: ContextLifecycleObserver(document)
, m_runtimeFlags(InternalRuntimeFlags::create())
, m_scrollingCoordinator(document->page()->scrollingCoordinator())
+ , m_touchEventTargetRectUpdateCount(0)
{
+ if (m_scrollingCoordinator) {
+ m_scrollingCoordinator->addTouchEventTargetRectsObserver(this);
+ }
}
Document* Internals::contextDocument() const
@@ -411,10 +414,10 @@ unsigned short Internals::compareTreeScopePosition(const Node* node1, const Node
unsigned Internals::numberOfActiveAnimations() const
{
Frame* contextFrame = frame();
- if (RuntimeEnabledFeatures::webAnimationsCSSEnabled())
- return frame()->document()->timeline()->numberOfActiveAnimationsForTesting();
- if (AnimationController* controller = contextFrame->animation())
- return controller->numberOfActiveAnimations(contextFrame->document());
+ if (!RuntimeEnabledFeatures::webAnimationsCSSEnabled()) {
+ if (AnimationController* controller = contextFrame->animation())
+ return controller->numberOfActiveAnimations(contextFrame->document());
+ }
return 0;
}
@@ -457,9 +460,7 @@ void Internals::pauseAnimations(double pauseTime, ExceptionState& es)
return;
}
- if (RuntimeEnabledFeatures::webAnimationsCSSEnabled())
- frame()->document()->timeline()->pauseAnimationsForTesting(pauseTime);
- else
+ if (!RuntimeEnabledFeatures::webAnimationsCSSEnabled())
frame()->animation()->pauseAnimationsForTesting(pauseTime);
}
@@ -1293,126 +1294,48 @@ unsigned Internals::touchEventHandlerCount(Document* document, ExceptionState& e
return count;
}
-static RenderLayer* findRenderLayerForGraphicsLayer(RenderLayer* searchRoot, GraphicsLayer* graphicsLayer, String* layerType)
+LayerRectList* Internals::touchEventTargetLayerRects(Document* document, ExceptionState& es)
{
- if (searchRoot->backing() && graphicsLayer == searchRoot->backing()->graphicsLayer())
- return searchRoot;
-
- if (graphicsLayer == searchRoot->layerForScrolling()) {
- *layerType = "scrolling";
- return searchRoot;
- }
-
- if (graphicsLayer == searchRoot->layerForHorizontalScrollbar()) {
- *layerType = "horizontalScrollbar";
- return searchRoot;
- }
-
- if (graphicsLayer == searchRoot->layerForVerticalScrollbar()) {
- *layerType = "verticalScrollbar";
- return searchRoot;
- }
-
- if (graphicsLayer == searchRoot->layerForScrollCorner()) {
- *layerType = "scrollCorner";
- return searchRoot;
- }
-
- for (RenderLayer* child = searchRoot->firstChild(); child; child = child->nextSibling()) {
- RenderLayer* foundLayer = findRenderLayerForGraphicsLayer(child, graphicsLayer, layerType);
- if (foundLayer)
- return foundLayer;
- }
-
- return 0;
-}
-
-// Given a vector of rects, merge those that are adjacent, leaving empty rects
-// in the place of no longer used slots. This is intended to simplify the list
-// of rects returned by an SkRegion (which have been split apart for sorting
-// purposes). No attempt is made to do this efficiently (eg. by relying on the
-// sort criteria of SkRegion).
-static void mergeRects(WebKit::WebVector<WebKit::WebRect>& rects)
-{
- for (size_t i = 0; i < rects.size(); ++i) {
- if (rects[i].isEmpty())
- continue;
- bool updated;
- do {
- updated = false;
- for (size_t j = i+1; j < rects.size(); ++j) {
- if (rects[j].isEmpty())
- continue;
- // Try to merge rects[j] into rects[i] along the 4 possible edges.
- if (rects[i].y == rects[j].y && rects[i].height == rects[j].height) {
- if (rects[i].x + rects[i].width == rects[j].x) {
- rects[i].width += rects[j].width;
- rects[j] = WebKit::WebRect();
- updated = true;
- } else if (rects[i].x == rects[j].x + rects[j].width) {
- rects[i].x = rects[j].x;
- rects[i].width += rects[j].width;
- rects[j] = WebKit::WebRect();
- updated = true;
- }
- } else if (rects[i].x == rects[j].x && rects[i].width == rects[j].width) {
- if (rects[i].y + rects[i].height == rects[j].y) {
- rects[i].height += rects[j].height;
- rects[j] = WebKit::WebRect();
- updated = true;
- } else if (rects[i].y == rects[j].y + rects[j].height) {
- rects[i].y = rects[j].y;
- rects[i].height += rects[j].height;
- rects[j] = WebKit::WebRect();
- updated = true;
- }
- }
- }
- } while (updated);
- }
-}
-
-static void accumulateLayerRectList(RenderLayerCompositor* compositor, GraphicsLayer* graphicsLayer, LayerRectList* rects)
-{
- WebKit::WebVector<WebKit::WebRect> layerRects = graphicsLayer->platformLayer()->touchEventHandlerRegion();
- if (!layerRects.isEmpty()) {
- mergeRects(layerRects);
- String layerType;
- RenderLayer* renderLayer = findRenderLayerForGraphicsLayer(compositor->rootRenderLayer(), graphicsLayer, &layerType);
- Node* node = renderLayer ? renderLayer->renderer()->node() : 0;
- for (size_t i = 0; i < layerRects.size(); ++i) {
- if (!layerRects[i].isEmpty())
- rects->append(node, layerType, ClientRect::create(layerRects[i]));
- }
+ if (!document || !document->view() || !document->page() || document != contextDocument()) {
+ es.throwDOMException(InvalidAccessError);
+ return 0;
}
- size_t numChildren = graphicsLayer->children().size();
- for (size_t i = 0; i < numChildren; ++i)
- accumulateLayerRectList(compositor, graphicsLayer->children()[i], rects);
+ // Do any pending layouts (which may call touchEventTargetRectsChange) to ensure this
+ // really takes any previous changes into account.
+ document->updateLayout();
+ return m_currentTouchEventRects.get();
}
-PassRefPtr<LayerRectList> Internals::touchEventTargetLayerRects(Document* document, ExceptionState& es)
+unsigned Internals::touchEventTargetLayerRectsUpdateCount(Document* document, ExceptionState& es)
{
if (!document || !document->view() || !document->page() || document != contextDocument()) {
es.throwDOMException(InvalidAccessError);
return 0;
}
- // Do any pending layouts (which may call touchEventTargetRectsChange) to ensure this
- // really takes any previous changes into account.
+ // Do any pending layouts to ensure this really takes any previous changes into account.
document->updateLayout();
- if (RenderView* view = document->renderView()) {
- if (RenderLayerCompositor* compositor = view->compositor()) {
- if (GraphicsLayer* rootLayer = compositor->rootGraphicsLayer()) {
- RefPtr<LayerRectList> rects = LayerRectList::create();
- accumulateLayerRectList(compositor, rootLayer, rects.get());
- return rects;
- }
+ return m_touchEventTargetRectUpdateCount;
+}
+
+void Internals::touchEventTargetRectsChanged(const LayerHitTestRects& rects)
+{
+ // When profiling content_shell, it can be handy to exclude this time (since it's only
+ // present for testing / debugging).
+ TRACE_EVENT0("input", "Internals::touchEventTargetRectsChanged");
+
+ m_touchEventTargetRectUpdateCount++;
+
+ // Since it's not safe to hang onto the pointers in a LayerHitTestRects, we immediately
+ // copy into a LayerRectList.
+ m_currentTouchEventRects = LayerRectList::create();
+ for (LayerHitTestRects::const_iterator iter = rects.begin(); iter != rects.end(); ++iter) {
+ for (size_t i = 0; i < iter->value.size(); ++i) {
+ m_currentTouchEventRects->append(iter->key->renderer()->node(), ClientRect::create(enclosingIntRect(iter->value[i])));
}
}
-
- return 0;
}
PassRefPtr<NodeList> Internals::nodesFromRect(Document* document, int centerX, int centerY, unsigned topPadding, unsigned rightPadding,
diff --git a/chromium/third_party/WebKit/Source/core/testing/Internals.h b/chromium/third_party/WebKit/Source/core/testing/Internals.h
index bbba5ffdde4..bde21e22f4e 100644
--- a/chromium/third_party/WebKit/Source/core/testing/Internals.h
+++ b/chromium/third_party/WebKit/Source/core/testing/Internals.h
@@ -33,10 +33,10 @@
#include "core/dom/ContextLifecycleObserver.h"
#include "core/dom/NodeList.h"
#include "core/page/scrolling/ScrollingCoordinator.h"
-#include "wtf/ArrayBuffer.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefCounted.h"
-#include "wtf/text/WTFString.h"
+#include <wtf/ArrayBuffer.h>
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+#include <wtf/text/WTFString.h>
namespace WebCore {
@@ -67,7 +67,8 @@ class ShadowRoot;
class TypeConversions;
class Internals : public RefCounted<Internals>
- , public ContextLifecycleObserver {
+ , public ContextLifecycleObserver
+ , public ScrollingCoordinator::TouchEventTargetRectsObserver {
public:
static PassRefPtr<Internals> create(Document*);
virtual ~Internals();
@@ -181,7 +182,9 @@ public:
unsigned wheelEventHandlerCount(Document*, ExceptionState&);
unsigned touchEventHandlerCount(Document*, ExceptionState&);
- PassRefPtr<LayerRectList> touchEventTargetLayerRects(Document*, ExceptionState&);
+ LayerRectList* touchEventTargetLayerRects(Document*, ExceptionState&);
+ unsigned touchEventTargetLayerRectsUpdateCount(Document*, ExceptionState&);
+ virtual void touchEventTargetRectsChanged(const LayerHitTestRects&);
// This is used to test rect based hit testing like what's done on touch screens.
PassRefPtr<NodeList> nodesFromRect(Document*, int x, int y, unsigned topPadding, unsigned rightPadding,
@@ -304,6 +307,8 @@ private:
OwnPtr<InspectorFrontendChannelDummy> m_frontendChannel;
RefPtr<InternalRuntimeFlags> m_runtimeFlags;
RefPtr<ScrollingCoordinator> m_scrollingCoordinator;
+ int m_touchEventTargetRectUpdateCount;
+ RefPtr<LayerRectList> m_currentTouchEventRects;
RefPtr<InternalProfilers> m_profilers;
};
diff --git a/chromium/third_party/WebKit/Source/core/testing/Internals.idl b/chromium/third_party/WebKit/Source/core/testing/Internals.idl
index 65a304e81be..d521c04ebe5 100644
--- a/chromium/third_party/WebKit/Source/core/testing/Internals.idl
+++ b/chromium/third_party/WebKit/Source/core/testing/Internals.idl
@@ -142,7 +142,7 @@
[RaisesException] unsigned long wheelEventHandlerCount(Document document);
[RaisesException] unsigned long touchEventHandlerCount(Document document);
[RaisesException] LayerRectList touchEventTargetLayerRects(Document document);
-
+ [RaisesException] unsigned long touchEventTargetLayerRectsUpdateCount(Document document);
[RaisesException] NodeList nodesFromRect(Document document, long x, long y,
unsigned long topPadding, unsigned long rightPadding, unsigned long bottomPadding, unsigned long leftPadding,
diff --git a/chromium/third_party/WebKit/Source/core/testing/LayerRect.h b/chromium/third_party/WebKit/Source/core/testing/LayerRect.h
index 4827feee4f2..f945681417f 100644
--- a/chromium/third_party/WebKit/Source/core/testing/LayerRect.h
+++ b/chromium/third_party/WebKit/Source/core/testing/LayerRect.h
@@ -36,7 +36,6 @@
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
#include "wtf/RefPtr.h"
-#include "wtf/text/WTFString.h"
namespace WebCore {
@@ -44,25 +43,22 @@ class Node;
class LayerRect : public RefCounted<LayerRect> {
public:
- static PassRefPtr<LayerRect> create(PassRefPtr<Node> node, const String& layerType, PassRefPtr<ClientRect> rect)
+ static PassRefPtr<LayerRect> create(PassRefPtr<Node> node, PassRefPtr<ClientRect> rect)
{
- return adoptRef(new LayerRect(node, layerType, rect));
+ return adoptRef(new LayerRect(node, rect));
}
Node* layerRootNode() const { return m_layerRootNode.get(); }
- String layerType() const { return m_layerType; }
ClientRect* layerRelativeRect() const { return m_rect.get(); }
private:
- LayerRect(PassRefPtr<Node> node, const String& layerName, PassRefPtr<ClientRect> rect)
+ LayerRect(PassRefPtr<Node> node, PassRefPtr<ClientRect> rect)
: m_layerRootNode(node)
- , m_layerType(layerName)
, m_rect(rect)
{
}
RefPtr<Node> m_layerRootNode;
- String m_layerType;
RefPtr<ClientRect> m_rect;
};
diff --git a/chromium/third_party/WebKit/Source/core/testing/LayerRect.idl b/chromium/third_party/WebKit/Source/core/testing/LayerRect.idl
index 8a4d8e17f18..50994ab58e9 100644
--- a/chromium/third_party/WebKit/Source/core/testing/LayerRect.idl
+++ b/chromium/third_party/WebKit/Source/core/testing/LayerRect.idl
@@ -31,6 +31,5 @@
[
] interface LayerRect {
readonly attribute Node layerRootNode;
- readonly attribute DOMString layerType;
readonly attribute ClientRect layerRelativeRect;
};
diff --git a/chromium/third_party/WebKit/Source/core/testing/LayerRectList.cpp b/chromium/third_party/WebKit/Source/core/testing/LayerRectList.cpp
index 4e8b9911983..578b407a6f4 100644
--- a/chromium/third_party/WebKit/Source/core/testing/LayerRectList.cpp
+++ b/chromium/third_party/WebKit/Source/core/testing/LayerRectList.cpp
@@ -58,9 +58,9 @@ LayerRect* LayerRectList::item(unsigned index)
return m_list[index].get();
}
-void LayerRectList::append(PassRefPtr<Node> layerRootNode, const String& layerType, PassRefPtr<ClientRect> layerRelativeRect)
+void LayerRectList::append(PassRefPtr<Node> layerRootNode, PassRefPtr<ClientRect> layerRelativeRect)
{
- m_list.append(LayerRect::create(layerRootNode, layerType, layerRelativeRect));
+ m_list.append(LayerRect::create(layerRootNode, layerRelativeRect));
}
} // namespace WebCore
diff --git a/chromium/third_party/WebKit/Source/core/testing/LayerRectList.h b/chromium/third_party/WebKit/Source/core/testing/LayerRectList.h
index ec1582b8b99..d46d1dc78b8 100644
--- a/chromium/third_party/WebKit/Source/core/testing/LayerRectList.h
+++ b/chromium/third_party/WebKit/Source/core/testing/LayerRectList.h
@@ -35,7 +35,6 @@
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
namespace WebCore {
@@ -51,7 +50,7 @@ public:
unsigned length() const;
LayerRect* item(unsigned index);
- void append(PassRefPtr<Node> layerRootNode, const String& layerName, PassRefPtr<ClientRect> layerRelativeRect);
+ void append(PassRefPtr<Node> layerRootNode, PassRefPtr<ClientRect> layerRelativeRect);
private:
LayerRectList();
diff --git a/chromium/third_party/WebKit/Source/core/testing/MallocStatistics.h b/chromium/third_party/WebKit/Source/core/testing/MallocStatistics.h
index bc4da8562ca..3f07bbd9f71 100644
--- a/chromium/third_party/WebKit/Source/core/testing/MallocStatistics.h
+++ b/chromium/third_party/WebKit/Source/core/testing/MallocStatistics.h
@@ -26,9 +26,9 @@
#ifndef MallocStatistics_h
#define MallocStatistics_h
-#include "wtf/FastMalloc.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefCounted.h"
+#include <wtf/FastMalloc.h>
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/testing/MockPagePopupDriver.h b/chromium/third_party/WebKit/Source/core/testing/MockPagePopupDriver.h
index e1f90aa54d0..154815be362 100644
--- a/chromium/third_party/WebKit/Source/core/testing/MockPagePopupDriver.h
+++ b/chromium/third_party/WebKit/Source/core/testing/MockPagePopupDriver.h
@@ -28,7 +28,7 @@
#include "core/page/PagePopupClient.h"
#include "core/page/PagePopupDriver.h"
-#include "wtf/RefPtr.h"
+#include <wtf/RefPtr.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/testing/TypeConversions.h b/chromium/third_party/WebKit/Source/core/testing/TypeConversions.h
index 10f675f42f4..b8cde7bf27a 100644
--- a/chromium/third_party/WebKit/Source/core/testing/TypeConversions.h
+++ b/chromium/third_party/WebKit/Source/core/testing/TypeConversions.h
@@ -26,9 +26,9 @@
#ifndef TypeConversions_h
#define TypeConversions_h
-#include "wtf/FastMalloc.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefCounted.h"
+#include <wtf/FastMalloc.h>
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/workers/AbstractWorker.cpp b/chromium/third_party/WebKit/Source/core/workers/AbstractWorker.cpp
index 24e9bb88a92..e4b9c7f177f 100644
--- a/chromium/third_party/WebKit/Source/core/workers/AbstractWorker.cpp
+++ b/chromium/third_party/WebKit/Source/core/workers/AbstractWorker.cpp
@@ -57,24 +57,24 @@ void AbstractWorker::contextDestroyed()
KURL AbstractWorker::resolveURL(const String& url, ExceptionState& es)
{
if (url.isEmpty()) {
- es.throwDOMException(SyntaxError, "Failed to create a worker: an empty URL was provided.");
+ es.throwDOMException(SyntaxError);
return KURL();
}
// FIXME: This should use the dynamic global scope (bug #27887)
KURL scriptURL = scriptExecutionContext()->completeURL(url);
if (!scriptURL.isValid()) {
- es.throwDOMException(SyntaxError, "Failed to create a worker: '" + url + "' is not a valid URL.");
+ es.throwDOMException(SyntaxError);
return KURL();
}
if (!scriptExecutionContext()->securityOrigin()->canRequest(scriptURL)) {
- es.throwDOMException(SecurityError, "Failed to create a worker: script with origin '" + SecurityOrigin::create(scriptURL)->toString() + "' cannot be accessed from origin '" + scriptExecutionContext()->securityOrigin()->toString() + "'.");
+ es.throwDOMException(SecurityError);
return KURL();
}
if (scriptExecutionContext()->contentSecurityPolicy() && !scriptExecutionContext()->contentSecurityPolicy()->allowScriptFromSource(scriptURL)) {
- es.throwDOMException(SecurityError, "Failed to create a worker: access to the script at '" + url + "' is denied by the document's Content Security Policy.");
+ es.throwDOMException(SecurityError);
return KURL();
}
diff --git a/chromium/third_party/WebKit/Source/core/workers/AbstractWorker.h b/chromium/third_party/WebKit/Source/core/workers/AbstractWorker.h
index de94684d9bd..5805534924f 100644
--- a/chromium/third_party/WebKit/Source/core/workers/AbstractWorker.h
+++ b/chromium/third_party/WebKit/Source/core/workers/AbstractWorker.h
@@ -36,10 +36,10 @@
#include "core/dom/EventListener.h"
#include "core/dom/EventNames.h"
#include "core/dom/EventTarget.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefCounted.h"
-#include "wtf/RefPtr.h"
-#include "wtf/text/AtomicStringHash.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+#include <wtf/RefPtr.h>
+#include <wtf/text/AtomicStringHash.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/workers/DefaultSharedWorkerRepository.h b/chromium/third_party/WebKit/Source/core/workers/DefaultSharedWorkerRepository.h
index 6cf1ee1b450..1237988ab14 100644
--- a/chromium/third_party/WebKit/Source/core/workers/DefaultSharedWorkerRepository.h
+++ b/chromium/third_party/WebKit/Source/core/workers/DefaultSharedWorkerRepository.h
@@ -32,14 +32,14 @@
#define DefaultSharedWorkerRepository_h
#include "core/page/ContentSecurityPolicy.h"
-#include "wtf/Forward.h"
-#include "wtf/HashMap.h"
-#include "wtf/Noncopyable.h"
-#include "wtf/PassOwnPtr.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefPtr.h"
-#include "wtf/Threading.h"
-#include "wtf/text/StringHash.h"
+#include <wtf/Forward.h>
+#include <wtf/HashMap.h>
+#include <wtf/Noncopyable.h>
+#include <wtf/PassOwnPtr.h>
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefPtr.h>
+#include <wtf/text/StringHash.h>
+#include <wtf/Threading.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/workers/SharedWorker.cpp b/chromium/third_party/WebKit/Source/core/workers/SharedWorker.cpp
index 6ccf3e4fd91..55019ec7dc5 100644
--- a/chromium/third_party/WebKit/Source/core/workers/SharedWorker.cpp
+++ b/chromium/third_party/WebKit/Source/core/workers/SharedWorker.cpp
@@ -65,18 +65,18 @@ PassRefPtr<SharedWorker> SharedWorker::create(ScriptExecutionContext* context, c
worker->suspendIfNeeded();
+ KURL scriptURL = worker->resolveURL(url, es);
+ if (scriptURL.isEmpty())
+ return 0;
+
// We don't currently support nested workers, so workers can only be created from documents.
ASSERT_WITH_SECURITY_IMPLICATION(context->isDocument());
Document* document = toDocument(context);
if (!document->securityOrigin()->canAccessSharedWorkers()) {
- es.throwDOMException(SecurityError, "Failed to create 'SharedWorker': access to shared workers is denied to origin '" + document->securityOrigin()->toString() + "'.");
+ es.throwDOMException(SecurityError);
return 0;
}
- KURL scriptURL = worker->resolveURL(url, es);
- if (scriptURL.isEmpty())
- return 0;
-
SharedWorkerRepository::connect(worker.get(), remotePort.release(), scriptURL, name, es);
return worker.release();
diff --git a/chromium/third_party/WebKit/Source/core/workers/SharedWorkerRepository.h b/chromium/third_party/WebKit/Source/core/workers/SharedWorkerRepository.h
index 26d15cbf068..6a3927af560 100644
--- a/chromium/third_party/WebKit/Source/core/workers/SharedWorkerRepository.h
+++ b/chromium/third_party/WebKit/Source/core/workers/SharedWorkerRepository.h
@@ -31,9 +31,9 @@
#ifndef SharedWorkerRepository_h
#define SharedWorkerRepository_h
-#include "wtf/Forward.h"
-#include "wtf/PassOwnPtr.h"
-#include "wtf/PassRefPtr.h"
+#include <wtf/Forward.h>
+#include <wtf/PassOwnPtr.h>
+#include <wtf/PassRefPtr.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/workers/Worker.cpp b/chromium/third_party/WebKit/Source/core/workers/Worker.cpp
index 52d852393ae..c94d08c4e70 100644
--- a/chromium/third_party/WebKit/Source/core/workers/Worker.cpp
+++ b/chromium/third_party/WebKit/Source/core/workers/Worker.cpp
@@ -33,9 +33,9 @@
#include "core/dom/EventListener.h"
#include "core/dom/EventNames.h"
#include "core/dom/MessageEvent.h"
-#include "core/fetch/ResourceFetcher.h"
#include "core/inspector/InspectorInstrumentation.h"
#include "core/loader/FrameLoader.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/page/DOMWindow.h"
#include "core/page/Frame.h"
#include "core/page/UseCounter.h"
diff --git a/chromium/third_party/WebKit/Source/core/workers/Worker.h b/chromium/third_party/WebKit/Source/core/workers/Worker.h
index 023578a9f21..3f0eb1a166c 100644
--- a/chromium/third_party/WebKit/Source/core/workers/Worker.h
+++ b/chromium/third_party/WebKit/Source/core/workers/Worker.h
@@ -34,10 +34,10 @@
#include "core/dom/MessagePort.h"
#include "core/workers/AbstractWorker.h"
#include "core/workers/WorkerScriptLoaderClient.h"
-#include "wtf/Forward.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefPtr.h"
-#include "wtf/text/AtomicStringHash.h"
+#include <wtf/Forward.h>
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefPtr.h>
+#include <wtf/text/AtomicStringHash.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/workers/WorkerEventQueue.h b/chromium/third_party/WebKit/Source/core/workers/WorkerEventQueue.h
index fda0b93eed9..5eb85673b5a 100644
--- a/chromium/third_party/WebKit/Source/core/workers/WorkerEventQueue.h
+++ b/chromium/third_party/WebKit/Source/core/workers/WorkerEventQueue.h
@@ -28,10 +28,10 @@
#define WorkerEventQueue_h
#include "core/dom/EventQueue.h"
-#include "wtf/HashMap.h"
-#include "wtf/HashSet.h"
-#include "wtf/PassOwnPtr.h"
-#include "wtf/RefCounted.h"
+#include <wtf/HashMap.h>
+#include <wtf/HashSet.h>
+#include <wtf/PassOwnPtr.h>
+#include <wtf/RefCounted.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp b/chromium/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
index 374aa7e4726..f80e1ffce1f 100644
--- a/chromium/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
+++ b/chromium/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
@@ -194,7 +194,7 @@ void WorkerGlobalScope::importScripts(const Vector<String>& urls, ExceptionState
for (Vector<String>::const_iterator it = urls.begin(); it != urlsEnd; ++it) {
const KURL& url = scriptExecutionContext()->completeURL(*it);
if (!url.isValid()) {
- es.throwDOMException(SyntaxError, "Failed to execute 'importScripts': the URL '" + *it + "' is invalid.");
+ es.throwDOMException(SyntaxError);
return;
}
completedURLs.append(url);
@@ -208,7 +208,7 @@ void WorkerGlobalScope::importScripts(const Vector<String>& urls, ExceptionState
// If the fetching attempt failed, throw a NetworkError exception and abort all these steps.
if (scriptLoader->failed()) {
- es.throwDOMException(NetworkError, "Failed to execute 'importScripts': the script at '" + it->elidedString() + "' failed to load.");
+ es.throwDOMException(NetworkError);
return;
}
diff --git a/chromium/third_party/WebKit/Source/core/workers/WorkerGlobalScope.idl b/chromium/third_party/WebKit/Source/core/workers/WorkerGlobalScope.idl
index f7a445e3fd7..87c3594f8f7 100644
--- a/chromium/third_party/WebKit/Source/core/workers/WorkerGlobalScope.idl
+++ b/chromium/third_party/WebKit/Source/core/workers/WorkerGlobalScope.idl
@@ -37,7 +37,7 @@
attribute EventHandler onerror;
// WorkerUtils
- [RaisesException] void importScripts(DOMString... urls);
+ [Custom] void importScripts(/*[Variadic] in DOMString urls */);
[Replaceable] readonly attribute WorkerNavigator navigator;
// Additional constructors
diff --git a/chromium/third_party/WebKit/Source/core/workers/WorkerLoaderProxy.h b/chromium/third_party/WebKit/Source/core/workers/WorkerLoaderProxy.h
index f3eed8dc807..3342d900d77 100644
--- a/chromium/third_party/WebKit/Source/core/workers/WorkerLoaderProxy.h
+++ b/chromium/third_party/WebKit/Source/core/workers/WorkerLoaderProxy.h
@@ -32,8 +32,8 @@
#define WorkerLoaderProxy_h
#include "core/dom/ScriptExecutionContext.h"
-#include "wtf/Forward.h"
-#include "wtf/PassOwnPtr.h"
+#include <wtf/Forward.h>
+#include <wtf/PassOwnPtr.h>
namespace WebKit {
class WebWorkerBase;
diff --git a/chromium/third_party/WebKit/Source/core/workers/WorkerLocation.cpp b/chromium/third_party/WebKit/Source/core/workers/WorkerLocation.cpp
index c93e8d1be15..87b509067c6 100644
--- a/chromium/third_party/WebKit/Source/core/workers/WorkerLocation.cpp
+++ b/chromium/third_party/WebKit/Source/core/workers/WorkerLocation.cpp
@@ -25,9 +25,10 @@
*/
#include "config.h"
+
#include "core/workers/WorkerLocation.h"
-#include "wtf/text/WTFString.h"
+#include <wtf/text/WTFString.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/workers/WorkerMessagingProxy.cpp b/chromium/third_party/WebKit/Source/core/workers/WorkerMessagingProxy.cpp
index 9794ea62322..eb15b16300e 100644
--- a/chromium/third_party/WebKit/Source/core/workers/WorkerMessagingProxy.cpp
+++ b/chromium/third_party/WebKit/Source/core/workers/WorkerMessagingProxy.cpp
@@ -49,7 +49,7 @@
#include "core/workers/Worker.h"
#include "core/workers/WorkerClients.h"
#include "core/workers/WorkerThreadStartupData.h"
-#include "wtf/MainThread.h"
+#include <wtf/MainThread.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/workers/WorkerMessagingProxy.h b/chromium/third_party/WebKit/Source/core/workers/WorkerMessagingProxy.h
index 26566bfb2b5..9b2113bd4ae 100644
--- a/chromium/third_party/WebKit/Source/core/workers/WorkerMessagingProxy.h
+++ b/chromium/third_party/WebKit/Source/core/workers/WorkerMessagingProxy.h
@@ -31,12 +31,12 @@
#include "core/workers/WorkerGlobalScopeProxy.h"
#include "core/workers/WorkerLoaderProxy.h"
#include "core/workers/WorkerObjectProxy.h"
-#include "wtf/Forward.h"
-#include "wtf/Noncopyable.h"
-#include "wtf/PassOwnPtr.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefPtr.h"
-#include "wtf/Vector.h"
+#include <wtf/Forward.h>
+#include <wtf/Noncopyable.h>
+#include <wtf/PassOwnPtr.h>
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefPtr.h>
+#include <wtf/Vector.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/workers/WorkerObjectProxy.h b/chromium/third_party/WebKit/Source/core/workers/WorkerObjectProxy.h
index d0061f752ac..d4da8699306 100644
--- a/chromium/third_party/WebKit/Source/core/workers/WorkerObjectProxy.h
+++ b/chromium/third_party/WebKit/Source/core/workers/WorkerObjectProxy.h
@@ -33,7 +33,7 @@
#include "core/dom/MessagePort.h"
#include "core/workers/WorkerReportingProxy.h"
-#include "wtf/PassOwnPtr.h"
+#include <wtf/PassOwnPtr.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/workers/WorkerReportingProxy.h b/chromium/third_party/WebKit/Source/core/workers/WorkerReportingProxy.h
index daa8f500b45..a42df140dd0 100644
--- a/chromium/third_party/WebKit/Source/core/workers/WorkerReportingProxy.h
+++ b/chromium/third_party/WebKit/Source/core/workers/WorkerReportingProxy.h
@@ -32,7 +32,7 @@
#define WorkerReportingProxy_h
#include "core/page/ConsoleTypes.h"
-#include "wtf/Forward.h"
+#include <wtf/Forward.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/workers/WorkerRunLoop.cpp b/chromium/third_party/WebKit/Source/core/workers/WorkerRunLoop.cpp
index e2d2a040f1b..a0744ccebbf 100644
--- a/chromium/third_party/WebKit/Source/core/workers/WorkerRunLoop.cpp
+++ b/chromium/third_party/WebKit/Source/core/workers/WorkerRunLoop.cpp
@@ -37,7 +37,7 @@
#include "core/platform/ThreadTimers.h"
#include "core/workers/WorkerGlobalScope.h"
#include "core/workers/WorkerThread.h"
-#include "wtf/CurrentTime.h"
+#include <wtf/CurrentTime.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/workers/WorkerRunLoop.h b/chromium/third_party/WebKit/Source/core/workers/WorkerRunLoop.h
index 8ee3e8eadf4..28a7bc5bf82 100644
--- a/chromium/third_party/WebKit/Source/core/workers/WorkerRunLoop.h
+++ b/chromium/third_party/WebKit/Source/core/workers/WorkerRunLoop.h
@@ -32,9 +32,9 @@
#define WorkerRunLoop_h
#include "core/dom/ScriptExecutionContext.h"
-#include "wtf/MessageQueue.h"
-#include "wtf/OwnPtr.h"
-#include "wtf/PassOwnPtr.h"
+#include <wtf/MessageQueue.h>
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp b/chromium/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp
index 7f6290e683a..9c10f8b70bd 100644
--- a/chromium/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp
+++ b/chromium/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp
@@ -26,6 +26,7 @@
*/
#include "config.h"
+
#include "core/workers/WorkerScriptLoader.h"
#include "core/dom/ScriptExecutionContext.h"
@@ -35,9 +36,9 @@
#include "core/workers/WorkerGlobalScope.h"
#include "core/workers/WorkerScriptLoaderClient.h"
-#include "wtf/OwnPtr.h"
-#include "wtf/RefPtr.h"
-#include "wtf/UnusedParam.h"
+#include <wtf/OwnPtr.h>
+#include <wtf/RefPtr.h>
+#include <wtf/UnusedParam.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/xml/DOMParser.cpp b/chromium/third_party/WebKit/Source/core/xml/DOMParser.cpp
index b923b46ec23..561b34d57a9 100644
--- a/chromium/third_party/WebKit/Source/core/xml/DOMParser.cpp
+++ b/chromium/third_party/WebKit/Source/core/xml/DOMParser.cpp
@@ -21,7 +21,7 @@
#include "core/dom/DOMImplementation.h"
#include "core/dom/Document.h"
-#include "wtf/text/WTFString.h"
+#include <wtf/text/WTFString.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/xml/NativeXPathNSResolver.cpp b/chromium/third_party/WebKit/Source/core/xml/NativeXPathNSResolver.cpp
index 8ae8c04db12..e398afd373b 100644
--- a/chromium/third_party/WebKit/Source/core/xml/NativeXPathNSResolver.cpp
+++ b/chromium/third_party/WebKit/Source/core/xml/NativeXPathNSResolver.cpp
@@ -28,7 +28,7 @@
#include "XMLNames.h"
#include "core/dom/Node.h"
-#include "wtf/text/WTFString.h"
+#include <wtf/text/WTFString.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/xml/NativeXPathNSResolver.h b/chromium/third_party/WebKit/Source/core/xml/NativeXPathNSResolver.h
index 17a1238ba10..00e04fd839b 100644
--- a/chromium/third_party/WebKit/Source/core/xml/NativeXPathNSResolver.h
+++ b/chromium/third_party/WebKit/Source/core/xml/NativeXPathNSResolver.h
@@ -27,7 +27,7 @@
#define NativeXPathNSResolver_h
#include "core/xml/XPathNSResolver.h"
-#include "wtf/RefPtr.h"
+#include <wtf/RefPtr.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/xml/XMLErrors.cpp b/chromium/third_party/WebKit/Source/core/xml/XMLErrors.cpp
index acef59f78ef..2c1bd853564 100644
--- a/chromium/third_party/WebKit/Source/core/xml/XMLErrors.cpp
+++ b/chromium/third_party/WebKit/Source/core/xml/XMLErrors.cpp
@@ -34,7 +34,7 @@
#include "core/dom/Document.h"
#include "core/dom/Element.h"
#include "core/dom/Text.h"
-#include "wtf/text/WTFString.h"
+#include <wtf/text/WTFString.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/xml/XMLErrors.h b/chromium/third_party/WebKit/Source/core/xml/XMLErrors.h
index 7adfd1e3a7f..d45a25903c5 100644
--- a/chromium/third_party/WebKit/Source/core/xml/XMLErrors.h
+++ b/chromium/third_party/WebKit/Source/core/xml/XMLErrors.h
@@ -29,8 +29,8 @@
#ifndef XMLErrors_h
#define XMLErrors_h
-#include "wtf/text/StringBuilder.h"
-#include "wtf/text/TextPosition.h"
+#include <wtf/text/StringBuilder.h>
+#include <wtf/text/TextPosition.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/xml/XMLHttpRequest.cpp b/chromium/third_party/WebKit/Source/core/xml/XMLHttpRequest.cpp
index 9dc97ee7509..e65a4a720fd 100644
--- a/chromium/third_party/WebKit/Source/core/xml/XMLHttpRequest.cpp
+++ b/chromium/third_party/WebKit/Source/core/xml/XMLHttpRequest.cpp
@@ -260,10 +260,12 @@ Document* XMLHttpRequest::responseXML(ExceptionState& es)
return m_responseDocument.get();
}
-Blob* XMLHttpRequest::responseBlob()
+Blob* XMLHttpRequest::responseBlob(ExceptionState& es)
{
- ASSERT(m_responseTypeCode == ResponseTypeBlob);
-
+ if (m_responseTypeCode != ResponseTypeBlob) {
+ es.throwDOMException(InvalidStateError);
+ return 0;
+ }
// We always return null before DONE.
if (m_error || m_state != DONE)
return 0;
@@ -293,9 +295,12 @@ Blob* XMLHttpRequest::responseBlob()
return m_responseBlob.get();
}
-ArrayBuffer* XMLHttpRequest::responseArrayBuffer()
+ArrayBuffer* XMLHttpRequest::responseArrayBuffer(ExceptionState& es)
{
- ASSERT(m_responseTypeCode == ResponseTypeArrayBuffer);
+ if (m_responseTypeCode != ResponseTypeArrayBuffer) {
+ es.throwDOMException(InvalidStateError);
+ return 0;
+ }
if (m_error || m_state != DONE)
return 0;
diff --git a/chromium/third_party/WebKit/Source/core/xml/XMLHttpRequest.h b/chromium/third_party/WebKit/Source/core/xml/XMLHttpRequest.h
index a4316f1cdbe..fde3a84be50 100644
--- a/chromium/third_party/WebKit/Source/core/xml/XMLHttpRequest.h
+++ b/chromium/third_party/WebKit/Source/core/xml/XMLHttpRequest.h
@@ -108,7 +108,7 @@ public:
String getResponseHeader(const AtomicString& name, ExceptionState&) const;
ScriptString responseText(ExceptionState&);
Document* responseXML(ExceptionState&);
- Blob* responseBlob();
+ Blob* responseBlob(ExceptionState&);
unsigned long timeout() const { return m_timeoutMilliseconds; }
void setTimeout(unsigned long timeout, ExceptionState&);
@@ -124,7 +124,7 @@ public:
ResponseTypeCode responseTypeCode() const { return m_responseTypeCode; }
// response attribute has custom getter.
- ArrayBuffer* responseArrayBuffer();
+ ArrayBuffer* responseArrayBuffer(ExceptionState&);
void setLastSendLineNumber(unsigned lineNumber) { m_lastSendLineNumber = lineNumber; }
void setLastSendURL(const String& url) { m_lastSendURL = url; }
diff --git a/chromium/third_party/WebKit/Source/core/xml/XMLHttpRequestUpload.cpp b/chromium/third_party/WebKit/Source/core/xml/XMLHttpRequestUpload.cpp
index 8803da05361..770e4954c7c 100644
--- a/chromium/third_party/WebKit/Source/core/xml/XMLHttpRequestUpload.cpp
+++ b/chromium/third_party/WebKit/Source/core/xml/XMLHttpRequestUpload.cpp
@@ -30,8 +30,8 @@
#include "core/dom/EventNames.h"
#include "core/xml/XMLHttpRequest.h"
#include "core/xml/XMLHttpRequestProgressEvent.h"
-#include "wtf/Assertions.h"
-#include "wtf/text/AtomicString.h"
+#include <wtf/Assertions.h>
+#include <wtf/text/AtomicString.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/xml/XMLSerializer.cpp b/chromium/third_party/WebKit/Source/core/xml/XMLSerializer.cpp
index 3b056364981..ad32db4ad5a 100644
--- a/chromium/third_party/WebKit/Source/core/xml/XMLSerializer.cpp
+++ b/chromium/third_party/WebKit/Source/core/xml/XMLSerializer.cpp
@@ -24,7 +24,7 @@
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
#include "core/editing/markup.h"
-#include "wtf/text/WTFString.h"
+#include <wtf/text/WTFString.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/xml/XPathExpression.cpp b/chromium/third_party/WebKit/Source/core/xml/XPathExpression.cpp
index 0850a92a65d..0e587e3cc25 100644
--- a/chromium/third_party/WebKit/Source/core/xml/XPathExpression.cpp
+++ b/chromium/third_party/WebKit/Source/core/xml/XPathExpression.cpp
@@ -34,7 +34,7 @@
#include "core/xml/XPathParser.h"
#include "core/xml/XPathResult.h"
#include "core/xml/XPathUtil.h"
-#include "wtf/text/WTFString.h"
+#include <wtf/text/WTFString.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/xml/XPathExpressionNode.cpp b/chromium/third_party/WebKit/Source/core/xml/XPathExpressionNode.cpp
index 524a48d65d4..a534976e36f 100644
--- a/chromium/third_party/WebKit/Source/core/xml/XPathExpressionNode.cpp
+++ b/chromium/third_party/WebKit/Source/core/xml/XPathExpressionNode.cpp
@@ -28,7 +28,7 @@
#include "core/xml/XPathExpressionNode.h"
#include "core/dom/Node.h"
-#include "wtf/StdLibExtras.h"
+#include <wtf/StdLibExtras.h>
namespace WebCore {
namespace XPath {
diff --git a/chromium/third_party/WebKit/Source/core/xml/XPathExpressionNode.h b/chromium/third_party/WebKit/Source/core/xml/XPathExpressionNode.h
index 7101a562edf..64a930d2737 100644
--- a/chromium/third_party/WebKit/Source/core/xml/XPathExpressionNode.h
+++ b/chromium/third_party/WebKit/Source/core/xml/XPathExpressionNode.h
@@ -29,9 +29,9 @@
#include "core/dom/Node.h"
#include "core/xml/XPathValue.h"
-#include "wtf/HashMap.h"
-#include "wtf/Vector.h"
-#include "wtf/text/StringHash.h"
+#include <wtf/HashMap.h>
+#include <wtf/text/StringHash.h>
+#include <wtf/Vector.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/xml/XPathFunctions.cpp b/chromium/third_party/WebKit/Source/core/xml/XPathFunctions.cpp
index 0af3a8bbfb3..0e9f977361d 100644
--- a/chromium/third_party/WebKit/Source/core/xml/XPathFunctions.cpp
+++ b/chromium/third_party/WebKit/Source/core/xml/XPathFunctions.cpp
@@ -34,8 +34,8 @@
#include "core/dom/TreeScope.h"
#include "core/xml/XPathUtil.h"
#include "core/xml/XPathValue.h"
-#include "wtf/MathExtras.h"
-#include "wtf/text/StringBuilder.h"
+#include <wtf/MathExtras.h>
+#include <wtf/text/StringBuilder.h>
namespace WebCore {
namespace XPath {
diff --git a/chromium/third_party/WebKit/Source/core/xml/XPathGrammar.y b/chromium/third_party/WebKit/Source/core/xml/XPathGrammar.y
index a4f5b692cff..e2a8c23390d 100644
--- a/chromium/third_party/WebKit/Source/core/xml/XPathGrammar.y
+++ b/chromium/third_party/WebKit/Source/core/xml/XPathGrammar.y
@@ -36,7 +36,7 @@
#include "core/xml/XPathPredicate.h"
#include "core/xml/XPathStep.h"
#include "core/xml/XPathVariableReference.h"
-#include "wtf/FastMalloc.h"
+#include <wtf/FastMalloc.h>
#define YYMALLOC fastMalloc
#define YYFREE fastFree
diff --git a/chromium/third_party/WebKit/Source/core/xml/XPathNodeSet.h b/chromium/third_party/WebKit/Source/core/xml/XPathNodeSet.h
index c90e395ded4..488fe8797b6 100644
--- a/chromium/third_party/WebKit/Source/core/xml/XPathNodeSet.h
+++ b/chromium/third_party/WebKit/Source/core/xml/XPathNodeSet.h
@@ -26,8 +26,8 @@
#ifndef XPathNodeSet_h
#define XPathNodeSet_h
-#include "wtf/Forward.h"
-#include "wtf/Vector.h"
+#include <wtf/Forward.h>
+#include <wtf/Vector.h>
#include "core/dom/Node.h"
diff --git a/chromium/third_party/WebKit/Source/core/xml/XPathParser.cpp b/chromium/third_party/WebKit/Source/core/xml/XPathParser.cpp
index 3fe9b350ccf..4f2c8b26e2d 100644
--- a/chromium/third_party/WebKit/Source/core/xml/XPathParser.cpp
+++ b/chromium/third_party/WebKit/Source/core/xml/XPathParser.cpp
@@ -34,8 +34,8 @@
#include "core/xml/XPathNSResolver.h"
#include "core/xml/XPathPath.h"
#include "core/xml/XPathStep.h"
-#include "wtf/StdLibExtras.h"
-#include "wtf/text/StringHash.h"
+#include <wtf/StdLibExtras.h>
+#include <wtf/text/StringHash.h>
using namespace WebCore;
using namespace WTF;
diff --git a/chromium/third_party/WebKit/Source/core/xml/XPathPredicate.cpp b/chromium/third_party/WebKit/Source/core/xml/XPathPredicate.cpp
index 963e115a626..3a77f7d0a6c 100644
--- a/chromium/third_party/WebKit/Source/core/xml/XPathPredicate.cpp
+++ b/chromium/third_party/WebKit/Source/core/xml/XPathPredicate.cpp
@@ -32,7 +32,7 @@
#include "core/xml/XPathFunctions.h"
#include "core/xml/XPathUtil.h"
#include "core/xml/XPathValue.h"
-#include "wtf/MathExtras.h"
+#include <wtf/MathExtras.h>
namespace WebCore {
namespace XPath {
diff --git a/chromium/third_party/WebKit/Source/core/xml/XPathUtil.cpp b/chromium/third_party/WebKit/Source/core/xml/XPathUtil.cpp
index 5967efa025d..9ee19c8bf91 100644
--- a/chromium/third_party/WebKit/Source/core/xml/XPathUtil.cpp
+++ b/chromium/third_party/WebKit/Source/core/xml/XPathUtil.cpp
@@ -29,7 +29,7 @@
#include "core/dom/ContainerNode.h"
#include "core/dom/NodeTraversal.h"
-#include "wtf/text/StringBuilder.h"
+#include <wtf/text/StringBuilder.h>
namespace WebCore {
namespace XPath {
diff --git a/chromium/third_party/WebKit/Source/core/xml/XPathUtil.h b/chromium/third_party/WebKit/Source/core/xml/XPathUtil.h
index 9db3314ec9d..62b65994e3c 100644
--- a/chromium/third_party/WebKit/Source/core/xml/XPathUtil.h
+++ b/chromium/third_party/WebKit/Source/core/xml/XPathUtil.h
@@ -27,8 +27,8 @@
#ifndef XPathUtil_h
#define XPathUtil_h
-#include "wtf/Forward.h"
-#include "wtf/Vector.h"
+#include <wtf/Forward.h>
+#include <wtf/Vector.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/xml/XPathValue.cpp b/chromium/third_party/WebKit/Source/core/xml/XPathValue.cpp
index 301356cd6ea..2bd56c0d86b 100644
--- a/chromium/third_party/WebKit/Source/core/xml/XPathValue.cpp
+++ b/chromium/third_party/WebKit/Source/core/xml/XPathValue.cpp
@@ -30,8 +30,8 @@
#include <limits>
#include "core/xml/XPathExpressionNode.h"
#include "core/xml/XPathUtil.h"
-#include "wtf/MathExtras.h"
-#include "wtf/StdLibExtras.h"
+#include <wtf/MathExtras.h>
+#include <wtf/StdLibExtras.h>
using std::numeric_limits;
diff --git a/chromium/third_party/WebKit/Source/core/xml/XPathValue.h b/chromium/third_party/WebKit/Source/core/xml/XPathValue.h
index c21a8dc2b4f..a693e7187f8 100644
--- a/chromium/third_party/WebKit/Source/core/xml/XPathValue.h
+++ b/chromium/third_party/WebKit/Source/core/xml/XPathValue.h
@@ -28,7 +28,7 @@
#define XPathValue_h
#include "core/xml/XPathNodeSet.h"
-#include "wtf/text/WTFString.h"
+#include <wtf/text/WTFString.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/xml/XSLImportRule.cpp b/chromium/third_party/WebKit/Source/core/xml/XSLImportRule.cpp
index b6917afa228..242303c2172 100644
--- a/chromium/third_party/WebKit/Source/core/xml/XSLImportRule.cpp
+++ b/chromium/third_party/WebKit/Source/core/xml/XSLImportRule.cpp
@@ -24,9 +24,9 @@
#include "FetchInitiatorTypeNames.h"
#include "core/dom/Document.h"
-#include "core/fetch/FetchRequest.h"
-#include "core/fetch/ResourceFetcher.h"
-#include "core/fetch/XSLStyleSheetResource.h"
+#include "core/loader/cache/FetchRequest.h"
+#include "core/loader/cache/ResourceFetcher.h"
+#include "core/loader/cache/XSLStyleSheetResource.h"
#include "core/xml/XSLStyleSheet.h"
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/xml/XSLImportRule.h b/chromium/third_party/WebKit/Source/core/xml/XSLImportRule.h
index e78fc08585a..63355d1182c 100644
--- a/chromium/third_party/WebKit/Source/core/xml/XSLImportRule.h
+++ b/chromium/third_party/WebKit/Source/core/xml/XSLImportRule.h
@@ -23,10 +23,10 @@
#ifndef XSLImportRule_h
#define XSLImportRule_h
-#include "core/fetch/ResourcePtr.h"
-#include "core/fetch/StyleSheetResourceClient.h"
+#include "core/loader/cache/ResourcePtr.h"
+#include "core/loader/cache/StyleSheetResourceClient.h"
#include "core/xml/XSLStyleSheet.h"
-#include "wtf/PassOwnPtr.h"
+#include <wtf/PassOwnPtr.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/xml/XSLStyleSheet.h b/chromium/third_party/WebKit/Source/core/xml/XSLStyleSheet.h
index 3ca331a7beb..f7b47c53b63 100644
--- a/chromium/third_party/WebKit/Source/core/xml/XSLStyleSheet.h
+++ b/chromium/third_party/WebKit/Source/core/xml/XSLStyleSheet.h
@@ -27,7 +27,7 @@
#include <libxslt/transform.h>
#include "core/css/StyleSheet.h"
#include "core/dom/ProcessingInstruction.h"
-#include "wtf/PassRefPtr.h"
+#include <wtf/PassRefPtr.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/xml/XSLTProcessor.cpp b/chromium/third_party/WebKit/Source/core/xml/XSLTProcessor.cpp
index d1807cd1cfb..043fd8de7e6 100644
--- a/chromium/third_party/WebKit/Source/core/xml/XSLTProcessor.cpp
+++ b/chromium/third_party/WebKit/Source/core/xml/XSLTProcessor.cpp
@@ -21,6 +21,7 @@
*/
#include "config.h"
+
#include "core/xml/XSLTProcessor.h"
#include "core/dom/DOMImplementation.h"
@@ -32,8 +33,9 @@
#include "core/page/Frame.h"
#include "core/page/FrameView.h"
#include "weborigin/SecurityOrigin.h"
-#include "wtf/Assertions.h"
-#include "wtf/Vector.h"
+
+#include <wtf/Assertions.h>
+#include <wtf/Vector.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/xml/XSLTProcessorLibxslt.cpp b/chromium/third_party/WebKit/Source/core/xml/XSLTProcessorLibxslt.cpp
index b9e111b2465..6e3866cd2fc 100644
--- a/chromium/third_party/WebKit/Source/core/xml/XSLTProcessorLibxslt.cpp
+++ b/chromium/third_party/WebKit/Source/core/xml/XSLTProcessorLibxslt.cpp
@@ -21,12 +21,22 @@
*/
#include "config.h"
+
#include "core/xml/XSLTProcessor.h"
+#include <libxslt/imports.h>
+#include <libxslt/security.h>
+#include <libxslt/variables.h>
+#include <libxslt/xsltutils.h>
+#include <wtf/Assertions.h>
+#include <wtf/text/CString.h>
+#include <wtf/text/StringBuffer.h>
+#include <wtf/unicode/UTF8.h>
+#include <wtf/Vector.h>
#include "core/dom/Document.h"
#include "core/dom/TransformSource.h"
#include "core/editing/markup.h"
-#include "core/fetch/ResourceFetcher.h"
+#include "core/loader/cache/ResourceFetcher.h"
#include "core/page/Frame.h"
#include "core/page/Page.h"
#include "core/page/PageConsole.h"
@@ -38,15 +48,6 @@
#include "core/xml/XSLTUnicodeSort.h"
#include "core/xml/parser/XMLDocumentParser.h"
#include "weborigin/SecurityOrigin.h"
-#include "wtf/Assertions.h"
-#include "wtf/Vector.h"
-#include "wtf/text/CString.h"
-#include "wtf/text/StringBuffer.h"
-#include "wtf/unicode/UTF8.h"
-#include <libxslt/imports.h>
-#include <libxslt/security.h>
-#include <libxslt/variables.h>
-#include <libxslt/xsltutils.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/xml/XSLTUnicodeSort.cpp b/chromium/third_party/WebKit/Source/core/xml/XSLTUnicodeSort.cpp
index 83342cb6900..316b5c4817e 100644
--- a/chromium/third_party/WebKit/Source/core/xml/XSLTUnicodeSort.cpp
+++ b/chromium/third_party/WebKit/Source/core/xml/XSLTUnicodeSort.cpp
@@ -29,10 +29,10 @@
#include "config.h"
#include "core/xml/XSLTUnicodeSort.h"
-#include "wtf/text/WTFString.h"
-#include "wtf/unicode/Collator.h"
#include <libxslt/templates.h>
#include <libxslt/xsltutils.h>
+#include <wtf/text/WTFString.h>
+#include <wtf/unicode/Collator.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp b/chromium/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
index 7f2b90f381d..197868f423f 100644
--- a/chromium/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
+++ b/chromium/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
@@ -26,6 +26,15 @@
#include "config.h"
#include "core/xml/parser/XMLDocumentParser.h"
+#include <libxml/parser.h>
+#include <libxml/parserInternals.h>
+#include <libxslt/xslt.h>
+#include <wtf/StringExtras.h>
+#include <wtf/text/CString.h>
+#include <wtf/Threading.h>
+#include <wtf/unicode/UTF8.h>
+#include <wtf/UnusedParam.h>
+#include <wtf/Vector.h>
#include "HTMLNames.h"
#include "XMLNSNames.h"
#include "bindings/v8/ExceptionState.h"
@@ -40,14 +49,14 @@
#include "core/dom/ProcessingInstruction.h"
#include "core/dom/ScriptLoader.h"
#include "core/dom/TransformSource.h"
-#include "core/fetch/ResourceFetcher.h"
-#include "core/fetch/ScriptResource.h"
#include "core/html/HTMLHtmlElement.h"
#include "core/html/HTMLTemplateElement.h"
#include "core/html/parser/HTMLEntityParser.h"
#include "core/loader/FrameLoader.h"
#include "core/loader/ImageLoader.h"
#include "core/loader/TextResourceDecoder.h"
+#include "core/loader/cache/ResourceFetcher.h"
+#include "core/loader/cache/ScriptResource.h"
#include "core/page/Frame.h"
#include "core/page/UseCounter.h"
#include "core/platform/network/ResourceError.h"
@@ -58,16 +67,7 @@
#include "core/xml/parser/XMLDocumentParserScope.h"
#include "core/xml/parser/XMLParserInput.h"
#include "weborigin/SecurityOrigin.h"
-#include "wtf/StringExtras.h"
#include "wtf/TemporaryChange.h"
-#include "wtf/Threading.h"
-#include "wtf/UnusedParam.h"
-#include "wtf/Vector.h"
-#include "wtf/text/CString.h"
-#include "wtf/unicode/UTF8.h"
-#include <libxml/parser.h>
-#include <libxml/parserInternals.h>
-#include <libxslt/xslt.h>
using namespace std;
diff --git a/chromium/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.h b/chromium/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.h
index 64b1898eedc..72334821501 100644
--- a/chromium/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.h
+++ b/chromium/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.h
@@ -27,15 +27,15 @@
#include "core/dom/ParserContentPolicy.h"
#include "core/dom/ScriptableDocumentParser.h"
-#include "core/fetch/ResourceClient.h"
-#include "core/fetch/ResourcePtr.h"
+#include "core/loader/cache/ResourceClient.h"
+#include "core/loader/cache/ResourcePtr.h"
#include "core/platform/text/SegmentedString.h"
#include "core/xml/XMLErrors.h"
-#include "wtf/HashMap.h"
-#include "wtf/OwnPtr.h"
-#include "wtf/text/CString.h"
-#include "wtf/text/StringHash.h"
#include <libxml/tree.h>
+#include <wtf/HashMap.h>
+#include <wtf/OwnPtr.h>
+#include <wtf/text/CString.h>
+#include <wtf/text/StringHash.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/core/xml/parser/XMLDocumentParserScope.h b/chromium/third_party/WebKit/Source/core/xml/parser/XMLDocumentParserScope.h
index 613d165cb27..510c5838a2c 100644
--- a/chromium/third_party/WebKit/Source/core/xml/parser/XMLDocumentParserScope.h
+++ b/chromium/third_party/WebKit/Source/core/xml/parser/XMLDocumentParserScope.h
@@ -26,7 +26,8 @@
#ifndef XMLDocumentParserScope_h
#define XMLDocumentParserScope_h
-#include "wtf/Noncopyable.h"
+#include <wtf/Noncopyable.h>
+
#include <libxml/xmlerror.h>
namespace WebCore {
diff --git a/chromium/third_party/WebKit/Source/devtools/devtools.gyp b/chromium/third_party/WebKit/Source/devtools/devtools.gyp
index b458f6e9b58..1eb4103cfc1 100644
--- a/chromium/third_party/WebKit/Source/devtools/devtools.gyp
+++ b/chromium/third_party/WebKit/Source/devtools/devtools.gyp
@@ -105,7 +105,6 @@
'front_end/JavaScriptFormatter.js',
'front_end/jsdifflib.js',
'front_end/KeyboardShortcut.js',
- 'front_end/LayersPanelDescriptor.js',
'front_end/Linkifier.js',
'front_end/LiveEditSupport.js',
'front_end/NativeBreakpointsSidebarPane.js',
@@ -232,7 +231,6 @@
'front_end/textPrompt.css',
'front_end/timelinePanel.css',
'front_end/canvasProfiler.css',
- 'front_end/layersPanel.css',
],
'devtools_elements_js_files': [
'front_end/CSSNamedFlowCollectionsView.js',
@@ -352,7 +350,6 @@
'<@(devtools_timeline_js_files)',
'<@(devtools_profiles_js_files)',
'<@(devtools_audits_js_files)',
- '<@(devtools_layers_js_files)',
'<@(devtools_codemirror_js_files)',
],
'devtools_uglifyjs_files': [
@@ -460,14 +457,6 @@
'front_end/Images/trackHoriz.png',
'front_end/Images/trackVert.png',
],
-
- 'devtools_layers_js_files': [
- 'front_end/LayersPanel.js',
- 'front_end/LayerTreeModel.js',
- 'front_end/LayerTree.js',
- 'front_end/Layers3DView.js',
- ],
-
'devtools_extension_api_files': [
'front_end/ExtensionAPI.js',
'front_end/DevToolsExtensionAPI.js'
@@ -492,7 +481,6 @@
'concatenated_devtools_profiles_js',
'concatenated_devtools_audits_js',
'concatenated_devtools_codemirror_js',
- 'concatenated_devtools_layers_js',
'concatenated_heap_snapshot_worker_js',
'concatenated_script_formatter_worker_js',
'concatenated_devtools_css'],
@@ -578,7 +566,6 @@
'concatenated_devtools_profiles_js',
'concatenated_devtools_audits_js',
'concatenated_devtools_codemirror_js',
- 'concatenated_devtools_layers_js',
'concatenated_heap_snapshot_worker_js',
'concatenated_script_formatter_worker_js',
'concatenated_devtools_css'],
@@ -595,7 +582,6 @@
'<(PRODUCT_DIR)/resources/inspector/TimelinePanel.js',
'<(PRODUCT_DIR)/resources/inspector/ProfilesPanel.js',
'<(PRODUCT_DIR)/resources/inspector/AuditsPanel.js',
- '<(PRODUCT_DIR)/resources/inspector/LayersPanel.js',
'<(PRODUCT_DIR)/resources/inspector/CodeMirrorTextEditor.js',
'<(PRODUCT_DIR)/resources/inspector/HeapSnapshotWorker.js',
'<(PRODUCT_DIR)/resources/inspector/ScriptFormatterWorker.js',
@@ -871,22 +857,6 @@
}],
},
{
- 'target_name': 'concatenated_devtools_layers_js',
- 'type': 'none',
- 'actions': [{
- 'action_name': 'concatenate_devtools_layers_js',
- 'script_name': 'scripts/inline_js_imports.py',
- 'input_file': 'front_end/LayersPanel.js',
- 'inputs': [
- '<@(_script_name)',
- '<@(devtools_layers_js_files)',
- ],
- 'search_path': 'front_end',
- 'outputs': ['<(PRODUCT_DIR)/resources/inspector/LayersPanel.js'],
- 'action': ['python', '<@(_script_name)', '<@(_input_file)', '<@(_search_path)', '<@(_outputs)'],
- }],
- },
- {
'target_name': 'concatenated_devtools_css',
'type': 'none',
'dependencies': [
diff --git a/chromium/third_party/WebKit/Source/devtools/front_end/AuditLauncherView.js b/chromium/third_party/WebKit/Source/devtools/front_end/AuditLauncherView.js
index 3ff4e4e9930..b5f777e5295 100644
--- a/chromium/third_party/WebKit/Source/devtools/front_end/AuditLauncherView.js
+++ b/chromium/third_party/WebKit/Source/devtools/front_end/AuditLauncherView.js
@@ -141,7 +141,7 @@ WebInspector.AuditLauncherView.prototype = {
if (this._auditRunning === auditRunning)
return;
this._auditRunning = auditRunning;
- this._launchButton.textContent = this._auditRunning ? WebInspector.UIString("Stop") : WebInspector.UIString("Run");
+ this._updateButton();
this._toggleUIComponents(this._auditRunning);
if (this._auditRunning)
this._startAudit();
@@ -208,6 +208,17 @@ WebInspector.AuditLauncherView.prototype = {
_categoryClicked: function()
{
this._selectedCategoriesUpdated(true);
+ this._selectAllCheckboxElement.checked = this._checkedCategoriesCount === this._sortedCategories.length;
+ },
+
+ _updateCheckedCategoriesCount: function()
+ {
+ this._checkedCategoriesCount = 0;
+ var checkboxes = this._categoriesElement.getElementsByTagName("input");
+ for (var i = 0; i < checkboxes.length; ++i) {
+ if (checkboxes[i].checked)
+ this._checkedCategoriesCount += 1;
+ }
},
/**
@@ -252,6 +263,7 @@ WebInspector.AuditLauncherView.prototype = {
this._contentElement.appendChild(categoryElement);
this._categoriesElement = this._contentElement.createChild("fieldset", "audit-categories-container");
+ this._checkedCategoriesCount = 0;
this._contentElement.createChild("div", "flexible-space");
@@ -289,14 +301,7 @@ WebInspector.AuditLauncherView.prototype = {
*/
_selectedCategoriesUpdated: function(userGesture)
{
- var checkedCategoriesCount = 0;
- var checkboxes = this._categoriesElement.getElementsByTagName("input");
- for (var i = 0; i < checkboxes.length; ++i) {
- if (checkboxes[i].checked)
- ++checkedCategoriesCount;
- }
- this._launchButton.disabled = checkedCategoriesCount === 0;
- this._selectAllCheckboxElement.checked = checkedCategoriesCount === this._sortedCategories.length;
+ this._updateCheckedCategoriesCount();
// Save present categories only upon user gesture to clean up junk from past versions and removed extensions.
// Do not remove old categories if not handling a user gesture, as there's chance categories will be added
@@ -307,6 +312,13 @@ WebInspector.AuditLauncherView.prototype = {
selectedCategories[childNodes[i].__displayName] = childNodes[i].firstChild.checked;
selectedCategories[WebInspector.AuditLauncherView.AllCategoriesKey] = this._selectAllCheckboxElement.checked;
this._selectedCategoriesSetting.set(selectedCategories);
+ this._updateButton();
+ },
+
+ _updateButton: function()
+ {
+ this._launchButton.textContent = this._auditRunning ? WebInspector.UIString("Stop") : WebInspector.UIString("Run");
+ this._launchButton.disabled = !this._checkedCategoriesCount;
},
__proto__: WebInspector.View.prototype
diff --git a/chromium/third_party/WebKit/Source/devtools/front_end/CPUProfileView.js b/chromium/third_party/WebKit/Source/devtools/front_end/CPUProfileView.js
index 3a3153bf75a..ff9a152531c 100644
--- a/chromium/third_party/WebKit/Source/devtools/front_end/CPUProfileView.js
+++ b/chromium/third_party/WebKit/Source/devtools/front_end/CPUProfileView.js
@@ -143,6 +143,9 @@ WebInspector.CPUProfileView.prototype = {
this._calculateTimes(profile);
+ if (profile.idleTime)
+ this._injectIdleTimeNode(profile);
+
this._assignParentsInProfile();
if (this.samples)
this._buildIdToNodeMap();
@@ -628,6 +631,39 @@ WebInspector.CPUProfileView.prototype = {
}
},
+ /**
+ * @param {ProfilerAgent.CPUProfile} profile
+ */
+ _injectIdleTimeNode: function(profile)
+ {
+ var idleTime = profile.idleTime;
+ var nodes = profile.head.children;
+
+ var programNode = {selfTime: 0};
+ for (var i = nodes.length - 1; i >= 0; --i) {
+ if (nodes[i].functionName === "(program)") {
+ programNode = nodes[i];
+ break;
+ }
+ }
+ var programTime = programNode.selfTime;
+ if (idleTime > programTime)
+ idleTime = programTime;
+ programTime = programTime - idleTime;
+ programNode.selfTime = programTime;
+ programNode.totalTime = programTime;
+ var idleNode = {
+ functionName: "(idle)",
+ url: null,
+ lineNumber: 0,
+ totalTime: idleTime,
+ selfTime: idleTime,
+ callUID: 0,
+ children: []
+ };
+ nodes.push(idleNode);
+ },
+
__proto__: WebInspector.View.prototype
}
diff --git a/chromium/third_party/WebKit/Source/devtools/front_end/CanvasProfileView.js b/chromium/third_party/WebKit/Source/devtools/front_end/CanvasProfileView.js
index 76094be452a..02e7b4d01a6 100644
--- a/chromium/third_party/WebKit/Source/devtools/front_end/CanvasProfileView.js
+++ b/chromium/third_party/WebKit/Source/devtools/front_end/CanvasProfileView.js
@@ -484,13 +484,12 @@ WebInspector.CanvasProfileView.prototype = {
{
var element = parentElement.createChild("span", "canvas-call-argument");
element._argumentIndex = -1;
- var description = callArgument.enumName || callArgument.description;
if (callArgument.type === "string") {
const maxStringLength = 150;
element.createTextChild("\"");
- element.createChild("span", "canvas-formatted-string").textContent = description.trimMiddle(maxStringLength);
+ element.createChild("span", "canvas-formatted-string").textContent = callArgument.description.trimMiddle(maxStringLength);
element.createTextChild("\"");
- element._suppressPopover = (description.length <= maxStringLength && !/[\r\n]/.test(description));
+ element._suppressPopover = (callArgument.description.length <= maxStringLength && !/[\r\n]/.test(callArgument.description));
} else {
var type = callArgument.subtype || callArgument.type;
if (type) {
@@ -502,11 +501,11 @@ WebInspector.CanvasProfileView.prototype = {
element._suppressPopover = true;
break;
case "number":
- element._suppressPopover = !isNaN(description);
+ element._suppressPopover = !isNaN(callArgument.description);
break;
}
}
- element.textContent = description;
+ element.textContent = callArgument.description;
}
if (callArgument.resourceId) {
element.addStyleClass("canvas-formatted-resource");
diff --git a/chromium/third_party/WebKit/Source/devtools/front_end/CodeMirrorTextEditor.js b/chromium/third_party/WebKit/Source/devtools/front_end/CodeMirrorTextEditor.js
index 029f07fe4a4..fa7c6d4323f 100644
--- a/chromium/third_party/WebKit/Source/devtools/front_end/CodeMirrorTextEditor.js
+++ b/chromium/third_party/WebKit/Source/devtools/front_end/CodeMirrorTextEditor.js
@@ -856,10 +856,6 @@ WebInspector.CodeMirrorTextEditor.prototype = {
{
},
- /**
- * @param {number} width
- * @param {number} height
- */
_updatePaddingBottom: function(width, height)
{
var scrollInfo = this._codeMirror.getScrollInfo();
@@ -877,12 +873,9 @@ WebInspector.CodeMirrorTextEditor.prototype = {
_resizeEditor: function()
{
- var parentElement = this.element.parentElement;
- if (!parentElement || !this.isShowing())
- return;
var scrollInfo = this._codeMirror.getScrollInfo();
- var width = parentElement.offsetWidth;
- var height = parentElement.offsetHeight;
+ var width = this.element.parentElement.offsetWidth;
+ var height = this.element.parentElement.offsetHeight;
this._codeMirror.setSize(width, height);
this._updatePaddingBottom(width, height);
this._codeMirror.scrollTo(scrollInfo.left, scrollInfo.top);
diff --git a/chromium/third_party/WebKit/Source/devtools/front_end/DebuggerModel.js b/chromium/third_party/WebKit/Source/devtools/front_end/DebuggerModel.js
index da464fbe3c0..cffad006043 100644
--- a/chromium/third_party/WebKit/Source/devtools/front_end/DebuggerModel.js
+++ b/chromium/third_party/WebKit/Source/devtools/front_end/DebuggerModel.js
@@ -167,24 +167,6 @@ WebInspector.DebuggerModel.prototype = {
/**
* @param {WebInspector.DebuggerModel.Location} rawLocation
- */
- stepIntoSelection: function(rawLocation)
- {
- /**
- * @param {WebInspector.DebuggerModel.Location} requestedLocation
- * @param {?string} error
- */
- function callback(requestedLocation, error)
- {
- if (error)
- return;
- this._pendingStepIntoLocation = requestedLocation;
- };
- DebuggerAgent.continueToLocation(rawLocation, true, callback.bind(this, rawLocation));
- },
-
- /**
- * @param {WebInspector.DebuggerModel.Location} rawLocation
* @param {string} condition
* @param {function(?DebuggerAgent.BreakpointId, Array.<WebInspector.DebuggerModel.Location>):void=} callback
*/
@@ -383,19 +365,6 @@ WebInspector.DebuggerModel.prototype = {
*/
_pausedScript: function(callFrames, reason, auxData, breakpointIds)
{
- if (this._pendingStepIntoLocation) {
- var requestedLocation = this._pendingStepIntoLocation;
- delete this._pendingStepIntoLocation;
-
- if (callFrames.length > 0) {
- var topLocation = callFrames[0].location;
- if (topLocation.lineNumber == requestedLocation.lineNumber && topLocation.columnNumber == requestedLocation.columnNumber && topLocation.scriptId == requestedLocation.scriptId) {
- DebuggerAgent.stepInto();
- return;
- }
- }
- }
-
this._setDebuggerPausedDetails(new WebInspector.DebuggerPausedDetails(this, callFrames, reason, auxData, breakpointIds));
},
@@ -505,11 +474,7 @@ WebInspector.DebuggerModel.prototype = {
function updateExecutionLine(uiLocation)
{
- var data = {
- uiLocation: uiLocation,
- callFrame: callFrame
- };
- this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.ExecutionLineChanged, data);
+ this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.ExecutionLineChanged, uiLocation);
}
this._executionLineLiveLocation = callFrame.script.createLiveLocation(callFrame.location, updateExecutionLine.bind(this));
},
@@ -849,29 +814,6 @@ WebInspector.DebuggerModel.CallFrame.prototype = {
},
/**
- * @param {function(Array.<DebuggerAgent.Location>)} callback
- */
- getStepIntoLocations: function(callback)
- {
- if (this._stepInLocations) {
- callback(this._stepInLocations.slice(0));
- return;
- }
- /**
- * @param {?string} error
- * @param {Array.<DebuggerAgent.Location>=} stepInPositions
- */
- function getStepInPositionsCallback(error, stepInPositions) {
- if (error) {
- return;
- }
- this._stepInLocations = stepInPositions;
- callback(this._stepInLocations.slice(0));
- }
- DebuggerAgent.getStepInPositions(this.id, getStepInPositionsCallback.bind(this));
- },
-
- /**
* @param {function(WebInspector.UILocation):(boolean|undefined)} updateDelegate
*/
createLiveLocation: function(updateDelegate)
diff --git a/chromium/third_party/WebKit/Source/devtools/front_end/JavaScriptSourceFrame.js b/chromium/third_party/WebKit/Source/devtools/front_end/JavaScriptSourceFrame.js
index c35d6706a8d..e245d9e2683 100644
--- a/chromium/third_party/WebKit/Source/devtools/front_end/JavaScriptSourceFrame.js
+++ b/chromium/third_party/WebKit/Source/devtools/front_end/JavaScriptSourceFrame.js
@@ -51,10 +51,6 @@ WebInspector.JavaScriptSourceFrame = function(scriptsPanel, uiSourceCode)
this.textEditor.addEventListener(WebInspector.TextEditor.Events.GutterClick, this._handleGutterClick.bind(this), this);
- this.textEditor.element.addEventListener("mousedown", this._onMouseDownAndClick.bind(this, true), true);
- this.textEditor.element.addEventListener("click", this._onMouseDownAndClick.bind(this, false), true);
-
-
this._breakpointManager.addEventListener(WebInspector.BreakpointManager.Events.BreakpointAdded, this._breakpointAdded, this);
this._breakpointManager.addEventListener(WebInspector.BreakpointManager.Events.BreakpointRemoved, this._breakpointRemoved, this);
@@ -364,12 +360,6 @@ WebInspector.JavaScriptSourceFrame.prototype = {
if (this._popoverHelper.isPopoverVisible()) {
this._popoverHelper.hidePopover();
event.consume();
- return;
- }
- if (this._stepIntoMarkup && WebInspector.KeyboardShortcut.eventHasCtrlOrMeta(event)) {
- this._stepIntoMarkup.moveSelectionTo(-1);
- event.consume();
- return;
}
}
},
@@ -426,44 +416,23 @@ WebInspector.JavaScriptSourceFrame.prototype = {
/**
* @param {number} lineNumber
- * @param {WebInspector.DebuggerModel.CallFrame} callFrame
*/
- setExecutionLine: function(lineNumber, callFrame)
+ setExecutionLine: function(lineNumber)
{
this._executionLineNumber = lineNumber;
- this._executionCallFrame = callFrame;
if (this.loaded) {
this.textEditor.setExecutionLine(lineNumber);
this.revealLine(this._executionLineNumber);
if (this.canEditSource())
this.setSelection(WebInspector.TextRange.createFromLocation(lineNumber, 0));
-
- /**
- * @param {Array.<DebuggerAgent.Location>} locations
- */
- function locationsCallback(locations)
- {
- if (this._executionCallFrame !== callFrame || this._stepIntoMarkup)
- return;
- this._stepIntoMarkup = WebInspector.JavaScriptSourceFrame.StepIntoMarkup.create(this, locations);
- if (this._stepIntoMarkup)
- this._stepIntoMarkup.show();
- }
- callFrame.getStepIntoLocations(locationsCallback.bind(this));
}
},
clearExecutionLine: function()
{
- if (this._stepIntoMarkup) {
- this._stepIntoMarkup.dispose();
- delete this._stepIntoMarkup;
- }
-
if (this.loaded && typeof this._executionLineNumber === "number")
this.textEditor.clearExecutionLine();
delete this._executionLineNumber;
- delete this._executionCallFrame;
},
_lineNumberAfterEditing: function(lineNumber, oldRange, newRange)
@@ -487,24 +456,6 @@ WebInspector.JavaScriptSourceFrame.prototype = {
return newLineNumber;
},
- _onMouseDownAndClick: function(isMouseDown, event)
- {
- var markup = this._stepIntoMarkup;
- if (!markup)
- return;
- var index = markup.findItemByCoordinates(event.x, event.y);
- if (typeof index === "undefined")
- return;
-
- if (isMouseDown) {
- // Do not let text editor to spoil 'click' event that is coming for us.
- event.consume();
- } else {
- var rawLocation = markup.getRawPosition(index);
- this._scriptsPanel.doStepIntoSelection(rawLocation);
- }
- },
-
/**
* @return {boolean}
*/
@@ -592,7 +543,7 @@ WebInspector.JavaScriptSourceFrame.prototype = {
onTextEditorContentLoaded: function()
{
if (typeof this._executionLineNumber === "number")
- this.setExecutionLine(this._executionLineNumber, this._executionCallFrame);
+ this.setExecutionLine(this._executionLineNumber);
var breakpointLocations = this._breakpointManager.breakpointLocationsForUISourceCode(this._uiSourceCode);
for (var i = 0; i < breakpointLocations.length; ++i)
@@ -680,14 +631,6 @@ WebInspector.JavaScriptSourceFrame.prototype = {
WebInspector.debuggerModel.continueToLocation(rawLocation);
},
- /**
- * @return {WebInspector.JavaScriptSourceFrame.StepIntoMarkup|undefined}
- */
- stepIntoMarkup: function()
- {
- return this._stepIntoMarkup;
- },
-
dispose: function()
{
this._breakpointManager.removeEventListener(WebInspector.BreakpointManager.Events.BreakpointAdded, this._breakpointAdded, this);
@@ -703,178 +646,3 @@ WebInspector.JavaScriptSourceFrame.prototype = {
__proto__: WebInspector.UISourceCodeFrame.prototype
}
-
-/**
- * @constructor
- * @param {Array.<DebuggerAgent.Location>} rawPositions
- * @param {Array.<WebInspector.TextRange>} editorRanges
- * @param {number} firstToExecute
- * @param {WebInspector.JavaScriptSourceFrame} sourceFrame
- */
-WebInspector.JavaScriptSourceFrame.StepIntoMarkup = function(rawPositions, editorRanges, firstToExecute, sourceFrame)
-{
- this._positions = rawPositions;
- this._editorRanges = editorRanges;
- this._highlightDescriptors = new Array(rawPositions.length);
- this._firstToExecute = firstToExecute;
- this._currentSelection = firstToExecute;
- this._sourceFrame = sourceFrame;
-};
-
-WebInspector.JavaScriptSourceFrame.StepIntoMarkup.prototype = {
- show: function()
- {
- for (var i = 0; i < this._positions.length; ++i)
- this._highlightItem(i, i == this._currentSelection);
- },
-
- /**
- * @param {boolean} backward
- */
- iterateSelection: function(backward)
- {
- var nextSelection = backward ? this._currentSelection - 1 : this._currentSelection + 1;
- this.moveSelectionTo(nextSelection);
- },
-
- selectFirstToExecute: function()
- {
- this.moveSelectionTo(this._firstToExecute);
- },
-
- /**
- * @param {number} nextSelection
- */
- moveSelectionTo: function(nextSelection)
- {
- var modulo = this._positions.length + 1;
- nextSelection = (nextSelection + modulo) % modulo;
- this._hideItemHighlight(this._currentSelection);
- this._hideItemHighlight(nextSelection);
- this._highlightItem(this._currentSelection, false);
- this._highlightItem(nextSelection, true);
- this._currentSelection = nextSelection;
- },
-
- /**
- * @param {number} position
- * @param {boolean} selected
- */
- _highlightItem: function(position, selected)
- {
- if (position === this._positions.length)
- return;
- var styleName = selected ? "source-frame-stepin-mark-highlighted" : "source-frame-stepin-mark";
- var textEditor = this._sourceFrame.textEditor;
- var highlightDescriptor = textEditor.highlightRange(this._editorRanges[position], styleName);
- this._highlightDescriptors[position] = highlightDescriptor;
- },
-
- /**
- * @param {number} position
- */
- _hideItemHighlight: function(position)
- {
- if (position === this._positions.length)
- return;
- var highlightDescriptor = this._highlightDescriptors[position];
- console.assert(highlightDescriptor);
- var textEditor = this._sourceFrame.textEditor;
- textEditor.removeHighlight(highlightDescriptor);
- this._highlightDescriptors[position] = undefined;
- },
-
- dispose: function()
- {
- for (var i = 0; i < this._positions.length; ++i)
- this._hideItemHighlight(i);
- },
-
- /**
- * @param {number} x
- * @param {number} y
- * @return {number|undefined}
- */
- findItemByCoordinates: function(x, y)
- {
- var textPosition = this._sourceFrame.textEditor.coordinatesToCursorPosition(x, y);
- if (!textPosition)
- return;
-
- var ranges = this._editorRanges;
-
- for (var i = 0; i < ranges.length; ++i) {
- var nextRange = ranges[i];
- if (nextRange.startLine == textPosition.startLine && nextRange.startColumn <= textPosition.startColumn && nextRange.endColumn >= textPosition.startColumn)
- return i;
- }
- },
-
- /**
- * @return {number|undefined}
- */
- getSelectedItemIndex: function()
- {
- if (this._currentSelection === this._positions.length)
- return undefined;
- return this._currentSelection;
- },
-
- /**
- * @return {WebInspector.DebuggerModel.Location}
- */
- getRawPosition: function(position)
- {
- return /** @type {WebInspector.DebuggerModel.Location} */ (this._positions[position]);
- }
-
-};
-
-/**
- * @param {WebInspector.JavaScriptSourceFrame} sourceFrame
- * @param {Array.<DebuggerAgent.Location>} stepIntoRawLocations
- * @return {?WebInspector.JavaScriptSourceFrame.StepIntoMarkup}
- */
-WebInspector.JavaScriptSourceFrame.StepIntoMarkup.create = function(sourceFrame, stepIntoRawLocations)
-{
- if (!stepIntoRawLocations.length)
- return null;
-
- var firstToExecute = stepIntoRawLocations[0];
- stepIntoRawLocations.sort(WebInspector.JavaScriptSourceFrame.StepIntoMarkup._Comparator);
- var firstToExecuteIndex = stepIntoRawLocations.indexOf(firstToExecute);
-
- var textEditor = sourceFrame.textEditor;
- var uiRanges = [];
- for (var i = 0; i < stepIntoRawLocations.length; ++i) {
- var uiLocation = WebInspector.debuggerModel.rawLocationToUILocation(/** @type {WebInspector.DebuggerModel.Location} */ (stepIntoRawLocations[i]));
-
- var token = textEditor.tokenAtTextPosition(uiLocation.lineNumber, uiLocation.columnNumber);
- var startColumn;
- var endColumn;
- if (token) {
- startColumn = token.startColumn;
- endColumn = token.endColumn;
- } else {
- startColumn = uiLocation.columnNumber;
- endColumn = uiLocation.columnNumber;
- }
- var range = new WebInspector.TextRange(uiLocation.lineNumber, startColumn, uiLocation.lineNumber, endColumn);
- uiRanges.push(range);
- }
-
- return new WebInspector.JavaScriptSourceFrame.StepIntoMarkup(stepIntoRawLocations, uiRanges, firstToExecuteIndex, sourceFrame);
-};
-
-/**
- * @param {DebuggerAgent.Location} locationA
- * @param {DebuggerAgent.Location} locationB
- * @return {number}
- */
-WebInspector.JavaScriptSourceFrame.StepIntoMarkup._Comparator = function(locationA, locationB)
-{
- if (locationA.lineNumber === locationB.lineNumber)
- return locationA.columnNumber - locationB.columnNumber;
- else
- return locationA.lineNumber - locationB.lineNumber;
-};
diff --git a/chromium/third_party/WebKit/Source/devtools/front_end/KeyboardShortcut.js b/chromium/third_party/WebKit/Source/devtools/front_end/KeyboardShortcut.js
index 793c9bd56f3..b3f6f8fb110 100644
--- a/chromium/third_party/WebKit/Source/devtools/front_end/KeyboardShortcut.js
+++ b/chromium/third_party/WebKit/Source/devtools/front_end/KeyboardShortcut.js
@@ -94,11 +94,6 @@ WebInspector.KeyboardShortcut.Keys = {
H: { code: 72, name: "H" },
Ctrl: { code: 17, name: "Ctrl" },
Meta: { code: 91, name: "Meta" },
- get CtrlOrMeta()
- {
- // "default" command/ctrl key for platform, Command on Mac, Ctrl on other platforms
- return WebInspector.isMac() ? this.Meta : this.Ctrl;
- },
};
/**
diff --git a/chromium/third_party/WebKit/Source/devtools/front_end/LayerTree.js b/chromium/third_party/WebKit/Source/devtools/front_end/LayerTree.js
deleted file mode 100644
index a525e6d5b99..00000000000
--- a/chromium/third_party/WebKit/Source/devtools/front_end/LayerTree.js
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @constructor
- * @param {WebInspector.LayerTreeModel} model
- * @param {TreeOutline} treeOutline
- */
-WebInspector.LayerTree = function(model, treeOutline)
-{
- this._model = model;
- this._treeOutline = treeOutline;
- this._model.addEventListener(WebInspector.LayerTreeModel.Events.LayerTreeChanged, this._update.bind(this));
- this._needsUpdate = true;
-}
-
-WebInspector.LayerTree.prototype = {
- /**
- * @param {boolean} visible
- */
- setVisible: function(visible)
- {
- if (this._isVisible === visible)
- return;
- this._isVisible = visible;
- if (visible && this._needsUpdate)
- this._update();
- },
-
- _update: function()
- {
- if (!this._isVisible) {
- this._needsUpdate = true;
- return;
- }
- this._needsUpdate = false;
-
- var seenLayers = {};
-
- /**
- * @param {WebInspector.Layer} layer
- */
- function updateLayer(layer)
- {
- var id = layer.id();
- if (seenLayers[id])
- console.assert(false, "Duplicate layer id: " + id);
- seenLayers[id] = true;
- var node = this._treeOutline.getCachedTreeElement(layer);
- var parent = layer.parent() ? this._treeOutline.getCachedTreeElement(layer.parent()) : this._treeOutline;
- if (!parent)
- console.assert(false, "Parent is not in the tree");
- if (!node) {
- node = new WebInspector.LayerTreeElement(layer);
- parent.appendChild(node);
- } else {
- var oldParentId = node.parent.representedObject && node.parent.representedObject.id();
- if (oldParentId !== layer.parentId()) {
- (node.parent || this._treeOutline).removeChild(node);
- parent.appendChild(node);
- }
- node._update();
- }
- }
- this._model.forEachLayer(updateLayer.bind(this));
- // Cleanup layers that don't exist anymore from tree
- for (var i = 0; i < this._treeOutline.children.length; ++i) {
- for (var node = this._treeOutline.children[i]; node;) {
- if (seenLayers[node.representedObject.id()]) {
- node = node.traverseNextTreeElement(false);
- } else {
- var nextNode = node.nextSibling || node.parent;
- node.parent.removeChild(node);
- node = nextNode;
- }
- }
- }
- }
- }
-
-/**
- * @constructor
- * @param {WebInspector.Layer} layer
- * @extends {TreeElement}
- */
-WebInspector.LayerTreeElement = function(layer)
-{
- TreeElement.call(this, "#" + layer.id(), layer);
-}
-
-WebInspector.LayerTreeElement.prototype = {
- onattach: function()
- {
- var selection = document.createElement("div");
- selection.className = "selection";
- this.listItemElement.insertBefore(selection, this.listItemElement.firstChild);
- },
-
- _update: function()
- {
- },
-
- __proto__: TreeElement.prototype
-}
diff --git a/chromium/third_party/WebKit/Source/devtools/front_end/LayerTreeModel.js b/chromium/third_party/WebKit/Source/devtools/front_end/LayerTreeModel.js
deleted file mode 100644
index e4922bb1369..00000000000
--- a/chromium/third_party/WebKit/Source/devtools/front_end/LayerTreeModel.js
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @constructor
- * @extends {WebInspector.Object}
- */
-WebInspector.LayerTreeModel = function()
-{
- this._layersById = {};
- InspectorBackend.registerLayerTreeDispatcher(new WebInspector.LayerTreeDispatcher(this));
- LayerTreeAgent.enable();
-}
-
-WebInspector.LayerTreeModel.Events = {
- LayerTreeChanged: "LayerTreeChanged"
-}
-
-WebInspector.LayerTreeModel.prototype = {
- dispose: function()
- {
- LayerTreeAgent.disable();
- },
-
- /**
- * @return {WebInspector.Layer}
- */
- root: function()
- {
- return this._root;
- },
-
- /**
- * @param {function(WebInspector.Layer)} callback
- * @param {WebInspector.Layer=} root
- * @return {boolean}
- */
- forEachLayer: function(callback, root)
- {
- if (!root) {
- root = this.root();
- if (!root)
- return false;
- }
- return callback(root) || root.children().some(this.forEachLayer.bind(this, callback));
- },
-
- /**
- * @param {function()=} callback
- */
- requestLayers: function(callback)
- {
- if (!callback)
- callback = function() {}
- if (typeof this._root !== "undefined") {
- callback();
- return;
- }
- if (this._pendingRequestLayersCallbacks) {
- this._pendingRequestLayersCallbacks.push(callback);
- return;
- }
- this._pendingRequestLayersCallbacks = [];
- this._pendingRequestLayersCallbacks.push(callback);
- function onGetLayers(error, layers)
- {
- this._root = null;
- if (error) {
- console.error("LayerTreeAgent.getLayers(): " + error);
- return;
- }
- this._repopulate(layers);
- for (var i = 0; i < this._pendingRequestLayersCallbacks.length; ++i)
- this._pendingRequestLayersCallbacks[i]();
- delete this._pendingRequestLayersCallbacks;
- }
- function onDocumentAvailable()
- {
- LayerTreeAgent.getLayers(undefined, onGetLayers.bind(this))
- }
- WebInspector.domAgent.requestDocument(onDocumentAvailable.bind(this));
- },
-
- /**
- * @param {string} id
- * @return {WebInspector.Layer?}
- */
- layerById: function(id)
- {
- return this._layersById[id];
- },
-
- /**
- * @param{Array.<LayerTreeAgent.Layer>} payload
- */
- _repopulate: function(payload)
- {
- var oldLayersById = this._layersById;
- this._layersById = {};
- for (var i = 0; i < payload.length; ++i) {
- var layer = oldLayersById[payload[i].layerId];
- if (layer)
- layer._reset(payload[i]);
- else
- layer = new WebInspector.Layer(payload[i]);
- this._layersById[layer.id()] = layer;
- var parentId = layer.parentId();
- if (parentId)
- this._layersById[parentId].addChild(layer);
- else {
- if (this._root)
- console.assert(false, "Multiple root layers");
- this._root = layer;
- }
- }
- this.dispatchEventToListeners(WebInspector.LayerTreeModel.Events.LayerTreeChanged);
- },
-
- _layerTreeChanged: function()
- {
- delete this._root;
- this.requestLayers();
- },
-
- __proto__: WebInspector.Object.prototype
-}
-
-/**
- * @constructor
- * @param {LayerTreeAgent.Layer} layerPayload
- */
-WebInspector.Layer = function(layerPayload)
-{
- this._reset(layerPayload);
-}
-
-WebInspector.Layer.prototype = {
- /**
- * @return {string?}
- */
- id: function()
- {
- return this._layerPayload.layerId;
- },
-
- /**
- * @return {string?}
- */
- parentId: function()
- {
- return this._layerPayload.parentLayerId;
- },
-
- /**
- * @return {WebInspector.Layer}
- */
- parent: function()
- {
- return this._parent;
- },
-
- isRoot: function()
- {
- return !!this.parentId();
- },
-
- children: function()
- {
- return this._children;
- },
-
- /**
- * @param {WebInspector.Layer} child
- */
- addChild: function(child)
- {
- if (child._parent)
- console.assert(false, "Child already has a parent");
- this._children.push(child);
- child._parent = this;
- },
-
- nodeIdForSelfOrAncestor: function()
- {
- for (var layer = this; layer; layer = layer._parent) {
- var nodeId = layer._layerPayload["nodeId"];
- if (nodeId)
- return nodeId;
- }
- return null;
- },
-
- /**
- * @return {number}
- */
- offsetX: function()
- {
- return this._layerPayload.offsetX;
- },
-
- /**
- * @return {number}
- */
- offsetY: function()
- {
- return this._layerPayload.offsetY;
- },
-
- /**
- * @return {number}
- */
- width: function()
- {
- return this._layerPayload.width;
- },
-
- /**
- * @return {number}
- */
- height: function()
- {
- return this._layerPayload.height;
- },
-
- /**
- * @param {LayerTreeAgent.Layer} layerPayload
- */
- _reset: function(layerPayload)
- {
- this._children = [];
- this._parent = null;
- this._layerPayload = layerPayload;
- }
-}
-
-/**
- * @constructor
- * @implements {LayerTreeAgent.Dispatcher}
- * @param {WebInspector.LayerTreeModel} layerTreeModel
- */
-WebInspector.LayerTreeDispatcher = function(layerTreeModel)
-{
- this._layerTreeModel = layerTreeModel;
-}
-
-WebInspector.LayerTreeDispatcher.prototype = {
- layerTreeDidChange: function()
- {
- this._layerTreeModel._layerTreeChanged();
- }
-}
diff --git a/chromium/third_party/WebKit/Source/devtools/front_end/Layers3DView.js b/chromium/third_party/WebKit/Source/devtools/front_end/Layers3DView.js
deleted file mode 100644
index a2af860254b..00000000000
--- a/chromium/third_party/WebKit/Source/devtools/front_end/Layers3DView.js
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @constructor
- * @extends {WebInspector.View}
- * @param {WebInspector.LayerTreeModel} model
- */
-WebInspector.Layers3DView = function(model)
-{
- WebInspector.View.call(this);
- this.element.classList.add("fill");
- this.element.classList.add("layers-3d-view");
- this._model = model;
- this._model.addEventListener(WebInspector.LayerTreeModel.Events.LayerTreeChanged, this._update, this);
- this._rotatingContainerElement = this.element.createChild("div", "fill rotating-container");
- this.element.addEventListener("mousemove", this._onMouseMove.bind(this), false);
- this.element.addEventListener("mousedown", this._onMouseDown.bind(this), false);
- this._elementsByLayerId = {};
- this._rotateX = 0;
- this._rotateY = 0;
-}
-
-WebInspector.Layers3DView.prototype = {
- onResize: function()
- {
- this._scale();
- },
-
- wasShown: function()
- {
- if (this._needsUpdate)
- this._update();
- },
-
- _scale: function()
- {
- const padding = 40;
- var scale = 1;
- var root = this._model.root();
- if (!root)
- return;
- var scaleX = this.element.clientWidth / (root.width() + 2 * padding);
- var scaleY = this.element.clientHeight / (root.height() + 2 * padding);
- scale = Math.min(scaleX, scaleY);
- var element = this._elementForLayer(root);
- element.style.webkitTransform = "scale(" + scale + "," + scale +")";
- element.style.webkitTransformOrigin = padding + "px " + padding + "px";
- },
-
- _update: function()
- {
- if (!this.isShowing()) {
- this._needsUpdate = true;
- return;
- }
- function updateLayer(layer)
- {
- var element = this._elementForLayer(layer);
- this._updateLayerElement(element);
- for (var childElement = element.firstElementChild; childElement;) {
- var nextElement = childElement.nextSibling;
- if (childElement.__layer && !this._model.layerById(childElement.__layer.id()))
- childElement.remove();
- childElement = nextElement;
- }
- }
- this._model.forEachLayer(updateLayer.bind(this));
- this._needsUpdate = false;
- this._scale();
- },
-
- /**
- * @param {WebInspector.Layer} layer
- * @return {Element}
- */
- _elementForLayer: function(layer)
- {
- var element = this._elementsByLayerId[layer.id()];
- if (element)
- return element;
- element = document.createElement("div");
- element.className = "layer-container";
- element.__layer = layer;
- ["fill back-wall", "side-wall top", "side-wall right", "side-wall bottom", "side-wall left"].forEach(element.createChild.bind(element, "div"));
- this._elementsByLayerId[layer.id()] = element;
- return element;
- },
-
- /**
- * @param {Element} element
- */
- _updateLayerElement: function(element)
- {
- var layer = element.__layer;
- var style = element.style;
- var parentElement = layer.parent() ? this._elementForLayer(layer.parent()) : this._rotatingContainerElement;
- element.__depth = (parentElement.__depth || 0) + 1;
- style.backgroundColor = this._colorForLayer(layer, element.__depth);
- style.left = layer.offsetX() + "px";
- style.top = layer.offsetY() + "px";
- style.width = layer.width() + "px";
- style.height = layer.height() + "px";
- if (parentElement !== element.parentElement)
- parentElement.appendChild(element);
- },
-
- /**
- * @param {WebInspector.Layer} layer
- * @param {number} depth
- * @return {string}
- */
- _colorForLayer: function(layer, depth)
- {
- const base = 144;
- var component = base + 20 * ((depth - 1) % 5);
- return "rgb(" + component + "," + component + "," + component + ")";
- },
-
- /**
- * @param {Event} event
- */
- _onMouseDown: function(event)
- {
- if (event.which !== 1)
- return;
- this._originX = event.clientX;
- this._originY = event.clientY;
- this._oldRotateX = this._rotateX;
- this._oldRotateY = this._rotateY;
- },
-
- /**
- * @param {Event} event
- */
- _onMouseMove: function(event)
- {
- if (event.which !== 1)
- return;
- this._rotateX = this._oldRotateX + (this._originY - event.clientY) / 2;
- this._rotateY = this._oldRotateY - (this._originX - event.clientX) / 4;
- this._rotatingContainerElement.style.webkitTransform = "rotateX(" + this._rotateX + "deg) rotateY(" + this._rotateY + "deg)";
- },
-
- __proto__: WebInspector.View.prototype
-}
diff --git a/chromium/third_party/WebKit/Source/devtools/front_end/LayersPanel.js b/chromium/third_party/WebKit/Source/devtools/front_end/LayersPanel.js
deleted file mode 100644
index 9b1c5a54f6a..00000000000
--- a/chromium/third_party/WebKit/Source/devtools/front_end/LayersPanel.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-importScript("LayerTreeModel.js");
-importScript("LayerTree.js");
-importScript("Layers3DView.js");
-
-/**
- * @constructor
- * @extends {WebInspector.Panel}
- */
-WebInspector.LayersPanel = function()
-{
- WebInspector.Panel.call(this, "layers");
- this.registerRequiredCSS("layersPanel.css");
-
- const initialLayerTreeSidebarWidth = 225;
- const minimumMainWidthPercent = 0.5;
- this.createSidebarViewWithTree();
- this.sidebarElement.addStyleClass("outline-disclosure");
- this.sidebarTreeElement.removeStyleClass("sidebar-tree");
- this._model = new WebInspector.LayerTreeModel();
- this._layerTree = new WebInspector.LayerTree(this._model, this.sidebarTree);
- this._layerDetailsSplitView = new WebInspector.SplitView(false, "layerDetailsSplitView");
- this._layerDetailsSplitView.show(this.splitView.mainElement);
- this._layers3DView = new WebInspector.Layers3DView(this._model);
- this._layers3DView.show(this._layerDetailsSplitView.mainElement);
- this._model.requestLayers();
-}
-
-WebInspector.LayersPanel.prototype = {
- wasShown: function()
- {
- WebInspector.Panel.prototype.wasShown.call(this);
- this._layerTree.setVisible(true);
- this.sidebarTreeElement.focus();
- },
-
- willHide: function()
- {
- this._layerTree.setVisible(false);
- WebInspector.Panel.prototype.willHide.call(this);
- },
-
- __proto__: WebInspector.Panel.prototype
-}
diff --git a/chromium/third_party/WebKit/Source/devtools/front_end/LayersPanelDescriptor.js b/chromium/third_party/WebKit/Source/devtools/front_end/LayersPanelDescriptor.js
deleted file mode 100644
index 95ad832993c..00000000000
--- a/chromium/third_party/WebKit/Source/devtools/front_end/LayersPanelDescriptor.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY GOOGLE INC. AND ITS CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC.
- * OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @constructor
- * @extends {WebInspector.PanelDescriptor}
- */
-WebInspector.LayersPanelDescriptor = function()
-{
- WebInspector.PanelDescriptor.call(this, "layers", WebInspector.UIString("Layers"), "LayersPanel", "LayersPanel.js");
-}
-
-WebInspector.LayersPanelDescriptor.prototype = {
- __proto__: WebInspector.PanelDescriptor.prototype
-}
diff --git a/chromium/third_party/WebKit/Source/devtools/front_end/OverridesView.js b/chromium/third_party/WebKit/Source/devtools/front_end/OverridesView.js
index 9d34d9c934a..efd64e456fa 100644
--- a/chromium/third_party/WebKit/Source/devtools/front_end/OverridesView.js
+++ b/chromium/third_party/WebKit/Source/devtools/front_end/OverridesView.js
@@ -49,16 +49,37 @@ WebInspector.OverridesView = function()
var topContainer = wrapper.createChild("div", "settings-tab help-content");
var enableOptionsContainer = topContainer.createChild("div", "help-block");
- var enableOnStartupField = this._createCheckboxSetting(WebInspector.UIString("Enable on DevTools startup"), WebInspector.settings.enableOverridesOnStartup);
- enableOnStartupField.id = "enable-devtools-on-startup";
- this._enableOnStartupField = enableOnStartupField;
- var enableLabel = this._createNonPersistedCheckbox(WebInspector.UIString("Enable"), this._setOverridesActive.bind(this));
+ /**
+ * @param {boolean} enabled
+ */
+ function enableClicked(enabled)
+ {
+ WebInspector.overridesSupport.setOverridesActive(enabled);
+ this._mainContainer.disabled = !enabled;
+ }
+ var boundEnableClicked = enableClicked.bind(this);
+ var enableLabel = this._createNonPersistedCheckbox(WebInspector.UIString("Enable"), boundEnableClicked);
var enableCheckbox = enableLabel.getElementsByTagName("input")[0];
enableCheckbox.checked = WebInspector.settings.enableOverridesOnStartup.get();
enableOptionsContainer.appendChild(enableLabel);
- enableOptionsContainer.appendChild(enableOnStartupField);
+ var enableOnStartupPara = this._createCheckboxSetting(WebInspector.UIString("Enable on DevTools startup"), WebInspector.settings.enableOverridesOnStartup);
+ enableOnStartupPara.id = "enable-devtools-on-startup";
+ enableOptionsContainer.appendChild(enableOnStartupPara);
+
+ /**
+ * @param {WebInspector.Event} event
+ */
+ function enableOnStartupClicked(event)
+ {
+ var enableOnStartup = /** @type {boolean} */ (event.data);
+ if (enableOnStartup) {
+ enableCheckbox.checked = true;
+ boundEnableClicked(true);
+ }
+ }
+ WebInspector.settings.enableOverridesOnStartup.addChangeListener(enableOnStartupClicked, this);
- var mainContainer = topContainer.createChild("fieldset", "help-container");
+ var mainContainer = topContainer.createChild("div", "help-container");
this._mainContainer = mainContainer;
function appendBlock(contentElements)
@@ -75,7 +96,7 @@ WebInspector.OverridesView = function()
appendBlock([this._createDeviceOrientationOverrideControl()]);
appendBlock([this._createCheckboxSetting(WebInspector.UIString("Emulate touch events"), WebInspector.settings.emulateTouchEvents)]);
appendBlock([this._createMediaEmulationElement()]);
- this._setOverridesActive(enableCheckbox.checked);
+ boundEnableClicked(enableCheckbox.checked);
this._statusElement = document.createElement("span");
this._statusElement.textContent = WebInspector.UIString("Overrides");
@@ -91,16 +112,6 @@ WebInspector.OverridesView.showInDrawer = function()
WebInspector.OverridesView.prototype = {
/**
- * @param {boolean} active
- */
- _setOverridesActive: function(active)
- {
- WebInspector.overridesSupport.setOverridesActive(active);
- this._mainContainer.disabled = !active;
- this._enableOnStartupField.disabled = !active;
- },
-
- /**
* @param {string} name
* @param {!WebInspector.Setting} setting
* @param {function(boolean)=} callback
diff --git a/chromium/third_party/WebKit/Source/devtools/front_end/ScriptsPanel.js b/chromium/third_party/WebKit/Source/devtools/front_end/ScriptsPanel.js
index e2e3f0dfa51..ead3c9255b5 100644
--- a/chromium/third_party/WebKit/Source/devtools/front_end/ScriptsPanel.js
+++ b/chromium/third_party/WebKit/Source/devtools/front_end/ScriptsPanel.js
@@ -173,9 +173,6 @@ WebInspector.ScriptsPanel = function(workspaceForTest)
WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.GlobalObjectCleared, this._debuggerReset, this);
WebInspector.advancedSearchController.registerSearchScope(new WebInspector.ScriptsSearchScope(this._workspace));
-
- this._boundOnKeyUp = this._onKeyUp.bind(this);
- this._boundOnKeyDown = this._onKeyDown.bind(this);
}
WebInspector.ScriptsPanel.prototype = {
@@ -206,16 +203,10 @@ WebInspector.ScriptsPanel.prototype = {
{
WebInspector.Panel.prototype.wasShown.call(this);
this._navigatorController.wasShown();
-
- this.element.addEventListener("keydown", this._boundOnKeyDown, false);
- this.element.addEventListener("keyup", this._boundOnKeyUp, false);
},
willHide: function()
{
- this.element.removeEventListener("keydown", this._boundOnKeyDown, false);
- this.element.removeEventListener("keyup", this._boundOnKeyUp, false);
-
WebInspector.Panel.prototype.willHide.call(this);
WebInspector.closeViewInDrawer();
},
@@ -521,14 +512,13 @@ WebInspector.ScriptsPanel.prototype = {
_executionLineChanged: function(event)
{
- var uiLocation = event.data.uiLocation;
- var callFrame = event.data.callFrame;
+ var uiLocation = event.data;
this._clearCurrentExecutionLine();
if (!uiLocation)
return;
var sourceFrame = this._getOrCreateSourceFrame(uiLocation.uiSourceCode);
- sourceFrame.setExecutionLine(uiLocation.lineNumber, callFrame);
+ sourceFrame.setExecutionLine(uiLocation.lineNumber);
this._executionSourceFrame = sourceFrame;
},
@@ -744,34 +734,6 @@ WebInspector.ScriptsPanel.prototype = {
* @param {Event=} event
* @return {boolean}
*/
- _stepIntoSelectionClicked: function(event)
- {
- if (!this._paused)
- return true;
-
- if (this._executionSourceFrame) {
- var stepIntoMarkup = this._executionSourceFrame.stepIntoMarkup();
- if (stepIntoMarkup)
- stepIntoMarkup.iterateSelection(event.shiftKey);
- }
- return true;
- },
-
- doStepIntoSelection: function(rawLocation)
- {
- if (!this._paused)
- return;
-
- this._paused = false;
- this._stepping = true;
- this._clearInterface();
- WebInspector.debuggerModel.stepIntoSelection(rawLocation);
- },
-
- /**
- * @param {Event=} event
- * @return {boolean}
- */
_stepOutClicked: function(event)
{
if (!this._paused)
@@ -839,9 +801,6 @@ WebInspector.ScriptsPanel.prototype = {
this._stepIntoButton = this._createButtonAndRegisterShortcuts("scripts-step-into", title, handler, WebInspector.ScriptsPanelDescriptor.ShortcutKeys.StepInto);
debugToolbar.appendChild(this._stepIntoButton.element);
- // Step into selection (keyboard shortcut only).
- this.registerShortcuts(WebInspector.ScriptsPanelDescriptor.ShortcutKeys.StepIntoSelection, this._stepIntoSelectionClicked.bind(this))
-
// Step out.
title = WebInspector.UIString("Step out of current function (%s).");
handler = this._stepOutClicked.bind(this);
@@ -994,35 +953,6 @@ WebInspector.ScriptsPanel.prototype = {
view.replaceAllWith(query, text);
},
- _onKeyDown: function(event)
- {
- if (event.keyCode !== WebInspector.KeyboardShortcut.Keys.CtrlOrMeta.code)
- return;
- if (!this._paused || !this._executionSourceFrame)
- return;
- var stepIntoMarkup = this._executionSourceFrame.stepIntoMarkup();
- if (stepIntoMarkup)
- stepIntoMarkup.moveSelectionTo(-1);
- },
-
- _onKeyUp: function(event)
- {
- if (event.keyCode !== WebInspector.KeyboardShortcut.Keys.CtrlOrMeta.code)
- return;
- if (!this._paused || !this._executionSourceFrame)
- return;
- var stepIntoMarkup = this._executionSourceFrame.stepIntoMarkup();
- if (!stepIntoMarkup)
- return;
- var currentPosition = stepIntoMarkup.getSelectedItemIndex();
- if (typeof currentPosition === "undefined") {
- stepIntoMarkup.selectFirstToExecute();
- } else {
- var rawLocation = stepIntoMarkup.getRawPosition(currentPosition);
- this.doStepIntoSelection(rawLocation);
- }
- },
-
_toggleFormatSource: function()
{
this._toggleFormatSourceButton.toggled = !this._toggleFormatSourceButton.toggled;
diff --git a/chromium/third_party/WebKit/Source/devtools/front_end/ScriptsPanelDescriptor.js b/chromium/third_party/WebKit/Source/devtools/front_end/ScriptsPanelDescriptor.js
index 4fbb07ef237..68f29c38218 100644
--- a/chromium/third_party/WebKit/Source/devtools/front_end/ScriptsPanelDescriptor.js
+++ b/chromium/third_party/WebKit/Source/devtools/front_end/ScriptsPanelDescriptor.js
@@ -62,7 +62,6 @@ WebInspector.ScriptsPanelDescriptor.prototype = {
section.addAlternateKeys(WebInspector.ScriptsPanelDescriptor.ShortcutKeys.PauseContinue, WebInspector.UIString("Pause/Continue"));
section.addAlternateKeys(WebInspector.ScriptsPanelDescriptor.ShortcutKeys.StepOver, WebInspector.UIString("Step over"));
section.addAlternateKeys(WebInspector.ScriptsPanelDescriptor.ShortcutKeys.StepInto, WebInspector.UIString("Step into"));
- section.addAlternateKeys(WebInspector.ScriptsPanelDescriptor.ShortcutKeys.StepIntoSelection, WebInspector.UIString("Step into selection"));
section.addAlternateKeys(WebInspector.ScriptsPanelDescriptor.ShortcutKeys.StepOut, WebInspector.UIString("Step out"));
var nextAndPrevFrameKeys = WebInspector.ScriptsPanelDescriptor.ShortcutKeys.NextCallFrame.concat(WebInspector.ScriptsPanelDescriptor.ShortcutKeys.PrevCallFrame);
@@ -96,11 +95,6 @@ WebInspector.ScriptsPanelDescriptor.ShortcutKeys = {
WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Semicolon, WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
],
- StepIntoSelection: [
- WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.F11, WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta),
- WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.F11, WebInspector.KeyboardShortcut.Modifiers.Shift | WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
- ],
-
StepOut: [
WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.F11, WebInspector.KeyboardShortcut.Modifiers.Shift),
WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.Keys.Semicolon, WebInspector.KeyboardShortcut.Modifiers.Shift | WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta)
diff --git a/chromium/third_party/WebKit/Source/devtools/front_end/Settings.js b/chromium/third_party/WebKit/Source/devtools/front_end/Settings.js
index 8162d32a64e..9e07dbf738d 100644
--- a/chromium/third_party/WebKit/Source/devtools/front_end/Settings.js
+++ b/chromium/third_party/WebKit/Source/devtools/front_end/Settings.js
@@ -261,7 +261,6 @@ WebInspector.ExperimentsSettings = function()
this.frameworksDebuggingSupport = this._createExperiment("frameworksDebuggingSupport", "Enable frameworks debugging support");
this.refreshFileSystemsOnFocus = this._createExperiment("refreshFileSystemsOnFocus", "Refresh file system folders on window focus");
this.scrollBeyondEndOfFile = this._createExperiment("scrollBeyondEndOfFile", "Support scrolling beyond end of file");
- this.layersPanel = this._createExperiment("layersPanel", "Show Layers panel");
this._cleanUpSetting();
}
diff --git a/chromium/third_party/WebKit/Source/devtools/front_end/helpScreen.css b/chromium/third_party/WebKit/Source/devtools/front_end/helpScreen.css
index 57589149e81..ed1bb8354ed 100644
--- a/chromium/third_party/WebKit/Source/devtools/front_end/helpScreen.css
+++ b/chromium/third_party/WebKit/Source/devtools/front_end/helpScreen.css
@@ -98,7 +98,7 @@ body.platform-mac .help-window-main .help-window-title {
-webkit-column-width: 470px;
}
-body.platform-mac .settings-tab .help-container {
+body.platform-mac .settings-tab.help-container {
-webkit-column-width: 430px;
}
@@ -189,36 +189,31 @@ body.platform-mac .help-key {
margin: 0 0.5em;
}
-.settings-tab fieldset {
- margin: 0;
- padding: 0;
- border: none;
-}
-
-.help-block > fieldset {
+.help-content > fieldset {
margin: 3px 0;
}
-.help-block fieldset {
+.help-content fieldset {
+ border: none;
margin-left: 7px;
padding: 0 initial;
}
-#general-tab-content .help-block fieldset legend {
+#general-tab-content .help-content fieldset legend {
font-size: 14px;
}
-body.platform-mac .settings-tab.help-block fieldset {
+body.platform-mac .settings-tab.help-content fieldset {
margin-left: 10px;
}
-.help-block fieldset p,
-.help-block fieldset fieldset {
+.help-content fieldset p,
+.help-content fieldset fieldset {
border-left: 1px solid rgb(128,128,128);
padding-left: 30px;
}
-.help-block fieldset label {
+.help-content fieldset label {
padding-right: 4px;
}
@@ -431,12 +426,12 @@ body.platform-mac .help-content input[type=radio] {
}
.settings-tab p,
-.settings-tab .help-block fieldset {
+.settings-tab fieldset {
margin: 12px 0;
}
-.settings-tab .help-block fieldset p,
-.settings-tab .help-block fieldset fieldset {
+.settings-tab fieldset p,
+.settings-tab fieldset fieldset {
border-left: none transparent;
}
diff --git a/chromium/third_party/WebKit/Source/devtools/front_end/inspector.css b/chromium/third_party/WebKit/Source/devtools/front_end/inspector.css
index 98484be958d..49a89fdf7f7 100644
--- a/chromium/third_party/WebKit/Source/devtools/front_end/inspector.css
+++ b/chromium/third_party/WebKit/Source/devtools/front_end/inspector.css
@@ -2429,16 +2429,6 @@ body.inactive li.selected .bubble.search-matches {
background-color: rgb(255, 255, 194);
}
-.source-frame-stepin-mark {
- text-decoration: underline;
- background-color: #bfccfe;
-}
-
-.source-frame-stepin-mark-highlighted {
- text-decoration: underline;
- background-color: #698cfe;
-}
-
.workers-list {
list-style: none;
margin: 0;
diff --git a/chromium/third_party/WebKit/Source/devtools/front_end/inspector.html b/chromium/third_party/WebKit/Source/devtools/front_end/inspector.html
index 2dc75042625..aafcd28e7f4 100644
--- a/chromium/third_party/WebKit/Source/devtools/front_end/inspector.html
+++ b/chromium/third_party/WebKit/Source/devtools/front_end/inspector.html
@@ -185,7 +185,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<script type="text/javascript" src="ProfilesPanelDescriptor.js"></script>
<script type="text/javascript" src="ScriptsPanelDescriptor.js"></script>
<script type="text/javascript" src="TimelinePanelDescriptor.js"></script>
- <script type="text/javascript" src="LayersPanelDescriptor.js"></script>
<script type="text/javascript" src="DockController.js"></script>
<script type="text/javascript" src="TracingAgent.js"></script>
<script type="text/javascript" src="DevToolsExtensionAPI.js"></script>
diff --git a/chromium/third_party/WebKit/Source/devtools/front_end/inspector.js b/chromium/third_party/WebKit/Source/devtools/front_end/inspector.js
index 5eaee481dd7..25bfe2a5aca 100644
--- a/chromium/third_party/WebKit/Source/devtools/front_end/inspector.js
+++ b/chromium/third_party/WebKit/Source/devtools/front_end/inspector.js
@@ -46,10 +46,6 @@ var WebInspector = {
var audits = new WebInspector.PanelDescriptor("audits", WebInspector.UIString("Audits"), "AuditsPanel", "AuditsPanel.js");
var console = new WebInspector.PanelDescriptor("console", WebInspector.UIString("Console"), "ConsolePanel");
var allDescriptors = [elements, resources, network, scripts, timeline, profiles, audits, console];
- if (WebInspector.experimentsSettings.layersPanel.isEnabled()) {
- var layers = new WebInspector.LayersPanelDescriptor();
- allDescriptors.push(layers);
- }
var allProfilers = [profiles];
if (WebInspector.experimentsSettings.customizableToolbar.isEnabled()) {
allProfilers = [];
diff --git a/chromium/third_party/WebKit/Source/devtools/front_end/layersPanel.css b/chromium/third_party/WebKit/Source/devtools/front_end/layersPanel.css
deleted file mode 100644
index 3763b73962a..00000000000
--- a/chromium/third_party/WebKit/Source/devtools/front_end/layersPanel.css
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-.layers.panel .outline-disclosure {
- z-index: 10;
-}
-
-div.outline-disclosure > ol {
- margin-left: -12px;
-}
-
-.layers.panel .outline-disclosure ol.children {
- padding-left: 12px;
-}
-
-.layers-3d-view {
- overflow: hidden;
-}
-
-.layers-3d-view .rotating-container {
- -webkit-transform-style: preserve-3d;
-}
-
-.layers-3d-view .layer-container {
- position: absolute;
- opacity: 0.8;
- border: 1px solid rgba(40, 40, 40, 0.8);
- -webkit-transform: translateZ(20px);
- -webkit-transform-style: preserve-3d;
-}
-
-.layer-container .side-wall {
- position: absolute;
- background-color: inherit;
- top: 0px;
- right: 0px;
- bottom: 0px;
- left: 0px;
- height: 4px;
- width: 4px;
- -webkit-transform-origin: 0 0;
- border: solid black 1px;
-}
-
-.layer-container .back-wall {
- -webkit-transform: translateZ(-4px);
- background-color: inherit;
-}
-
-.layer-container .side-wall.top {
- width: auto;
- bottom: auto;
- -webkit-transform: rotateX(-90deg);
-}
-
-.layer-container .side-wall.bottom {
- width: auto;
- top: auto;
- -webkit-transform: translateY(4px) rotateX(-90deg);
-}
-
-.layer-container .side-wall.left {
- height: auto;
- right: auto;
- -webkit-transform: rotateY(90deg);
-}
-
-.layer-container .side-wall.right {
- height: auto;
- left: auto;
- -webkit-transform: translateX(4px) rotateY(90deg);
-}
diff --git a/chromium/third_party/WebKit/Source/devtools/protocol.json b/chromium/third_party/WebKit/Source/devtools/protocol.json
index 5cb1ddff5b8..6e56eceb79e 100644
--- a/chromium/third_party/WebKit/Source/devtools/protocol.json
+++ b/chromium/third_party/WebKit/Source/devtools/protocol.json
@@ -3216,6 +3216,7 @@
"description": "Profile.",
"properties": [
{ "name": "head", "$ref": "CPUProfileNode" },
+ { "name": "idleTime", "type": "number", "description": "Idle time in seconds." },
{ "name": "startTime", "type": "number", "description": "Profiling start time in seconds." },
{ "name": "endTime", "type": "number", "description": "Profiling end time in seconds." },
{ "name": "samples", "optional": true, "type": "array", "items": { "type": "integer" }, "description": "Ids of samples top nodes." }
@@ -3497,10 +3498,8 @@
"description": "Resource state descriptor.",
"properties": [
{ "name": "name", "type": "string", "description": "State name." },
- { "name": "enumValueForName", "type": "string", "optional": true, "description": "String representation of the enum value, if <code>name</code> stands for an enum." },
{ "name": "value", "$ref": "CallArgument", "optional": true, "description": "The value associated with the particular state." },
- { "name": "values", "type": "array", "items": { "$ref": "ResourceStateDescriptor" }, "optional": true, "description": "Array of values associated with the particular state. Either <code>value</code> or <code>values</code> will be specified." },
- { "name": "isArray", "type": "boolean", "optional": true, "description": "True iff the given <code>values</code> items stand for an array rather than a list of grouped states." }
+ { "name": "values", "type": "array", "items": { "$ref": "ResourceStateDescriptor" }, "optional": true, "description": "Array of values associated with the particular state. Either <code>value</code> or <code>values</code> will be specified." }
]
},
{
@@ -3519,11 +3518,9 @@
"type": "object",
"properties": [
{ "name": "description", "type": "string", "description": "String representation of the object." },
- { "name": "enumName", "type": "string", "optional": true, "description": "Enum name, if any, that stands for the value (for example, a WebGL enum name)." },
{ "name": "resourceId", "$ref": "ResourceId", "optional": true, "description": "Resource identifier. Specified for <code>Resource</code> objects only." },
{ "name": "type", "type": "string", "optional": true, "enum": ["object", "function", "undefined", "string", "number", "boolean"], "description": "Object type. Specified for non <code>Resource</code> objects only." },
- { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date"], "description": "Object subtype hint. Specified for <code>object</code> type values only." },
- { "name": "remoteObject", "$ref": "Runtime.RemoteObject", "optional": true, "description": "The <code>RemoteObject</code>, if requested." }
+ { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date"], "description": "Object subtype hint. Specified for <code>object</code> type values only." }
]
},
{
diff --git a/chromium/third_party/WebKit/Source/devtools/scripts/compile_frontend.py b/chromium/third_party/WebKit/Source/devtools/scripts/compile_frontend.py
index 3df42dd6680..01eeb46b746 100755
--- a/chromium/third_party/WebKit/Source/devtools/scripts/compile_frontend.py
+++ b/chromium/third_party/WebKit/Source/devtools/scripts/compile_frontend.py
@@ -312,16 +312,6 @@ modules = [
]
},
{
- "name": "layers",
- "dependencies": ["components"],
- "sources": [
- "LayerTreeModel.js",
- "LayersPanel.js",
- "LayerTree.js",
- "Layers3DView.js",
- ]
- },
- {
"name": "extensions",
"dependencies": ["components"],
"sources": [
diff --git a/chromium/third_party/WebKit/Source/modules/device_orientation/DeviceMotionController.cpp b/chromium/third_party/WebKit/Source/modules/device_orientation/DeviceMotionController.cpp
index 1d43fa4c34e..4e28bf2f254 100644
--- a/chromium/third_party/WebKit/Source/modules/device_orientation/DeviceMotionController.cpp
+++ b/chromium/third_party/WebKit/Source/modules/device_orientation/DeviceMotionController.cpp
@@ -35,8 +35,7 @@
namespace WebCore {
DeviceMotionController::DeviceMotionController(Document* document)
- : DOMWindowLifecycleObserver(document->domWindow())
- , DeviceSensorEventController(document)
+ : DeviceSensorEventController(document)
{
}
@@ -91,9 +90,4 @@ bool DeviceMotionController::isNullEvent(Event* event)
return !motionEvent->deviceMotionData()->canProvideEventData();
}
-void DeviceMotionController::removeAllEventListeners()
-{
- stopUpdating();
-}
-
} // namespace WebCore
diff --git a/chromium/third_party/WebKit/Source/modules/device_orientation/DeviceMotionController.h b/chromium/third_party/WebKit/Source/modules/device_orientation/DeviceMotionController.h
index 207bd52ba31..4bc4d5227c3 100644
--- a/chromium/third_party/WebKit/Source/modules/device_orientation/DeviceMotionController.h
+++ b/chromium/third_party/WebKit/Source/modules/device_orientation/DeviceMotionController.h
@@ -28,7 +28,6 @@
#define DeviceMotionController_h
#include "core/dom/Event.h"
-#include "core/page/DOMWindowLifecycleObserver.h"
#include "core/platform/Supplementable.h"
#include "modules/device_orientation/DeviceSensorEventController.h"
@@ -36,7 +35,7 @@ namespace WebCore {
class DeviceMotionData;
-class DeviceMotionController : public DeviceSensorEventController, public Supplement<ScriptExecutionContext>, public DOMWindowLifecycleObserver {
+class DeviceMotionController : public DeviceSensorEventController, public Supplement<ScriptExecutionContext> {
public:
virtual ~DeviceMotionController();
@@ -46,9 +45,6 @@ public:
void didChangeDeviceMotion(DeviceMotionData*);
- // Inherited from DOMWindowLifecycleObserver
- virtual void removeAllEventListeners() OVERRIDE;
-
private:
explicit DeviceMotionController(Document*);
virtual void registerWithDispatcher() OVERRIDE;
diff --git a/chromium/third_party/WebKit/Source/modules/encoding/OWNERS b/chromium/third_party/WebKit/Source/modules/encoding/OWNERS
deleted file mode 100644
index 6540c735acc..00000000000
--- a/chromium/third_party/WebKit/Source/modules/encoding/OWNERS
+++ /dev/null
@@ -1,2 +0,0 @@
-jsbell@chromium.org
-kbr@chromium.org
diff --git a/chromium/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.cpp b/chromium/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.cpp
index 0d4b6f60bfc..861a081be0f 100644
--- a/chromium/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.cpp
+++ b/chromium/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.cpp
@@ -135,12 +135,6 @@ public:
m_result->m_file = File::createForFileSystemFile(m_url, metadata).get();
}
}
-
- virtual bool shouldBlockUntilCompletion() const OVERRIDE
- {
- return true;
- }
-
private:
CreateFileHelper(PassRefPtr<CreateFileResult> result, const String& name, const KURL& url, FileSystemType type)
: m_result(result)
diff --git a/chromium/third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.cpp b/chromium/third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.cpp
index d44420449c0..3532c200b28 100644
--- a/chromium/third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.cpp
+++ b/chromium/third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.cpp
@@ -53,7 +53,7 @@ EntrySyncVector DirectoryReaderSync::readEntries(ExceptionState& es)
return EntrySyncVector();
EntriesSyncCallbackHelper helper(m_fileSystem->asyncFileSystem());
- if (!m_fileSystem->readDirectory(this, m_fullPath, helper.successCallback(), helper.errorCallback(), DOMFileSystemBase::Synchronous)) {
+ if (!m_fileSystem->readDirectory(this, m_fullPath, helper.successCallback(), helper.errorCallback())) {
es.throwDOMException(InvalidModificationError);
setHasMoreEntries(false);
return EntrySyncVector();
diff --git a/chromium/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapFactories.cpp b/chromium/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapFactories.cpp
deleted file mode 100644
index 6900a147f48..00000000000
--- a/chromium/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapFactories.cpp
+++ /dev/null
@@ -1,344 +0,0 @@
-/*
- * Copyright (c) 2013, Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "modules/imagebitmap/ImageBitmapFactories.h"
-
-#include "RuntimeEnabledFeatures.h"
-#include "V8ImageBitmap.h"
-#include "bindings/v8/ExceptionState.h"
-#include "bindings/v8/ScriptScope.h"
-#include "bindings/v8/ScriptState.h"
-#include "core/html/HTMLCanvasElement.h"
-#include "core/html/HTMLImageElement.h"
-#include "core/html/HTMLVideoElement.h"
-#include "core/html/ImageData.h"
-#include "core/html/canvas/CanvasRenderingContext2D.h"
-#include "core/page/DOMWindow.h"
-#include "core/page/ImageBitmap.h"
-#include "core/platform/SharedBuffer.h"
-#include "core/platform/graphics/BitmapImage.h"
-#include "core/platform/graphics/ImageSource.h"
-#include "core/platform/graphics/skia/NativeImageSkia.h"
-
-namespace WebCore {
-
-static LayoutSize sizeFor(HTMLImageElement* image)
-{
- if (ImageResource* cachedImage = image->cachedImage())
- return cachedImage->imageSizeForRenderer(image->renderer(), 1.0f); // FIXME: Not sure about this.
- return IntSize();
-}
-
-static IntSize sizeFor(HTMLVideoElement* video)
-{
- if (MediaPlayer* player = video->player())
- return player->naturalSize();
- return IntSize();
-}
-
-static ScriptObject fulfillImageBitmap(ScriptExecutionContext* context, PassRefPtr<ImageBitmap> imageBitmap)
-{
- // Promises must be enabled.
- ASSERT(RuntimeEnabledFeatures::promiseEnabled());
- RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(context);
- resolver->fulfill(imageBitmap);
- return resolver->promise();
-}
-
-ScriptObject ImageBitmapFactories::createImageBitmap(EventTarget* eventTarget, HTMLImageElement* image, ExceptionState& es)
-{
- LayoutSize s = sizeFor(image);
- return createImageBitmap(eventTarget, image, 0, 0, s.width(), s.height(), es);
-}
-
-ScriptObject ImageBitmapFactories::createImageBitmap(EventTarget* eventTarget, HTMLImageElement* image, int sx, int sy, int sw, int sh, ExceptionState& es)
-{
- if (!image) {
- es.throwTypeError();
- return ScriptObject();
- }
- if (!image->cachedImage()) {
- es.throwDOMException(InvalidStateError);
- return ScriptObject();
- }
- if (image->cachedImage()->image()->isSVGImage()) {
- es.throwDOMException(InvalidStateError);
- return ScriptObject();
- }
- if (!sw || !sh) {
- es.throwDOMException(IndexSizeError);
- return ScriptObject();
- }
- if (!image->cachedImage()->image()->hasSingleSecurityOrigin()) {
- es.throwDOMException(SecurityError);
- return ScriptObject();
- }
- if (!image->cachedImage()->passesAccessControlCheck(eventTarget->toDOMWindow()->document()->securityOrigin())
- && eventTarget->toDOMWindow()->document()->securityOrigin()->taintsCanvas(image->src())) {
- es.throwDOMException(SecurityError);
- return ScriptObject();
- }
- // FIXME: make ImageBitmap creation asynchronous crbug.com/258082
- return fulfillImageBitmap(eventTarget->scriptExecutionContext(), ImageBitmap::create(image, IntRect(sx, sy, sw, sh)));
-}
-
-ScriptObject ImageBitmapFactories::createImageBitmap(EventTarget* eventTarget, HTMLVideoElement* video, ExceptionState& es)
-{
- IntSize s = sizeFor(video);
- return createImageBitmap(eventTarget, video, 0, 0, s.width(), s.height(), es);
-}
-
-ScriptObject ImageBitmapFactories::createImageBitmap(EventTarget* eventTarget, HTMLVideoElement* video, int sx, int sy, int sw, int sh, ExceptionState& es)
-{
- if (!video) {
- es.throwTypeError();
- return ScriptObject();
- }
- if (!video->player()) {
- es.throwDOMException(InvalidStateError);
- return ScriptObject();
- }
- if (video->networkState() == HTMLMediaElement::NETWORK_EMPTY) {
- es.throwDOMException(InvalidStateError);
- return ScriptObject();
- }
- if (video->player()->readyState() <= MediaPlayer::HaveMetadata) {
- es.throwDOMException(InvalidStateError);
- return ScriptObject();
- }
- if (!sw || !sh) {
- es.throwDOMException(IndexSizeError);
- return ScriptObject();
- }
- if (!video->hasSingleSecurityOrigin()) {
- es.throwDOMException(SecurityError);
- return ScriptObject();
- }
- if (!video->player()->didPassCORSAccessCheck() && eventTarget->toDOMWindow()->document()->securityOrigin()->taintsCanvas(video->currentSrc())) {
- es.throwDOMException(SecurityError);
- return ScriptObject();
- }
- // FIXME: make ImageBitmap creation asynchronous crbug.com/258082
- return fulfillImageBitmap(eventTarget->scriptExecutionContext(), ImageBitmap::create(video, IntRect(sx, sy, sw, sh)));
-}
-
-ScriptObject ImageBitmapFactories::createImageBitmap(EventTarget* eventTarget, CanvasRenderingContext2D* context, ExceptionState& es)
-{
- return createImageBitmap(eventTarget, context->canvas(), es);
-}
-
-ScriptObject ImageBitmapFactories::createImageBitmap(EventTarget* eventTarget, CanvasRenderingContext2D* context, int sx, int sy, int sw, int sh, ExceptionState& es)
-{
- return createImageBitmap(eventTarget, context->canvas(), sx, sy, sw, sh, es);
-}
-
-ScriptObject ImageBitmapFactories::createImageBitmap(EventTarget* eventTarget, HTMLCanvasElement* canvas, ExceptionState& es)
-{
- return createImageBitmap(eventTarget, canvas, 0, 0, canvas->width(), canvas->height(), es);
-}
-
-ScriptObject ImageBitmapFactories::createImageBitmap(EventTarget* eventTarget, HTMLCanvasElement* canvas, int sx, int sy, int sw, int sh, ExceptionState& es)
-{
- if (!canvas) {
- es.throwTypeError();
- return ScriptObject();
- }
- if (!canvas->originClean()) {
- es.throwDOMException(InvalidStateError);
- return ScriptObject();
- }
- if (!sw || !sh) {
- es.throwDOMException(IndexSizeError);
- return ScriptObject();
- }
- // FIXME: make ImageBitmap creation asynchronous crbug.com/258082
- return fulfillImageBitmap(eventTarget->scriptExecutionContext(), ImageBitmap::create(canvas, IntRect(sx, sy, sw, sh)));
-}
-
-ScriptObject ImageBitmapFactories::createImageBitmap(EventTarget* eventTarget, Blob* blob, ExceptionState& es)
-{
- // Promises must be enabled.
- ASSERT(RuntimeEnabledFeatures::promiseEnabled());
-
- if (!blob) {
- es.throwDOMException(TypeError);
- return ScriptObject();
- }
- RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(eventTarget->scriptExecutionContext());
- RefPtr<ImageBitmapLoader> loader = ImageBitmapFactories::ImageBitmapLoader::create(from(eventTarget->toDOMWindow()), resolver, IntRect());
- from(eventTarget->toDOMWindow())->addLoader(loader);
- loader->loadBlobAsync(eventTarget->scriptExecutionContext(), blob);
- return resolver->promise();
-}
-
-ScriptObject ImageBitmapFactories::createImageBitmap(EventTarget* eventTarget, Blob* blob, int sx, int sy, int sw, int sh, ExceptionState& es)
-{
- // Promises must be enabled.
- ASSERT(RuntimeEnabledFeatures::promiseEnabled());
-
- if (!blob) {
- es.throwDOMException(TypeError);
- return ScriptObject();
- }
- if (!sw || !sh) {
- es.throwDOMException(IndexSizeError);
- return ScriptObject();
- }
- RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(eventTarget->scriptExecutionContext());
- RefPtr<ImageBitmapLoader> loader = ImageBitmapFactories::ImageBitmapLoader::create(from(eventTarget->toDOMWindow()), resolver, IntRect(sx, sy, sw, sh));
- from(eventTarget->toDOMWindow())->addLoader(loader);
- loader->loadBlobAsync(eventTarget->scriptExecutionContext(), blob);
- return resolver->promise();
-}
-
-ScriptObject ImageBitmapFactories::createImageBitmap(EventTarget* eventTarget, ImageData* data, ExceptionState& es)
-{
- return createImageBitmap(eventTarget, data, 0, 0, data->width(), data->height(), es);
-}
-
-ScriptObject ImageBitmapFactories::createImageBitmap(EventTarget* eventTarget, ImageData* data, int sx, int sy, int sw, int sh, ExceptionState& es)
-{
- if (!data) {
- es.throwTypeError();
- return ScriptObject();
- }
- if (!sw || !sh) {
- es.throwDOMException(IndexSizeError);
- return ScriptObject();
- }
- // FIXME: make ImageBitmap creation asynchronous crbug.com/258082
- return fulfillImageBitmap(eventTarget->scriptExecutionContext(), ImageBitmap::create(data, IntRect(sx, sy, sw, sh)));
-}
-
-ScriptObject ImageBitmapFactories::createImageBitmap(EventTarget* eventTarget, ImageBitmap* bitmap, ExceptionState& es)
-{
- return createImageBitmap(eventTarget, bitmap, 0, 0, bitmap->width(), bitmap->height(), es);
-}
-
-ScriptObject ImageBitmapFactories::createImageBitmap(EventTarget* eventTarget, ImageBitmap* bitmap, int sx, int sy, int sw, int sh, ExceptionState& es)
-{
- if (!bitmap) {
- es.throwTypeError();
- return ScriptObject();
- }
- if (!sw || !sh) {
- es.throwDOMException(IndexSizeError);
- return ScriptObject();
- }
- // FIXME: make ImageBitmap creation asynchronous crbug.com/258082
- return fulfillImageBitmap(eventTarget->scriptExecutionContext(), ImageBitmap::create(bitmap, IntRect(sx, sy, sw, sh)));
-}
-
-const char* ImageBitmapFactories::supplementName()
-{
- return "ImageBitmapFactories";
-}
-
-ImageBitmapFactories* ImageBitmapFactories::from(DOMWindow* window)
-{
- ImageBitmapFactories* supplement = static_cast<ImageBitmapFactories*>(Supplement<DOMWindow>::from(window, supplementName()));
- if (!supplement) {
- supplement = new ImageBitmapFactories();
- provideTo(window, supplementName(), adoptPtr(supplement));
- }
- return supplement;
-}
-
-void ImageBitmapFactories::addLoader(PassRefPtr<ImageBitmapLoader> loader)
-{
- m_pendingLoaders.add(loader);
-}
-
-void ImageBitmapFactories::didFinishLoading(ImageBitmapLoader* loader)
-{
- ASSERT(m_pendingLoaders.contains(loader));
- m_pendingLoaders.remove(loader);
-}
-
-ImageBitmapFactories::ImageBitmapLoader::ImageBitmapLoader(ImageBitmapFactories* factory, PassRefPtr<ScriptPromiseResolver> resolver, const IntRect& cropRect)
- : m_loader(FileReaderLoader::ReadAsArrayBuffer, this)
- , m_scriptState(ScriptState::current())
- , m_factory(factory)
- , m_resolver(resolver)
- , m_cropRect(cropRect)
-{
-}
-
-void ImageBitmapFactories::ImageBitmapLoader::loadBlobAsync(ScriptExecutionContext* context, Blob* blob)
-{
- m_loader.start(context, *blob);
-}
-
-void ImageBitmapFactories::ImageBitmapLoader::rejectPromise()
-{
- ScriptScope scope(m_scriptState);
- m_resolver->reject(ScriptValue::createNull());
- m_factory->didFinishLoading(this);
-}
-
-void ImageBitmapFactories::ImageBitmapLoader::didFinishLoading()
-{
- if (!m_loader.arrayBufferResult()) {
- rejectPromise();
- return;
- }
- RefPtr<SharedBuffer> sharedBuffer = SharedBuffer::create((char*)m_loader.arrayBufferResult()->data(), m_loader.arrayBufferResult()->byteLength());
-
- OwnPtr<ImageSource> source = adoptPtr(new ImageSource());
- source->setData(sharedBuffer.get(), true);
- RefPtr<NativeImageSkia> imageSkia = source->createFrameAtIndex(0);
- if (!imageSkia) {
- rejectPromise();
- return;
- }
-
- RefPtr<Image> image = BitmapImage::create(imageSkia);
- if (!image->width() || !image->height()) {
- rejectPromise();
- return;
- }
- if (!m_cropRect.width() && !m_cropRect.height()) {
- // No cropping variant was called.
- m_cropRect = IntRect(IntPoint(), image->size());
- }
-
- RefPtr<ImageBitmap> imageBitmap = ImageBitmap::create(image.get(), m_cropRect);
- ScriptScope scope(m_scriptState);
- m_resolver->fulfill(imageBitmap.release());
- m_factory->didFinishLoading(this);
-}
-
-void ImageBitmapFactories::ImageBitmapLoader::didFail(FileError::ErrorCode)
-{
- rejectPromise();
-}
-
-} // namespace WebCore
diff --git a/chromium/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapFactories.h b/chromium/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapFactories.h
deleted file mode 100644
index b8a7472f5e6..00000000000
--- a/chromium/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapFactories.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 2013, Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ImageBitmapFactories_h
-#define ImageBitmapFactories_h
-
-#include "bindings/v8/ScriptPromiseResolver.h"
-#include "bindings/v8/ScriptState.h"
-#include "core/fileapi/FileReaderLoader.h"
-#include "core/fileapi/FileReaderLoaderClient.h"
-#include "core/platform/Supplementable.h"
-#include "core/platform/graphics/IntRect.h"
-#include "wtf/Forward.h"
-#include "wtf/HashSet.h"
-
-namespace WebCore {
-
-class Blob;
-class CanvasRenderingContext2D;
-class EventTarget;
-class ExceptionState;
-class HTMLCanvasElement;
-class HTMLImageElement;
-class HTMLVideoElement;
-class ImageBitmap;
-class ImageData;
-class ScriptExecutionContext;
-
-class ImageBitmapFactories : public Supplement<DOMWindow> {
-
-class ImageBitmapLoader;
-
-public:
- static ScriptObject createImageBitmap(EventTarget*, HTMLImageElement*, ExceptionState&);
- static ScriptObject createImageBitmap(EventTarget*, HTMLImageElement*, int sx, int sy, int sw, int sh, ExceptionState&);
- static ScriptObject createImageBitmap(EventTarget*, HTMLVideoElement*, ExceptionState&);
- static ScriptObject createImageBitmap(EventTarget*, HTMLVideoElement*, int sx, int sy, int sw, int sh, ExceptionState&);
- static ScriptObject createImageBitmap(EventTarget*, CanvasRenderingContext2D*, ExceptionState&);
- static ScriptObject createImageBitmap(EventTarget*, CanvasRenderingContext2D*, int sx, int sy, int sw, int sh, ExceptionState&);
- static ScriptObject createImageBitmap(EventTarget*, HTMLCanvasElement*, ExceptionState&);
- static ScriptObject createImageBitmap(EventTarget*, HTMLCanvasElement*, int sx, int sy, int sw, int sh, ExceptionState&);
- static ScriptObject createImageBitmap(EventTarget*, Blob*, ExceptionState&);
- static ScriptObject createImageBitmap(EventTarget*, Blob*, int sx, int sy, int sw, int sh, ExceptionState&);
- static ScriptObject createImageBitmap(EventTarget*, ImageData*, ExceptionState&);
- static ScriptObject createImageBitmap(EventTarget*, ImageData*, int sx, int sy, int sw, int sh, ExceptionState&);
- static ScriptObject createImageBitmap(EventTarget*, ImageBitmap*, ExceptionState&);
- static ScriptObject createImageBitmap(EventTarget*, ImageBitmap*, int sx, int sy, int sw, int sh, ExceptionState&);
-
- void addLoader(PassRefPtr<ImageBitmapLoader>);
- void didFinishLoading(ImageBitmapLoader*);
-
- virtual ~ImageBitmapFactories() { }
- static ImageBitmapFactories* from(DOMWindow*);
-
-private:
- class ImageBitmapLoader : public RefCounted<ImageBitmapLoader>, public FileReaderLoaderClient {
- public:
- static PassRefPtr<ImageBitmapLoader> create(ImageBitmapFactories* factory, PassRefPtr<ScriptPromiseResolver> resolver, const IntRect& cropRect)
- {
- return adoptRef(new ImageBitmapLoader(factory, resolver, cropRect));
- }
-
- void loadBlobAsync(ScriptExecutionContext*, Blob*);
-
- ~ImageBitmapLoader() { }
-
- private:
- ImageBitmapLoader(ImageBitmapFactories*, PassRefPtr<ScriptPromiseResolver>, const IntRect&);
-
- void rejectPromise();
-
- // FileReaderLoaderClient
- virtual void didStartLoading() OVERRIDE { }
- virtual void didReceiveData() OVERRIDE { }
- virtual void didFinishLoading() OVERRIDE;
- virtual void didFail(FileError::ErrorCode) OVERRIDE;
-
- ScriptState* m_scriptState;
- FileReaderLoader m_loader;
- ImageBitmapFactories* m_factory;
- RefPtr<ScriptPromiseResolver> m_resolver;
- IntRect m_cropRect;
- };
-
- static const char* supplementName();
-
- HashSet<RefPtr<ImageBitmapLoader> > m_pendingLoaders;
-};
-
-} // namespace WebCore
-
-#endif // ImageBitmapFactories_h
diff --git a/chromium/third_party/WebKit/Source/modules/imagebitmap/OWNERS b/chromium/third_party/WebKit/Source/modules/imagebitmap/OWNERS
deleted file mode 100644
index 9c1707ac0fd..00000000000
--- a/chromium/third_party/WebKit/Source/modules/imagebitmap/OWNERS
+++ /dev/null
@@ -1,2 +0,0 @@
-arbesfeld@chromium.org
-junov@chromium.org \ No newline at end of file
diff --git a/chromium/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp b/chromium/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp
index 180905749f8..9f99d943409 100644
--- a/chromium/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp
+++ b/chromium/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp
@@ -100,7 +100,7 @@ PassRefPtr<RTCConfiguration> RTCPeerConnection::parseConfiguration(const Diction
return 0;
}
KURL url(KURL(), urlString);
- if (!url.isValid() || !(url.protocolIs("turn") || url.protocolIs("turns") || url.protocolIs("stun"))) {
+ if (!url.isValid() || !(url.protocolIs("turn") || url.protocolIs("stun"))) {
es.throwDOMException(TypeMismatchError);
return 0;
}
diff --git a/chromium/third_party/WebKit/Source/modules/modules.gypi b/chromium/third_party/WebKit/Source/modules/modules.gypi
index 872b0df2b09..ba24a2ed92a 100644
--- a/chromium/third_party/WebKit/Source/modules/modules.gypi
+++ b/chromium/third_party/WebKit/Source/modules/modules.gypi
@@ -50,7 +50,6 @@
'geolocation/Geolocation.idl',
'geolocation/Geoposition.idl',
'geolocation/PositionError.idl',
- 'imagebitmap/ImageBitmapFactories.idl',
'indexeddb/IDBAny.idl',
'indexeddb/IDBCursor.idl',
'indexeddb/IDBCursorWithValue.idl',
@@ -346,8 +345,6 @@
'geolocation/GeolocationController.cpp',
'geolocation/NavigatorGeolocation.cpp',
'geolocation/NavigatorGeolocation.h',
- 'imagebitmap/ImageBitmapFactories.cpp',
- 'imagebitmap/ImageBitmapFactories.h',
'indexeddb/DOMWindowIndexedDatabase.cpp',
'indexeddb/DOMWindowIndexedDatabase.h',
'indexeddb/IDBAny.cpp',
diff --git a/chromium/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp b/chromium/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
index df33faf653a..865e0f26b8f 100644
--- a/chromium/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
+++ b/chromium/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
@@ -62,7 +62,7 @@ static void initProtocolHandlerWhitelist()
"tel",
"urn",
"webcal",
- "wtai",
+ "webtai",
"xmpp",
};
for (size_t i = 0; i < WTF_ARRAY_LENGTH(protocols); ++i)
@@ -106,8 +106,7 @@ static bool isProtocolWhitelisted(const String& scheme)
static bool verifyProtocolHandlerScheme(const String& scheme, ExceptionState& es)
{
if (scheme.startsWith("web+")) {
- // The specification requires that the length of scheme is at least five characteres (including 'web+' prefix).
- if (scheme.length() >= 5 && isValidProtocol(scheme))
+ if (isValidProtocol(scheme))
return true;
es.throwDOMException(SecurityError);
return false;
diff --git a/chromium/third_party/WebKit/Source/web/AssociatedURLLoader.cpp b/chromium/third_party/WebKit/Source/web/AssociatedURLLoader.cpp
index 98f9cae4fe2..ccf03cb1737 100644
--- a/chromium/third_party/WebKit/Source/web/AssociatedURLLoader.cpp
+++ b/chromium/third_party/WebKit/Source/web/AssociatedURLLoader.cpp
@@ -37,6 +37,7 @@
#include "core/loader/CrossOriginAccessControl.h"
#include "core/loader/DocumentThreadableLoader.h"
#include "core/loader/DocumentThreadableLoaderClient.h"
+#include "core/loader/ResourceLoader.h"
#include "core/platform/Timer.h"
#include "core/platform/chromium/support/WrappedResourceRequest.h"
#include "core/platform/chromium/support/WrappedResourceResponse.h"
diff --git a/chromium/third_party/WebKit/Source/web/AsyncFileSystemChromium.cpp b/chromium/third_party/WebKit/Source/web/AsyncFileSystemChromium.cpp
index 66b37edee11..32d2e4fa808 100644
--- a/chromium/third_party/WebKit/Source/web/AsyncFileSystemChromium.cpp
+++ b/chromium/third_party/WebKit/Source/web/AsyncFileSystemChromium.cpp
@@ -50,7 +50,9 @@ PassOwnPtr<AsyncFileSystem> AsyncFileSystem::create()
}
AsyncFileSystemChromium::AsyncFileSystemChromium()
+ : m_webFileSystem(WebKit::Platform::current()->fileSystem())
{
+ ASSERT(m_webFileSystem);
}
AsyncFileSystemChromium::~AsyncFileSystemChromium()
@@ -59,52 +61,52 @@ AsyncFileSystemChromium::~AsyncFileSystemChromium()
void AsyncFileSystemChromium::move(const KURL& sourcePath, const KURL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
{
- webFileSystem()->move(sourcePath, destinationPath, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+ m_webFileSystem->move(sourcePath, destinationPath, new WebKit::WebFileSystemCallbacksImpl(callbacks));
}
void AsyncFileSystemChromium::copy(const KURL& sourcePath, const KURL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
{
- webFileSystem()->copy(sourcePath, destinationPath, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+ m_webFileSystem->copy(sourcePath, destinationPath, new WebKit::WebFileSystemCallbacksImpl(callbacks));
}
void AsyncFileSystemChromium::remove(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
{
- webFileSystem()->remove(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+ m_webFileSystem->remove(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
}
void AsyncFileSystemChromium::removeRecursively(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
{
- webFileSystem()->removeRecursively(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+ m_webFileSystem->removeRecursively(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
}
void AsyncFileSystemChromium::readMetadata(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
{
- webFileSystem()->readMetadata(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+ m_webFileSystem->readMetadata(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
}
void AsyncFileSystemChromium::createFile(const KURL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
{
- webFileSystem()->createFile(path, exclusive, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+ m_webFileSystem->createFile(path, exclusive, new WebKit::WebFileSystemCallbacksImpl(callbacks));
}
void AsyncFileSystemChromium::createDirectory(const KURL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
{
- webFileSystem()->createDirectory(path, exclusive, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+ m_webFileSystem->createDirectory(path, exclusive, new WebKit::WebFileSystemCallbacksImpl(callbacks));
}
void AsyncFileSystemChromium::fileExists(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
{
- webFileSystem()->fileExists(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+ m_webFileSystem->fileExists(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
}
void AsyncFileSystemChromium::directoryExists(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
{
- webFileSystem()->directoryExists(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+ m_webFileSystem->directoryExists(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
}
void AsyncFileSystemChromium::readDirectory(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
{
- webFileSystem()->readDirectory(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+ m_webFileSystem->readDirectory(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
}
void AsyncFileSystemChromium::createWriter(AsyncFileWriterClient* client, const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
@@ -112,17 +114,12 @@ void AsyncFileSystemChromium::createWriter(AsyncFileWriterClient* client, const
OwnPtr<AsyncFileWriterChromium> asyncFileWriter = AsyncFileWriterChromium::create(client);
WebKit::WebFileWriterClient* writerClient = asyncFileWriter.get();
- webFileSystem()->createFileWriter(path, writerClient, new WebKit::WebFileSystemCallbacksImpl(callbacks, asyncFileWriter.release()));
+ m_webFileSystem->createFileWriter(path, writerClient, new WebKit::WebFileSystemCallbacksImpl(callbacks, asyncFileWriter.release()));
}
void AsyncFileSystemChromium::createSnapshotFileAndReadMetadata(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
{
- webFileSystem()->createSnapshotFileAndReadMetadata(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
-}
-
-WebKit::WebFileSystem* AsyncFileSystemChromium::webFileSystem()
-{
- return WebKit::Platform::current()->fileSystem();
+ m_webFileSystem->createSnapshotFileAndReadMetadata(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
}
} // namespace WebCore
diff --git a/chromium/third_party/WebKit/Source/web/AsyncFileSystemChromium.h b/chromium/third_party/WebKit/Source/web/AsyncFileSystemChromium.h
index 1eaa9c2d89e..66496f50f70 100644
--- a/chromium/third_party/WebKit/Source/web/AsyncFileSystemChromium.h
+++ b/chromium/third_party/WebKit/Source/web/AsyncFileSystemChromium.h
@@ -64,9 +64,10 @@ public:
virtual void createWriter(AsyncFileWriterClient*, const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
virtual void createSnapshotFileAndReadMetadata(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
-private:
+protected:
AsyncFileSystemChromium();
- WebKit::WebFileSystem* webFileSystem();
+
+ WebKit::WebFileSystem* m_webFileSystem;
};
} // namespace WebCore
diff --git a/chromium/third_party/WebKit/Source/web/BackForwardClientImpl.cpp b/chromium/third_party/WebKit/Source/web/BackForwardClientImpl.cpp
index 6e2c17f4bca..1cbbdb177e5 100644
--- a/chromium/third_party/WebKit/Source/web/BackForwardClientImpl.cpp
+++ b/chromium/third_party/WebKit/Source/web/BackForwardClientImpl.cpp
@@ -33,11 +33,15 @@
#include "WebViewClient.h"
#include "WebViewImpl.h"
+#include "core/history/HistoryItem.h"
+#include "wtf/text/StringConcatenate.h"
using namespace WebCore;
namespace WebKit {
+const char backForwardNavigationScheme[] = "chrome-back-forward";
+
BackForwardClientImpl::BackForwardClientImpl(WebViewImpl* webView)
: m_webView(webView)
{
@@ -47,11 +51,49 @@ BackForwardClientImpl::~BackForwardClientImpl()
{
}
-void BackForwardClientImpl::didAddItem()
+void BackForwardClientImpl::addItem(PassRefPtr<HistoryItem> item)
{
+ m_currentItem = item;
+
// If WebCore adds a new HistoryItem, it means this is a new navigation (ie,
// not a reload or back/forward).
m_webView->observeNewNavigation();
+
+ if (m_webView->client())
+ m_webView->client()->didAddHistoryItem();
+}
+
+void BackForwardClientImpl::goToItem(HistoryItem* item)
+{
+ m_currentItem = item;
+
+ if (m_pendingHistoryItem == item)
+ m_pendingHistoryItem = 0;
+}
+
+HistoryItem* BackForwardClientImpl::itemAtIndex(int index)
+{
+ if (!m_webView->client())
+ return 0;
+
+ if (!index)
+ return m_currentItem.get();
+
+ if (index > forwardListCount() || -index > backListCount())
+ return 0;
+
+ // Since we don't keep the entire back/forward list, we have no way to
+ // properly implement this method. We return a dummy entry instead that we
+ // intercept in our FrameLoaderClient implementation in case WebCore asks
+ // to navigate to this HistoryItem.
+
+ // FIXME: We should change WebCore to handle history.{back,forward,go}
+ // differently. It should perhaps just ask the FrameLoaderClient to
+ // perform those navigations.
+
+ String urlString = String(backForwardNavigationScheme) + "://go/" + String::number(index);
+ m_pendingHistoryItem = HistoryItem::create(urlString);
+ return m_pendingHistoryItem.get();
}
int BackForwardClientImpl::backListCount()
@@ -70,4 +112,15 @@ int BackForwardClientImpl::forwardListCount()
return m_webView->client()->historyForwardListCount();
}
+bool BackForwardClientImpl::isActive()
+{
+ return m_webView->client();
+}
+
+void BackForwardClientImpl::close()
+{
+ m_currentItem = 0;
+ m_pendingHistoryItem = 0;
+}
+
} // namespace WebKit
diff --git a/chromium/third_party/WebKit/Source/web/BackForwardClientImpl.h b/chromium/third_party/WebKit/Source/web/BackForwardClientImpl.h
index 6550a4075ef..c76680948f3 100644
--- a/chromium/third_party/WebKit/Source/web/BackForwardClientImpl.h
+++ b/chromium/third_party/WebKit/Source/web/BackForwardClientImpl.h
@@ -37,6 +37,8 @@
namespace WebKit {
class WebViewImpl;
+extern const char backForwardNavigationScheme[];
+
class BackForwardClientImpl : public WebCore::BackForwardClient {
public:
explicit BackForwardClientImpl(WebViewImpl*);
@@ -44,11 +46,21 @@ public:
private:
// WebCore::BackForwardList methods:
- virtual void didAddItem();
+ virtual void addItem(PassRefPtr<WebCore::HistoryItem>);
+ virtual void goToItem(WebCore::HistoryItem*);
+ virtual WebCore::HistoryItem* itemAtIndex(int index);
virtual int backListCount();
virtual int forwardListCount();
+ virtual bool isActive();
+ virtual void close();
WebViewImpl* m_webView;
+
+ RefPtr<WebCore::HistoryItem> m_currentItem;
+
+ // The last history item that was accessed via itemAtIndex(). We keep track
+ // of this until goToItem() is called, so we can track the navigation.
+ RefPtr<WebCore::HistoryItem> m_pendingHistoryItem;
};
} // namespace WebKit
diff --git a/chromium/third_party/WebKit/Source/web/ChromeClientImpl.cpp b/chromium/third_party/WebKit/Source/web/ChromeClientImpl.cpp
index a567df5fb45..bea7012f64d 100644
--- a/chromium/third_party/WebKit/Source/web/ChromeClientImpl.cpp
+++ b/chromium/third_party/WebKit/Source/web/ChromeClientImpl.cpp
@@ -921,7 +921,7 @@ void ChromeClientImpl::openPasswordGenerator(HTMLInputElement* input)
m_webView->passwordGeneratorClient()->openPasswordGenerator(webInput);
}
-bool ChromeClientImpl::shouldRunModalDialogDuringPageDismissal(const DialogType& dialogType, const String& dialogMessage, Document::PageDismissalType dismissalType) const
+bool ChromeClientImpl::shouldRunModalDialogDuringPageDismissal(const DialogType& dialogType, const String& dialogMessage, FrameLoader::PageDismissalType dismissalType) const
{
const char* kDialogs[] = {"alert", "confirm", "prompt", "showModalDialog"};
int dialog = static_cast<int>(dialogType);
diff --git a/chromium/third_party/WebKit/Source/web/ChromeClientImpl.h b/chromium/third_party/WebKit/Source/web/ChromeClientImpl.h
index 639e9d9550b..71c4ace37ea 100644
--- a/chromium/third_party/WebKit/Source/web/ChromeClientImpl.h
+++ b/chromium/third_party/WebKit/Source/web/ChromeClientImpl.h
@@ -175,7 +175,7 @@ public:
virtual bool isPasswordGenerationEnabled() const OVERRIDE;
virtual void openPasswordGenerator(WebCore::HTMLInputElement*) OVERRIDE;
- virtual bool shouldRunModalDialogDuringPageDismissal(const DialogType&, const String& dialogMessage, WebCore::Document::PageDismissalType) const;
+ virtual bool shouldRunModalDialogDuringPageDismissal(const DialogType&, const String& dialogMessage, WebCore::FrameLoader::PageDismissalType) const;
virtual bool shouldRubberBandInDirection(WebCore::ScrollDirection) const;
virtual void numWheelEventHandlersChanged(unsigned);
diff --git a/chromium/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp b/chromium/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp
index c8f36925cf7..a44c87d653e 100644
--- a/chromium/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp
+++ b/chromium/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp
@@ -122,7 +122,7 @@ static String selectMisspelledWord(Frame* selectedFrame)
// Selection is empty, so change the selection to the word under the cursor.
HitTestResult hitTestResult = selectedFrame->eventHandler()->
- hitTestResultAtPoint(selectedFrame->page()->contextMenuController().hitTestResult().pointInInnerNodeFrame());
+ hitTestResultAtPoint(selectedFrame->page()->contextMenuController()->hitTestResult().pointInInnerNodeFrame());
Node* innerNode = hitTestResult.innerNode();
VisiblePosition pos(innerNode->renderer()->positionForPoint(
hitTestResult.localPoint()));
@@ -184,7 +184,7 @@ void ContextMenuClientImpl::showContextMenu(const WebCore::ContextMenu* defaultM
if (!m_webView->contextMenuAllowed())
return;
- HitTestResult r = m_webView->page()->contextMenuController().hitTestResult();
+ HitTestResult r = m_webView->page()->contextMenuController()->hitTestResult();
Frame* selectedFrame = r.innerNodeFrame();
WebContextMenuData data;
@@ -368,12 +368,6 @@ void ContextMenuClientImpl::showContextMenu(const WebCore::ContextMenu* defaultM
m_webView->client()->showContextMenu(selected_web_frame, data);
}
-void ContextMenuClientImpl::clearContextMenu()
-{
- if (m_webView->client())
- m_webView->client()->clearContextMenu();
-}
-
static void populateSubMenuItems(const Vector<ContextMenuItem>& inputMenu, WebVector<WebMenuItemInfo>& subMenuItems)
{
Vector<WebMenuItemInfo> subItems;
diff --git a/chromium/third_party/WebKit/Source/web/ContextMenuClientImpl.h b/chromium/third_party/WebKit/Source/web/ContextMenuClientImpl.h
index 5b0875c064a..b44c79add7f 100644
--- a/chromium/third_party/WebKit/Source/web/ContextMenuClientImpl.h
+++ b/chromium/third_party/WebKit/Source/web/ContextMenuClientImpl.h
@@ -43,7 +43,6 @@ public:
ContextMenuClientImpl(WebViewImpl* webView) : m_webView(webView) {}
virtual ~ContextMenuClientImpl() {}
virtual void showContextMenu(const WebCore::ContextMenu*);
- virtual void clearContextMenu();
private:
void populateCustomMenuItems(const WebCore::ContextMenu*, WebContextMenuData*);
WebViewImpl* m_webView;
diff --git a/chromium/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp b/chromium/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
index 640bfb2563c..7a5f0c8ad5a 100644
--- a/chromium/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
+++ b/chromium/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
@@ -44,6 +44,7 @@
#include "core/loader/FrameLoadRequest.h"
#include "core/loader/FrameLoader.h"
#include "core/loader/ProgressTracker.h"
+#include "core/loader/ResourceLoader.h"
#include "core/page/Chrome.h"
#include "core/page/EventHandler.h"
#include "core/page/FrameView.h"
@@ -523,11 +524,36 @@ void FrameLoaderClientImpl::loadURLExternally(const ResourceRequest& request, Na
}
}
-void FrameLoaderClientImpl::navigateBackForward(int offset) const
+bool FrameLoaderClientImpl::shouldGoToHistoryItem(HistoryItem* item) const
{
+ const KURL& url = item->url();
+ if (!url.protocolIs(backForwardNavigationScheme))
+ return true;
+
+ // Else, we'll punt this history navigation to the embedder. It is
+ // necessary that we intercept this here, well before the FrameLoader
+ // has made any state changes for this history traversal.
+
+ bool ok;
+ int offset = url.lastPathComponent().toIntStrict(&ok);
+ if (!ok) {
+ ASSERT_NOT_REACHED();
+ return false;
+ }
+
WebViewImpl* webview = m_webFrame->viewImpl();
if (webview->client())
webview->client()->navigateBackForwardSoon(offset);
+
+ return false;
+}
+
+bool FrameLoaderClientImpl::shouldStopLoadingForHistoryItem(HistoryItem* targetItem) const
+{
+ // Don't stop loading for pseudo-back-forward URLs, since they will get
+ // translated and then pass through again.
+ const KURL& url = targetItem->url();
+ return !url.protocolIs(backForwardNavigationScheme);
}
void FrameLoaderClientImpl::didAccessInitialDocument()
diff --git a/chromium/third_party/WebKit/Source/web/FrameLoaderClientImpl.h b/chromium/third_party/WebKit/Source/web/FrameLoaderClientImpl.h
index 103567a883c..468c4dc2dfb 100644
--- a/chromium/third_party/WebKit/Source/web/FrameLoaderClientImpl.h
+++ b/chromium/third_party/WebKit/Source/web/FrameLoaderClientImpl.h
@@ -100,7 +100,8 @@ public:
virtual void postProgressEstimateChangedNotification();
virtual void postProgressFinishedNotification();
virtual void loadURLExternally(const WebCore::ResourceRequest&, WebCore::NavigationPolicy, const String& suggestedName = String());
- virtual void navigateBackForward(int offset) const;
+ virtual bool shouldGoToHistoryItem(WebCore::HistoryItem*) const;
+ virtual bool shouldStopLoadingForHistoryItem(WebCore::HistoryItem*) const;
virtual void didAccessInitialDocument();
virtual void didDisownOpener();
virtual void didDisplayInsecureContent();
diff --git a/chromium/third_party/WebKit/Source/web/PageOverlay.cpp b/chromium/third_party/WebKit/Source/web/PageOverlay.cpp
index 9166835f2ca..c0e7911c527 100644
--- a/chromium/third_party/WebKit/Source/web/PageOverlay.cpp
+++ b/chromium/third_party/WebKit/Source/web/PageOverlay.cpp
@@ -110,15 +110,6 @@ void PageOverlay::update()
m_layer = GraphicsLayer::create(m_viewImpl->graphicsLayerFactory(), m_layerClient.get());
m_layer->setName("WebViewImpl page overlay content");
m_layer->setDrawsContent(true);
-
- // Compositor hit-testing does not know how to deal with layers that may be
- // transparent to events (see http://crbug.com/269598). So require
- // scrolling and touches on this layer to go to the main thread.
- WebLayer* platformLayer = m_layer->platformLayer();
- platformLayer->setShouldScrollOnMainThread(true);
- WebVector<WebRect> webRects(static_cast<size_t>(1));
- webRects[0] = WebRect(0, 0, INT_MAX, INT_MAX);
- platformLayer->setTouchEventHandlerRegion(webRects);
}
FloatSize size(m_viewImpl->size());
@@ -131,6 +122,9 @@ void PageOverlay::update()
m_viewImpl->setOverlayLayer(m_layer.get());
m_layer->setNeedsDisplay();
+
+ WebLayer* platformLayer = m_layer->platformLayer();
+ platformLayer->setShouldScrollOnMainThread(true);
}
void PageOverlay::paintWebFrame(GraphicsContext& gc)
diff --git a/chromium/third_party/WebKit/Source/web/WebCache.cpp b/chromium/third_party/WebKit/Source/web/WebCache.cpp
index c68013d8f7e..8ae3cd6062d 100644
--- a/chromium/third_party/WebKit/Source/web/WebCache.cpp
+++ b/chromium/third_party/WebKit/Source/web/WebCache.cpp
@@ -31,7 +31,7 @@
#include "config.h"
#include "WebCache.h"
-#include "core/fetch/MemoryCache.h"
+#include "core/loader/cache/MemoryCache.h"
using WebCore::MemoryCache;
diff --git a/chromium/third_party/WebKit/Source/web/WebCachedURLRequest.cpp b/chromium/third_party/WebKit/Source/web/WebCachedURLRequest.cpp
index a1d9eecf30e..4f5d16d0642 100644
--- a/chromium/third_party/WebKit/Source/web/WebCachedURLRequest.cpp
+++ b/chromium/third_party/WebKit/Source/web/WebCachedURLRequest.cpp
@@ -31,7 +31,7 @@
#include "config.h"
#include "WebCachedURLRequest.h"
-#include "core/fetch/FetchRequest.h"
+#include "core/loader/cache/FetchRequest.h"
#include "core/platform/chromium/support/WrappedResourceRequest.h"
#include "public/platform/WebURLRequest.h"
diff --git a/chromium/third_party/WebKit/Source/web/WebDataSourceImpl.cpp b/chromium/third_party/WebKit/Source/web/WebDataSourceImpl.cpp
index 0ed7727edb9..fe987cdadf4 100644
--- a/chromium/third_party/WebKit/Source/web/WebDataSourceImpl.cpp
+++ b/chromium/third_party/WebKit/Source/web/WebDataSourceImpl.cpp
@@ -32,7 +32,6 @@
#include "WebDataSourceImpl.h"
#include "ApplicationCacheHostInternal.h"
-#include "core/dom/Document.h"
#include "core/loader/FrameLoader.h"
#include "public/platform/WebURL.h"
#include "public/platform/WebURLError.h"
@@ -98,14 +97,12 @@ bool WebDataSourceImpl::replacesCurrentHistoryItem() const
WebString WebDataSourceImpl::pageTitle() const
{
- ASSERT(frame()->loader()->documentLoader() == this);
- return frame()->document()->title();
+ return title().string();
}
WebTextDirection WebDataSourceImpl::pageTitleDirection() const
{
- ASSERT(frame()->loader()->documentLoader() == this);
- return frame()->document()->titleWithDirection().direction() == LTR ? WebTextDirectionLeftToRight : WebTextDirectionRightToLeft;
+ return title().direction() == LTR ? WebTextDirectionLeftToRight : WebTextDirectionRightToLeft;
}
WebNavigationType WebDataSourceImpl::navigationType() const
diff --git a/chromium/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp b/chromium/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp
index 3ea57461e1f..0f533fbad5e 100644
--- a/chromium/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp
+++ b/chromium/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp
@@ -46,9 +46,9 @@
#include "bindings/v8/V8Binding.h"
#include "bindings/v8/V8Utilities.h"
#include "core/dom/ExceptionCode.h"
-#include "core/fetch/MemoryCache.h"
#include "core/inspector/InjectedScriptHost.h"
#include "core/inspector/InspectorController.h"
+#include "core/loader/cache/MemoryCache.h"
#include "core/page/Frame.h"
#include "core/page/FrameView.h"
#include "core/page/Page.h"
@@ -464,18 +464,10 @@ void WebDevToolsAgentImpl::webViewResized(const WebSize& size)
bool WebDevToolsAgentImpl::handleInputEvent(WebCore::Page* page, const WebInputEvent& inputEvent)
{
- if (!m_attached)
- return false;
-
InspectorController* ic = inspectorController();
if (!ic)
return false;
- if (WebInputEvent::isGestureEventType(inputEvent.type) && inputEvent.type == WebInputEvent::GestureTap) {
- // Only let GestureTab in (we only need it and we know PlatformGestureEventBuilder supports it).
- PlatformGestureEvent gestureEvent = PlatformGestureEventBuilder(page->mainFrame()->view(), *static_cast<const WebGestureEvent*>(&inputEvent));
- return ic->handleGestureEvent(page->mainFrame(), gestureEvent);
- }
if (WebInputEvent::isMouseEventType(inputEvent.type) && inputEvent.type != WebInputEvent::MouseEnter) {
// PlatformMouseEventBuilder does not work with MouseEnter type, so we filter it out manually.
PlatformMouseEvent mouseEvent = PlatformMouseEventBuilder(page->mainFrame()->view(), *static_cast<const WebMouseEvent*>(&inputEvent));
diff --git a/chromium/third_party/WebKit/Source/web/WebFileSystemCallbacksImpl.cpp b/chromium/third_party/WebKit/Source/web/WebFileSystemCallbacksImpl.cpp
index a882f926a9a..b993b344337 100644
--- a/chromium/third_party/WebKit/Source/web/WebFileSystemCallbacksImpl.cpp
+++ b/chromium/third_party/WebKit/Source/web/WebFileSystemCallbacksImpl.cpp
@@ -32,6 +32,8 @@
#include "AsyncFileSystemChromium.h"
#include "AsyncFileWriterChromium.h"
+#include "WorkerAsyncFileSystemChromium.h"
+#include "core/dom/ScriptExecutionContext.h"
#include "core/platform/AsyncFileSystemCallbacks.h"
#include "core/platform/FileMetadata.h"
#include "public/platform/WebFileInfo.h"
@@ -45,14 +47,17 @@ using namespace WebCore;
namespace WebKit {
-WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl(PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl(PassOwnPtr<AsyncFileSystemCallbacks> callbacks, ScriptExecutionContext* context, FileSystemSynchronousType synchronousType)
: m_callbacks(callbacks)
+ , m_context(context)
+ , m_synchronousType(synchronousType)
{
ASSERT(m_callbacks);
}
WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl(PassOwnPtr<AsyncFileSystemCallbacks> callbacks, PassOwnPtr<AsyncFileWriterChromium> writer)
: m_callbacks(callbacks)
+ , m_context(0)
, m_writer(writer)
{
ASSERT(m_callbacks);
@@ -112,6 +117,11 @@ void WebFileSystemCallbacksImpl::didOpenFileSystem(const WebString& name, const
{
// This object is intended to delete itself on exit.
OwnPtr<WebFileSystemCallbacksImpl> callbacks = adoptPtr(this);
+
+ if (m_context && m_context->isWorkerGlobalScope()) {
+ m_callbacks->didOpenFileSystem(name, rootURL, WorkerAsyncFileSystemChromium::create(m_context, m_synchronousType));
+ return;
+ }
m_callbacks->didOpenFileSystem(name, rootURL, AsyncFileSystemChromium::create());
}
diff --git a/chromium/third_party/WebKit/Source/web/WebFileSystemCallbacksImpl.h b/chromium/third_party/WebKit/Source/web/WebFileSystemCallbacksImpl.h
index 1522f94af85..06d1f8c137e 100644
--- a/chromium/third_party/WebKit/Source/web/WebFileSystemCallbacksImpl.h
+++ b/chromium/third_party/WebKit/Source/web/WebFileSystemCallbacksImpl.h
@@ -42,6 +42,7 @@ namespace WebCore {
class AsyncFileSystemCallbacks;
class AsyncFileWriterChromium;
class BlobDataHandle;
+class ScriptExecutionContext;
}
namespace WebKit {
@@ -53,7 +54,7 @@ class WebURL;
class WebFileSystemCallbacksImpl : public WebFileSystemCallbacks {
public:
- WebFileSystemCallbacksImpl(PassOwnPtr<WebCore::AsyncFileSystemCallbacks>);
+ WebFileSystemCallbacksImpl(PassOwnPtr<WebCore::AsyncFileSystemCallbacks>, WebCore::ScriptExecutionContext* = 0, WebCore::FileSystemSynchronousType = WebCore::AsynchronousFileSystem);
WebFileSystemCallbacksImpl(PassOwnPtr<WebCore::AsyncFileSystemCallbacks>, PassOwnPtr<WebCore::AsyncFileWriterChromium>);
virtual ~WebFileSystemCallbacksImpl();
@@ -74,6 +75,10 @@ public:
private:
OwnPtr<WebCore::AsyncFileSystemCallbacks> m_callbacks;
+ // Used for worker's openFileSystem callbacks.
+ WebCore::ScriptExecutionContext* m_context;
+ WebCore::FileSystemSynchronousType m_synchronousType;
+
// Used for createFileWriter callbacks.
OwnPtr<WebCore::AsyncFileWriterChromium> m_writer;
};
diff --git a/chromium/third_party/WebKit/Source/web/WebFrameImpl.cpp b/chromium/third_party/WebKit/Source/web/WebFrameImpl.cpp
index baf06cd1d7a..8526f56e4fe 100644
--- a/chromium/third_party/WebKit/Source/web/WebFrameImpl.cpp
+++ b/chromium/third_party/WebKit/Source/web/WebFrameImpl.cpp
@@ -984,7 +984,7 @@ void WebFrameImpl::stopLoading()
// FIXME: Figure out what we should really do here. It seems like a bug
// that FrameLoader::stopLoading doesn't call stopAllLoaders.
frame()->loader()->stopAllLoaders();
- frame()->loader()->stopLoading();
+ frame()->loader()->stopLoading(UnloadEventPolicyNone);
}
WebDataSource* WebFrameImpl::provisionalDataSource() const
@@ -1368,11 +1368,6 @@ void WebFrameImpl::moveCaretSelection(const WebPoint& point)
frame()->selection()->moveTo(position, UserTriggered);
}
-void WebFrameImpl::setCaretVisible(bool visible)
-{
- frame()->selection()->setCaretVisible(visible);
-}
-
VisiblePosition WebFrameImpl::visiblePositionForWindowPoint(const WebPoint& point)
{
FloatPoint unscaledPoint(point);
diff --git a/chromium/third_party/WebKit/Source/web/WebFrameImpl.h b/chromium/third_party/WebKit/Source/web/WebFrameImpl.h
index b6e0b419399..d67fc22e083 100644
--- a/chromium/third_party/WebKit/Source/web/WebFrameImpl.h
+++ b/chromium/third_party/WebKit/Source/web/WebFrameImpl.h
@@ -188,7 +188,6 @@ public:
virtual void moveCaretSelectionTowardsWindowPoint(const WebPoint&);
virtual void moveRangeSelection(const WebPoint& base, const WebPoint& extent);
virtual void moveCaretSelection(const WebPoint&);
- virtual void setCaretVisible(bool);
virtual int printBegin(const WebPrintParams&,
const WebNode& constrainToNode,
bool* useBrowserOverlays);
diff --git a/chromium/third_party/WebKit/Source/web/WebHelperPluginImpl.cpp b/chromium/third_party/WebKit/Source/web/WebHelperPluginImpl.cpp
index 570d4b31050..028f5220005 100644
--- a/chromium/third_party/WebKit/Source/web/WebHelperPluginImpl.cpp
+++ b/chromium/third_party/WebKit/Source/web/WebHelperPluginImpl.cpp
@@ -131,7 +131,7 @@ void WebHelperPluginImpl::closeHelperPlugin()
if (m_page) {
m_page->clearPageGroup();
m_page->mainFrame()->loader()->stopAllLoaders();
- m_page->mainFrame()->loader()->stopLoading();
+ m_page->mainFrame()->loader()->stopLoading(UnloadEventPolicyNone);
}
// We must destroy the page now in case the host page is being destroyed, in
diff --git a/chromium/third_party/WebKit/Source/web/WebPagePopupImpl.cpp b/chromium/third_party/WebKit/Source/web/WebPagePopupImpl.cpp
index c52a116d0b8..b1968204c5b 100644
--- a/chromium/third_party/WebKit/Source/web/WebPagePopupImpl.cpp
+++ b/chromium/third_party/WebKit/Source/web/WebPagePopupImpl.cpp
@@ -320,7 +320,7 @@ void WebPagePopupImpl::closePopup()
if (m_page) {
m_page->clearPageGroup();
m_page->mainFrame()->loader()->stopAllLoaders();
- m_page->mainFrame()->loader()->stopLoading();
+ m_page->mainFrame()->loader()->stopLoading(UnloadEventPolicyNone);
DOMWindowPagePopup::uninstall(m_page->mainFrame()->domWindow());
}
m_closing = true;
diff --git a/chromium/third_party/WebKit/Source/web/WebViewImpl.cpp b/chromium/third_party/WebKit/Source/web/WebViewImpl.cpp
index 2c8e3da8b0b..6674e5e321f 100644
--- a/chromium/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/chromium/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -567,7 +567,7 @@ void WebViewImpl::mouseContextMenu(const WebMouseEvent& event)
if (!mainFrameImpl() || !mainFrameImpl()->frameView())
return;
- m_page->contextMenuController().clearContextMenu();
+ m_page->contextMenuController()->clearContextMenu();
PlatformMouseEventBuilder pme(mainFrameImpl()->frameView(), event);
@@ -760,7 +760,7 @@ bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event)
break;
m_client->cancelScheduledContentIntents();
- m_page->contextMenuController().clearContextMenu();
+ m_page->contextMenuController()->clearContextMenu();
m_contextMenuAllowed = true;
eventSwallowed = mainFrameImpl()->frame()->eventHandler()->handleGestureEvent(platformEvent);
m_contextMenuAllowed = false;
@@ -1356,7 +1356,7 @@ bool WebViewImpl::sendContextMenuEvent(const WebKeyboardEvent& event)
// detect if we create a new menu for this event, since we won't create
// a new menu if the DOM swallows the event and the defaultEventHandler does
// not run.
- page()->contextMenuController().clearContextMenu();
+ page()->contextMenuController()->clearContextMenu();
m_contextMenuAllowed = true;
Frame* focusedFrame = page()->focusController().focusedOrMainFrame();
@@ -2462,19 +2462,19 @@ void WebViewImpl::willCloseLayerTreeView()
void WebViewImpl::didAcquirePointerLock()
{
if (page())
- page()->pointerLockController().didAcquirePointerLock();
+ page()->pointerLockController()->didAcquirePointerLock();
}
void WebViewImpl::didNotAcquirePointerLock()
{
if (page())
- page()->pointerLockController().didNotAcquirePointerLock();
+ page()->pointerLockController()->didNotAcquirePointerLock();
}
void WebViewImpl::didLosePointerLock()
{
if (page())
- page()->pointerLockController().didLosePointerLock();
+ page()->pointerLockController()->didLosePointerLock();
}
void WebViewImpl::didChangeWindowResizerRect()
@@ -3453,13 +3453,13 @@ void WebViewImpl::performCustomContextMenuAction(unsigned action)
{
if (!m_page)
return;
- ContextMenu* menu = m_page->contextMenuController().contextMenu();
+ ContextMenu* menu = m_page->contextMenuController()->contextMenu();
if (!menu)
return;
const ContextMenuItem* item = menu->itemWithAction(static_cast<ContextMenuAction>(ContextMenuItemBaseCustomTag + action));
if (item)
- m_page->contextMenuController().contextMenuItemSelected(item);
- m_page->contextMenuController().clearContextMenu();
+ m_page->contextMenuController()->contextMenuItemSelected(item);
+ m_page->contextMenuController()->clearContextMenu();
}
void WebViewImpl::showContextMenu()
@@ -3467,7 +3467,7 @@ void WebViewImpl::showContextMenu()
if (!page())
return;
- page()->contextMenuController().clearContextMenu();
+ page()->contextMenuController()->clearContextMenu();
m_contextMenuAllowed = true;
if (Frame* focusedFrame = page()->focusController().focusedOrMainFrame())
focusedFrame->eventHandler()->sendContextMenuEventForKey();
@@ -4071,7 +4071,7 @@ void WebViewImpl::pointerLockMouseEvent(const WebInputEvent& event)
const WebMouseEvent& mouseEvent = static_cast<const WebMouseEvent&>(event);
if (page())
- page()->pointerLockController().dispatchLockedMouseEvent(
+ page()->pointerLockController()->dispatchLockedMouseEvent(
PlatformMouseEventBuilder(mainFrameImpl()->frameView(), mouseEvent),
eventType);
}
diff --git a/chromium/third_party/WebKit/Source/web/WorkerAsyncFileSystemChromium.cpp b/chromium/third_party/WebKit/Source/web/WorkerAsyncFileSystemChromium.cpp
new file mode 100644
index 00000000000..5da01d30c42
--- /dev/null
+++ b/chromium/third_party/WebKit/Source/web/WorkerAsyncFileSystemChromium.cpp
@@ -0,0 +1,194 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WorkerAsyncFileSystemChromium.h"
+
+#include "WebFileSystemCallbacksImpl.h"
+#include "WebFileWriter.h"
+#include "WorkerAsyncFileWriterChromium.h"
+#include "WorkerFileSystemCallbacksBridge.h"
+#include "bindings/v8/WorkerScriptController.h"
+#include "core/fileapi/BlobURL.h"
+#include "core/platform/AsyncFileSystemCallbacks.h"
+#include "core/platform/FileMetadata.h"
+#include "core/platform/FileSystem.h"
+#include "core/platform/NotImplemented.h"
+#include "core/workers/WorkerGlobalScope.h"
+#include "core/workers/WorkerThread.h"
+#include "public/platform/WebFileSystem.h"
+#include "wtf/text/CString.h"
+
+using namespace WebKit;
+
+namespace WebCore {
+
+static const char fileSystemOperationsMode[] = "fileSystemOperationsMode";
+
+WorkerAsyncFileSystemChromium::WorkerAsyncFileSystemChromium(ScriptExecutionContext* context, FileSystemSynchronousType synchronousType)
+ : m_scriptExecutionContext(context)
+ , m_workerGlobalScope(toWorkerGlobalScope(context))
+ , m_synchronousType(synchronousType)
+{
+ ASSERT(m_scriptExecutionContext->isWorkerGlobalScope());
+
+ m_workerLoaderProxy = &m_workerGlobalScope->thread()->workerLoaderProxy();
+}
+
+WorkerAsyncFileSystemChromium::~WorkerAsyncFileSystemChromium()
+{
+}
+
+bool WorkerAsyncFileSystemChromium::waitForOperationToComplete()
+{
+ if (!m_bridgeForCurrentOperation)
+ return false;
+
+ RefPtr<WorkerFileSystemCallbacksBridge> bridge = m_bridgeForCurrentOperation.release();
+ if (m_workerGlobalScope->thread()->runLoop().runInMode(m_workerGlobalScope, m_modeForCurrentOperation) == MessageQueueTerminated) {
+ bridge->stop();
+ return false;
+ }
+ return true;
+}
+
+void WorkerAsyncFileSystemChromium::move(const KURL& sourcePath, const KURL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ createWorkerFileSystemCallbacksBridge(callbacks)->postMoveToMainThread(m_webFileSystem, sourcePath, destinationPath, m_modeForCurrentOperation);
+}
+
+void WorkerAsyncFileSystemChromium::copy(const KURL& sourcePath, const KURL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ createWorkerFileSystemCallbacksBridge(callbacks)->postCopyToMainThread(m_webFileSystem, sourcePath, destinationPath, m_modeForCurrentOperation);
+}
+
+void WorkerAsyncFileSystemChromium::remove(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ createWorkerFileSystemCallbacksBridge(callbacks)->postRemoveToMainThread(m_webFileSystem, path, m_modeForCurrentOperation);
+}
+
+void WorkerAsyncFileSystemChromium::removeRecursively(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ createWorkerFileSystemCallbacksBridge(callbacks)->postRemoveRecursivelyToMainThread(m_webFileSystem, path, m_modeForCurrentOperation);
+}
+
+void WorkerAsyncFileSystemChromium::readMetadata(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ createWorkerFileSystemCallbacksBridge(callbacks)->postReadMetadataToMainThread(m_webFileSystem, path, m_modeForCurrentOperation);
+}
+
+void WorkerAsyncFileSystemChromium::createFile(const KURL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ createWorkerFileSystemCallbacksBridge(callbacks)->postCreateFileToMainThread(m_webFileSystem, path, exclusive, m_modeForCurrentOperation);
+}
+
+void WorkerAsyncFileSystemChromium::createDirectory(const KURL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ createWorkerFileSystemCallbacksBridge(callbacks)->postCreateDirectoryToMainThread(m_webFileSystem, path, exclusive, m_modeForCurrentOperation);
+}
+
+void WorkerAsyncFileSystemChromium::fileExists(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ createWorkerFileSystemCallbacksBridge(callbacks)->postFileExistsToMainThread(m_webFileSystem, path, m_modeForCurrentOperation);
+}
+
+void WorkerAsyncFileSystemChromium::directoryExists(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ createWorkerFileSystemCallbacksBridge(callbacks)->postDirectoryExistsToMainThread(m_webFileSystem, path, m_modeForCurrentOperation);
+}
+
+void WorkerAsyncFileSystemChromium::readDirectory(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ createWorkerFileSystemCallbacksBridge(callbacks)->postReadDirectoryToMainThread(m_webFileSystem, path, m_modeForCurrentOperation);
+}
+
+class WorkerFileWriterHelperCallbacks : public AsyncFileSystemCallbacks {
+public:
+ static PassOwnPtr<WorkerFileWriterHelperCallbacks> create(AsyncFileWriterClient* client, const WebURL& path, WebKit::WebFileSystem* webFileSystem, PassOwnPtr<WebCore::AsyncFileSystemCallbacks> callbacks, WorkerGlobalScope* workerGlobalScope)
+ {
+ return adoptPtr(new WorkerFileWriterHelperCallbacks(client, path, webFileSystem, callbacks, workerGlobalScope));
+ }
+
+ virtual void didReadMetadata(const FileMetadata& metadata)
+ {
+ ASSERT(m_callbacks);
+ if (metadata.type != FileMetadata::TypeFile || metadata.length < 0)
+ m_callbacks->didFail(WebKit::WebFileErrorInvalidState);
+ else {
+ OwnPtr<WorkerAsyncFileWriterChromium> asyncFileWriterChromium = WorkerAsyncFileWriterChromium::create(m_webFileSystem, m_path, m_workerGlobalScope, m_client, WorkerAsyncFileWriterChromium::Asynchronous);
+ m_callbacks->didCreateFileWriter(asyncFileWriterChromium.release(), metadata.length);
+ }
+ }
+
+ virtual void didFail(int code)
+ {
+ ASSERT(m_callbacks);
+ m_callbacks->didFail(code);
+ }
+
+private:
+ WorkerFileWriterHelperCallbacks(AsyncFileWriterClient* client, const WebURL& path, WebKit::WebFileSystem* webFileSystem, PassOwnPtr<WebCore::AsyncFileSystemCallbacks> callbacks, WorkerGlobalScope* workerGlobalScope)
+ : m_client(client)
+ , m_path(path)
+ , m_webFileSystem(webFileSystem)
+ , m_callbacks(callbacks)
+ , m_workerGlobalScope(workerGlobalScope)
+ {
+ }
+
+ AsyncFileWriterClient* m_client;
+ WebURL m_path;
+ WebKit::WebFileSystem* m_webFileSystem;
+ OwnPtr<WebCore::AsyncFileSystemCallbacks> m_callbacks;
+ WorkerGlobalScope* m_workerGlobalScope;
+};
+
+void WorkerAsyncFileSystemChromium::createWriter(AsyncFileWriterClient* client, const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ createWorkerFileSystemCallbacksBridge(WorkerFileWriterHelperCallbacks::create(client, path, m_webFileSystem, callbacks, m_workerGlobalScope))->postReadMetadataToMainThread(m_webFileSystem, path, m_modeForCurrentOperation);
+}
+
+void WorkerAsyncFileSystemChromium::createSnapshotFileAndReadMetadata(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ createWorkerFileSystemCallbacksBridge(callbacks)->postCreateSnapshotFileToMainThread(m_webFileSystem, path, m_modeForCurrentOperation);
+}
+
+PassRefPtr<WorkerFileSystemCallbacksBridge> WorkerAsyncFileSystemChromium::createWorkerFileSystemCallbacksBridge(PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ ASSERT_UNUSED(m_synchronousType, m_synchronousType == AsynchronousFileSystem || !m_bridgeForCurrentOperation);
+
+ m_modeForCurrentOperation = fileSystemOperationsMode;
+ m_modeForCurrentOperation.append(String::number(m_workerGlobalScope->thread()->runLoop().createUniqueId()));
+
+ m_bridgeForCurrentOperation = WorkerFileSystemCallbacksBridge::create(m_workerLoaderProxy, m_scriptExecutionContext, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+ return m_bridgeForCurrentOperation;
+}
+
+} // namespace WebCore
diff --git a/chromium/third_party/WebKit/Source/web/WorkerAsyncFileSystemChromium.h b/chromium/third_party/WebKit/Source/web/WorkerAsyncFileSystemChromium.h
new file mode 100644
index 00000000000..b6675555fb4
--- /dev/null
+++ b/chromium/third_party/WebKit/Source/web/WorkerAsyncFileSystemChromium.h
@@ -0,0 +1,92 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WorkerAsyncFileSystemChromium_h
+#define WorkerAsyncFileSystemChromium_h
+
+#include "AsyncFileSystemChromium.h"
+#include "modules/filesystem/FileSystemType.h"
+#include "wtf/PassOwnPtr.h"
+#include "wtf/RefPtr.h"
+
+namespace WebKit {
+class WebFileSystem;
+class WebURL;
+class WorkerFileSystemCallbacksBridge;
+}
+
+namespace WebCore {
+
+class AsyncFileSystemCallbacks;
+class ScriptExecutionContext;
+class WorkerGlobalScope;
+class WorkerLoaderProxy;
+
+class WorkerAsyncFileSystemChromium : public AsyncFileSystemChromium {
+public:
+ static PassOwnPtr<AsyncFileSystem> create(ScriptExecutionContext* context, FileSystemSynchronousType synchronousType)
+ {
+ return adoptPtr(new WorkerAsyncFileSystemChromium(context, synchronousType));
+ }
+
+ virtual ~WorkerAsyncFileSystemChromium();
+
+ // Runs one pending operation (to wait for completion in the sync-mode).
+ virtual bool waitForOperationToComplete();
+
+ virtual void move(const KURL& sourcePath, const KURL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void copy(const KURL& sourcePath, const KURL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void remove(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void removeRecursively(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void readMetadata(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void createFile(const KURL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void createDirectory(const KURL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void fileExists(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void directoryExists(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void readDirectory(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void createWriter(AsyncFileWriterClient*, const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void createSnapshotFileAndReadMetadata(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+
+private:
+ WorkerAsyncFileSystemChromium(ScriptExecutionContext*, FileSystemSynchronousType);
+
+ PassRefPtr<WebKit::WorkerFileSystemCallbacksBridge> createWorkerFileSystemCallbacksBridge(PassOwnPtr<AsyncFileSystemCallbacks>);
+
+ ScriptExecutionContext* m_scriptExecutionContext;
+ WorkerLoaderProxy* m_workerLoaderProxy;
+ WorkerGlobalScope* m_workerGlobalScope;
+ RefPtr<WebKit::WorkerFileSystemCallbacksBridge> m_bridgeForCurrentOperation;
+ String m_modeForCurrentOperation;
+ FileSystemSynchronousType m_synchronousType;
+};
+
+} // namespace WebCore
+
+#endif // WorkerAsyncFileSystemChromium_h
diff --git a/chromium/third_party/WebKit/Source/web/WorkerAsyncFileWriterChromium.cpp b/chromium/third_party/WebKit/Source/web/WorkerAsyncFileWriterChromium.cpp
new file mode 100644
index 00000000000..5e675532300
--- /dev/null
+++ b/chromium/third_party/WebKit/Source/web/WorkerAsyncFileWriterChromium.cpp
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WorkerAsyncFileWriterChromium.h"
+
+#include "WebFileWriter.h"
+#include "WebWorkerBase.h"
+#include "WorkerFileWriterCallbacksBridge.h"
+#include "core/dom/ScriptExecutionContext.h"
+#include "core/fileapi/Blob.h"
+#include "core/platform/AsyncFileSystem.h"
+#include "core/workers/WorkerGlobalScope.h"
+#include "core/workers/WorkerLoaderProxy.h"
+#include "core/workers/WorkerThread.h"
+#include "public/platform/WebFileSystem.h"
+#include "public/platform/WebURL.h"
+#include "wtf/Assertions.h"
+
+using namespace WebKit;
+
+namespace WebCore {
+
+WorkerAsyncFileWriterChromium::WorkerAsyncFileWriterChromium(WebFileSystem* webFileSystem, const WebURL& path, WorkerGlobalScope* workerGlobalScope, AsyncFileWriterClient* client, WriterType type)
+{
+ ASSERT(type == Asynchronous); // Synchronous is not implemented yet.
+
+ WorkerLoaderProxy* proxy = &workerGlobalScope->thread()->workerLoaderProxy();
+ m_bridge = WorkerFileWriterCallbacksBridge::create(path, proxy, workerGlobalScope, client);
+}
+
+WorkerAsyncFileWriterChromium::~WorkerAsyncFileWriterChromium()
+{
+ m_bridge->postShutdownToMainThread(m_bridge);
+}
+
+bool WorkerAsyncFileWriterChromium::waitForOperationToComplete()
+{
+ return m_bridge->waitForOperationToComplete();
+}
+
+void WorkerAsyncFileWriterChromium::write(long long position, Blob* data)
+{
+ m_bridge->postWriteToMainThread(position, data->url());
+}
+
+void WorkerAsyncFileWriterChromium::truncate(long long length)
+{
+ m_bridge->postTruncateToMainThread(length);
+}
+
+void WorkerAsyncFileWriterChromium::abort()
+{
+ m_bridge->postAbortToMainThread();
+}
+
+}
diff --git a/chromium/third_party/WebKit/Source/core/animation/AnimatableTransform.h b/chromium/third_party/WebKit/Source/web/WorkerAsyncFileWriterChromium.h
index a0e71dfb61f..96ebd354a65 100644
--- a/chromium/third_party/WebKit/Source/core/animation/AnimatableTransform.h
+++ b/chromium/third_party/WebKit/Source/web/WorkerAsyncFileWriterChromium.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2010 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -28,43 +28,57 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef AnimatableTransform_h
-#define AnimatableTransform_h
+#ifndef WorkerAsyncFileWriterChromium_h
+#define WorkerAsyncFileWriterChromium_h
-#include "core/animation/AnimatableValue.h"
-#include "core/platform/graphics/transforms/TransformOperations.h"
+#include "modules/filesystem/AsyncFileWriter.h"
+#include "wtf/PassOwnPtr.h"
+
+namespace WebKit {
+ class WebFileSystem;
+ class WebFileWriter;
+ class WebURL;
+ class WorkerFileWriterCallbacksBridge;
+}
+
+namespace WTF {
+ class String;
+}
+using WTF::String;
namespace WebCore {
-class AnimatableTransform : public AnimatableValue {
+class AsyncFileSystem;
+class AsyncFileWriterClient;
+class Blob;
+class WorkerGlobalScope;
+
+class WorkerAsyncFileWriterChromium : public AsyncFileWriter {
public:
- virtual ~AnimatableTransform() { }
- static PassRefPtr<AnimatableTransform> create(const TransformOperations&);
- const TransformOperations& transformOperations() const
+ enum WriterType {
+ Asynchronous,
+ Synchronous,
+ };
+
+ static PassOwnPtr<WorkerAsyncFileWriterChromium> create(WebKit::WebFileSystem* webFileSystem, const WebKit::WebURL& path, WorkerGlobalScope* workerGlobalScope, AsyncFileWriterClient* client, WriterType type)
{
- return m_transform;
+ return adoptPtr(new WorkerAsyncFileWriterChromium(webFileSystem, path, workerGlobalScope, client, type));
}
+ ~WorkerAsyncFileWriterChromium();
-protected:
- virtual PassRefPtr<AnimatableValue> interpolateTo(const AnimatableValue*, double fraction) const OVERRIDE;
- virtual PassRefPtr<AnimatableValue> addWith(const AnimatableValue*) const OVERRIDE;
+ bool waitForOperationToComplete();
-private:
- explicit AnimatableTransform(const TransformOperations& transform)
- : AnimatableValue(TypeTransform)
- , m_transform(transform)
- {
- }
- const TransformOperations m_transform;
-};
+ // FileWriter
+ virtual void write(long long position, Blob* data);
+ virtual void truncate(long long length);
+ virtual void abort();
-inline const AnimatableTransform* toAnimatableTransform(const AnimatableValue* value)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(value && value->isTransform());
- return static_cast<const AnimatableTransform*>(value);
-}
+private:
-} // namespace WebCore
+ WorkerAsyncFileWriterChromium(WebKit::WebFileSystem*, const WebKit::WebURL& path, WorkerGlobalScope*, AsyncFileWriterClient*, WriterType);
+ RefPtr<WebKit::WorkerFileWriterCallbacksBridge> m_bridge;
+};
-#endif // AnimatableTransform_h
+} // namespace
+#endif // AsyncFileWriterChromium_h
diff --git a/chromium/third_party/WebKit/Source/web/WorkerFileSystemClient.cpp b/chromium/third_party/WebKit/Source/web/WorkerFileSystemClient.cpp
index 4daa833e9cb..3e3e065f613 100644
--- a/chromium/third_party/WebKit/Source/web/WorkerFileSystemClient.cpp
+++ b/chromium/third_party/WebKit/Source/web/WorkerFileSystemClient.cpp
@@ -119,7 +119,7 @@ void WorkerFileSystemClient::openFileSystem(ScriptExecutionContext* context, Web
String mode = "openFileSystemMode";
mode.append(String::number(runLoop.createUniqueId()));
- RefPtr<WorkerFileSystemCallbacksBridge> bridge = WorkerFileSystemCallbacksBridge::create(workerLoaderProxy, workerGlobalScope, new WebFileSystemCallbacksImpl(callbacks));
+ RefPtr<WorkerFileSystemCallbacksBridge> bridge = WorkerFileSystemCallbacksBridge::create(workerLoaderProxy, workerGlobalScope, new WebFileSystemCallbacksImpl(callbacks, context, synchronousType));
bridge->postOpenFileSystemToMainThread(webWorker->commonClient(), static_cast<WebFileSystemType>(type), size, openMode == CreateFileSystemIfNotPresent, mode);
if (synchronousType == SynchronousFileSystem) {
diff --git a/chromium/third_party/WebKit/Source/web/WorkerFileWriterCallbacksBridge.cpp b/chromium/third_party/WebKit/Source/web/WorkerFileWriterCallbacksBridge.cpp
new file mode 100644
index 00000000000..96aaa33446a
--- /dev/null
+++ b/chromium/third_party/WebKit/Source/web/WorkerFileWriterCallbacksBridge.cpp
@@ -0,0 +1,228 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WorkerFileWriterCallbacksBridge.h"
+
+#include "WebFileWriter.h"
+#include "WebWorkerBase.h"
+#include "core/dom/CrossThreadTask.h"
+#include "core/workers/WorkerGlobalScope.h"
+#include "core/workers/WorkerLoaderProxy.h"
+#include "core/workers/WorkerThread.h"
+#include "modules/filesystem/AsyncFileWriterClient.h"
+#include "public/platform/Platform.h"
+#include "public/platform/WebCString.h"
+#include "public/platform/WebFileSystem.h"
+#include "wtf/MainThread.h"
+#include "wtf/Threading.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WorkerFileWriterCallbacksBridge::notifyStop()
+{
+ ASSERT(m_workerGlobalScope->isContextThread());
+ m_clientOnWorkerThread = 0;
+ {
+ MutexLocker locker(m_loaderProxyMutex);
+ m_proxy = 0;
+ }
+}
+
+void WorkerFileWriterCallbacksBridge::postWriteToMainThread(long long position, const KURL& data)
+{
+ ASSERT(!m_operationInProgress);
+ m_operationInProgress = true;
+ dispatchTaskToMainThread(createCallbackTask(&writeOnMainThread,
+ this, position, data));
+}
+
+void WorkerFileWriterCallbacksBridge::postTruncateToMainThread(long long length)
+{
+ ASSERT(!m_operationInProgress);
+ m_operationInProgress = true;
+ dispatchTaskToMainThread(createCallbackTask(&truncateOnMainThread,
+ this, length));
+}
+
+void WorkerFileWriterCallbacksBridge::postAbortToMainThread()
+{
+ ASSERT(m_operationInProgress);
+ dispatchTaskToMainThread(createCallbackTask(&abortOnMainThread, this));
+}
+
+void WorkerFileWriterCallbacksBridge::postShutdownToMainThread(PassRefPtr<WorkerFileWriterCallbacksBridge> bridge)
+{
+ ASSERT(m_workerGlobalScope->isContextThread());
+ m_clientOnWorkerThread = 0;
+ stopObserving();
+ dispatchTaskToMainThread(createCallbackTask(&shutdownOnMainThread, bridge));
+}
+
+void WorkerFileWriterCallbacksBridge::writeOnMainThread(ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge> bridge, long long position, const KURL& data)
+{
+ bridge->m_writer->write(position, WebURL(data));
+}
+
+void WorkerFileWriterCallbacksBridge::truncateOnMainThread(ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge> bridge, long long length)
+{
+ bridge->m_writer->truncate(length);
+}
+
+void WorkerFileWriterCallbacksBridge::abortOnMainThread(ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge> bridge)
+{
+ bridge->m_writer->cancel();
+}
+
+void WorkerFileWriterCallbacksBridge::initOnMainThread(ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge> bridge, const KURL& path)
+{
+ ASSERT(!bridge->m_writer);
+ bridge->m_writer = adoptPtr(WebKit::Platform::current()->fileSystem()->createFileWriter(path, bridge.get()));
+}
+
+void WorkerFileWriterCallbacksBridge::shutdownOnMainThread(ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge> bridge)
+{
+ bridge->m_writerDeleted = true;
+ bridge->m_writer.clear();
+}
+
+void WorkerFileWriterCallbacksBridge::didWrite(long long bytes, bool complete)
+{
+ dispatchTaskToWorkerThread(createCallbackTask(&didWriteOnWorkerThread, this, bytes, complete));
+}
+
+void WorkerFileWriterCallbacksBridge::didFail(WebFileError error)
+{
+ dispatchTaskToWorkerThread(createCallbackTask(&didFailOnWorkerThread, this, error));
+}
+
+void WorkerFileWriterCallbacksBridge::didTruncate()
+{
+ dispatchTaskToWorkerThread(createCallbackTask(&didTruncateOnWorkerThread, this));
+}
+
+static const char fileWriterOperationsMode[] = "fileWriterOperationsMode";
+
+WorkerFileWriterCallbacksBridge::WorkerFileWriterCallbacksBridge(const KURL& path, WorkerLoaderProxy* proxy, ScriptExecutionContext* scriptExecutionContext, AsyncFileWriterClient* client)
+ : WorkerGlobalScope::Observer(toWorkerGlobalScope(scriptExecutionContext))
+ , m_proxy(proxy)
+ , m_workerGlobalScope(scriptExecutionContext)
+ , m_clientOnWorkerThread(client)
+ , m_writerDeleted(false)
+ , m_operationInProgress(false)
+{
+ ASSERT(m_workerGlobalScope->isContextThread());
+ m_mode = fileWriterOperationsMode;
+ m_mode.append(String::number(toWorkerGlobalScope(scriptExecutionContext)->thread()->runLoop().createUniqueId()));
+ postInitToMainThread(path);
+}
+
+void WorkerFileWriterCallbacksBridge::postInitToMainThread(const KURL& path)
+{
+ dispatchTaskToMainThread(
+ createCallbackTask(&initOnMainThread, this, path));
+}
+
+WorkerFileWriterCallbacksBridge::~WorkerFileWriterCallbacksBridge()
+{
+ ASSERT(!m_clientOnWorkerThread);
+ ASSERT(!m_writer);
+}
+
+// We know m_clientOnWorkerThread is still valid because it is only cleared on the context thread, and because we check in runTaskOnWorkerThread before calling any of these methods.
+void WorkerFileWriterCallbacksBridge::didWriteOnWorkerThread(ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge> bridge, long long length, bool complete)
+{
+ ASSERT(bridge->m_workerGlobalScope->isContextThread());
+ ASSERT(bridge->m_operationInProgress);
+ if (complete)
+ bridge->m_operationInProgress = false;
+ bridge->m_clientOnWorkerThread->didWrite(length, complete);
+}
+
+void WorkerFileWriterCallbacksBridge::didFailOnWorkerThread(ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge> bridge, WebFileError error)
+{
+ ASSERT(bridge->m_workerGlobalScope->isContextThread());
+ ASSERT(bridge->m_operationInProgress);
+ bridge->m_operationInProgress = false;
+ bridge->m_clientOnWorkerThread->didFail(static_cast<FileError::ErrorCode>(error));
+}
+
+void WorkerFileWriterCallbacksBridge::didTruncateOnWorkerThread(ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge> bridge)
+{
+ ASSERT(bridge->m_workerGlobalScope->isContextThread());
+ ASSERT(bridge->m_operationInProgress);
+ bridge->m_operationInProgress = false;
+ bridge->m_clientOnWorkerThread->didTruncate();
+}
+
+void WorkerFileWriterCallbacksBridge::runTaskOnMainThread(ScriptExecutionContext* scriptExecutionContext, PassRefPtr<WorkerFileWriterCallbacksBridge> bridge, PassOwnPtr<ScriptExecutionContext::Task> taskToRun)
+{
+ ASSERT(isMainThread());
+ if (!bridge->m_writerDeleted)
+ taskToRun->performTask(scriptExecutionContext);
+}
+
+void WorkerFileWriterCallbacksBridge::runTaskOnWorkerThread(ScriptExecutionContext* scriptExecutionContext, PassRefPtr<WorkerFileWriterCallbacksBridge> bridge, PassOwnPtr<ScriptExecutionContext::Task> taskToRun)
+{
+ ASSERT(bridge->m_workerGlobalScope->isContextThread());
+ if (bridge->m_clientOnWorkerThread)
+ taskToRun->performTask(scriptExecutionContext);
+}
+
+void WorkerFileWriterCallbacksBridge::dispatchTaskToMainThread(PassOwnPtr<ScriptExecutionContext::Task> task)
+{
+ ASSERT(m_workerGlobalScope->isContextThread());
+ WebWorkerBase::dispatchTaskToMainThread(
+ createCallbackTask(&runTaskOnMainThread, this, task));
+}
+
+void WorkerFileWriterCallbacksBridge::dispatchTaskToWorkerThread(PassOwnPtr<ScriptExecutionContext::Task> task)
+{
+ ASSERT(isMainThread());
+
+ MutexLocker locker(m_loaderProxyMutex);
+ if (m_proxy)
+ m_proxy->postTaskForModeToWorkerGlobalScope(
+ createCallbackTask(&runTaskOnWorkerThread, this, task), m_mode);
+}
+
+bool WorkerFileWriterCallbacksBridge::waitForOperationToComplete()
+{
+ while (m_operationInProgress) {
+ WorkerGlobalScope* context = toWorkerGlobalScope(m_workerGlobalScope);
+ if (context->thread()->runLoop().runInMode(context, m_mode) == MessageQueueTerminated)
+ return false;
+ }
+ return true;
+}
+
+} // namespace WebKit
diff --git a/chromium/third_party/WebKit/Source/web/WorkerFileWriterCallbacksBridge.h b/chromium/third_party/WebKit/Source/web/WorkerFileWriterCallbacksBridge.h
new file mode 100644
index 00000000000..526c47150fd
--- /dev/null
+++ b/chromium/third_party/WebKit/Source/web/WorkerFileWriterCallbacksBridge.h
@@ -0,0 +1,165 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WorkerFileWriterCallbacksBridge_h
+#define WorkerFileWriterCallbacksBridge_h
+
+#include "WebFileWriterClient.h"
+#include "core/workers/WorkerGlobalScope.h"
+#include "public/platform/WebFileError.h"
+#include "wtf/PassOwnPtr.h"
+#include "wtf/PassRefPtr.h"
+#include "wtf/ThreadSafeRefCounted.h"
+
+namespace WebCore {
+ class AsyncFileWriterClient;
+ class KURL;
+ class WorkerLoaderProxy;
+}
+
+namespace WTF {
+ class String;
+}
+using WTF::String;
+
+namespace WebKit {
+
+class WebFileSystem;
+class WebFileWriter;
+class WebFileWriterClient;
+class WebURL;
+class WebWorkerBase;
+
+// This class is used as a mechanism to bridge calls between threads.
+// Calls to a WebFileWriter must happen on the main thread, but they come from
+// the context thread. The responses through the WebFileWriterClient interface
+// start on the main thread, but must be sent via the worker context thread.
+//
+// A typical flow for write would look like this:
+// Bridge::postWriteToMainThread() on WorkerThread
+// --> Bridge::writeOnMainThread() is called on MainThread
+// --> WebFileWriter::write()
+// This makes an IPC; the actual operation is down in the browser.
+// --> Bridge::didWrite is called on MainThread
+// --> Bridge::didWriteOnWorkerThread is called on WorkerThread
+// This calls the original client (m_clientOnWorkerThread).
+//
+// The bridge object is refcounted, so that it doesn't get deleted while there
+// are cross-thread calls in flight. Each CrossThreadTask carries a reference
+// to the bridge, which guarantees that the bridge will still be valid when the
+// task is executed. In order to shut down the bridge, the WebFileWriterClient
+// should call postShutdownToMainThread before dropping its reference to the
+// bridge. This ensures that the WebFileWriter will be cleared on the main
+// thread and that no further calls to the WebFileWriterClient will be made.
+class WorkerFileWriterCallbacksBridge : public ThreadSafeRefCounted<WorkerFileWriterCallbacksBridge>, public WebCore::WorkerGlobalScope::Observer, public WebFileWriterClient {
+public:
+ ~WorkerFileWriterCallbacksBridge();
+
+ // WorkerGlobalScope::Observer method.
+ virtual void notifyStop();
+
+ static PassRefPtr<WorkerFileWriterCallbacksBridge> create(const WebCore::KURL& path, WebCore::WorkerLoaderProxy* proxy, WebCore::ScriptExecutionContext* workerGlobalScope, WebCore::AsyncFileWriterClient* client)
+ {
+ return adoptRef(new WorkerFileWriterCallbacksBridge(path, proxy, workerGlobalScope, client));
+ }
+
+ // Methods that create an instance and post an initial request task to the main thread. They must be called on the worker thread.
+ void postWriteToMainThread(long long position, const WebCore::KURL& data);
+ void postTruncateToMainThread(long long length);
+ void postAbortToMainThread();
+
+ // The owning WorkerAsyncFileWriterChromium should call this method before dropping its last reference to the bridge, on the context thread.
+ // The actual deletion of the WorkerFileWriterCallbacksBridge may happen on either the main or context thread, depending on where the last reference goes away; that's safe as long as this is called first.
+ void postShutdownToMainThread(PassRefPtr<WorkerFileWriterCallbacksBridge>);
+
+ // Callback methods that are called on the main thread.
+ // These are the implementation of WebKit::WebFileWriterClient.
+ void didWrite(long long bytes, bool complete);
+ void didFail(WebFileError);
+ void didTruncate();
+
+ // Call this on the context thread to wait for the current operation to complete.
+ bool waitForOperationToComplete();
+
+private:
+ WorkerFileWriterCallbacksBridge(const WebCore::KURL& path, WebCore::WorkerLoaderProxy*, WebCore::ScriptExecutionContext*, WebCore::AsyncFileWriterClient*);
+
+ void postInitToMainThread(const WebCore::KURL& path);
+
+ // Methods that are to be called on the main thread.
+ static void writeOnMainThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge>, long long position, const WebCore::KURL& data);
+ static void truncateOnMainThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge>, long long length);
+ static void abortOnMainThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge>);
+ static void initOnMainThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge>, const WebCore::KURL& path);
+ static void shutdownOnMainThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge>);
+
+ // Methods that dispatch to AsyncFileWriterClient on the worker threads.
+ static void didWriteOnWorkerThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge>, long long length, bool complete);
+ static void didFailOnWorkerThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge>, WebFileError);
+ static void didTruncateOnWorkerThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge>);
+
+ // Called on the main thread to run the supplied task.
+ static void runTaskOnMainThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge>, PassOwnPtr<WebCore::ScriptExecutionContext::Task>);
+ // Called on the worker thread to run the supplied task.
+ static void runTaskOnWorkerThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge>, PassOwnPtr<WebCore::ScriptExecutionContext::Task>);
+
+ // Called on the worker thread to dispatch to the main thread.
+ void dispatchTaskToMainThread(PassOwnPtr<WebCore::ScriptExecutionContext::Task>);
+ // Called on the main thread to dispatch to the worker thread.
+ void dispatchTaskToWorkerThread(PassOwnPtr<WebCore::ScriptExecutionContext::Task>);
+
+ // Used from the main thread to post tasks to the context thread.
+ WebCore::WorkerLoaderProxy* m_proxy;
+
+ // Mutex for proxy.
+ Mutex m_loaderProxyMutex;
+
+ // Used on the context thread, only to check that we're running on the context thread.
+ WebCore::ScriptExecutionContext* m_workerGlobalScope;
+
+ // Created and destroyed from the main thread.
+ OwnPtr<WebKit::WebFileWriter> m_writer;
+
+ // Used on the context thread to call back into the client.
+ WebCore::AsyncFileWriterClient* m_clientOnWorkerThread;
+
+ // Used to indicate that shutdown has started on the main thread, and hence the writer has been deleted.
+ bool m_writerDeleted;
+
+ // Used by waitForOperationToComplete.
+ bool m_operationInProgress;
+
+ // Used by postTaskForModeToWorkerGlobalScope and runInMode.
+ String m_mode;
+};
+
+} // namespace WebCore
+
+#endif // WorkerFileWriterCallbacksBridge_h
diff --git a/chromium/third_party/WebKit/Source/web/web.gypi b/chromium/third_party/WebKit/Source/web/web.gypi
index 05b6fafd052..a010db63007 100644
--- a/chromium/third_party/WebKit/Source/web/web.gypi
+++ b/chromium/third_party/WebKit/Source/web/web.gypi
@@ -267,10 +267,16 @@
'WebWorkerRunLoop.cpp',
'WorkerAllowMainThreadBridgeBase.cpp',
'WorkerAllowMainThreadBridgeBase.h',
+ 'WorkerAsyncFileSystemChromium.cpp',
+ 'WorkerAsyncFileSystemChromium.h',
+ 'WorkerAsyncFileWriterChromium.cpp',
+ 'WorkerAsyncFileWriterChromium.h',
'WorkerFileSystemCallbacksBridge.cpp',
'WorkerFileSystemCallbacksBridge.h',
'WorkerFileSystemClient.cpp',
'WorkerFileSystemClient.h',
+ 'WorkerFileWriterCallbacksBridge.cpp',
+ 'WorkerFileWriterCallbacksBridge.h',
'android/WebInputEventFactory.cpp',
'default/WebRenderTheme.cpp',
'gtk/WebInputEventFactory.cpp',
diff --git a/chromium/third_party/WebKit/Source/wtf/Assertions.cpp b/chromium/third_party/WebKit/Source/wtf/Assertions.cpp
index f7884df4012..acf6be01a63 100644
--- a/chromium/third_party/WebKit/Source/wtf/Assertions.cpp
+++ b/chromium/third_party/WebKit/Source/wtf/Assertions.cpp
@@ -60,7 +60,6 @@
#if OS(WINDOWS)
#include <windows.h>
-#define HAVE_ISDEBUGGERPRESENT 1
#endif
#if (OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))) && !OS(ANDROID)
diff --git a/chromium/third_party/WebKit/Source/wtf/Platform.h b/chromium/third_party/WebKit/Source/wtf/Platform.h
index 4d7c4e75186..3d90b0eddbe 100644
--- a/chromium/third_party/WebKit/Source/wtf/Platform.h
+++ b/chromium/third_party/WebKit/Source/wtf/Platform.h
@@ -162,6 +162,7 @@
#endif /* OS(DARWIN) */
#if OS(WINDOWS)
+#define HAVE_ISDEBUGGERPRESENT 1
#define HAVE_VIRTUALALLOC 1
#endif
diff --git a/chromium/third_party/WebKit/Source/wtf/text/Base64.cpp b/chromium/third_party/WebKit/Source/wtf/text/Base64.cpp
index 876e22565bf..9a31527a225 100644
--- a/chromium/third_party/WebKit/Source/wtf/text/Base64.cpp
+++ b/chromium/third_party/WebKit/Source/wtf/text/Base64.cpp
@@ -128,7 +128,7 @@ void base64Encode(const char* data, unsigned len, Vector<char>& out, Base64Encod
}
}
-bool base64Decode(const Vector<char>& in, Vector<char>& out, Base64DecodePolicy policy)
+bool base64Decode(const Vector<char>& in, Vector<char>& out, Base64InvalidCharactersPolicy charactersPolicy, Base64PaddingValidationPolicy paddingPolicy)
{
out.clear();
@@ -136,40 +136,48 @@ bool base64Decode(const Vector<char>& in, Vector<char>& out, Base64DecodePolicy
if (in.size() > UINT_MAX)
return false;
- return base64Decode(in.data(), in.size(), out, policy);
+ return base64Decode(in.data(), in.size(), out, charactersPolicy, paddingPolicy);
}
template<typename T>
-static inline bool base64DecodeInternal(const T* data, unsigned length, Vector<char>& out, Base64DecodePolicy policy)
+static inline bool base64DecodeInternal(const T* data, unsigned length, Vector<char>& out, Base64InvalidCharactersPolicy charactersPolicy, Base64PaddingValidationPolicy paddingPolicy)
{
out.clear();
if (!length)
return true;
+ unsigned dataLength = length;
+ if (paddingPolicy == Base64StrictPaddingValidation) {
+ if (!(dataLength % 4)) {
+ // There may be 2 = padding max.
+ while (data[dataLength - 1] == '=' && dataLength >= (length - 2))
+ --dataLength;
+ }
+ if (dataLength % 4 == 1)
+ return false;
+ }
+
out.grow(length);
- unsigned equalsSignCount = 0;
+ bool sawEqualsSign = false;
unsigned outLength = 0;
for (unsigned idx = 0; idx < length; ++idx) {
unsigned ch = data[idx];
if (ch == '=') {
- ++equalsSignCount;
- // There should be no padding if length is a multiple of 4, and there
- // should never be more than 2 padding characters.
- if (policy == Base64FailOnInvalidCharacterOrExcessPadding && (length % 4 || equalsSignCount > 2))
+ sawEqualsSign = true;
+ if (paddingPolicy == Base64StrictPaddingValidation && idx < dataLength)
return false;
} else if (('0' <= ch && ch <= '9') || ('A' <= ch && ch <= 'Z') || ('a' <= ch && ch <= 'z') || ch == '+' || ch == '/') {
- if (equalsSignCount)
+ if (sawEqualsSign)
return false;
out[outLength] = base64DecMap[ch];
++outLength;
- } else if (policy == Base64FailOnInvalidCharacterOrExcessPadding || policy == Base64FailOnInvalidCharacter || (policy == Base64IgnoreWhitespace && !isSpaceOrNewline(ch))) {
+ } else if (charactersPolicy == Base64FailOnInvalidCharacter || (charactersPolicy == Base64IgnoreWhitespace && !isSpaceOrNewline(ch)))
return false;
- }
}
if (!outLength)
- return !equalsSignCount;
+ return !sawEqualsSign;
// Valid data is (n * 4 + [0,2,3]) characters long.
if ((outLength % 4) == 1)
@@ -204,18 +212,18 @@ static inline bool base64DecodeInternal(const T* data, unsigned length, Vector<c
return true;
}
-bool base64Decode(const char* data, unsigned length, Vector<char>& out, Base64DecodePolicy policy)
+bool base64Decode(const char* data, unsigned length, Vector<char>& out, Base64InvalidCharactersPolicy charactersPolicy, Base64PaddingValidationPolicy paddingPolicy)
{
- return base64DecodeInternal<LChar>(reinterpret_cast<const LChar*>(data), length, out, policy);
+ return base64DecodeInternal<LChar>(reinterpret_cast<const LChar*>(data), length, out, charactersPolicy, paddingPolicy);
}
-bool base64Decode(const String& in, Vector<char>& out, Base64DecodePolicy policy)
+bool base64Decode(const String& in, Vector<char>& out, Base64InvalidCharactersPolicy charactersPolicy, Base64PaddingValidationPolicy paddingPolicy)
{
if (in.isEmpty())
- return base64DecodeInternal<LChar>(0, 0, out, policy);
+ return base64DecodeInternal<LChar>(0, 0, out, charactersPolicy, paddingPolicy);
if (in.is8Bit())
- return base64DecodeInternal<LChar>(in.characters8(), in.length(), out, policy);
- return base64DecodeInternal<UChar>(in.characters16(), in.length(), out, policy);
+ return base64DecodeInternal<LChar>(in.characters8(), in.length(), out, charactersPolicy, paddingPolicy);
+ return base64DecodeInternal<UChar>(in.characters16(), in.length(), out, charactersPolicy, paddingPolicy);
}
} // namespace WTF
diff --git a/chromium/third_party/WebKit/Source/wtf/text/Base64.h b/chromium/third_party/WebKit/Source/wtf/text/Base64.h
index 4ebebc82dcb..7ccd8d1c7c8 100644
--- a/chromium/third_party/WebKit/Source/wtf/text/Base64.h
+++ b/chromium/third_party/WebKit/Source/wtf/text/Base64.h
@@ -39,13 +39,17 @@ enum Base64EncodePolicy {
Base64InsertLFs
};
-enum Base64DecodePolicy {
- Base64FailOnInvalidCharacterOrExcessPadding,
+enum Base64InvalidCharactersPolicy {
Base64FailOnInvalidCharacter,
Base64IgnoreWhitespace,
Base64IgnoreInvalidCharacters
};
+enum Base64PaddingValidationPolicy {
+ Base64NoPaddingValidation,
+ Base64StrictPaddingValidation
+};
+
WTF_EXPORT void base64Encode(const char*, unsigned, Vector<char>&, Base64EncodePolicy = Base64DoNotInsertLFs);
WTF_EXPORT void base64Encode(const Vector<char>&, Vector<char>&, Base64EncodePolicy = Base64DoNotInsertLFs);
WTF_EXPORT void base64Encode(const CString&, Vector<char>&, Base64EncodePolicy = Base64DoNotInsertLFs);
@@ -53,9 +57,9 @@ WTF_EXPORT String base64Encode(const char*, unsigned, Base64EncodePolicy = Base6
WTF_EXPORT String base64Encode(const Vector<char>&, Base64EncodePolicy = Base64DoNotInsertLFs);
WTF_EXPORT String base64Encode(const CString&, Base64EncodePolicy = Base64DoNotInsertLFs);
-WTF_EXPORT bool base64Decode(const String&, Vector<char>&, Base64DecodePolicy = Base64FailOnInvalidCharacter);
-WTF_EXPORT bool base64Decode(const Vector<char>&, Vector<char>&, Base64DecodePolicy = Base64FailOnInvalidCharacter);
-WTF_EXPORT bool base64Decode(const char*, unsigned, Vector<char>&, Base64DecodePolicy = Base64FailOnInvalidCharacter);
+WTF_EXPORT bool base64Decode(const String&, Vector<char>&, Base64InvalidCharactersPolicy = Base64FailOnInvalidCharacter, Base64PaddingValidationPolicy = Base64NoPaddingValidation);
+WTF_EXPORT bool base64Decode(const Vector<char>&, Vector<char>&, Base64InvalidCharactersPolicy = Base64FailOnInvalidCharacter, Base64PaddingValidationPolicy = Base64NoPaddingValidation);
+WTF_EXPORT bool base64Decode(const char*, unsigned, Vector<char>&, Base64InvalidCharactersPolicy = Base64FailOnInvalidCharacter, Base64PaddingValidationPolicy = Base64NoPaddingValidation);
inline void base64Encode(const Vector<char>& in, Vector<char>& out, Base64EncodePolicy policy)
{
@@ -82,11 +86,13 @@ inline String base64Encode(const CString& in, Base64EncodePolicy policy)
using WTF::Base64EncodePolicy;
using WTF::Base64DoNotInsertLFs;
using WTF::Base64InsertLFs;
-using WTF::Base64DecodePolicy;
-using WTF::Base64FailOnInvalidCharacterOrExcessPadding;
+using WTF::Base64InvalidCharactersPolicy;
using WTF::Base64FailOnInvalidCharacter;
using WTF::Base64IgnoreWhitespace;
using WTF::Base64IgnoreInvalidCharacters;
+using WTF::Base64PaddingValidationPolicy;
+using WTF::Base64NoPaddingValidation;
+using WTF::Base64StrictPaddingValidation;
using WTF::base64Encode;
using WTF::base64Decode;
diff --git a/chromium/third_party/WebKit/Tools/RebaselineLogServer/app.yaml b/chromium/third_party/WebKit/Tools/RebaselineLogServer/app.yaml
deleted file mode 100644
index 86ab13d7d2e..00000000000
--- a/chromium/third_party/WebKit/Tools/RebaselineLogServer/app.yaml
+++ /dev/null
@@ -1,9 +0,0 @@
-application: blinkrebaseline
-version: 1
-runtime: python27
-api_version: 1
-threadsafe: true
-
-handlers:
-- url: /.*
- script: main.app
diff --git a/chromium/third_party/WebKit/Tools/RebaselineLogServer/logs.html b/chromium/third_party/WebKit/Tools/RebaselineLogServer/logs.html
deleted file mode 100644
index 8f2498d62c5..00000000000
--- a/chromium/third_party/WebKit/Tools/RebaselineLogServer/logs.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE html>
-<title>Rebaseline-o-matic logs</title>
-<style>
-h1 {
- font-size: 1em;
- margin: 0;
- padding: 4px;
- background-color: lightgray;
-}
-pre {
- margin: 0;
- padding: 4px;
-}
-.container {
- border: 1px dashed;
- margin-bottom: 8px;
-}
-</style>
-
-{% for log in logs %}
-<div class="container">
- <h1>
- <script>
- // This date format needs to match the format string used in loghandler.py.
- lastDateBeforeQueryParameter = '{{ log.date|date:"Y-m-d\TH:i:s" }}Z';
- document.write(new Date('{{ log.date|date:"c" }}').toLocaleString())
- </script>
- </h1>
- <pre>{% if log.is_no_needs_rebaseline %}No NeedsRebaseline entries in TestExpectations.{% else %}{{ log.content }}{% endif %}</pre>
-</div>
-{% endfor %}
-
-{% if not logs %}
-No more logs.
-{% endif %}
-
-<script>
- var urlBase = location.toString().replace(/\?.*/, '');
- [3, 10, 100].forEach(function(numLogs) {
- var url = urlBase + "?{{ before_param }}=" + lastDateBeforeQueryParameter + "&{{ num_logs_param }}=" + numLogs;
- document.write('<a href="' + url + '">previous ' + numLogs + '</a> ');
- })
-</script>
diff --git a/chromium/third_party/WebKit/Tools/RebaselineLogServer/main.py b/chromium/third_party/WebKit/Tools/RebaselineLogServer/main.py
deleted file mode 100644
index 9211df34f97..00000000000
--- a/chromium/third_party/WebKit/Tools/RebaselineLogServer/main.py
+++ /dev/null
@@ -1,143 +0,0 @@
-# Copyright (C) 2013 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import datetime
-import logging
-import webapp2
-
-from google.appengine.ext import ndb
-from google.appengine.ext.webapp import template
-
-# A simple log server for rebaseline-o-matic.
-#
-# Accepts updates to the same log entry and shows a simple status page.
-# Has a special state for the case where there are no NeedsRebaseline
-# lines in TestExpectations to avoid cluttering the log with useless
-# entries every 30 seconds.
-#
-# Other than that, new updatelog calls append to the most recent log
-# entry until they have the newentry parameter, in which case, it
-# starts a new log entry.
-
-LOG_PARAM = "log"
-NEW_ENTRY_PARAM = "newentry"
-NO_NEEDS_REBASELINE_PARAM = "noneedsrebaseline"
-NUM_LOGS_PARAM = "numlogs"
-BEFORE_PARAM = "before"
-
-
-class LogEntry(ndb.Model):
- content = ndb.TextProperty()
- date = ndb.DateTimeProperty(auto_now_add=True)
- is_no_needs_rebaseline = ndb.BooleanProperty()
-
-
-def logs_query():
- return LogEntry.query().order(-LogEntry.date)
-
-
-class UpdateLog(webapp2.RequestHandler):
- def post(self):
- new_log_data = self.request.POST.get(LOG_PARAM)
- # This entry is set to on whenever a new auto-rebaseline run is going to
- # start logging entries. If this is not on, then the log will get appended
- # to the most recent log entry.
- new_entry = self.request.POST.get(NEW_ENTRY_PARAM) == "on"
- # The case of no NeedsRebaseline lines in TestExpectations is special-cased
- # to always overwrite the previous noneedsrebaseline entry in the log to
- # avoid cluttering the log with useless empty posts. It just updates the
- # date of the entry so that users can see that rebaseline-o-matic is still
- # running.
- no_needs_rebaseline = self.request.POST.get(NO_NEEDS_REBASELINE_PARAM) == "on"
-
- out = "Wrote new log entry."
- if not new_entry or no_needs_rebaseline:
- log_entries = logs_query().fetch(1)
- if log_entries:
- log_entry = log_entries[0]
- log_entry.date = datetime.datetime.now()
- if no_needs_rebaseline:
- # Don't write out a new log entry for repeated no_needs_rebaseline cases.
- # The repeated entries just add noise to the logs.
- if log_entry.is_no_needs_rebaseline:
- out = "Overwrote existing no needs rebaseline log."
- else:
- out = "Wrote new no needs rebaseline log."
- new_entry = True
- new_log_data = ""
- elif log_entry.is_no_needs_rebaseline:
- out = "Previous entry was a no need rebaseline log. Writing a new log."
- new_entry = True
- else:
- out = "Added to existing log entry."
- log_entry.content = log_entry.content + "\n" + new_log_data
-
- if new_entry or not log_entries:
- log_entry = LogEntry(content=new_log_data, is_no_needs_rebaseline=no_needs_rebaseline)
-
- log_entry.put()
- self.response.out.write(out)
-
-
-class UploadForm(webapp2.RequestHandler):
- def get(self):
- self.response.out.write(template.render("uploadform.html", {
- "update_log_url": "/updatelog",
- "set_no_needs_rebaseline_url": "/noneedsrebaselines",
- "log_param": LOG_PARAM,
- "new_entry_param": NEW_ENTRY_PARAM,
- "no_needs_rebaseline_param": NO_NEEDS_REBASELINE_PARAM,
- }))
-
-
-class ShowLatest(webapp2.RequestHandler):
- def get(self):
- query = logs_query()
-
- before = self.request.get(BEFORE_PARAM)
- if before:
- date = datetime.datetime.strptime(before, "%Y-%m-%dT%H:%M:%SZ")
- query = query.filter(LogEntry.date < date)
-
- num_logs = self.request.get(NUM_LOGS_PARAM)
- logs = query.fetch(int(num_logs) if num_logs else 3)
-
- self.response.out.write(template.render("logs.html", {
- "logs": logs,
- "num_logs_param": NUM_LOGS_PARAM,
- "before_param": BEFORE_PARAM,
- }))
-
-
-routes = [
- ('/uploadform', UploadForm),
- ('/updatelog', UpdateLog),
- ('/', ShowLatest),
-]
-
-app = webapp2.WSGIApplication(routes, debug=True)
diff --git a/chromium/third_party/WebKit/Tools/RebaselineLogServer/main_unittest.py b/chromium/third_party/WebKit/Tools/RebaselineLogServer/main_unittest.py
deleted file mode 100644
index d3d6e30902a..00000000000
--- a/chromium/third_party/WebKit/Tools/RebaselineLogServer/main_unittest.py
+++ /dev/null
@@ -1,122 +0,0 @@
-# Copyright (C) 2013 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# Usage: PYTHON_PATH=/path/to/appengine_sdk python loghandler_unittest.py.
-
-import dev_appserver
-dev_appserver.fix_sys_path()
-
-import unittest
-import webapp2
-
-from google.appengine.ext import testbed
-
-import main
-
-
-class TestHandlers(unittest.TestCase):
- def setUp(self):
- self.testbed = testbed.Testbed()
- self.testbed.activate()
- self.testbed.init_datastore_v3_stub()
- self.testbed.init_memcache_stub()
-
- def test_update_log(self):
- request = webapp2.Request.blank('/updatelog')
- request.method = 'POST'
- request.POST[main.LOG_PARAM] = 'data to log'
- request.POST[main.NEW_ENTRY_PARAM] = 'on'
- request.POST[main.NO_NEEDS_REBASELINE_PARAM] = 'off'
-
- response = request.get_response(main.app)
- self.assertEqual(response.status_int, 200)
- self.assertEqual(response.body, 'Wrote new log entry.')
-
- response = request.get_response(main.app)
- self.assertEqual(response.status_int, 200)
- self.assertEqual(response.body, 'Wrote new log entry.')
-
- request = webapp2.Request.blank('/updatelog')
- request.method = 'POST'
- request.POST[main.LOG_PARAM] = 'data to log'
- request.POST[main.NEW_ENTRY_PARAM] = 'off'
- request.POST[main.NO_NEEDS_REBASELINE_PARAM] = 'off'
-
- response = request.get_response(main.app)
- self.assertEqual(response.status_int, 200)
- self.assertEqual(response.body, 'Added to existing log entry.')
-
- request = webapp2.Request.blank('/updatelog')
- request.method = 'POST'
- request.POST[main.LOG_PARAM] = 'data to log'
- request.POST[main.NEW_ENTRY_PARAM] = 'off'
- request.POST[main.NO_NEEDS_REBASELINE_PARAM] = 'on'
-
- response = request.get_response(main.app)
- self.assertEqual(response.status_int, 200)
- self.assertEqual(response.body, 'Wrote new no needs rebaseline log.')
-
- response = request.get_response(main.app)
- self.assertEqual(response.status_int, 200)
- self.assertEqual(response.body, 'Overwrote existing no needs rebaseline log.')
-
- request = webapp2.Request.blank('/updatelog')
- request.method = 'POST'
- request.POST[main.LOG_PARAM] = 'data to log'
- request.POST[main.NEW_ENTRY_PARAM] = 'off'
- request.POST[main.NO_NEEDS_REBASELINE_PARAM] = 'off'
-
- response = request.get_response(main.app)
- self.assertEqual(response.status_int, 200)
- self.assertEqual(response.body, 'Previous entry was a no need rebaseline log. Writing a new log.')
-
- def test_update_log_first_entry_without_new_entry_param(self):
- request = webapp2.Request.blank('/updatelog')
- request.method = 'POST'
- request.POST[main.LOG_PARAM] = 'data to log'
- request.POST[main.NEW_ENTRY_PARAM] = 'off'
- request.POST[main.NO_NEEDS_REBASELINE_PARAM] = 'off'
-
- response = request.get_response(main.app)
- self.assertEqual(response.status_int, 200)
- self.assertEqual(response.body, 'Wrote new log entry.')
-
- def test_update_log_first_entry_no_needs_rebaseline_param(self):
- request = webapp2.Request.blank('/updatelog')
- request.method = 'POST'
- request.POST[main.LOG_PARAM] = 'data to log'
- request.POST[main.NEW_ENTRY_PARAM] = 'off'
- request.POST[main.NO_NEEDS_REBASELINE_PARAM] = 'on'
-
- response = request.get_response(main.app)
- self.assertEqual(response.status_int, 200)
- self.assertEqual(response.body, 'Wrote new log entry.')
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/chromium/third_party/WebKit/Tools/RebaselineLogServer/uploadform.html b/chromium/third_party/WebKit/Tools/RebaselineLogServer/uploadform.html
deleted file mode 100644
index cbc71e5102e..00000000000
--- a/chromium/third_party/WebKit/Tools/RebaselineLogServer/uploadform.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<title>Update rebaseline logs</title>
-<style>
-html, body {
- height: 100%;
-}
-body, form {
- display: flex;
- flex-direction: column;
-}
-form, textarea {
- flex: 1;
-}
-</style>
-
-<h1>Update logs</h1>
-<p>This page is for manually testing the log server.</p>
-<form accept="text/html" action="{{ update_log_url }}" enctype="multipart/form-data" method="post">
- <div>
- <label><input name="{{ new_entry_param }}" type="checkbox">Start a new log entry</label>
- <label><input name="{{ no_needs_rebaseline_param }}" type="checkbox">No tests need rebaseline</label>
- <input class=button type="submit" value="Upload">
- </div>
- <textarea name="{{ log_param }}" placeholder="Some logging data..."/></textarea>
-</form>
diff --git a/chromium/third_party/WebKit/Tools/Scripts/webkitpy/common/net/layouttestresults.py b/chromium/third_party/WebKit/Tools/Scripts/webkitpy/common/net/layouttestresults.py
index 2597e0a1401..b3c4367c0b5 100644
--- a/chromium/third_party/WebKit/Tools/Scripts/webkitpy/common/net/layouttestresults.py
+++ b/chromium/third_party/WebKit/Tools/Scripts/webkitpy/common/net/layouttestresults.py
@@ -103,9 +103,6 @@ class LayoutTestResults(object):
def run_was_interrupted(self):
return self._results["interrupted"]
- def builder_name(self):
- return self._results["builder_name"]
-
def blink_revision(self):
return int(self._results["blink_revision"])
diff --git a/chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/builders.py b/chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/builders.py
index 99564c6054f..91c7c7a0c8a 100644
--- a/chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/builders.py
+++ b/chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/builders.py
@@ -41,7 +41,8 @@ from webkitpy.common.memoized import memoized
_exact_matches = {
"WebKit XP": {"port_name": "win-xp"},
"WebKit Win7": {"port_name": "win-win7"},
- "WebKit Win7 (dbg)": {"port_name": "win-win7"},
+ "WebKit Win7 (dbg)(1)": {"port_name": "win-win7"},
+ "WebKit Win7 (dbg)(2)": {"port_name": "win-win7"},
"WebKit Linux": {"port_name": "linux-x86_64"},
"WebKit Linux 32": {"port_name": "linux-x86"},
"WebKit Linux (dbg)": {"port_name": "linux-x86_64"},
diff --git a/chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py b/chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
index 087ba5ec543..0d8578a36aa 100644
--- a/chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
+++ b/chromium/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
@@ -236,6 +236,11 @@ def parse_args(args):
dest="retry_failures",
help="Don't re-try any tests that produce unexpected results."),
+ # FIXME: Remove this after we remove the flag from the v8 bot.
+ optparse.make_option("--retry-crashes", action="store_true",
+ default=False,
+ help="ignored (we now always retry crashes when we retry failures)."),
+
optparse.make_option("--max-locked-shards", type="int", default=0,
help="Set the maximum number of locked shards"),
optparse.make_option("--additional-env-var", type="string", action="append", default=[],
diff --git a/chromium/third_party/WebKit/Tools/Scripts/webkitpy/style/checker.py b/chromium/third_party/WebKit/Tools/Scripts/webkitpy/style/checker.py
index ee084544f74..c6357da4b7b 100644
--- a/chromium/third_party/WebKit/Tools/Scripts/webkitpy/style/checker.py
+++ b/chromium/third_party/WebKit/Tools/Scripts/webkitpy/style/checker.py
@@ -38,6 +38,7 @@ import sys
from checkers.common import categories as CommonCategories
from checkers.common import CarriageReturnChecker
from checkers.cpp import CppChecker
+from checkers.cmake import CMakeChecker
from checkers.jsonchecker import JSONChecker
from checkers.png import PNGChecker
from checkers.python import PythonChecker
@@ -126,7 +127,113 @@ _PATH_RULES_SPECIFIER = [
# discipline as WebCore.
([# There is no clean way to avoid "yy_*" names used by flex.
- "Source/core/css/CSSParser-in.cpp"],
+ "Source/WebCore/css/CSSParser.cpp",
+ # Qt code uses '_' in some places (such as private slots
+ # and on test xxx_data methos on tests)
+ "Source/JavaScriptCore/qt/",
+ "Source/WebKit/qt/tests/",
+ "Source/WebKit/qt/declarative/",
+ "Source/WebKit/qt/examples/"],
+ ["-readability/naming"]),
+
+ ([# The Qt APIs use Qt declaration style, it puts the * to
+ # the variable name, not to the class.
+ "Source/WebKit/qt/Api/",
+ "Source/WebKit/qt/WidgetApi/"],
+ ["-readability/naming",
+ "-whitespace/declaration"]),
+
+ ([# Qt's MiniBrowser has no config.h
+ "Tools/MiniBrowser/qt",
+ "Tools/MiniBrowser/qt/raw"],
+ ["-build/include"]),
+
+ ([# The Qt APIs use Qt/QML naming style, which includes
+ # naming parameters in h files.
+ "Source/WebKit2/UIProcess/API/qt"],
+ ["-readability/parameter_name"]),
+
+ ([# The GTK+ port uses the autotoolsconfig.h header in some C sources
+ # to serve the same purpose of config.h.
+ "Tools/GtkLauncher/main.c"],
+ ["-build/include_order"]),
+
+ ([# The GTK+ APIs use GTK+ naming style, which includes
+ # lower-cased, underscore-separated values, whitespace before
+ # parens for function calls, and always having variable names.
+ # Also, GTK+ allows the use of NULL.
+ "Source/WebCore/bindings/scripts/test/GObject",
+ "Source/WebKit/gtk/webkit/",
+ "Tools/DumpRenderTree/gtk/"],
+ ["-readability/naming",
+ "-readability/parameter_name",
+ "-readability/null",
+ "-readability/enum_casing",
+ "-whitespace/parens"]),
+
+ ([# The GTK+ API use upper case, underscore separated, words in
+ # certain types of enums (e.g. signals, properties).
+ "Source/WebKit2/UIProcess/API/gtk",
+ "Source/WebKit2/WebProcess/InjectedBundle/API/gtk"],
+ ["-readability/enum_casing"]),
+
+ ([# Header files in ForwardingHeaders have no header guards or
+ # exceptional header guards (e.g., WebCore_FWD_Debugger_h).
+ "/ForwardingHeaders/"],
+ ["-build/header_guard"]),
+ ([# assembler has lots of opcodes that use underscores, so
+ # we don't check for underscores in that directory.
+ "Source/JavaScriptCore/assembler/",
+ "Source/JavaScriptCore/jit/JIT"],
+ ["-readability/naming/underscores"]),
+ ([# JITStubs has an usual syntax which causes false alarms for a few checks.
+ "JavaScriptCore/jit/JITStubs.cpp"],
+ ["-readability/parameter_name",
+ "-whitespace/parens"]),
+
+ ([# The EFL APIs use EFL naming style, which includes
+ # both lower-cased and camel-cased, underscore-sparated
+ # values.
+ "Source/WebKit/efl/ewk/",
+ "Source/WebKit2/UIProcess/API/efl/"],
+ ["-readability/naming",
+ "-readability/parameter_name"]),
+ ([# EWebLauncher and MiniBrowser are EFL simple application.
+ # They need to use efl coding style and they don't have config.h.
+ "Tools/EWebLauncher/",
+ "Tools/MiniBrowser/efl/"],
+ ["-readability/naming",
+ "-readability/parameter_name",
+ "-whitespace/declaration",
+ "-build/include_order"]),
+
+ # WebKit2 rules:
+ # WebKit2 and certain directories have idiosyncracies.
+ ([# NPAPI has function names with underscores.
+ "Source/WebKit2/WebProcess/Plugins/Netscape"],
+ ["-readability/naming"]),
+ ([# The WebKit2 C API has names with underscores and whitespace-aligned
+ # struct members. Also, we allow unnecessary parameter names in
+ # WebKit2 APIs because we're matching CF's header style.
+ # Additionally, we use word which starts with non-capital letter 'k'
+ # for types of enums.
+ "Source/WebKit2/UIProcess/API/C/",
+ "Source/WebKit2/Shared/API/c/",
+ "Source/WebKit2/WebProcess/InjectedBundle/API/c/"],
+ ["-readability/enum_casing",
+ "-readability/naming",
+ "-readability/parameter_name",
+ "-whitespace/declaration"]),
+ ([# These files define GObjects, which implies some definitions of
+ # variables and functions containing underscores.
+ "Source/WebCore/platform/graphics/clutter/GraphicsLayerActor.cpp",
+ "Source/WebCore/platform/graphics/clutter/GraphicsLayerActor.h",
+ "Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer1.cpp",
+ "Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp",
+ "Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp",
+ "Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp",
+ "Source/WebCore/platform/network/soup/ProxyResolverSoup.cpp",
+ "Source/WebCore/platform/network/soup/ProxyResolverSoup.h"],
["-readability/naming"]),
# For third-party Python code, keep only the following checks--
@@ -141,6 +248,22 @@ _PATH_RULES_SPECIFIER = [
"+pep8/W291", # Trailing white space
"+whitespace/carriage_return"]),
+ ([# glu's libtess is third-party code, and doesn't follow WebKit style.
+ "Source/ThirdParty/glu"],
+ ["-readability",
+ "-whitespace",
+ "-build/header_guard",
+ "-build/include_order"]),
+
+ ([# There is no way to avoid the symbols __jit_debug_register_code
+ # and __jit_debug_descriptor when integrating with gdb.
+ "Source/JavaScriptCore/jit/GDBInterface.cpp"],
+ ["-readability/naming"]),
+
+ ([# On some systems the trailing CR is causing parser failure.
+ "Source/JavaScriptCore/parser/Keywords.table"],
+ ["+whitespace/carriage_return"]),
+
([# Jinja templates: files have .cpp or .h extensions, but contain
# template code, which can't be handled, so disable tests.
"Source/bindings/templates",
@@ -160,9 +283,12 @@ _JSON_FILE_EXTENSION = 'json'
_PYTHON_FILE_EXTENSION = 'py'
_TEXT_FILE_EXTENSIONS = [
+ 'ac',
'cc',
'cgi',
'css',
+ 'exp',
+ 'flex',
'gyp',
'gypi',
'html',
@@ -173,9 +299,13 @@ _TEXT_FILE_EXTENSIONS = [
'php',
'pl',
'pm',
+ 'pri',
+ 'pro',
'rb',
'sh',
+ 'table',
'txt',
+ 'wm',
'xhtml',
'y',
]
@@ -189,6 +319,8 @@ _XML_FILE_EXTENSIONS = [
_PNG_FILE_EXTENSION = 'png'
+_CMAKE_FILE_EXTENSION = 'cmake'
+
# Files to skip that are less obvious.
#
# Some files should be skipped when checking style. For example,
@@ -383,6 +515,7 @@ class FileType:
# WATCHLIST = 7
XML = 8
XCODEPROJ = 9
+ CMAKE = 10
class CheckerDispatcher(object):
@@ -453,6 +586,8 @@ class CheckerDispatcher(object):
return FileType.XCODEPROJ
elif file_extension == _PNG_FILE_EXTENSION:
return FileType.PNG
+ elif ((file_extension == _CMAKE_FILE_EXTENSION) or os.path.basename(file_path) == 'CMakeLists.txt'):
+ return FileType.CMAKE
elif ((not file_extension and os.path.join("Tools", "Scripts") in file_path) or
file_extension in _TEXT_FILE_EXTENSIONS or os.path.basename(file_path) == 'TestExpectations'):
return FileType.TEXT
@@ -478,6 +613,8 @@ class CheckerDispatcher(object):
checker = XcodeProjectFileChecker(file_path, handle_style_error)
elif file_type == FileType.PNG:
checker = PNGChecker(file_path, handle_style_error)
+ elif file_type == FileType.CMAKE:
+ checker = CMakeChecker(file_path, handle_style_error)
elif file_type == FileType.TEXT:
basename = os.path.basename(file_path)
if basename == 'TestExpectations':
diff --git a/chromium/third_party/WebKit/Tools/Scripts/webkitpy/style/checker_unittest.py b/chromium/third_party/WebKit/Tools/Scripts/webkitpy/style/checker_unittest.py
index 1c588732051..c19367fc2b9 100644
--- a/chromium/third_party/WebKit/Tools/Scripts/webkitpy/style/checker_unittest.py
+++ b/chromium/third_party/WebKit/Tools/Scripts/webkitpy/style/checker_unittest.py
@@ -213,7 +213,43 @@ class GlobalVariablesTest(unittest.TestCase):
"build/include")
assertCheck("random_path.cpp",
"readability/naming")
- assertNoCheck("Source/core/css/CSSParser-in.cpp",
+ assertNoCheck("Source/WebKit/gtk/webkit/webkit.h",
+ "readability/naming")
+ assertNoCheck("Tools/DumpRenderTree/gtk/DumpRenderTree.cpp",
+ "readability/null")
+ assertNoCheck("Source/WebKit/efl/ewk/ewk_view.h",
+ "readability/naming")
+ assertNoCheck("Source/WebCore/css/CSSParser.cpp",
+ "readability/naming")
+
+ # Test if Qt exceptions are indeed working
+ assertCheck("Source/WebKit/qt/WidgetApi/qwebpage.cpp",
+ "readability/braces")
+ assertCheck("Source/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp",
+ "readability/braces")
+ assertCheck("Source/WebKit/qt/declarative/platformplugin/WebPlugin.cpp",
+ "readability/braces")
+ assertCheck("Source/WebKit/qt/examples/platformplugin/WebPlugin.cpp",
+ "readability/braces")
+ assertNoCheck("Source/WebKit/qt/WidgetApi/qwebpage.cpp",
+ "readability/naming")
+ assertNoCheck("Source/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp",
+ "readability/naming")
+ assertNoCheck("Source/WebKit/qt/declarative/platformplugin/WebPlugin.cpp",
+ "readability/naming")
+ assertNoCheck("Source/WebKit/qt/examples/platformplugin/WebPlugin.cpp",
+ "readability/naming")
+
+ assertNoCheck("Tools/MiniBrowser/qt/UrlLoader.cpp",
+ "build/include")
+
+ assertNoCheck("Source/WebKit2/UIProcess/API/qt",
+ "readability/parameter_name")
+
+ assertNoCheck("Source/WebCore/ForwardingHeaders/debugger/Debugger.h",
+ "build/header_guard")
+
+ assertNoCheck("Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp",
"readability/naming")
# Third-party Python code: webkitpy/thirdparty
@@ -224,6 +260,13 @@ class GlobalVariablesTest(unittest.TestCase):
assertCheck(path, "pep8/W291")
assertCheck(path, "whitespace/carriage_return")
+ # Test if the exception for GDBInterface.cpp is in place.
+ assertNoCheck("Source/JavaScriptCore/jit/GDBInterface.cpp",
+ "readability/naming")
+
+ # Javascript keywords.
+ assertCheck("Source/JavaScriptCore/parser/Keywords.table", "whitespace/carriage_return")
+
def test_max_reports_per_category(self):
"""Check that _MAX_REPORTS_PER_CATEGORY is valid."""
all_categories = self._all_categories()
@@ -456,9 +499,12 @@ class CheckerDispatcherDispatchTest(unittest.TestCase):
def test_text_paths(self):
"""Test paths that should be checked as text."""
paths = [
+ "foo.ac",
"foo.cc",
"foo.cgi",
"foo.css",
+ "foo.exp",
+ "foo.flex",
"foo.gyp",
"foo.gypi",
"foo.html",
@@ -469,9 +515,12 @@ class CheckerDispatcherDispatchTest(unittest.TestCase):
"foo.php",
"foo.pl",
"foo.pm",
+ "foo.pri",
+ "foo.pro",
"foo.rb",
"foo.sh",
"foo.txt",
+ "foo.wm",
"foo.xhtml",
"foo.y",
os.path.join("Source", "WebCore", "inspector", "front-end", "inspector.js"),
diff --git a/chromium/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cmake.py b/chromium/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cmake.py
new file mode 100644
index 00000000000..06b8929fab6
--- /dev/null
+++ b/chromium/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cmake.py
@@ -0,0 +1,150 @@
+# Copyright (C) 2012 Intel Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+"""Supports checking WebKit style in cmake files.(.cmake, CMakeLists.txt)"""
+
+import re
+
+from common import TabChecker
+
+
+class CMakeChecker(object):
+
+ """Processes CMake lines for checking style."""
+
+ # NO_SPACE_CMDS list are based on commands section of CMake document.
+ # Now it is generated from
+ # http://www.cmake.org/cmake/help/v2.8.10/cmake.html#section_Commands.
+ # Some commands are from default CMake modules such as pkg_check_modules.
+ # Please keep list in alphabet order.
+ #
+ # For commands in this list, spaces should not be added it and its
+ # parentheses. For eg, message("testing"), not message ("testing")
+ #
+ # The conditional commands like if, else, endif, foreach, endforeach,
+ # while, endwhile and break are listed in ONE_SPACE_CMDS
+ NO_SPACE_CMDS = [
+ 'add_custom_command', 'add_custom_target', 'add_definitions',
+ 'add_dependencies', 'add_executable', 'add_library',
+ 'add_subdirectory', 'add_test', 'aux_source_directory',
+ 'build_command',
+ 'cmake_minimum_required', 'cmake_policy', 'configure_file',
+ 'create_test_sourcelist',
+ 'define_property',
+ 'enable_language', 'enable_testing', 'endfunction', 'endmacro',
+ 'execute_process', 'export',
+ 'file', 'find_file', 'find_library', 'find_package', 'find_path',
+ 'find_program', 'fltk_wrap_ui', 'function',
+ 'get_cmake_property', 'get_directory_property',
+ 'get_filename_component', 'get_property', 'get_source_file_property',
+ 'get_target_property', 'get_test_property',
+ 'include', 'include_directories', 'include_external_msproject',
+ 'include_regular_expression', 'install',
+ 'link_directories', 'list', 'load_cache', 'load_command',
+ 'macro', 'mark_as_advanced', 'math', 'message',
+ 'option',
+ #From FindPkgConfig.cmake
+ 'pkg_check_modules',
+ 'project',
+ 'qt_wrap_cpp', 'qt_wrap_ui',
+ 'remove_definitions', 'return',
+ 'separate_arguments', 'set', 'set_directory_properties', 'set_property',
+ 'set_source_files_properties', 'set_target_properties',
+ 'set_tests_properties', 'site_name', 'source_group', 'string',
+ 'target_link_libraries', 'try_compile', 'try_run',
+ 'unset',
+ 'variable_watch',
+ ]
+
+ # CMake conditional commands, require one space between command and
+ # its parentheses, such as "if (", "foreach (", etc.
+ ONE_SPACE_CMDS = [
+ 'if', 'else', 'elseif', 'endif',
+ 'foreach', 'endforeach',
+ 'while', 'endwhile',
+ 'break',
+ ]
+
+ def __init__(self, file_path, handle_style_error):
+ self._handle_style_error = handle_style_error
+ self._tab_checker = TabChecker(file_path, handle_style_error)
+
+ def check(self, lines):
+ self._tab_checker.check(lines)
+ self._num_lines = len(lines)
+ for l in xrange(self._num_lines):
+ self._process_line(l + 1, lines[l])
+
+ def _process_line(self, line_number, line_content):
+ if re.match('(^|\ +)#', line_content):
+ # ignore comment line
+ return
+ l = line_content.expandtabs(4)
+ # check command like message( "testing")
+ if re.search('\(\ +', l):
+ self._handle_style_error(line_number, 'whitespace/parentheses', 5,
+ 'No space after "("')
+ # check command like message("testing" )
+ if re.search('\ +\)', l) and not re.search('^\ +\)$', l):
+ self._handle_style_error(line_number, 'whitespace/parentheses', 5,
+ 'No space before ")"')
+ self._check_trailing_whitespace(line_number, l)
+ self._check_no_space_cmds(line_number, l)
+ self._check_one_space_cmds(line_number, l)
+ self._check_indent(line_number, line_content)
+
+ def _check_trailing_whitespace(self, line_number, line_content):
+ line_content = line_content.rstrip('\n') # chr(10), newline
+ line_content = line_content.rstrip('\r') # chr(13), carriage return
+ line_content = line_content.rstrip('\x0c') # chr(12), form feed, ^L
+ stripped = line_content.rstrip()
+ if line_content != stripped:
+ self._handle_style_error(line_number, 'whitespace/trailing', 5,
+ 'No trailing spaces')
+
+ def _check_no_space_cmds(self, line_number, line_content):
+ # check command like "SET (" or "Set("
+ for t in self.NO_SPACE_CMDS:
+ self._check_non_lowercase_cmd(line_number, line_content, t)
+ if re.search('(^|\ +)' + t.lower() + '\ +\(', line_content):
+ msg = 'No space between command "' + t.lower() + '" and its parentheses, should be "' + t + '("'
+ self._handle_style_error(line_number, 'whitespace/parentheses', 5, msg)
+
+ def _check_one_space_cmds(self, line_number, line_content):
+ # check command like "IF (" or "if(" or "if (" or "If ()"
+ for t in self.ONE_SPACE_CMDS:
+ self._check_non_lowercase_cmd(line_number, line_content, t)
+ if re.search('(^|\ +)' + t.lower() + '(\(|\ \ +\()', line_content):
+ msg = 'One space between command "' + t.lower() + '" and its parentheses, should be "' + t + ' ("'
+ self._handle_style_error(line_number, 'whitespace/parentheses', 5, msg)
+
+ def _check_non_lowercase_cmd(self, line_number, line_content, cmd):
+ if re.search('(^|\ +)' + cmd + '\ *\(', line_content, flags=re.IGNORECASE) and \
+ (not re.search('(^|\ +)' + cmd.lower() + '\ *\(', line_content)):
+ msg = 'Use lowercase command "' + cmd.lower() + '"'
+ self._handle_style_error(line_number, 'command/lowercase', 5, msg)
+
+ def _check_indent(self, line_number, line_content):
+ #TODO (halton): add indent checking
+ pass
diff --git a/chromium/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cmake_unittest.py b/chromium/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cmake_unittest.py
new file mode 100644
index 00000000000..eefc8f7f19f
--- /dev/null
+++ b/chromium/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cmake_unittest.py
@@ -0,0 +1,90 @@
+# Copyright (C) 2012 Intel Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"""Unit test for cmake.py."""
+
+import webkitpy.thirdparty.unittest2 as unittest
+
+from cmake import CMakeChecker
+
+
+class CMakeCheckerTest(unittest.TestCase):
+
+ """Tests CMakeChecker class."""
+
+ def test_init(self):
+ """Test __init__() method."""
+ def _mock_handle_style_error(self):
+ pass
+
+ checker = CMakeChecker("foo.cmake", _mock_handle_style_error)
+ self.assertEqual(checker._handle_style_error, _mock_handle_style_error)
+
+ def test_check(self):
+ """Test check() method."""
+ errors = []
+
+ def _mock_handle_style_error(line_number, category, confidence,
+ message):
+ error = (line_number, category, confidence, message)
+ errors.append(error)
+
+ checker = CMakeChecker("foo.cmake", _mock_handle_style_error)
+
+ lines = [
+ '# This file is sample input for cmake_unittest.py and includes below problems:\n',
+ 'IF ()',
+ '\tmessage("Error line with Tab")\n',
+ ' message("Error line with endding spaces") \n',
+ ' message( "Error line with space after (")\n',
+ ' message("Error line with space before (" )\n',
+ ' MESSAGE("Error line with upper case non-condtional command")\n',
+ ' MESSage("Error line with upper case non-condtional command")\n',
+ ' message("correct message line")\n',
+ 'ENDif ()\n',
+ '\n',
+ 'if()\n',
+ 'endif ()\n',
+ '\n',
+ 'macro ()\n',
+ 'ENDMacro()\n',
+ '\n',
+ 'function ()\n',
+ 'endfunction()\n',
+ ]
+ checker.check(lines)
+
+ self.maxDiff = None
+ self.assertEqual(errors, [
+ (3, 'whitespace/tab', 5, 'Line contains tab character.'),
+ (2, 'command/lowercase', 5, 'Use lowercase command "if"'),
+ (4, 'whitespace/trailing', 5, 'No trailing spaces'),
+ (5, 'whitespace/parentheses', 5, 'No space after "("'),
+ (6, 'whitespace/parentheses', 5, 'No space before ")"'),
+ (7, 'command/lowercase', 5, 'Use lowercase command "message"'),
+ (8, 'command/lowercase', 5, 'Use lowercase command "message"'),
+ (10, 'command/lowercase', 5, 'Use lowercase command "endif"'),
+ (12, 'whitespace/parentheses', 5, 'One space between command "if" and its parentheses, should be "if ("'),
+ (15, 'whitespace/parentheses', 5, 'No space between command "macro" and its parentheses, should be "macro("'),
+ (16, 'command/lowercase', 5, 'Use lowercase command "endmacro"'),
+ (18, 'whitespace/parentheses', 5, 'No space between command "function" and its parentheses, should be "function("'),
+ ])
diff --git a/chromium/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py b/chromium/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
index ec55decae82..214395fdd17 100644
--- a/chromium/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
+++ b/chromium/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
@@ -32,8 +32,6 @@ import optparse
import re
import sys
import time
-import traceback
-import urllib
import urllib2
from webkitpy.common.checkout.baselineoptimizer import BaselineOptimizer
@@ -568,74 +566,18 @@ class AutoRebaseline(AbstractParallelRebaselineCommand):
self.no_optimize_option,
# FIXME: Remove this option.
self.results_directory_option,
- optparse.make_option("--log-server", help="Server to send logs to.")
])
- def _log_to_server(self, log_server, query):
- if not log_server:
- return
- urllib2.urlopen("http://" + log_server + "/updatelog", data=urllib.urlencode(query))
-
- # Logs when there are no NeedsRebaseline lines in TestExpectations.
- # These entries overwrite the existing log entry if the existing
- # entry is also a noneedsrebaseline entry. This is special cased
- # so that the log doesn't get bloated with entries like this
- # when there are no tests that needs rebaselining.
- def _log_no_needs_rebaseline_lines(self, log_server):
- self._log_to_server(log_server, {
- "noneedsrebaseline": "on",
- })
-
- # Uploaded log entries append to the existing entry unless the
- # newentry flag is set. In that case it starts a new entry to
- # start appending to. So, we need to call this on any fresh run
- # that is going to end up logging stuff (i.e. any run that isn't
- # a noneedsrebaseline run).
- def _start_new_log_entry(self, log_server):
- self._log_to_server(log_server, {
- "log": "",
- "newentry": "on",
- })
-
- def _configure_logging(self, log_server):
- if not log_server:
- return
-
- def _log_alias(query):
- self._log_to_server(log_server, query)
-
- class LogHandler(logging.Handler):
- def __init__(self):
- logging.Handler.__init__(self)
- self._records = []
-
- # Since this does not have the newentry flag, it will append
- # to the most recent log entry (i.e. the one created by
- # _start_new_log_entry.
- def emit(self, record):
- _log_alias({
- "log": record.getMessage(),
- })
-
- handler = LogHandler()
- _log.setLevel(logging.DEBUG)
- handler.setLevel(logging.DEBUG)
- _log.addHandler(handler)
-
- def bot_revision_data(self, log_server):
+ def latest_revision_processed_on_all_bots(self):
revisions = []
for result in self.builder_data().values():
if result.run_was_interrupted():
- self._start_new_log_entry(log_server)
- _log.error("Can't rebaseline because the latest run on %s exited early." % result.builder_name())
- return []
- revisions.append({
- "builder": result.builder_name(),
- "revision": result.blink_revision(),
- })
- return revisions
-
- def tests_to_rebaseline(self, tool, min_revision, print_revisions, log_server):
+ _log.error("Can't rebaseline. The latest run on %s did not complete." % builder_name)
+ return 0
+ revisions.append(result.blink_revision())
+ return int(min(revisions))
+
+ def tests_to_rebaseline(self, tool, min_revision, print_revisions):
port = tool.port_factory.get()
expectations_file_path = port.path_to_generic_test_expectations_file()
@@ -643,16 +585,10 @@ class AutoRebaseline(AbstractParallelRebaselineCommand):
revision = None
author = None
bugs = set()
- has_any_needs_rebaseline_lines = False
for line in tool.scm().blame(expectations_file_path).split("\n"):
if "NeedsRebaseline" not in line:
continue
-
- if not has_any_needs_rebaseline_lines:
- self._start_new_log_entry(log_server)
- has_any_needs_rebaseline_lines = True
-
parsed_line = re.match("^(\S*)[^(]*\((\S*).*?([^ ]*)\ \[[^[]*$", line)
commit_hash = parsed_line.group(1)
@@ -679,7 +615,7 @@ class AutoRebaseline(AbstractParallelRebaselineCommand):
_log.info("Too many tests to rebaseline in one patch. Doing the first %d." % self.MAX_LINES_TO_REBASELINE)
break
- return tests, revision, author, bugs, has_any_needs_rebaseline_lines
+ return tests, revision, author, bugs
def link_to_patch(self, revision):
return "http://src.chromium.org/viewvc/blink?view=revision&revision=" + str(revision)
@@ -727,9 +663,9 @@ class AutoRebaseline(AbstractParallelRebaselineCommand):
def tree_status(self):
blink_tree_status_url = "http://blink-status.appspot.com/status"
status = urllib2.urlopen(blink_tree_status_url).read().lower()
- if status.find('closed') != -1 or status == "0":
+ if status.find('closed') != -1 or status == 0:
return 'closed'
- elif status.find('open') != -1 or status == "1":
+ elif status.find('open') != -1 or status == 1:
return 'open'
return 'unknown'
@@ -742,36 +678,25 @@ class AutoRebaseline(AbstractParallelRebaselineCommand):
_log.error("Cannot proceed with working directory changes. Clean working directory first.")
return
- self._configure_logging(options.log_server)
-
- revision_data = self.bot_revision_data(options.log_server)
- if not revision_data:
- return
-
- min_revision = int(min([item["revision"] for item in revision_data]))
- tests, revision, author, bugs, has_any_needs_rebaseline_lines = self.tests_to_rebaseline(tool, min_revision, print_revisions=options.verbose, log_server=options.log_server)
-
- if not has_any_needs_rebaseline_lines:
- self._log_no_needs_rebaseline_lines(options.log_server)
+ min_revision = self.latest_revision_processed_on_all_bots()
+ if not min_revision:
return
if options.verbose:
- _log.info("Min revision across all bots is %s." % min_revision)
- for item in revision_data:
- _log.info("%s: r%s" % (item["builder"], item["revision"]))
+ _log.info("Bot min revision is %s." % min_revision)
+
+ tests, revision, author, bugs = self.tests_to_rebaseline(tool, min_revision, print_revisions=options.verbose)
+ test_prefix_list, lines_to_remove = self.get_test_prefix_list(tests)
if not tests:
_log.debug('No tests to rebaseline.')
return
+ _log.info('Rebaselining %s for r%s by %s.' % (list(tests), revision, author))
if self.tree_status() == 'closed':
_log.info('Cannot proceed. Tree is closed.')
return
- _log.info('Rebaselining %s for r%s by %s.' % (list(tests), revision, author))
-
- test_prefix_list, lines_to_remove = self.get_test_prefix_list(tests)
-
try:
old_branch_name = tool.scm().current_branch()
tool.scm().delete_branch(self.AUTO_REBASELINE_BRANCH_NAME)
@@ -787,8 +712,6 @@ class AutoRebaseline(AbstractParallelRebaselineCommand):
tool.scm().commit_locally_with_message(self.commit_message(author, revision, bugs))
- # FIXME: Log the upload, pull and dcommit stdout/stderr to the log-server.
-
# FIXME: It would be nice if we could dcommit the patch without uploading, but still
# go through all the precommit hooks. For rebaselines with lots of files, uploading
# takes a long time and sometimes fails, but we don't want to commit if, e.g. the
@@ -815,14 +738,10 @@ class RebaselineOMatic(AbstractDeclarativeCommand):
def execute(self, options, args, tool):
while True:
- try:
- tool.executive.run_command(['git', 'pull'])
- rebaseline_command = [tool.filesystem.join(tool.scm().checkout_root, 'Tools', 'Scripts', 'webkit-patch'), 'auto-rebaseline', '--log-server', 'blinkrebaseline.appspot.com']
- if options.verbose:
- rebaseline_command.append('--verbose')
- # Use call instead of run_command so that stdout doesn't get swallowed.
- tool.executive.call(rebaseline_command)
- except:
- traceback.print_exc(file=sys.stderr)
-
+ tool.executive.run_command(['git', 'pull'])
+ rebaseline_command = [tool.filesystem.join(tool.scm().checkout_root, 'Tools', 'Scripts', 'webkit-patch'), 'auto-rebaseline']
+ if options.verbose:
+ rebaseline_command.append('--verbose')
+ # Use call instead of run_command so that stdout doesn't get swallowed.
+ tool.executive.call(rebaseline_command)
time.sleep(self.SLEEP_TIME_IN_SECONDS)
diff --git a/chromium/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py b/chromium/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
index 6e981182780..9602cf0bee9 100644
--- a/chromium/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
+++ b/chromium/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
@@ -591,8 +591,7 @@ class TestAutoRebaseline(_BaseTestCase):
def setUp(self):
super(TestAutoRebaseline, self).setUp()
- self.command.latest_revision_processed_on_all_bots = lambda log_server: 9000
- self.command.bot_revision_data = lambda log_server: [{"builder": "Mock builder", "revision": "9000"}]
+ self.command.latest_revision_processed_on_all_bots = lambda: 9000
def test_tests_to_rebaseline(self):
def blame(path):
@@ -608,12 +607,11 @@ class TestAutoRebaseline(_BaseTestCase):
self.tool.scm().blame = blame
min_revision = 9000
- self.assertEqual(self.command.tests_to_rebaseline(self.tool, min_revision, print_revisions=False, log_server=None), (
+ self.assertEqual(self.command.tests_to_rebaseline(self.tool, min_revision, print_revisions=False), (
set(['path/to/rebaseline-without-bug-number.html', 'path/to/rebaseline-with-modifiers.html', 'path/to/rebaseline-without-modifiers.html']),
5678,
'foobarbaz1@chromium.org',
- set(['24182', '234']),
- True))
+ set(['24182', '234'])))
def test_tests_to_rebaseline_over_limit(self):
def blame(path):
@@ -628,12 +626,11 @@ class TestAutoRebaseline(_BaseTestCase):
expected_list_of_tests.append("path/to/rebaseline-%s.html" % i)
min_revision = 9000
- self.assertEqual(self.command.tests_to_rebaseline(self.tool, min_revision, print_revisions=False, log_server=None), (
+ self.assertEqual(self.command.tests_to_rebaseline(self.tool, min_revision, print_revisions=False), (
set(expected_list_of_tests),
5678,
'foobarbaz1@chromium.org',
- set(['24182']),
- True))
+ set(['24182'])))
def test_commit_message(self):
author = "foo@chromium.org"
@@ -664,7 +661,7 @@ TBR=foo@chromium.org
"""
self.tool.scm().blame = blame
- self.command.execute(MockOptions(optimize=True, verbose=False, move_overwritten_baselines=False, results_directory=False, log_server=None), [], self.tool)
+ self.command.execute(MockOptions(optimize=True, verbose=False, move_overwritten_baselines=False, results_directory=False), [], self.tool)
self.assertEqual(self.tool.executive.calls, [])
def test_execute(self):
@@ -741,13 +738,13 @@ crbug.com/24182 path/to/locally-changed-lined.html [ NeedsRebaseline ]
}
self.command.tree_status = lambda: 'closed'
- self.command.execute(MockOptions(optimize=True, verbose=False, move_overwritten_baselines=False, results_directory=False, log_server=None), [], self.tool)
+ self.command.execute(MockOptions(optimize=True, verbose=False, move_overwritten_baselines=False, results_directory=False), [], self.tool)
self.assertEqual(self.tool.executive.calls, [])
self.command.tree_status = lambda: 'open'
self.tool.executive.calls = []
- self.command.execute(MockOptions(optimize=True, verbose=False, move_overwritten_baselines=False, results_directory=False, log_server=None), [], self.tool)
+ self.command.execute(MockOptions(optimize=True, verbose=False, move_overwritten_baselines=False, results_directory=False), [], self.tool)
self.assertEqual(self.tool.executive.calls, [
[
['echo', 'copy-existing-baselines-internal', '--suffixes', 'txt,png', '--builder', 'MOCK Leopard', '--test', 'fast/dom/prototype-chocolate.html'],
@@ -829,7 +826,7 @@ Bug(foo) fast/dom/prototype-taco.html [ NeedsRebaseline ]
}
self.command.tree_status = lambda: 'open'
- self.command.execute(MockOptions(optimize=True, verbose=False, move_overwritten_baselines=False, results_directory=False, log_server=None), [], self.tool)
+ self.command.execute(MockOptions(optimize=True, verbose=False, move_overwritten_baselines=False, results_directory=False), [], self.tool)
self.assertEqual(self.tool.executive.calls, [
[
['echo', 'copy-existing-baselines-internal', '--suffixes', 'txt', '--builder', 'MOCK Leopard', '--test', 'fast/dom/prototype-taco.html'],
diff --git a/chromium/third_party/WebKit/WATCHLISTS b/chromium/third_party/WebKit/WATCHLISTS
index fc38a1e8cce..393c9556e9b 100644
--- a/chromium/third_party/WebKit/WATCHLISTS
+++ b/chromium/third_party/WebKit/WATCHLISTS
@@ -178,8 +178,7 @@
'rjwright@chromium.org',
'shans@chromium.org',
'steveblock@chromium.org',
- 'timloh@chromium.org',
- 'dino@apple.com'],
+ 'timloh@chromium.org'],
'devtools': [ 'pfeldman+blink@chromium.org',
'aandrey+blink@chromium.org',
'alph+blink@chromium.org',
diff --git a/chromium/third_party/WebKit/public/platform/WebCompositorSupport.h b/chromium/third_party/WebKit/public/platform/WebCompositorSupport.h
index 32a9e73f532..5f7d9b8d8fd 100644
--- a/chromium/third_party/WebKit/public/platform/WebCompositorSupport.h
+++ b/chromium/third_party/WebKit/public/platform/WebCompositorSupport.h
@@ -43,7 +43,6 @@ class WebFilterOperations;
class WebFloatAnimationCurve;
class WebGraphicsContext3D;
class WebImageLayer;
-class WebNinePatchLayer;
class WebLayer;
class WebScrollbar;
class WebScrollbarLayer;
@@ -71,8 +70,6 @@ public:
virtual WebImageLayer* createImageLayer() { return 0; }
- virtual WebNinePatchLayer* createNinePatchLayer() { return 0; }
-
virtual WebSolidColorLayer* createSolidColorLayer() { return 0; }
virtual WebScrollbarLayer* createScrollbarLayer(WebScrollbar*, WebScrollbarThemePainter, WebScrollbarThemeGeometry*) { return 0; }
diff --git a/chromium/third_party/WebKit/public/platform/WebFileSystem.h b/chromium/third_party/WebKit/public/platform/WebFileSystem.h
index 8dbea8c9e39..969359124c1 100644
--- a/chromium/third_party/WebKit/public/platform/WebFileSystem.h
+++ b/chromium/third_party/WebKit/public/platform/WebFileSystem.h
@@ -37,9 +37,6 @@
namespace WebKit {
-// FIXME: Delete this flag after we complete switching to the new code.
-#define USE_THREADLOCAL_WEBFILESYSTEM
-
// FIXME: Move these classes into platform.
class WebFileSystemCallbacks;
class WebFileWriter;
diff --git a/chromium/third_party/WebKit/public/platform/WebNinePatchLayer.h b/chromium/third_party/WebKit/public/platform/WebNinePatchLayer.h
deleted file mode 100644
index 1279db743cc..00000000000
--- a/chromium/third_party/WebKit/public/platform/WebNinePatchLayer.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WebNinePatchLayer_h
-#define WebNinePatchLayer_h
-
-#include "WebCommon.h"
-#include "WebLayer.h"
-#include "WebRect.h"
-#include "third_party/skia/include/core/SkBitmap.h"
-
-namespace WebKit {
-
-class WebNinePatchLayer {
-public:
- virtual ~WebNinePatchLayer() { }
-
- virtual WebLayer* layer() = 0;
- virtual void setBitmap(SkBitmap, const WebRect& aperture) = 0;
-};
-
-} // namespace WebKit
-
-#endif // WebNinePatchLayer_h
diff --git a/chromium/third_party/WebKit/public/web/WebFrame.h b/chromium/third_party/WebKit/public/web/WebFrame.h
index 211def68aed..68b7440a22d 100644
--- a/chromium/third_party/WebKit/public/web/WebFrame.h
+++ b/chromium/third_party/WebKit/public/web/WebFrame.h
@@ -456,8 +456,6 @@ public:
virtual void moveRangeSelection(const WebPoint& base, const WebPoint& extent) = 0;
virtual void moveCaretSelection(const WebPoint&) = 0;
- virtual void setCaretVisible(bool) = 0;
-
// Printing ------------------------------------------------------------
// Reformats the WebFrame for printing. WebPrintParams specifies the printable
diff --git a/chromium/third_party/WebKit/public/web/WebViewClient.h b/chromium/third_party/WebKit/public/web/WebViewClient.h
index 5014e3405c9..3aeab92416a 100644
--- a/chromium/third_party/WebKit/public/web/WebViewClient.h
+++ b/chromium/third_party/WebKit/public/web/WebViewClient.h
@@ -259,10 +259,6 @@ public:
// the given frame. Additional context data is supplied.
virtual void showContextMenu(WebFrame*, const WebContextMenuData&) { }
- // Called when the data attached to the currently displayed context menu is
- // invalidated. The context menu may be closed if possible.
- virtual void clearContextMenu() { }
-
// Called when a drag-n-drop operation should begin.
virtual void startDragging(WebFrame*, const WebDragData&, WebDragOperationsMask, const WebImage&, const WebPoint& dragImageOffset) { }
@@ -305,6 +301,9 @@ public:
virtual int historyBackListCount() { return 0; }
virtual int historyForwardListCount() { return 0; }
+ // Called to notify the embedder when a new history item is added.
+ virtual void didAddHistoryItem() { }
+
// Accessibility -------------------------------------------------------
diff --git a/chromium/third_party/angle_dx11/src/libEGL/libEGL.rc b/chromium/third_party/angle_dx11/src/libEGL/libEGL.rc
index 5d1f32f1c94..e2c472f3bb3 100644
--- a/chromium/third_party/angle_dx11/src/libEGL/libEGL.rc
+++ b/chromium/third_party/angle_dx11/src/libEGL/libEGL.rc
@@ -1,102 +1,102 @@
-// Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include <windows.h>
-#include "../common/version.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#include ""afxres.h""\r\n"
- "#include ""../common/version.h""\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION MAJOR_VERSION,MINOR_VERSION,BUILD_VERSION,BUILD_REVISION
- PRODUCTVERSION MAJOR_VERSION,MINOR_VERSION,BUILD_VERSION,BUILD_REVISION
- FILEFLAGSMASK 0x17L
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x4L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904b0"
- BEGIN
- VALUE "FileDescription", "ANGLE libEGL Dynamic Link Library"
- VALUE "FileVersion", VERSION_STRING
- VALUE "InternalName", "libEGL"
- VALUE "LegalCopyright", "Copyright (C) 2011 Google Inc."
- VALUE "OriginalFilename", "libEGL.dll"
- VALUE "PrivateBuild", VERSION_STRING
- VALUE "ProductName", "ANGLE libEGL Dynamic Link Library"
- VALUE "ProductVersion", VERSION_STRING
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x409, 1200
- END
-END
-
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include <windows.h>
+#include "../common/version.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "#include ""../common/version.h""\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION MAJOR_VERSION,MINOR_VERSION,BUILD_VERSION,BUILD_REVISION
+ PRODUCTVERSION MAJOR_VERSION,MINOR_VERSION,BUILD_VERSION,BUILD_REVISION
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "FileDescription", "ANGLE libEGL Dynamic Link Library"
+ VALUE "FileVersion", VERSION_STRING
+ VALUE "InternalName", "libEGL"
+ VALUE "LegalCopyright", "Copyright (C) 2011 Google Inc."
+ VALUE "OriginalFilename", "libEGL.dll"
+ VALUE "PrivateBuild", VERSION_STRING
+ VALUE "ProductName", "ANGLE libEGL Dynamic Link Library"
+ VALUE "ProductVersion", VERSION_STRING
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
diff --git a/chromium/third_party/angle_dx11/src/libGLESv2/libGLESv2.rc b/chromium/third_party/angle_dx11/src/libGLESv2/libGLESv2.rc
index 0ad21e440e7..f1b01b9b795 100644
--- a/chromium/third_party/angle_dx11/src/libGLESv2/libGLESv2.rc
+++ b/chromium/third_party/angle_dx11/src/libGLESv2/libGLESv2.rc
@@ -1,102 +1,102 @@
-// Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include <windows.h>
-#include "../common/version.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#include ""afxres.h""\r\n"
- "#include ""../common/version.h""\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION MAJOR_VERSION,MINOR_VERSION,BUILD_VERSION,BUILD_REVISION
- PRODUCTVERSION MAJOR_VERSION,MINOR_VERSION,BUILD_VERSION,BUILD_REVISION
- FILEFLAGSMASK 0x17L
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x4L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904b0"
- BEGIN
- VALUE "FileDescription", "ANGLE libGLESv2 Dynamic Link Library"
- VALUE "FileVersion", VERSION_STRING
- VALUE "InternalName", "libGLESv2"
- VALUE "LegalCopyright", "Copyright (C) 2011 Google Inc."
- VALUE "OriginalFilename", "libGLESv2.dll"
- VALUE "PrivateBuild", VERSION_STRING
- VALUE "ProductName", "ANGLE libGLESv2 Dynamic Link Library"
- VALUE "ProductVersion", VERSION_STRING
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x409, 1200
- END
-END
-
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include <windows.h>
+#include "../common/version.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "#include ""../common/version.h""\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION MAJOR_VERSION,MINOR_VERSION,BUILD_VERSION,BUILD_REVISION
+ PRODUCTVERSION MAJOR_VERSION,MINOR_VERSION,BUILD_VERSION,BUILD_REVISION
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "FileDescription", "ANGLE libGLESv2 Dynamic Link Library"
+ VALUE "FileVersion", VERSION_STRING
+ VALUE "InternalName", "libGLESv2"
+ VALUE "LegalCopyright", "Copyright (C) 2011 Google Inc."
+ VALUE "OriginalFilename", "libGLESv2.dll"
+ VALUE "PrivateBuild", VERSION_STRING
+ VALUE "ProductName", "ANGLE libGLESv2 Dynamic Link Library"
+ VALUE "ProductVersion", VERSION_STRING
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
diff --git a/chromium/third_party/cacheinvalidation/cacheinvalidation.gyp b/chromium/third_party/cacheinvalidation/cacheinvalidation.gyp
index bd8586fb3cb..8566506a96c 100644
--- a/chromium/third_party/cacheinvalidation/cacheinvalidation.gyp
+++ b/chromium/third_party/cacheinvalidation/cacheinvalidation.gyp
@@ -89,7 +89,6 @@
'src/google/cacheinvalidation/impl/recurring-task.h',
'src/google/cacheinvalidation/impl/registration-manager.cc',
'src/google/cacheinvalidation/impl/registration-manager.h',
- 'src/google/cacheinvalidation/impl/repeated-field-namespace-fix.h',
'src/google/cacheinvalidation/impl/run-state.h',
'src/google/cacheinvalidation/impl/safe-storage.cc',
'src/google/cacheinvalidation/impl/safe-storage.h',
diff --git a/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/build_constants.h b/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/build_constants.h
index f2adec1cf45..f4c44c69d3b 100644
--- a/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/build_constants.h
+++ b/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/build_constants.h
@@ -17,6 +17,6 @@
#ifndef INVALIDATION_BUILD_CONSTANTS_H_
#define INVALIDATION_BUILD_CONSTANTS_H_
namespace invalidation {
-const int BUILD_DATESTAMP = 20130807;
+const int BUILD_DATESTAMP = 20130604;
} // namespace invalidation
#endif // INVALIDATION_BUILD_CONSTANTS_H_
diff --git a/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/client-protocol-namespace-fix.h b/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/client-protocol-namespace-fix.h
index 9366a392313..b8a714f5ccf 100644
--- a/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/client-protocol-namespace-fix.h
+++ b/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/client-protocol-namespace-fix.h
@@ -20,10 +20,12 @@
#include "google/cacheinvalidation/client.pb.h"
#include "google/cacheinvalidation/client_protocol.pb.h"
#include "google/cacheinvalidation/types.pb.h"
-#include "google/cacheinvalidation/impl/repeated-field-namespace-fix.h"
namespace invalidation {
+using ::google::protobuf::RepeatedField;
+using ::google::protobuf::RepeatedPtrField;
+
// Client
using ::ipc::invalidation::PersistentStateBlob;
using ::ipc::invalidation::PersistentTiclState;
diff --git a/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/repeated-field-namespace-fix.h b/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/repeated-field-namespace-fix.h
deleted file mode 100644
index 94ba25ad5d5..00000000000
--- a/chromium/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/repeated-field-namespace-fix.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// 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.
-
-//
-// Brings RepeatedField classes into invalidation namespace.
-
-#ifndef GOOGLE_CACHEINVALIDATION_IMPL_REPEATED_FIELD_NAMESPACE_FIX_H_
-#define GOOGLE_CACHEINVALIDATION_IMPL_REPEATED_FIELD_NAMESPACE_FIX_H_
-
-#include "google/protobuf/repeated_field.h"
-
-namespace invalidation {
-
-using ::google::protobuf::RepeatedField;
-using ::google::protobuf::RepeatedPtrField;
-
-} // namespace invalidation
-
-#endif // GOOGLE_CACHEINVALIDATION_IMPL_REPEATED_FIELD_NAMESPACE_FIX_H_
diff --git a/chromium/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/common/BuildConstants.java b/chromium/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/common/BuildConstants.java
index 8e65cf3942c..c206a510471 100644
--- a/chromium/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/common/BuildConstants.java
+++ b/chromium/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/common/BuildConstants.java
@@ -33,5 +33,5 @@ package com.google.ipc.invalidation.common;
/** Build constant definitions. */
class BuildConstants {
- static final int BUILD_DATESTAMP = 20130807;
+ static final int BUILD_DATESTAMP = 20130604;
}
diff --git a/chromium/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/InvalidationClientTestHelper.java b/chromium/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/InvalidationClientTestHelper.java
new file mode 100644
index 00000000000..c8b4c114014
--- /dev/null
+++ b/chromium/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/InvalidationClientTestHelper.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2011 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.ipc.invalidation.external.client;
+
+import com.google.ipc.invalidation.ticl.InvalidationClientCore;
+import com.google.ipc.invalidation.ticl.InvalidationClientImpl;
+import com.google.protos.ipc.invalidation.ClientProtocol.ClientConfigP;
+
+import java.util.Random;
+
+/**
+ * Helper utility functions for testing with the invalidation client.
+ *
+ *
+ */
+public class InvalidationClientTestHelper {
+
+ /**
+ * Constructs an invalidation client library instance with parameters set for unit tests.
+ *
+ * @param clientType client type code as assigned by the notification system's backend
+ * @param clientName id/name of the client in the application's own naming scheme
+ * @param applicationName name of the application using the library (for debugging/monitoring)
+ * @param listener callback object for invalidation events
+ */
+ public static InvalidationClient createForTest(SystemResources resources,
+ int clientType, byte[] clientName, String applicationName, InvalidationListener listener) {
+ ClientConfigP config = InvalidationClientCore.createConfigForTest().build();
+ Random random = new Random(resources.getInternalScheduler().getCurrentTimeMs());
+ return new InvalidationClientImpl(resources, random, clientType, clientName, config,
+ applicationName, listener);
+ }
+}
diff --git a/chromium/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android2/AndroidTiclManifest.java b/chromium/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android2/AndroidTiclManifest.java
index acea0e87dfe..09d69ca5ae9 100644
--- a/chromium/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android2/AndroidTiclManifest.java
+++ b/chromium/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android2/AndroidTiclManifest.java
@@ -33,107 +33,67 @@ import java.util.Map;
*
*/
public class AndroidTiclManifest {
+ /**
+ * Name of the {@code <application>} metadata element whose value gives the Java class that
+ * implements the application {@code InvalidationListener}. Must be set if
+ * {@link #LISTENER_SERVICE_NAME_KEY} is not set.
+ */
+ private static final String LISTENER_NAME_KEY = "ipc.invalidation.ticl.listener_class";
+
+ /**
+ * Name of the {@code <application>} metadata element whose value gives the Java class that
+ * implements the Ticl service. Should only be set in tests.
+ */
+ private static final String TICL_SERVICE_NAME_KEY = "ipc.invalidation.ticl.service_class";
/**
- * Cache of {@link ApplicationMetadata} to avoid repeatedly scanning manifest. The key is the
- * package name for the context.
+ * Name of the {@code <application>} metadata element whose value gives the Java class that
+ * implements the application's invalidation listener intent service.
*/
- private static final Map<String, ApplicationMetadata> applicationMetadataCache =
- new HashMap<String, ApplicationMetadata>();
+ private static final String LISTENER_SERVICE_NAME_KEY =
+ "ipc.invalidation.ticl.listener_service_class";
+
+ /** Default values returned if not overriden by the manifest file. */
+ private static final Map<String, String> DEFAULTS = new HashMap<String, String>();
+ static {
+ DEFAULTS.put(TICL_SERVICE_NAME_KEY,
+ "com.google.ipc.invalidation.ticl.android2.TiclService");
+ DEFAULTS.put(LISTENER_NAME_KEY, "");
+ DEFAULTS.put(LISTENER_SERVICE_NAME_KEY,
+ "com.google.ipc.invalidation.ticl.android2.AndroidInvalidationListenerStub");
+ }
- /** Application metadata from the Android manifest. */
- private final ApplicationMetadata metadata;
+ private final Context context;
public AndroidTiclManifest(Context context) {
- metadata = createApplicationMetadata(Preconditions.checkNotNull(context));
+ this.context = Preconditions.checkNotNull(context);
}
/** Returns the name of the class implementing the Ticl service. */
public String getTiclServiceClass() {
- return metadata.ticlServiceClass;
+ return Preconditions.checkNotNull(readApplicationMetadata(TICL_SERVICE_NAME_KEY));
}
/** Returns the name of the class on which listener events will be invoked. */
String getListenerClass() {
- return metadata.listenerClass;
+ return Preconditions.checkNotNull(readApplicationMetadata(LISTENER_NAME_KEY));
}
/** Returns the name of the class implementing the invalidation listener intent service. */
public String getListenerServiceClass() {
- return metadata.listenerServiceClass;
+ return Preconditions.checkNotNull(readApplicationMetadata(LISTENER_SERVICE_NAME_KEY));
}
/**
- * If it has not already been cached for the given {@code context}, creates and caches application
- * metadata from the manifest.
+ * Returns the metadata-provided value for {@code key} in {@code AndroidManifest.xml} if one
+ * exists, or the value from {@link #DEFAULTS} if one does not.
*/
- private static ApplicationMetadata createApplicationMetadata(Context context) {
- synchronized (applicationMetadataCache) {
- String packageName = context.getPackageName();
- ApplicationMetadata metadata = applicationMetadataCache.get(packageName);
- if (metadata == null) {
- metadata = new ApplicationMetadata(context);
- applicationMetadataCache.put(packageName, metadata);
- }
- return metadata;
- }
- }
-
- /** Application metadata for a specific context. */
- private static final class ApplicationMetadata {
- /**
- * Name of the {@code <application>} metadata element whose value gives the Java class that
- * implements the application {@code InvalidationListener}. Must be set if
- * {@link #LISTENER_SERVICE_NAME_KEY} is not set.
- */
- private static final String LISTENER_NAME_KEY = "ipc.invalidation.ticl.listener_class";
-
- /**
- * Name of the {@code <application>} metadata element whose value gives the Java class that
- * implements the Ticl service. Should only be set in tests.
- */
- private static final String TICL_SERVICE_NAME_KEY = "ipc.invalidation.ticl.service_class";
-
- /**
- * Name of the {@code <application>} metadata element whose value gives the Java class that
- * implements the application's invalidation listener intent service.
- */
- private static final String LISTENER_SERVICE_NAME_KEY =
- "ipc.invalidation.ticl.listener_service_class";
-
- /** Default values returned if not overriden by the manifest file. */
- private static final Map<String, String> DEFAULTS = new HashMap<String, String>();
- static {
- DEFAULTS.put(TICL_SERVICE_NAME_KEY,
- "com.google.ipc.invalidation.ticl.android2.TiclService");
- DEFAULTS.put(LISTENER_NAME_KEY, "");
- DEFAULTS.put(LISTENER_SERVICE_NAME_KEY,
- "com.google.ipc.invalidation.ticl.android2.AndroidInvalidationListenerStub");
- }
-
- private final String ticlServiceClass;
- private final String listenerClass;
- private final String listenerServiceClass;
-
- ApplicationMetadata(Context context) {
- ApplicationInfo appInfo;
- try {
- // Read metadata from manifest.xml
- appInfo = context.getPackageManager()
- .getApplicationInfo(context.getPackageName(), PackageManager.GET_META_DATA);
- } catch (NameNotFoundException exception) {
- throw new RuntimeException("Cannot read own application info", exception);
- }
- ticlServiceClass = readApplicationMetadata(appInfo, TICL_SERVICE_NAME_KEY);
- listenerClass = readApplicationMetadata(appInfo, LISTENER_NAME_KEY);
- listenerServiceClass = readApplicationMetadata(appInfo, LISTENER_SERVICE_NAME_KEY);
- }
-
- /**
- * Returns the metadata-provided value for {@code key} in {@code appInfo} if one
- * exists, or the value from {@link #DEFAULTS} if one does not.
- */
- private static String readApplicationMetadata(ApplicationInfo appInfo, String key) {
+ private String readApplicationMetadata(String key) {
+ ApplicationInfo appInfo;
+ try {
+ // Read the manifest-provided value.
+ appInfo = context.getPackageManager().getApplicationInfo(context.getPackageName(),
+ PackageManager.GET_META_DATA);
String value = null;
if (appInfo.metaData != null) {
value = appInfo.metaData.getString(key);
@@ -141,6 +101,8 @@ public class AndroidTiclManifest {
// Return the manifest value if present or the default value if not.
return (value != null) ?
value : Preconditions.checkNotNull(DEFAULTS.get(key), "No default value for %s", key);
+ } catch (NameNotFoundException exception) {
+ throw new RuntimeException("Cannot read own application info", exception);
}
}
}
diff --git a/chromium/third_party/cros_system_api/dbus/service_constants.h b/chromium/third_party/cros_system_api/dbus/service_constants.h
index dca711c4cb5..562262665e9 100644
--- a/chromium/third_party/cros_system_api/dbus/service_constants.h
+++ b/chromium/third_party/cros_system_api/dbus/service_constants.h
@@ -94,8 +94,6 @@ const char kCryptohomeAsyncTpmAttestationCreateEnrollRequest[] =
const char kCryptohomeAsyncTpmAttestationEnroll[] = "AsyncTpmAttestationEnroll";
const char kCryptohomeAsyncTpmAttestationCreateCertRequest[] =
"AsyncTpmAttestationCreateCertRequest";
-const char kCryptohomeAsyncTpmAttestationCreateCertRequestByProfile[] =
- "AsyncTpmAttestationCreateCertRequestByProfile";
const char kCryptohomeAsyncTpmAttestationFinishCertRequest[] =
"AsyncTpmAttestationFinishCertRequest";
const char kCryptohomeTpmAttestationDoesKeyExist[] =
@@ -1234,7 +1232,9 @@ const char kUpdateEngineServiceName[] = "org.chromium.UpdateEngine";
// Methods.
const char kAttemptUpdate[] = "AttemptUpdate";
const char kGetStatus[] = "GetStatus";
+const char kGetTrack[] = "GetTrack";
const char kRebootIfNeeded[] = "RebootIfNeeded";
+const char kSetTrack[] = "SetTrack";
const char kSetChannel[] = "SetChannel";
const char kGetChannel[] = "GetChannel";
diff --git a/chromium/third_party/cros_system_api/system_api.gyp b/chromium/third_party/cros_system_api/system_api.gyp
index c74c42d65e0..f4cc3523dbd 100644
--- a/chromium/third_party/cros_system_api/system_api.gyp
+++ b/chromium/third_party/cros_system_api/system_api.gyp
@@ -2,10 +2,10 @@
'targets': [
{
'target_name': 'system_api-protos',
- 'type': 'static_library',
+ 'type': 'none',
'variables': {
'proto_in_dir': 'dbus',
- 'proto_out_dir': 'include/system_api/proto_bindings',
+ 'proto_out_dir': 'include/chromeos/dbus',
},
'cflags': [
'-fvisibility=hidden',
@@ -13,16 +13,16 @@
'sources': [
'<(proto_in_dir)/mtp_storage_info.proto',
'<(proto_in_dir)/mtp_file_entry.proto',
- '<(proto_in_dir)/field_trial_list.proto',
+ '<(proto_in_dir)/video_activity_update.proto',
],
'includes': ['../common-mk/protoc.gypi'],
},
{
'target_name': 'system_api-power_manager-protos',
- 'type': 'static_library',
+ 'type': 'none',
'variables': {
'proto_in_dir': 'dbus/power_manager',
- 'proto_out_dir': 'include/power_manager/proto_bindings',
+ 'proto_out_dir': 'include/chromeos/dbus/power_manager',
},
'cflags': [
'-fvisibility=hidden',
@@ -30,7 +30,6 @@
'sources': [
'<(proto_in_dir)/suspend.proto',
'<(proto_in_dir)/input_event.proto',
- '<(proto_in_dir)/peripheral_battery_status.proto',
'<(proto_in_dir)/policy.proto',
'<(proto_in_dir)/power_supply_properties.proto',
],
diff --git a/chromium/third_party/flot/LICENSE.txt b/chromium/third_party/flot/LICENSE.txt
index 67f46256079..07d5b2094d1 100644
--- a/chromium/third_party/flot/LICENSE.txt
+++ b/chromium/third_party/flot/LICENSE.txt
@@ -1,4 +1,4 @@
-Copyright (c) 2007-2013 IOLA and Ole Laursen
+Copyright (c) 2007-2009 IOLA and Ole Laursen
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
diff --git a/chromium/third_party/flot/README.chromium b/chromium/third_party/flot/README.chromium
index ff39b4b076a..acee5bcf46d 100644
--- a/chromium/third_party/flot/README.chromium
+++ b/chromium/third_party/flot/README.chromium
@@ -1,9 +1,9 @@
Name: Flot Javascript/JQuery library for creating graphs
Short Name: Flot
URL: code.google.com/p/flot and http://drupal.org/project/flot
-Version: 0.8.1
+Version: 0.7
License: MIT
License File: LICENSE.txt
Security Critical: yes
-Description: Flot is used in the webui for performance monitor and the visualizer for Deep Memory Profiler to draw charts of performance metrics.
+Description: Flot is used in the webui for performance monitor to draw charts of performance metrics.
Local Modifications: none
diff --git a/chromium/third_party/flot/excanvas.min.js b/chromium/third_party/flot/excanvas.min.js
deleted file mode 100644
index fcf876c749e..00000000000
--- a/chromium/third_party/flot/excanvas.min.js
+++ /dev/null
@@ -1 +0,0 @@
-if(!document.createElement("canvas").getContext){(function(){var ab=Math;var n=ab.round;var l=ab.sin;var A=ab.cos;var H=ab.abs;var N=ab.sqrt;var d=10;var f=d/2;var z=+navigator.userAgent.match(/MSIE ([\d.]+)?/)[1];function y(){return this.context_||(this.context_=new D(this))}var t=Array.prototype.slice;function g(j,m,p){var i=t.call(arguments,2);return function(){return j.apply(m,i.concat(t.call(arguments)))}}function af(i){return String(i).replace(/&/g,"&amp;").replace(/"/g,"&quot;")}function Y(m,j,i){if(!m.namespaces[j]){m.namespaces.add(j,i,"#default#VML")}}function R(j){Y(j,"g_vml_","urn:schemas-microsoft-com:vml");Y(j,"g_o_","urn:schemas-microsoft-com:office:office");if(!j.styleSheets.ex_canvas_){var i=j.createStyleSheet();i.owningElement.id="ex_canvas_";i.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}"}}R(document);var e={init:function(i){var j=i||document;j.createElement("canvas");j.attachEvent("onreadystatechange",g(this.init_,this,j))},init_:function(p){var m=p.getElementsByTagName("canvas");for(var j=0;j<m.length;j++){this.initElement(m[j])}},initElement:function(j){if(!j.getContext){j.getContext=y;R(j.ownerDocument);j.innerHTML="";j.attachEvent("onpropertychange",x);j.attachEvent("onresize",W);var i=j.attributes;if(i.width&&i.width.specified){j.style.width=i.width.nodeValue+"px"}else{j.width=j.clientWidth}if(i.height&&i.height.specified){j.style.height=i.height.nodeValue+"px"}else{j.height=j.clientHeight}}return j}};function x(j){var i=j.srcElement;switch(j.propertyName){case"width":i.getContext().clearRect();i.style.width=i.attributes.width.nodeValue+"px";i.firstChild.style.width=i.clientWidth+"px";break;case"height":i.getContext().clearRect();i.style.height=i.attributes.height.nodeValue+"px";i.firstChild.style.height=i.clientHeight+"px";break}}function W(j){var i=j.srcElement;if(i.firstChild){i.firstChild.style.width=i.clientWidth+"px";i.firstChild.style.height=i.clientHeight+"px"}}e.init();var k=[];for(var ae=0;ae<16;ae++){for(var ad=0;ad<16;ad++){k[ae*16+ad]=ae.toString(16)+ad.toString(16)}}function B(){return[[1,0,0],[0,1,0],[0,0,1]]}function J(p,m){var j=B();for(var i=0;i<3;i++){for(var ah=0;ah<3;ah++){var Z=0;for(var ag=0;ag<3;ag++){Z+=p[i][ag]*m[ag][ah]}j[i][ah]=Z}}return j}function v(j,i){i.fillStyle=j.fillStyle;i.lineCap=j.lineCap;i.lineJoin=j.lineJoin;i.lineWidth=j.lineWidth;i.miterLimit=j.miterLimit;i.shadowBlur=j.shadowBlur;i.shadowColor=j.shadowColor;i.shadowOffsetX=j.shadowOffsetX;i.shadowOffsetY=j.shadowOffsetY;i.strokeStyle=j.strokeStyle;i.globalAlpha=j.globalAlpha;i.font=j.font;i.textAlign=j.textAlign;i.textBaseline=j.textBaseline;i.arcScaleX_=j.arcScaleX_;i.arcScaleY_=j.arcScaleY_;i.lineScale_=j.lineScale_}var b={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",grey:"#808080",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",oldlace:"#FDF5E6",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",whitesmoke:"#F5F5F5",yellowgreen:"#9ACD32"};function M(j){var p=j.indexOf("(",3);var i=j.indexOf(")",p+1);var m=j.substring(p+1,i).split(",");if(m.length!=4||j.charAt(3)!="a"){m[3]=1}return m}function c(i){return parseFloat(i)/100}function r(j,m,i){return Math.min(i,Math.max(m,j))}function I(ag){var i,ai,aj,ah,ak,Z;ah=parseFloat(ag[0])/360%360;if(ah<0){ah++}ak=r(c(ag[1]),0,1);Z=r(c(ag[2]),0,1);if(ak==0){i=ai=aj=Z}else{var j=Z<0.5?Z*(1+ak):Z+ak-Z*ak;var m=2*Z-j;i=a(m,j,ah+1/3);ai=a(m,j,ah);aj=a(m,j,ah-1/3)}return"#"+k[Math.floor(i*255)]+k[Math.floor(ai*255)]+k[Math.floor(aj*255)]}function a(j,i,m){if(m<0){m++}if(m>1){m--}if(6*m<1){return j+(i-j)*6*m}else{if(2*m<1){return i}else{if(3*m<2){return j+(i-j)*(2/3-m)*6}else{return j}}}}var C={};function F(j){if(j in C){return C[j]}var ag,Z=1;j=String(j);if(j.charAt(0)=="#"){ag=j}else{if(/^rgb/.test(j)){var p=M(j);var ag="#",ah;for(var m=0;m<3;m++){if(p[m].indexOf("%")!=-1){ah=Math.floor(c(p[m])*255)}else{ah=+p[m]}ag+=k[r(ah,0,255)]}Z=+p[3]}else{if(/^hsl/.test(j)){var p=M(j);ag=I(p);Z=p[3]}else{ag=b[j]||j}}}return C[j]={color:ag,alpha:Z}}var o={style:"normal",variant:"normal",weight:"normal",size:10,family:"sans-serif"};var L={};function E(i){if(L[i]){return L[i]}var p=document.createElement("div");var m=p.style;try{m.font=i}catch(j){}return L[i]={style:m.fontStyle||o.style,variant:m.fontVariant||o.variant,weight:m.fontWeight||o.weight,size:m.fontSize||o.size,family:m.fontFamily||o.family}}function u(m,j){var i={};for(var ah in m){i[ah]=m[ah]}var ag=parseFloat(j.currentStyle.fontSize),Z=parseFloat(m.size);if(typeof m.size=="number"){i.size=m.size}else{if(m.size.indexOf("px")!=-1){i.size=Z}else{if(m.size.indexOf("em")!=-1){i.size=ag*Z}else{if(m.size.indexOf("%")!=-1){i.size=(ag/100)*Z}else{if(m.size.indexOf("pt")!=-1){i.size=Z/0.75}else{i.size=ag}}}}}i.size*=0.981;return i}function ac(i){return i.style+" "+i.variant+" "+i.weight+" "+i.size+"px "+i.family}var s={butt:"flat",round:"round"};function S(i){return s[i]||"square"}function D(i){this.m_=B();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=d*1;this.globalAlpha=1;this.font="10px sans-serif";this.textAlign="left";this.textBaseline="alphabetic";this.canvas=i;var m="width:"+i.clientWidth+"px;height:"+i.clientHeight+"px;overflow:hidden;position:absolute";var j=i.ownerDocument.createElement("div");j.style.cssText=m;i.appendChild(j);var p=j.cloneNode(false);p.style.backgroundColor="red";p.style.filter="alpha(opacity=0)";i.appendChild(p);this.element_=j;this.arcScaleX_=1;this.arcScaleY_=1;this.lineScale_=1}var q=D.prototype;q.clearRect=function(){if(this.textMeasureEl_){this.textMeasureEl_.removeNode(true);this.textMeasureEl_=null}this.element_.innerHTML=""};q.beginPath=function(){this.currentPath_=[]};q.moveTo=function(j,i){var m=V(this,j,i);this.currentPath_.push({type:"moveTo",x:m.x,y:m.y});this.currentX_=m.x;this.currentY_=m.y};q.lineTo=function(j,i){var m=V(this,j,i);this.currentPath_.push({type:"lineTo",x:m.x,y:m.y});this.currentX_=m.x;this.currentY_=m.y};q.bezierCurveTo=function(m,j,ak,aj,ai,ag){var i=V(this,ai,ag);var ah=V(this,m,j);var Z=V(this,ak,aj);K(this,ah,Z,i)};function K(i,Z,m,j){i.currentPath_.push({type:"bezierCurveTo",cp1x:Z.x,cp1y:Z.y,cp2x:m.x,cp2y:m.y,x:j.x,y:j.y});i.currentX_=j.x;i.currentY_=j.y}q.quadraticCurveTo=function(ai,m,j,i){var ah=V(this,ai,m);var ag=V(this,j,i);var aj={x:this.currentX_+2/3*(ah.x-this.currentX_),y:this.currentY_+2/3*(ah.y-this.currentY_)};var Z={x:aj.x+(ag.x-this.currentX_)/3,y:aj.y+(ag.y-this.currentY_)/3};K(this,aj,Z,ag)};q.arc=function(al,aj,ak,ag,j,m){ak*=d;var ap=m?"at":"wa";var am=al+A(ag)*ak-f;var ao=aj+l(ag)*ak-f;var i=al+A(j)*ak-f;var an=aj+l(j)*ak-f;if(am==i&&!m){am+=0.125}var Z=V(this,al,aj);var ai=V(this,am,ao);var ah=V(this,i,an);this.currentPath_.push({type:ap,x:Z.x,y:Z.y,radius:ak,xStart:ai.x,yStart:ai.y,xEnd:ah.x,yEnd:ah.y})};q.rect=function(m,j,i,p){this.moveTo(m,j);this.lineTo(m+i,j);this.lineTo(m+i,j+p);this.lineTo(m,j+p);this.closePath()};q.strokeRect=function(m,j,i,p){var Z=this.currentPath_;this.beginPath();this.moveTo(m,j);this.lineTo(m+i,j);this.lineTo(m+i,j+p);this.lineTo(m,j+p);this.closePath();this.stroke();this.currentPath_=Z};q.fillRect=function(m,j,i,p){var Z=this.currentPath_;this.beginPath();this.moveTo(m,j);this.lineTo(m+i,j);this.lineTo(m+i,j+p);this.lineTo(m,j+p);this.closePath();this.fill();this.currentPath_=Z};q.createLinearGradient=function(j,p,i,m){var Z=new U("gradient");Z.x0_=j;Z.y0_=p;Z.x1_=i;Z.y1_=m;return Z};q.createRadialGradient=function(p,ag,m,j,Z,i){var ah=new U("gradientradial");ah.x0_=p;ah.y0_=ag;ah.r0_=m;ah.x1_=j;ah.y1_=Z;ah.r1_=i;return ah};q.drawImage=function(aq,m){var aj,ah,al,ay,ao,am,at,aA;var ak=aq.runtimeStyle.width;var ap=aq.runtimeStyle.height;aq.runtimeStyle.width="auto";aq.runtimeStyle.height="auto";var ai=aq.width;var aw=aq.height;aq.runtimeStyle.width=ak;aq.runtimeStyle.height=ap;if(arguments.length==3){aj=arguments[1];ah=arguments[2];ao=am=0;at=al=ai;aA=ay=aw}else{if(arguments.length==5){aj=arguments[1];ah=arguments[2];al=arguments[3];ay=arguments[4];ao=am=0;at=ai;aA=aw}else{if(arguments.length==9){ao=arguments[1];am=arguments[2];at=arguments[3];aA=arguments[4];aj=arguments[5];ah=arguments[6];al=arguments[7];ay=arguments[8]}else{throw Error("Invalid number of arguments")}}}var az=V(this,aj,ah);var p=at/2;var j=aA/2;var ax=[];var i=10;var ag=10;ax.push(" <g_vml_:group",' coordsize="',d*i,",",d*ag,'"',' coordorigin="0,0"',' style="width:',i,"px;height:",ag,"px;position:absolute;");if(this.m_[0][0]!=1||this.m_[0][1]||this.m_[1][1]!=1||this.m_[1][0]){var Z=[];Z.push("M11=",this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",n(az.x/d),",","Dy=",n(az.y/d),"");var av=az;var au=V(this,aj+al,ah);var ar=V(this,aj,ah+ay);var an=V(this,aj+al,ah+ay);av.x=ab.max(av.x,au.x,ar.x,an.x);av.y=ab.max(av.y,au.y,ar.y,an.y);ax.push("padding:0 ",n(av.x/d),"px ",n(av.y/d),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",Z.join(""),", sizingmethod='clip');")}else{ax.push("top:",n(az.y/d),"px;left:",n(az.x/d),"px;")}ax.push(' ">','<g_vml_:image src="',aq.src,'"',' style="width:',d*al,"px;"," height:",d*ay,'px"',' cropleft="',ao/ai,'"',' croptop="',am/aw,'"',' cropright="',(ai-ao-at)/ai,'"',' cropbottom="',(aw-am-aA)/aw,'"'," />","</g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",ax.join(""))};q.stroke=function(ao){var Z=10;var ap=10;var ag=5000;var ai={x:null,y:null};var an={x:null,y:null};for(var aj=0;aj<this.currentPath_.length;aj+=ag){var am=[];var ah=false;am.push("<g_vml_:shape",' filled="',!!ao,'"',' style="position:absolute;width:',Z,"px;height:",ap,'px;"',' coordorigin="0,0"',' coordsize="',d*Z,",",d*ap,'"',' stroked="',!ao,'"',' path="');var aq=false;for(var ak=aj;ak<Math.min(aj+ag,this.currentPath_.length);ak++){if(ak%ag==0&&ak>0){am.push(" m ",n(this.currentPath_[ak-1].x),",",n(this.currentPath_[ak-1].y))}var m=this.currentPath_[ak];var al;switch(m.type){case"moveTo":al=m;am.push(" m ",n(m.x),",",n(m.y));break;case"lineTo":am.push(" l ",n(m.x),",",n(m.y));break;case"close":am.push(" x ");m=null;break;case"bezierCurveTo":am.push(" c ",n(m.cp1x),",",n(m.cp1y),",",n(m.cp2x),",",n(m.cp2y),",",n(m.x),",",n(m.y));break;case"at":case"wa":am.push(" ",m.type," ",n(m.x-this.arcScaleX_*m.radius),",",n(m.y-this.arcScaleY_*m.radius)," ",n(m.x+this.arcScaleX_*m.radius),",",n(m.y+this.arcScaleY_*m.radius)," ",n(m.xStart),",",n(m.yStart)," ",n(m.xEnd),",",n(m.yEnd));break}if(m){if(ai.x==null||m.x<ai.x){ai.x=m.x}if(an.x==null||m.x>an.x){an.x=m.x}if(ai.y==null||m.y<ai.y){ai.y=m.y}if(an.y==null||m.y>an.y){an.y=m.y}}}am.push(' ">');if(!ao){w(this,am)}else{G(this,am,ai,an)}am.push("</g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",am.join(""))}};function w(m,ag){var j=F(m.strokeStyle);var p=j.color;var Z=j.alpha*m.globalAlpha;var i=m.lineScale_*m.lineWidth;if(i<1){Z*=i}ag.push("<g_vml_:stroke",' opacity="',Z,'"',' joinstyle="',m.lineJoin,'"',' miterlimit="',m.miterLimit,'"',' endcap="',S(m.lineCap),'"',' weight="',i,'px"',' color="',p,'" />')}function G(aq,ai,aK,ar){var aj=aq.fillStyle;var aB=aq.arcScaleX_;var aA=aq.arcScaleY_;var j=ar.x-aK.x;var p=ar.y-aK.y;if(aj instanceof U){var an=0;var aF={x:0,y:0};var ax=0;var am=1;if(aj.type_=="gradient"){var al=aj.x0_/aB;var m=aj.y0_/aA;var ak=aj.x1_/aB;var aM=aj.y1_/aA;var aJ=V(aq,al,m);var aI=V(aq,ak,aM);var ag=aI.x-aJ.x;var Z=aI.y-aJ.y;an=Math.atan2(ag,Z)*180/Math.PI;if(an<0){an+=360}if(an<0.000001){an=0}}else{var aJ=V(aq,aj.x0_,aj.y0_);aF={x:(aJ.x-aK.x)/j,y:(aJ.y-aK.y)/p};j/=aB*d;p/=aA*d;var aD=ab.max(j,p);ax=2*aj.r0_/aD;am=2*aj.r1_/aD-ax}var av=aj.colors_;av.sort(function(aN,i){return aN.offset-i.offset});var ap=av.length;var au=av[0].color;var at=av[ap-1].color;var az=av[0].alpha*aq.globalAlpha;var ay=av[ap-1].alpha*aq.globalAlpha;var aE=[];for(var aH=0;aH<ap;aH++){var ao=av[aH];aE.push(ao.offset*am+ax+" "+ao.color)}ai.push('<g_vml_:fill type="',aj.type_,'"',' method="none" focus="100%"',' color="',au,'"',' color2="',at,'"',' colors="',aE.join(","),'"',' opacity="',ay,'"',' g_o_:opacity2="',az,'"',' angle="',an,'"',' focusposition="',aF.x,",",aF.y,'" />')}else{if(aj instanceof T){if(j&&p){var ah=-aK.x;var aC=-aK.y;ai.push("<g_vml_:fill",' position="',ah/j*aB*aB,",",aC/p*aA*aA,'"',' type="tile"',' src="',aj.src_,'" />')}}else{var aL=F(aq.fillStyle);var aw=aL.color;var aG=aL.alpha*aq.globalAlpha;ai.push('<g_vml_:fill color="',aw,'" opacity="',aG,'" />')}}}q.fill=function(){this.stroke(true)};q.closePath=function(){this.currentPath_.push({type:"close"})};function V(j,Z,p){var i=j.m_;return{x:d*(Z*i[0][0]+p*i[1][0]+i[2][0])-f,y:d*(Z*i[0][1]+p*i[1][1]+i[2][1])-f}}q.save=function(){var i={};v(this,i);this.aStack_.push(i);this.mStack_.push(this.m_);this.m_=J(B(),this.m_)};q.restore=function(){if(this.aStack_.length){v(this.aStack_.pop(),this);this.m_=this.mStack_.pop()}};function h(i){return isFinite(i[0][0])&&isFinite(i[0][1])&&isFinite(i[1][0])&&isFinite(i[1][1])&&isFinite(i[2][0])&&isFinite(i[2][1])}function aa(j,i,p){if(!h(i)){return}j.m_=i;if(p){var Z=i[0][0]*i[1][1]-i[0][1]*i[1][0];j.lineScale_=N(H(Z))}}q.translate=function(m,j){var i=[[1,0,0],[0,1,0],[m,j,1]];aa(this,J(i,this.m_),false)};q.rotate=function(j){var p=A(j);var m=l(j);var i=[[p,m,0],[-m,p,0],[0,0,1]];aa(this,J(i,this.m_),false)};q.scale=function(m,j){this.arcScaleX_*=m;this.arcScaleY_*=j;var i=[[m,0,0],[0,j,0],[0,0,1]];aa(this,J(i,this.m_),true)};q.transform=function(Z,p,ah,ag,j,i){var m=[[Z,p,0],[ah,ag,0],[j,i,1]];aa(this,J(m,this.m_),true)};q.setTransform=function(ag,Z,ai,ah,p,j){var i=[[ag,Z,0],[ai,ah,0],[p,j,1]];aa(this,i,true)};q.drawText_=function(am,ak,aj,ap,ai){var ao=this.m_,at=1000,j=0,ar=at,ah={x:0,y:0},ag=[];var i=u(E(this.font),this.element_);var p=ac(i);var au=this.element_.currentStyle;var Z=this.textAlign.toLowerCase();switch(Z){case"left":case"center":case"right":break;case"end":Z=au.direction=="ltr"?"right":"left";break;case"start":Z=au.direction=="rtl"?"right":"left";break;default:Z="left"}switch(this.textBaseline){case"hanging":case"top":ah.y=i.size/1.75;break;case"middle":break;default:case null:case"alphabetic":case"ideographic":case"bottom":ah.y=-i.size/2.25;break}switch(Z){case"right":j=at;ar=0.05;break;case"center":j=ar=at/2;break}var aq=V(this,ak+ah.x,aj+ah.y);ag.push('<g_vml_:line from="',-j,' 0" to="',ar,' 0.05" ',' coordsize="100 100" coordorigin="0 0"',' filled="',!ai,'" stroked="',!!ai,'" style="position:absolute;width:1px;height:1px;">');if(ai){w(this,ag)}else{G(this,ag,{x:-j,y:0},{x:ar,y:i.size})}var an=ao[0][0].toFixed(3)+","+ao[1][0].toFixed(3)+","+ao[0][1].toFixed(3)+","+ao[1][1].toFixed(3)+",0,0";var al=n(aq.x/d)+","+n(aq.y/d);ag.push('<g_vml_:skew on="t" matrix="',an,'" ',' offset="',al,'" origin="',j,' 0" />','<g_vml_:path textpathok="true" />','<g_vml_:textpath on="true" string="',af(am),'" style="v-text-align:',Z,";font:",af(p),'" /></g_vml_:line>');this.element_.insertAdjacentHTML("beforeEnd",ag.join(""))};q.fillText=function(m,i,p,j){this.drawText_(m,i,p,j,false)};q.strokeText=function(m,i,p,j){this.drawText_(m,i,p,j,true)};q.measureText=function(m){if(!this.textMeasureEl_){var i='<span style="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;"></span>';this.element_.insertAdjacentHTML("beforeEnd",i);this.textMeasureEl_=this.element_.lastChild}var j=this.element_.ownerDocument;this.textMeasureEl_.innerHTML="";this.textMeasureEl_.style.font=this.font;this.textMeasureEl_.appendChild(j.createTextNode(m));return{width:this.textMeasureEl_.offsetWidth}};q.clip=function(){};q.arcTo=function(){};q.createPattern=function(j,i){return new T(j,i)};function U(i){this.type_=i;this.x0_=0;this.y0_=0;this.r0_=0;this.x1_=0;this.y1_=0;this.r1_=0;this.colors_=[]}U.prototype.addColorStop=function(j,i){i=F(i);this.colors_.push({offset:j,color:i.color,alpha:i.alpha})};function T(j,i){Q(j);switch(i){case"repeat":case null:case"":this.repetition_="repeat";break;case"repeat-x":case"repeat-y":case"no-repeat":this.repetition_=i;break;default:O("SYNTAX_ERR")}this.src_=j.src;this.width_=j.width;this.height_=j.height}function O(i){throw new P(i)}function Q(i){if(!i||i.nodeType!=1||i.tagName!="IMG"){O("TYPE_MISMATCH_ERR")}if(i.readyState!="complete"){O("INVALID_STATE_ERR")}}function P(i){this.code=this[i];this.message=i+": DOM Exception "+this.code}var X=P.prototype=new Error;X.INDEX_SIZE_ERR=1;X.DOMSTRING_SIZE_ERR=2;X.HIERARCHY_REQUEST_ERR=3;X.WRONG_DOCUMENT_ERR=4;X.INVALID_CHARACTER_ERR=5;X.NO_DATA_ALLOWED_ERR=6;X.NO_MODIFICATION_ALLOWED_ERR=7;X.NOT_FOUND_ERR=8;X.NOT_SUPPORTED_ERR=9;X.INUSE_ATTRIBUTE_ERR=10;X.INVALID_STATE_ERR=11;X.SYNTAX_ERR=12;X.INVALID_MODIFICATION_ERR=13;X.NAMESPACE_ERR=14;X.INVALID_ACCESS_ERR=15;X.VALIDATION_ERR=16;X.TYPE_MISMATCH_ERR=17;G_vmlCanvasManager=e;CanvasRenderingContext2D=D;CanvasGradient=U;CanvasPattern=T;DOMException=P})()}; \ No newline at end of file
diff --git a/chromium/third_party/flot/jquery.colorhelpers.min.js b/chromium/third_party/flot/jquery.colorhelpers.min.js
index 844cef6708c..7f44c57b560 100644
--- a/chromium/third_party/flot/jquery.colorhelpers.min.js
+++ b/chromium/third_party/flot/jquery.colorhelpers.min.js
@@ -1,21 +1 @@
-/* Plugin for jQuery for working with colors.
- *
- * Version 1.1.
- *
- * Inspiration from jQuery color animation plugin by John Resig.
- *
- * Released under the MIT license by Ole Laursen, October 2009.
- *
- * Examples:
- *
- * $.color.parse("#fff").scale('rgb', 0.25).add('a', -0.5).toString()
- * var c = $.color.extract($("#mydiv"), 'background-color');
- * console.log(c.r, c.g, c.b, c.a);
- * $.color.make(100, 50, 25, 0.4).toString() // returns "rgba(100,50,25,0.4)"
- *
- * Note that .scale() and .add() return the same modified object
- * instead of making a new one.
- *
- * V. 1.1: Fix error handling so e.g. parsing an empty string does
- * produce a color rather than just crashing.
- */(function(e){e.color={},e.color.make=function(t,n,r,i){var s={};return s.r=t||0,s.g=n||0,s.b=r||0,s.a=i!=null?i:1,s.add=function(e,t){for(var n=0;n<e.length;++n)s[e.charAt(n)]+=t;return s.normalize()},s.scale=function(e,t){for(var n=0;n<e.length;++n)s[e.charAt(n)]*=t;return s.normalize()},s.toString=function(){return s.a>=1?"rgb("+[s.r,s.g,s.b].join(",")+")":"rgba("+[s.r,s.g,s.b,s.a].join(",")+")"},s.normalize=function(){function e(e,t,n){return t<e?e:t>n?n:t}return s.r=e(0,parseInt(s.r),255),s.g=e(0,parseInt(s.g),255),s.b=e(0,parseInt(s.b),255),s.a=e(0,s.a,1),s},s.clone=function(){return e.color.make(s.r,s.b,s.g,s.a)},s.normalize()},e.color.extract=function(t,n){var r;do{r=t.css(n).toLowerCase();if(r!=""&&r!="transparent")break;t=t.parent()}while(!e.nodeName(t.get(0),"body"));return r=="rgba(0, 0, 0, 0)"&&(r="transparent"),e.color.parse(r)},e.color.parse=function(n){var r,i=e.color.make;if(r=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(n))return i(parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10));if(r=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(n))return i(parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10),parseFloat(r[4]));if(r=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(n))return i(parseFloat(r[1])*2.55,parseFloat(r[2])*2.55,parseFloat(r[3])*2.55);if(r=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(n))return i(parseFloat(r[1])*2.55,parseFloat(r[2])*2.55,parseFloat(r[3])*2.55,parseFloat(r[4]));if(r=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(n))return i(parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16));if(r=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(n))return i(parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16));var s=e.trim(n).toLowerCase();return s=="transparent"?i(255,255,255,0):(r=t[s]||[0,0,0],i(r[0],r[1],r[2]))};var t={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery); \ No newline at end of file
+(function(b){b.color={};b.color.make=function(f,e,c,d){var h={};h.r=f||0;h.g=e||0;h.b=c||0;h.a=d!=null?d:1;h.add=function(k,j){for(var g=0;g<k.length;++g){h[k.charAt(g)]+=j}return h.normalize()};h.scale=function(k,j){for(var g=0;g<k.length;++g){h[k.charAt(g)]*=j}return h.normalize()};h.toString=function(){if(h.a>=1){return"rgb("+[h.r,h.g,h.b].join(",")+")"}else{return"rgba("+[h.r,h.g,h.b,h.a].join(",")+")"}};h.normalize=function(){function g(j,k,i){return k<j?j:(k>i?i:k)}h.r=g(0,parseInt(h.r),255);h.g=g(0,parseInt(h.g),255);h.b=g(0,parseInt(h.b),255);h.a=g(0,h.a,1);return h};h.clone=function(){return b.color.make(h.r,h.b,h.g,h.a)};return h.normalize()};b.color.extract=function(e,d){var f;do{f=e.css(d).toLowerCase();if(f!=""&&f!="transparent"){break}e=e.parent()}while(!b.nodeName(e.get(0),"body"));if(f=="rgba(0, 0, 0, 0)"){f="transparent"}return b.color.parse(f)};b.color.parse=function(f){var e,c=b.color.make;if(e=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(f)){return c(parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10))}if(e=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(f)){return c(parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10),parseFloat(e[4]))}if(e=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(f)){return c(parseFloat(e[1])*2.55,parseFloat(e[2])*2.55,parseFloat(e[3])*2.55)}if(e=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(f)){return c(parseFloat(e[1])*2.55,parseFloat(e[2])*2.55,parseFloat(e[3])*2.55,parseFloat(e[4]))}if(e=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(f)){return c(parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16))}if(e=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(f)){return c(parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16))}var d=b.trim(f).toLowerCase();if(d=="transparent"){return c(255,255,255,0)}else{e=a[d]||[0,0,0];return c(e[0],e[1],e[2])}};var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery); \ No newline at end of file
diff --git a/chromium/third_party/flot/jquery.flot.canvas.min.js b/chromium/third_party/flot/jquery.flot.canvas.min.js
deleted file mode 100644
index ac70b537a6c..00000000000
--- a/chromium/third_party/flot/jquery.flot.canvas.min.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Flot plugin for drawing all elements of a plot on the canvas.
-
-Copyright (c) 2007-2013 IOLA and Ole Laursen.
-Licensed under the MIT license.
-
-Flot normally produces certain elements, like axis labels and the legend, using
-HTML elements. This permits greater interactivity and customization, and often
-looks better, due to cross-browser canvas text inconsistencies and limitations.
-
-It can also be desirable to render the plot entirely in canvas, particularly
-if the goal is to save it as an image, or if Flot is being used in a context
-where the HTML DOM does not exist, as is the case within Node.js. This plugin
-switches out Flot's standard drawing operations for canvas-only replacements.
-
-Currently the plugin supports only axis labels, but it will eventually allow
-every element of the plot to be rendered directly to canvas.
-
-The plugin supports these options:
-
-{
- canvas: boolean
-}
-
-The "canvas" option controls whether full canvas drawing is enabled, making it
-possible to toggle on and off. This is useful when a plot uses HTML text in the
-browser, but needs to redraw with canvas text when exporting as an image.
-
-*/(function(e){function o(t,o){var u=o.Canvas;n==null&&(r=u.prototype.getTextInfo,i=u.prototype.addText,n=u.prototype.render),u.prototype.render=function(){if(!t.getOptions().canvas)return n.call(this);var e=this.context,r=this._textCache;e.save(),e.textBaseline="middle";for(var i in r)if(s.call(r,i)){var o=r[i];for(var u in o)if(s.call(o,u)){var a=o[u],f=!0;for(var l in a)if(s.call(a,l)){var c=a[l],h=c.positions,p=c.lines;f&&(e.fillStyle=c.font.color,e.font=c.font.definition,f=!1);for(var d=0,v;v=h[d];d++)if(v.active)for(var m=0,g;g=v.lines[m];m++)e.fillText(p[m].text,g[0],g[1]);else h.splice(d--,1);h.length==0&&delete a[l]}}}e.restore()},u.prototype.getTextInfo=function(n,i,s,o,u){if(!t.getOptions().canvas)return r.call(this,n,i,s,o,u);var a,f,l,c;i=""+i,typeof s=="object"?a=s.style+" "+s.variant+" "+s.weight+" "+s.size+"px "+s.family:a=s,f=this._textCache[n],f==null&&(f=this._textCache[n]={}),l=f[a],l==null&&(l=f[a]={}),c=l[i];if(c==null){var h=this.context;if(typeof s!="object"){var p=e("<div>&nbsp;</div>").css("position","absolute").addClass(typeof s=="string"?s:null).appendTo(this.getTextLayer(n));s={lineHeight:p.height(),style:p.css("font-style"),variant:p.css("font-variant"),weight:p.css("font-weight"),family:p.css("font-family"),color:p.css("color")},s.size=p.css("line-height",1).height(),p.remove()}a=s.style+" "+s.variant+" "+s.weight+" "+s.size+"px "+s.family,c=l[i]={width:0,height:0,positions:[],lines:[],font:{definition:a,color:s.color}},h.save(),h.font=a;var d=(i+"").replace(/<br ?\/?>|\r\n|\r/g,"\n").split("\n");for(var v=0;v<d.length;++v){var m=d[v],g=h.measureText(m);c.width=Math.max(g.width,c.width),c.height+=s.lineHeight,c.lines.push({text:m,width:g.width,height:s.lineHeight})}h.restore()}return c},u.prototype.addText=function(e,n,r,s,o,u,a,f,l){if(!t.getOptions().canvas)return i.call(this,e,n,r,s,o,u,a,f,l);var c=this.getTextInfo(e,s,o,u,a),h=c.positions,p=c.lines;r+=c.height/p.length/2,l=="middle"?r=Math.round(r-c.height/2):l=="bottom"?r=Math.round(r-c.height):r=Math.round(r),!(window.opera&&window.opera.version().split(".")[0]<12)||(r-=2);for(var d=0,v;v=h[d];d++)if(v.x==n&&v.y==r){v.active=!0;return}v={active:!0,lines:[],x:n,y:r},h.push(v);for(var d=0,m;m=p[d];d++)f=="center"?v.lines.push([Math.round(n-m.width/2),r]):f=="right"?v.lines.push([Math.round(n-m.width),r]):v.lines.push([Math.round(n),r]),r+=m.height}}var t={canvas:!0},n,r,i,s=Object.prototype.hasOwnProperty;e.plot.plugins.push({init:o,options:t,name:"canvas",version:"1.0"})})(jQuery); \ No newline at end of file
diff --git a/chromium/third_party/flot/jquery.flot.categories.min.js b/chromium/third_party/flot/jquery.flot.categories.min.js
deleted file mode 100644
index ca86594fe34..00000000000
--- a/chromium/third_party/flot/jquery.flot.categories.min.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Flot plugin for plotting textual data or categories.
-
-Copyright (c) 2007-2013 IOLA and Ole Laursen.
-Licensed under the MIT license.
-
-Consider a dataset like [["February", 34], ["March", 20], ...]. This plugin
-allows you to plot such a dataset directly.
-
-To enable it, you must specify mode: "categories" on the axis with the textual
-labels, e.g.
-
- $.plot("#placeholder", data, { xaxis: { mode: "categories" } });
-
-By default, the labels are ordered as they are met in the data series. If you
-need a different ordering, you can specify "categories" on the axis options
-and list the categories there:
-
- xaxis: {
- mode: "categories",
- categories: ["February", "March", "April"]
- }
-
-If you need to customize the distances between the categories, you can specify
-"categories" as an object mapping labels to values
-
- xaxis: {
- mode: "categories",
- categories: { "February": 1, "March": 3, "April": 4 }
- }
-
-If you don't specify all categories, the remaining categories will be numbered
-from the max value plus 1 (with a spacing of 1 between each).
-
-Internally, the plugin works by transforming the input data through an auto-
-generated mapping where the first category becomes 0, the second 1, etc.
-Hence, a point like ["February", 34] becomes [0, 34] internally in Flot (this
-is visible in hover and click events that return numbers rather than the
-category labels). The plugin also overrides the tick generator to spit out the
-categories as ticks instead of the values.
-
-If you need to map a value back to its label, the mapping is always accessible
-as "categories" on the axis object, e.g. plot.getAxes().xaxis.categories.
-
-*/(function(e){function n(e,t,n,r){var i=t.xaxis.options.mode=="categories",s=t.yaxis.options.mode=="categories";if(!i&&!s)return;var o=r.format;if(!o){var u=t;o=[],o.push({x:!0,number:!0,required:!0}),o.push({y:!0,number:!0,required:!0});if(u.bars.show||u.lines.show&&u.lines.fill){var a=!!(u.bars.show&&u.bars.zero||u.lines.show&&u.lines.zero);o.push({y:!0,number:!0,required:!1,defaultValue:0,autoscale:a}),u.bars.horizontal&&(delete o[o.length-1].y,o[o.length-1].x=!0)}r.format=o}for(var f=0;f<o.length;++f)o[f].x&&i&&(o[f].number=!1),o[f].y&&s&&(o[f].number=!1)}function r(e){var t=-1;for(var n in e)e[n]>t&&(t=e[n]);return t+1}function i(e){var t=[];for(var n in e.categories){var r=e.categories[n];r>=e.min&&r<=e.max&&t.push([r,n])}return t.sort(function(e,t){return e[0]-t[0]}),t}function s(t,n,r){if(t[n].options.mode!="categories")return;if(!t[n].categories){var s={},u=t[n].options.categories||{};if(e.isArray(u))for(var a=0;a<u.length;++a)s[u[a]]=a;else for(var f in u)s[f]=u[f];t[n].categories=s}t[n].options.ticks||(t[n].options.ticks=i),o(r,n,t[n].categories)}function o(e,t,n){var i=e.points,s=e.pointsize,o=e.format,u=t.charAt(0),a=r(n);for(var f=0;f<i.length;f+=s){if(i[f]==null)continue;for(var l=0;l<s;++l){var c=i[f+l];if(c==null||!o[l][u])continue;c in n||(n[c]=a,++a),i[f+l]=n[c]}}}function u(e,t,n){s(t,"xaxis",n),s(t,"yaxis",n)}function a(e){e.hooks.processRawData.push(n),e.hooks.processDatapoints.push(u)}var t={xaxis:{categories:null},yaxis:{categories:null}};e.plot.plugins.push({init:a,options:t,name:"categories",version:"1.0"})})(jQuery); \ No newline at end of file
diff --git a/chromium/third_party/flot/jquery.flot.crosshair.min.js b/chromium/third_party/flot/jquery.flot.crosshair.min.js
index 65bb9904734..ccaf240366a 100644
--- a/chromium/third_party/flot/jquery.flot.crosshair.min.js
+++ b/chromium/third_party/flot/jquery.flot.crosshair.min.js
@@ -1,59 +1 @@
-/* Flot plugin for showing crosshairs when the mouse hovers over the plot.
-
-Copyright (c) 2007-2013 IOLA and Ole Laursen.
-Licensed under the MIT license.
-
-The plugin supports these options:
-
- crosshair: {
- mode: null or "x" or "y" or "xy"
- color: color
- lineWidth: number
- }
-
-Set the mode to one of "x", "y" or "xy". The "x" mode enables a vertical
-crosshair that lets you trace the values on the x axis, "y" enables a
-horizontal crosshair and "xy" enables them both. "color" is the color of the
-crosshair (default is "rgba(170, 0, 0, 0.80)"), "lineWidth" is the width of
-the drawn lines (default is 1).
-
-The plugin also adds four public methods:
-
- - setCrosshair( pos )
-
- Set the position of the crosshair. Note that this is cleared if the user
- moves the mouse. "pos" is in coordinates of the plot and should be on the
- form { x: xpos, y: ypos } (you can use x2/x3/... if you're using multiple
- axes), which is coincidentally the same format as what you get from a
- "plothover" event. If "pos" is null, the crosshair is cleared.
-
- - clearCrosshair()
-
- Clear the crosshair.
-
- - lockCrosshair(pos)
-
- Cause the crosshair to lock to the current location, no longer updating if
- the user moves the mouse. Optionally supply a position (passed on to
- setCrosshair()) to move it to.
-
- Example usage:
-
- var myFlot = $.plot( $("#graph"), ..., { crosshair: { mode: "x" } } };
- $("#graph").bind( "plothover", function ( evt, position, item ) {
- if ( item ) {
- // Lock the crosshair to the data point being hovered
- myFlot.lockCrosshair({
- x: item.datapoint[ 0 ],
- y: item.datapoint[ 1 ]
- });
- } else {
- // Return normal crosshair operation
- myFlot.unlockCrosshair();
- }
- });
-
- - unlockCrosshair()
-
- Free the crosshair to move again after locking it.
-*/(function(e){function n(e){function n(n){if(t.locked)return;t.x!=-1&&(t.x=-1,e.triggerRedrawOverlay())}function r(n){if(t.locked)return;if(e.getSelection&&e.getSelection()){t.x=-1;return}var r=e.offset();t.x=Math.max(0,Math.min(n.pageX-r.left,e.width())),t.y=Math.max(0,Math.min(n.pageY-r.top,e.height())),e.triggerRedrawOverlay()}var t={x:-1,y:-1,locked:!1};e.setCrosshair=function(r){if(!r)t.x=-1;else{var i=e.p2c(r);t.x=Math.max(0,Math.min(i.left,e.width())),t.y=Math.max(0,Math.min(i.top,e.height()))}e.triggerRedrawOverlay()},e.clearCrosshair=e.setCrosshair,e.lockCrosshair=function(r){r&&e.setCrosshair(r),t.locked=!0},e.unlockCrosshair=function(){t.locked=!1},e.hooks.bindEvents.push(function(e,t){if(!e.getOptions().crosshair.mode)return;t.mouseout(n),t.mousemove(r)}),e.hooks.drawOverlay.push(function(e,n){var r=e.getOptions().crosshair;if(!r.mode)return;var i=e.getPlotOffset();n.save(),n.translate(i.left,i.top);if(t.x!=-1){var s=e.getOptions().crosshair.lineWidth%2===0?0:.5;n.strokeStyle=r.color,n.lineWidth=r.lineWidth,n.lineJoin="round",n.beginPath();if(r.mode.indexOf("x")!=-1){var o=Math.round(t.x)+s;n.moveTo(o,0),n.lineTo(o,e.height())}if(r.mode.indexOf("y")!=-1){var u=Math.round(t.y)+s;n.moveTo(0,u),n.lineTo(e.width(),u)}n.stroke()}n.restore()}),e.hooks.shutdown.push(function(e,t){t.unbind("mouseout",n),t.unbind("mousemove",r)})}var t={crosshair:{mode:null,color:"rgba(170, 0, 0, 0.80)",lineWidth:1}};e.plot.plugins.push({init:n,options:t,name:"crosshair",version:"1.0"})})(jQuery); \ No newline at end of file
+(function(b){var a={crosshair:{mode:null,color:"rgba(170, 0, 0, 0.80)",lineWidth:1}};function c(h){var j={x:-1,y:-1,locked:false};h.setCrosshair=function e(l){if(!l){j.x=-1}else{var k=h.p2c(l);j.x=Math.max(0,Math.min(k.left,h.width()));j.y=Math.max(0,Math.min(k.top,h.height()))}h.triggerRedrawOverlay()};h.clearCrosshair=h.setCrosshair;h.lockCrosshair=function f(k){if(k){h.setCrosshair(k)}j.locked=true};h.unlockCrosshair=function g(){j.locked=false};function d(k){if(j.locked){return}if(j.x!=-1){j.x=-1;h.triggerRedrawOverlay()}}function i(k){if(j.locked){return}if(h.getSelection&&h.getSelection()){j.x=-1;return}var l=h.offset();j.x=Math.max(0,Math.min(k.pageX-l.left,h.width()));j.y=Math.max(0,Math.min(k.pageY-l.top,h.height()));h.triggerRedrawOverlay()}h.hooks.bindEvents.push(function(l,k){if(!l.getOptions().crosshair.mode){return}k.mouseout(d);k.mousemove(i)});h.hooks.drawOverlay.push(function(m,k){var n=m.getOptions().crosshair;if(!n.mode){return}var l=m.getPlotOffset();k.save();k.translate(l.left,l.top);if(j.x!=-1){k.strokeStyle=n.color;k.lineWidth=n.lineWidth;k.lineJoin="round";k.beginPath();if(n.mode.indexOf("x")!=-1){k.moveTo(j.x,0);k.lineTo(j.x,m.height())}if(n.mode.indexOf("y")!=-1){k.moveTo(0,j.y);k.lineTo(m.width(),j.y)}k.stroke()}k.restore()});h.hooks.shutdown.push(function(l,k){k.unbind("mouseout",d);k.unbind("mousemove",i)})}b.plot.plugins.push({init:c,options:a,name:"crosshair",version:"1.0"})})(jQuery); \ No newline at end of file
diff --git a/chromium/third_party/flot/jquery.flot.errorbars.min.js b/chromium/third_party/flot/jquery.flot.errorbars.min.js
deleted file mode 100644
index 72d7e3dc7b2..00000000000
--- a/chromium/third_party/flot/jquery.flot.errorbars.min.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Flot plugin for plotting error bars.
-
-Copyright (c) 2007-2013 IOLA and Ole Laursen.
-Licensed under the MIT license.
-
-Error bars are used to show standard deviation and other statistical
-properties in a plot.
-
-* Created by Rui Pereira - rui (dot) pereira (at) gmail (dot) com
-
-This plugin allows you to plot error-bars over points. Set "errorbars" inside
-the points series to the axis name over which there will be error values in
-your data array (*even* if you do not intend to plot them later, by setting
-"show: null" on xerr/yerr).
-
-The plugin supports these options:
-
- series: {
- points: {
- errorbars: "x" or "y" or "xy",
- xerr: {
- show: null/false or true,
- asymmetric: null/false or true,
- upperCap: null or "-" or function,
- lowerCap: null or "-" or function,
- color: null or color,
- radius: null or number
- },
- yerr: { same options as xerr }
- }
- }
-
-Each data point array is expected to be of the type:
-
- "x" [ x, y, xerr ]
- "y" [ x, y, yerr ]
- "xy" [ x, y, xerr, yerr ]
-
-Where xerr becomes xerr_lower,xerr_upper for the asymmetric error case, and
-equivalently for yerr. Eg., a datapoint for the "xy" case with symmetric
-error-bars on X and asymmetric on Y would be:
-
- [ x, y, xerr, yerr_lower, yerr_upper ]
-
-By default no end caps are drawn. Setting upperCap and/or lowerCap to "-" will
-draw a small cap perpendicular to the error bar. They can also be set to a
-user-defined drawing function, with (ctx, x, y, radius) as parameters, as eg.
-
- function drawSemiCircle( ctx, x, y, radius ) {
- ctx.beginPath();
- ctx.arc( x, y, radius, 0, Math.PI, false );
- ctx.moveTo( x - radius, y );
- ctx.lineTo( x + radius, y );
- ctx.stroke();
- }
-
-Color and radius both default to the same ones of the points series if not
-set. The independent radius parameter on xerr/yerr is useful for the case when
-we may want to add error-bars to a line, without showing the interconnecting
-points (with radius: 0), and still showing end caps on the error-bars.
-shadowSize and lineWidth are derived as well from the points series.
-
-*/(function(e){function n(e,t,n,r){if(!t.points.errorbars)return;var i=[{x:!0,number:!0,required:!0},{y:!0,number:!0,required:!0}],s=t.points.errorbars;if(s=="x"||s=="xy")t.points.xerr.asymmetric?(i.push({x:!0,number:!0,required:!0}),i.push({x:!0,number:!0,required:!0})):i.push({x:!0,number:!0,required:!0});if(s=="y"||s=="xy")t.points.yerr.asymmetric?(i.push({y:!0,number:!0,required:!0}),i.push({y:!0,number:!0,required:!0})):i.push({y:!0,number:!0,required:!0});r.format=i}function r(e,t){var n=e.datapoints.points,r=null,i=null,s=null,o=null,u=e.points.xerr,a=e.points.yerr,f=e.points.errorbars;f=="x"||f=="xy"?u.asymmetric?(r=n[t+2],i=n[t+3],f=="xy"&&(a.asymmetric?(s=n[t+4],o=n[t+5]):s=n[t+4])):(r=n[t+2],f=="xy"&&(a.asymmetric?(s=n[t+3],o=n[t+4]):s=n[t+3])):f=="y"&&(a.asymmetric?(s=n[t+2],o=n[t+3]):s=n[t+2]),i==null&&(i=r),o==null&&(o=s);var l=[r,i,s,o];return u.show||(l[0]=null,l[1]=null),a.show||(l[2]=null,l[3]=null),l}function i(e,t,n){var i=n.datapoints.points,o=n.datapoints.pointsize,u=[n.xaxis,n.yaxis],a=n.points.radius,f=[n.points.xerr,n.points.yerr],l=!1;if(u[0].p2c(u[0].max)<u[0].p2c(u[0].min)){l=!0;var c=f[0].lowerCap;f[0].lowerCap=f[0].upperCap,f[0].upperCap=c}var h=!1;if(u[1].p2c(u[1].min)<u[1].p2c(u[1].max)){h=!0;var c=f[1].lowerCap;f[1].lowerCap=f[1].upperCap,f[1].upperCap=c}for(var p=0;p<n.datapoints.points.length;p+=o){var d=r(n,p);for(var v=0;v<f.length;v++){var m=[u[v].min,u[v].max];if(d[v*f.length]){var g=i[p],y=i[p+1],b=[g,y][v]+d[v*f.length+1],w=[g,y][v]-d[v*f.length];if(f[v].err=="x")if(y>u[1].max||y<u[1].min||b<u[0].min||w>u[0].max)continue;if(f[v].err=="y")if(g>u[0].max||g<u[0].min||b<u[1].min||w>u[1].max)continue;var E=!0,S=!0;b>m[1]&&(E=!1,b=m[1]),w<m[0]&&(S=!1,w=m[0]);if(f[v].err=="x"&&l||f[v].err=="y"&&h){var c=w;w=b,b=c,c=S,S=E,E=c,c=m[0],m[0]=m[1],m[1]=c}g=u[0].p2c(g),y=u[1].p2c(y),b=u[v].p2c(b),w=u[v].p2c(w),m[0]=u[v].p2c(m[0]),m[1]=u[v].p2c(m[1]);var x=f[v].lineWidth?f[v].lineWidth:n.points.lineWidth,T=n.points.shadowSize!=null?n.points.shadowSize:n.shadowSize;if(x>0&&T>0){var N=T/2;t.lineWidth=N,t.strokeStyle="rgba(0,0,0,0.1)",s(t,f[v],g,y,b,w,E,S,a,N+N/2,m),t.strokeStyle="rgba(0,0,0,0.2)",s(t,f[v],g,y,b,w,E,S,a,N/2,m)}t.strokeStyle=f[v].color?f[v].color:n.color,t.lineWidth=x,s(t,f[v],g,y,b,w,E,S,a,0,m)}}}}function s(t,n,r,i,s,u,a,f,l,c,h){i+=c,s+=c,u+=c,n.err=="x"?(s>r+l?o(t,[[s,i],[Math.max(r+l,h[0]),i]]):a=!1,u<r-l?o(t,[[Math.min(r-l,h[1]),i],[u,i]]):f=!1):(s<i-l?o(t,[[r,s],[r,Math.min(i-l,h[0])]]):a=!1,u>i+l?o(t,[[r,Math.max(i+l,h[1])],[r,u]]):f=!1),l=n.radius!=null?n.radius:l,a&&(n.upperCap=="-"?n.err=="x"?o(t,[[s,i-l],[s,i+l]]):o(t,[[r-l,s],[r+l,s]]):e.isFunction(n.upperCap)&&(n.err=="x"?n.upperCap(t,s,i,l):n.upperCap(t,r,s,l))),f&&(n.lowerCap=="-"?n.err=="x"?o(t,[[u,i-l],[u,i+l]]):o(t,[[r-l,u],[r+l,u]]):e.isFunction(n.lowerCap)&&(n.err=="x"?n.lowerCap(t,u,i,l):n.lowerCap(t,r,u,l)))}function o(e,t){e.beginPath(),e.moveTo(t[0][0],t[0][1]);for(var n=1;n<t.length;n++)e.lineTo(t[n][0],t[n][1]);e.stroke()}function u(t,n){var r=t.getPlotOffset();n.save(),n.translate(r.left,r.top),e.each(t.getData(),function(e,r){r.points.errorbars&&(r.points.xerr.show||r.points.yerr.show)&&i(t,n,r)}),n.restore()}function a(e){e.hooks.processRawData.push(n),e.hooks.draw.push(u)}var t={series:{points:{errorbars:null,xerr:{err:"x",show:null,asymmetric:null,upperCap:null,lowerCap:null,color:null,radius:null},yerr:{err:"y",show:null,asymmetric:null,upperCap:null,lowerCap:null,color:null,radius:null}}}};e.plot.plugins.push({init:a,options:t,name:"errorbars",version:"1.0"})})(jQuery); \ No newline at end of file
diff --git a/chromium/third_party/flot/jquery.flot.fillbetween.min.js b/chromium/third_party/flot/jquery.flot.fillbetween.min.js
index e94efb7e740..47f3dfb6de0 100644
--- a/chromium/third_party/flot/jquery.flot.fillbetween.min.js
+++ b/chromium/third_party/flot/jquery.flot.fillbetween.min.js
@@ -1,30 +1 @@
-/* Flot plugin for computing bottoms for filled line and bar charts.
-
-Copyright (c) 2007-2013 IOLA and Ole Laursen.
-Licensed under the MIT license.
-
-The case: you've got two series that you want to fill the area between. In Flot
-terms, you need to use one as the fill bottom of the other. You can specify the
-bottom of each data point as the third coordinate manually, or you can use this
-plugin to compute it for you.
-
-In order to name the other series, you need to give it an id, like this:
-
- var dataset = [
- { data: [ ... ], id: "foo" } , // use default bottom
- { data: [ ... ], fillBetween: "foo" }, // use first dataset as bottom
- ];
-
- $.plot($("#placeholder"), dataset, { lines: { show: true, fill: true }});
-
-As a convenience, if the id given is a number that doesn't appear as an id in
-the series, it is interpreted as the index in the array instead (so fillBetween:
-0 can also mean the first series).
-
-Internally, the plugin modifies the datapoints in each series. For line series,
-extra data points might be inserted through interpolation. Note that at points
-where the bottom line is not defined (due to a null point or start/end of line),
-the current line will show a gap too. The algorithm comes from the
-jquery.flot.stack.js plugin, possibly some code could be shared.
-
-*/(function(e){function n(e){function t(e,t){var n;for(n=0;n<t.length;++n)if(t[n].id===e.fillBetween)return t[n];return typeof e.fillBetween=="number"?e.fillBetween<0||e.fillBetween>=t.length?null:t[e.fillBetween]:null}function n(e,n,r){if(n.fillBetween==null)return;var i=t(n,e.getData());if(!i)return;var s=r.pointsize,o=r.points,u=i.datapoints.pointsize,a=i.datapoints.points,f=[],l,c,h,p,d,v,m=n.lines.show,g=s>2&&r.format[2].y,y=m&&n.lines.steps,b=!0,w=0,E=0,S,x;for(;;){if(w>=o.length)break;S=f.length;if(o[w]==null){for(x=0;x<s;++x)f.push(o[w+x]);w+=s}else if(E>=a.length){if(!m)for(x=0;x<s;++x)f.push(o[w+x]);w+=s}else if(a[E]==null){for(x=0;x<s;++x)f.push(null);b=!0,E+=u}else{l=o[w],c=o[w+1],p=a[E],d=a[E+1],v=0;if(l===p){for(x=0;x<s;++x)f.push(o[w+x]);v=d,w+=s,E+=u}else if(l>p){if(m&&w>0&&o[w-s]!=null){h=c+(o[w-s+1]-c)*(p-l)/(o[w-s]-l),f.push(p),f.push(h);for(x=2;x<s;++x)f.push(o[w+x]);v=d}E+=u}else{if(b&&m){w+=s;continue}for(x=0;x<s;++x)f.push(o[w+x]);m&&E>0&&a[E-u]!=null&&(v=d+(a[E-u+1]-d)*(l-p)/(a[E-u]-p)),w+=s}b=!1,S!==f.length&&g&&(f[S+2]=v)}if(y&&S!==f.length&&S>0&&f[S]!==null&&f[S]!==f[S-s]&&f[S+1]!==f[S-s+1]){for(x=0;x<s;++x)f[S+s+x]=f[S+x];f[S+1]=f[S-s+1]}}r.points=f}e.hooks.processDatapoints.push(n)}var t={series:{fillBetween:null}};e.plot.plugins.push({init:n,options:t,name:"fillbetween",version:"1.0"})})(jQuery); \ No newline at end of file
+(function(b){var a={series:{fillBetween:null}};function c(f){function d(j,h){var g;for(g=0;g<h.length;++g){if(h[g].id==j.fillBetween){return h[g]}}if(typeof j.fillBetween=="number"){g=j.fillBetween;if(g<0||g>=h.length){return null}return h[g]}return null}function e(B,u,g){if(u.fillBetween==null){return}var p=d(u,B.getData());if(!p){return}var y=g.pointsize,E=g.points,h=p.datapoints.pointsize,x=p.datapoints.points,r=[],w,v,k,G,F,q,t=u.lines.show,o=y>2&&g.format[2].y,n=t&&u.lines.steps,D=true,C=0,A=0,z;while(true){if(C>=E.length){break}z=r.length;if(E[C]==null){for(m=0;m<y;++m){r.push(E[C+m])}C+=y}else{if(A>=x.length){if(!t){for(m=0;m<y;++m){r.push(E[C+m])}}C+=y}else{if(x[A]==null){for(m=0;m<y;++m){r.push(null)}D=true;A+=h}else{w=E[C];v=E[C+1];G=x[A];F=x[A+1];q=0;if(w==G){for(m=0;m<y;++m){r.push(E[C+m])}q=F;C+=y;A+=h}else{if(w>G){if(t&&C>0&&E[C-y]!=null){k=v+(E[C-y+1]-v)*(G-w)/(E[C-y]-w);r.push(G);r.push(k);for(m=2;m<y;++m){r.push(E[C+m])}q=F}A+=h}else{if(D&&t){C+=y;continue}for(m=0;m<y;++m){r.push(E[C+m])}if(t&&A>0&&x[A-h]!=null){q=F+(x[A-h+1]-F)*(w-G)/(x[A-h]-G)}C+=y}}D=false;if(z!=r.length&&o){r[z+2]=q}}}}if(n&&z!=r.length&&z>0&&r[z]!=null&&r[z]!=r[z-y]&&r[z+1]!=r[z-y+1]){for(m=0;m<y;++m){r[z+y+m]=r[z+m]}r[z+1]=r[z-y+1]}}g.points=r}f.hooks.processDatapoints.push(e)}b.plot.plugins.push({init:c,options:a,name:"fillbetween",version:"1.0"})})(jQuery); \ No newline at end of file
diff --git a/chromium/third_party/flot/jquery.flot.image.min.js b/chromium/third_party/flot/jquery.flot.image.min.js
index b128d30336d..9480c1e7a31 100644
--- a/chromium/third_party/flot/jquery.flot.image.min.js
+++ b/chromium/third_party/flot/jquery.flot.image.min.js
@@ -1,53 +1 @@
-/* Flot plugin for plotting images.
-
-Copyright (c) 2007-2013 IOLA and Ole Laursen.
-Licensed under the MIT license.
-
-The data syntax is [ [ image, x1, y1, x2, y2 ], ... ] where (x1, y1) and
-(x2, y2) are where you intend the two opposite corners of the image to end up
-in the plot. Image must be a fully loaded Javascript image (you can make one
-with new Image()). If the image is not complete, it's skipped when plotting.
-
-There are two helpers included for retrieving images. The easiest work the way
-that you put in URLs instead of images in the data, like this:
-
- [ "myimage.png", 0, 0, 10, 10 ]
-
-Then call $.plot.image.loadData( data, options, callback ) where data and
-options are the same as you pass in to $.plot. This loads the images, replaces
-the URLs in the data with the corresponding images and calls "callback" when
-all images are loaded (or failed loading). In the callback, you can then call
-$.plot with the data set. See the included example.
-
-A more low-level helper, $.plot.image.load(urls, callback) is also included.
-Given a list of URLs, it calls callback with an object mapping from URL to
-Image object when all images are loaded or have failed loading.
-
-The plugin supports these options:
-
- series: {
- images: {
- show: boolean
- anchor: "corner" or "center"
- alpha: [ 0, 1 ]
- }
- }
-
-They can be specified for a specific series:
-
- $.plot( $("#placeholder"), [{
- data: [ ... ],
- images: { ... }
- ])
-
-Note that because the data format is different from usual data points, you
-can't use images with anything else in a specific data series.
-
-Setting "anchor" to "center" causes the pixels in the image to be anchored at
-the corner pixel centers inside of at the pixel corners, effectively letting
-half a pixel stick out to each side in the plot.
-
-A possible future direction could be support for tiling for large images (like
-Google Maps).
-
-*/(function(e){function n(e,t,n){var r=e.getPlotOffset();if(!n.images||!n.images.show)return;var i=n.datapoints.points,s=n.datapoints.pointsize;for(var o=0;o<i.length;o+=s){var u=i[o],a=i[o+1],f=i[o+2],l=i[o+3],c=i[o+4],h=n.xaxis,p=n.yaxis,d;if(!u||u.width<=0||u.height<=0)continue;a>l&&(d=l,l=a,a=d),f>c&&(d=c,c=f,f=d),n.images.anchor=="center"&&(d=.5*(l-a)/(u.width-1),a-=d,l+=d,d=.5*(c-f)/(u.height-1),f-=d,c+=d);if(a==l||f==c||a>=h.max||l<=h.min||f>=p.max||c<=p.min)continue;var v=0,m=0,g=u.width,y=u.height;a<h.min&&(v+=(g-v)*(h.min-a)/(l-a),a=h.min),l>h.max&&(g+=(g-v)*(h.max-l)/(l-a),l=h.max),f<p.min&&(y+=(m-y)*(p.min-f)/(c-f),f=p.min),c>p.max&&(m+=(m-y)*(p.max-c)/(c-f),c=p.max),a=h.p2c(a),l=h.p2c(l),f=p.p2c(f),c=p.p2c(c),a>l&&(d=l,l=a,a=d),f>c&&(d=c,c=f,f=d),d=t.globalAlpha,t.globalAlpha*=n.images.alpha,t.drawImage(u,v,m,g-v,y-m,a+r.left,f+r.top,l-a,c-f),t.globalAlpha=d}}function r(e,t,n,r){if(!t.images.show)return;r.format=[{required:!0},{x:!0,number:!0,required:!0},{y:!0,number:!0,required:!0},{x:!0,number:!0,required:!0},{y:!0,number:!0,required:!0}]}function i(e){e.hooks.processRawData.push(r),e.hooks.drawSeries.push(n)}var t={series:{images:{show:!1,alpha:1,anchor:"corner"}}};e.plot.image={},e.plot.image.loadDataImages=function(t,n,r){var i=[],s=[],o=n.series.images.show;e.each(t,function(t,n){if(!o&&!n.images.show)return;n.data&&(n=n.data),e.each(n,function(e,t){typeof t[0]=="string"&&(i.push(t[0]),s.push(t))})}),e.plot.image.load(i,function(t){e.each(s,function(e,n){var r=n[0];t[r]&&(n[0]=t[r])}),r()})},e.plot.image.load=function(t,n){var r=t.length,i={};r==0&&n({}),e.each(t,function(t,s){var o=function(){--r,i[s]=this,r==0&&n(i)};e("<img />").load(o).error(o).attr("src",s)})},e.plot.plugins.push({init:i,options:t,name:"image",version:"1.1"})})(jQuery); \ No newline at end of file
+(function(c){var a={series:{images:{show:false,alpha:1,anchor:"corner"}}};c.plot.image={};c.plot.image.loadDataImages=function(g,f,k){var j=[],h=[];var i=f.series.images.show;c.each(g,function(l,m){if(!(i||m.images.show)){return}if(m.data){m=m.data}c.each(m,function(n,o){if(typeof o[0]=="string"){j.push(o[0]);h.push(o)}})});c.plot.image.load(j,function(l){c.each(h,function(n,o){var m=o[0];if(l[m]){o[0]=l[m]}});k()})};c.plot.image.load=function(h,i){var g=h.length,f={};if(g==0){i({})}c.each(h,function(k,j){var l=function(){--g;f[j]=this;if(g==0){i(f)}};c("<img />").load(l).error(l).attr("src",j)})};function d(q,o,l){var m=q.getPlotOffset();if(!l.images||!l.images.show){return}var r=l.datapoints.points,n=l.datapoints.pointsize;for(var t=0;t<r.length;t+=n){var y=r[t],w=r[t+1],g=r[t+2],v=r[t+3],f=r[t+4],h=l.xaxis,u=l.yaxis,x;if(!y||y.width<=0||y.height<=0){continue}if(w>v){x=v;v=w;w=x}if(g>f){x=f;f=g;g=x}if(l.images.anchor=="center"){x=0.5*(v-w)/(y.width-1);w-=x;v+=x;x=0.5*(f-g)/(y.height-1);g-=x;f+=x}if(w==v||g==f||w>=h.max||v<=h.min||g>=u.max||f<=u.min){continue}var k=0,s=0,j=y.width,p=y.height;if(w<h.min){k+=(j-k)*(h.min-w)/(v-w);w=h.min}if(v>h.max){j+=(j-k)*(h.max-v)/(v-w);v=h.max}if(g<u.min){p+=(s-p)*(u.min-g)/(f-g);g=u.min}if(f>u.max){s+=(s-p)*(u.max-f)/(f-g);f=u.max}w=h.p2c(w);v=h.p2c(v);g=u.p2c(g);f=u.p2c(f);if(w>v){x=v;v=w;w=x}if(g>f){x=f;f=g;g=x}x=o.globalAlpha;o.globalAlpha*=l.images.alpha;o.drawImage(y,k,s,j-k,p-s,w+m.left,g+m.top,v-w,f-g);o.globalAlpha=x}}function b(i,f,g,h){if(!f.images.show){return}h.format=[{required:true},{x:true,number:true,required:true},{y:true,number:true,required:true},{x:true,number:true,required:true},{y:true,number:true,required:true}]}function e(f){f.hooks.processRawData.push(b);f.hooks.drawSeries.push(d)}c.plot.plugins.push({init:e,options:a,name:"image",version:"1.1"})})(jQuery); \ No newline at end of file
diff --git a/chromium/third_party/flot/jquery.flot.min.js b/chromium/third_party/flot/jquery.flot.min.js
index 3706512c482..4467fc5d8cd 100644
--- a/chromium/third_party/flot/jquery.flot.min.js
+++ b/chromium/third_party/flot/jquery.flot.min.js
@@ -1,29 +1,6 @@
-/* Javascript plotting library for jQuery, version 0.8.1.
-
-Copyright (c) 2007-2013 IOLA and Ole Laursen.
-Licensed under the MIT license.
-
-*/// first an inline dependency, jquery.colorhelpers.js, we inline it here
-// for convenience
-/* Plugin for jQuery for working with colors.
+/* Javascript plotting library for jQuery, v. 0.7.
*
- * Version 1.1.
+ * Released under the MIT license by IOLA, December 2007.
*
- * Inspiration from jQuery color animation plugin by John Resig.
- *
- * Released under the MIT license by Ole Laursen, October 2009.
- *
- * Examples:
- *
- * $.color.parse("#fff").scale('rgb', 0.25).add('a', -0.5).toString()
- * var c = $.color.extract($("#mydiv"), 'background-color');
- * console.log(c.r, c.g, c.b, c.a);
- * $.color.make(100, 50, 25, 0.4).toString() // returns "rgba(100,50,25,0.4)"
- *
- * Note that .scale() and .add() return the same modified object
- * instead of making a new one.
- *
- * V. 1.1: Fix error handling so e.g. parsing an empty string does
- * produce a color rather than just crashing.
- */(function(e){e.color={},e.color.make=function(t,n,r,i){var s={};return s.r=t||0,s.g=n||0,s.b=r||0,s.a=i!=null?i:1,s.add=function(e,t){for(var n=0;n<e.length;++n)s[e.charAt(n)]+=t;return s.normalize()},s.scale=function(e,t){for(var n=0;n<e.length;++n)s[e.charAt(n)]*=t;return s.normalize()},s.toString=function(){return s.a>=1?"rgb("+[s.r,s.g,s.b].join(",")+")":"rgba("+[s.r,s.g,s.b,s.a].join(",")+")"},s.normalize=function(){function e(e,t,n){return t<e?e:t>n?n:t}return s.r=e(0,parseInt(s.r),255),s.g=e(0,parseInt(s.g),255),s.b=e(0,parseInt(s.b),255),s.a=e(0,s.a,1),s},s.clone=function(){return e.color.make(s.r,s.b,s.g,s.a)},s.normalize()},e.color.extract=function(t,n){var r;do{r=t.css(n).toLowerCase();if(r!=""&&r!="transparent")break;t=t.parent()}while(!e.nodeName(t.get(0),"body"));return r=="rgba(0, 0, 0, 0)"&&(r="transparent"),e.color.parse(r)},e.color.parse=function(n){var r,i=e.color.make;if(r=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(n))return i(parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10));if(r=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(n))return i(parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10),parseFloat(r[4]));if(r=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(n))return i(parseFloat(r[1])*2.55,parseFloat(r[2])*2.55,parseFloat(r[3])*2.55);if(r=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(n))return i(parseFloat(r[1])*2.55,parseFloat(r[2])*2.55,parseFloat(r[3])*2.55,parseFloat(r[4]));if(r=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(n))return i(parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16));if(r=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(n))return i(parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16));var s=e.trim(n).toLowerCase();return s=="transparent"?i(255,255,255,0):(r=t[s]||[0,0,0],i(r[0],r[1],r[2]))};var t={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery),function(e){function n(t,n){var r=n.children("."+t)[0];if(r==null){r=document.createElement("canvas"),r.className=t,e(r).css({direction:"ltr",position:"absolute",left:0,top:0}).appendTo(n);if(!r.getContext){if(!window.G_vmlCanvasManager)throw new Error("Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.");r=window.G_vmlCanvasManager.initElement(r)}}this.element=r;var i=this.context=r.getContext("2d"),s=window.devicePixelRatio||1,o=i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1;this.pixelRatio=s/o,this.resize(n.width(),n.height()),this.textContainer=null,this.text={},this._textCache={}}function r(t,r,s,o){function E(e,t){t=[w].concat(t);for(var n=0;n<e.length;++n)e[n].apply(this,t)}function S(){var t={Canvas:n};for(var r=0;r<o.length;++r){var i=o[r];i.init(w,t),i.options&&e.extend(!0,a,i.options)}}function x(n){e.extend(!0,a,n),n&&n.colors&&(a.colors=n.colors),a.xaxis.color==null&&(a.xaxis.color=e.color.parse(a.grid.color).scale("a",.22).toString()),a.yaxis.color==null&&(a.yaxis.color=e.color.parse(a.grid.color).scale("a",.22).toString()),a.xaxis.tickColor==null&&(a.xaxis.tickColor=a.grid.tickColor||a.xaxis.color),a.yaxis.tickColor==null&&(a.yaxis.tickColor=a.grid.tickColor||a.yaxis.color),a.grid.borderColor==null&&(a.grid.borderColor=a.grid.color),a.grid.tickColor==null&&(a.grid.tickColor=e.color.parse(a.grid.color).scale("a",.22).toString());var r,i,s,o={style:t.css("font-style"),size:Math.round(.8*(+t.css("font-size").replace("px","")||13)),variant:t.css("font-variant"),weight:t.css("font-weight"),family:t.css("font-family")};o.lineHeight=o.size*1.15,s=a.xaxes.length||1;for(r=0;r<s;++r)i=a.xaxes[r],i&&!i.tickColor&&(i.tickColor=i.color),i=e.extend(!0,{},a.xaxis,i),a.xaxes[r]=i,i.font&&(i.font=e.extend({},o,i.font),i.font.color||(i.font.color=i.color));s=a.yaxes.length||1;for(r=0;r<s;++r)i=a.yaxes[r],i&&!i.tickColor&&(i.tickColor=i.color),i=e.extend(!0,{},a.yaxis,i),a.yaxes[r]=i,i.font&&(i.font=e.extend({},o,i.font),i.font.color||(i.font.color=i.color));a.xaxis.noTicks&&a.xaxis.ticks==null&&(a.xaxis.ticks=a.xaxis.noTicks),a.yaxis.noTicks&&a.yaxis.ticks==null&&(a.yaxis.ticks=a.yaxis.noTicks),a.x2axis&&(a.xaxes[1]=e.extend(!0,{},a.xaxis,a.x2axis),a.xaxes[1].position="top"),a.y2axis&&(a.yaxes[1]=e.extend(!0,{},a.yaxis,a.y2axis),a.yaxes[1].position="right"),a.grid.coloredAreas&&(a.grid.markings=a.grid.coloredAreas),a.grid.coloredAreasColor&&(a.grid.markingsColor=a.grid.coloredAreasColor),a.lines&&e.extend(!0,a.series.lines,a.lines),a.points&&e.extend(!0,a.series.points,a.points),a.bars&&e.extend(!0,a.series.bars,a.bars),a.shadowSize!=null&&(a.series.shadowSize=a.shadowSize),a.highlightColor!=null&&(a.series.highlightColor=a.highlightColor);for(r=0;r<a.xaxes.length;++r)O(d,r+1).options=a.xaxes[r];for(r=0;r<a.yaxes.length;++r)O(v,r+1).options=a.yaxes[r];for(var u in b)a.hooks[u]&&a.hooks[u].length&&(b[u]=b[u].concat(a.hooks[u]));E(b.processOptions,[a])}function T(e){u=N(e),M(),_()}function N(t){var n=[];for(var r=0;r<t.length;++r){var i=e.extend(!0,{},a.series);t[r].data!=null?(i.data=t[r].data,delete t[r].data,e.extend(!0,i,t[r]),t[r].data=i.data):i.data=t[r],n.push(i)}return n}function C(e,t){var n=e[t+"axis"];return typeof n=="object"&&(n=n.n),typeof n!="number"&&(n=1),n}function k(){return e.grep(d.concat(v),function(e){return e})}function L(e){var t={},n,r;for(n=0;n<d.length;++n)r=d[n],r&&r.used&&(t["x"+r.n]=r.c2p(e.left));for(n=0;n<v.length;++n)r=v[n],r&&r.used&&(t["y"+r.n]=r.c2p(e.top));return t.x1!==undefined&&(t.x=t.x1),t.y1!==undefined&&(t.y=t.y1),t}function A(e){var t={},n,r,i;for(n=0;n<d.length;++n){r=d[n];if(r&&r.used){i="x"+r.n,e[i]==null&&r.n==1&&(i="x");if(e[i]!=null){t.left=r.p2c(e[i]);break}}}for(n=0;n<v.length;++n){r=v[n];if(r&&r.used){i="y"+r.n,e[i]==null&&r.n==1&&(i="y");if(e[i]!=null){t.top=r.p2c(e[i]);break}}}return t}function O(t,n){return t[n-1]||(t[n-1]={n:n,direction:t==d?"x":"y",options:e.extend(!0,{},t==d?a.xaxis:a.yaxis)}),t[n-1]}function M(){var t=u.length,n=-1,r;for(r=0;r<u.length;++r){var i=u[r].color;i!=null&&(t--,typeof i=="number"&&i>n&&(n=i))}t<=n&&(t=n+1);var s,o=[],f=a.colors,l=f.length,c=0;for(r=0;r<t;r++)s=e.color.parse(f[r%l]||"#666"),r%l==0&&r&&(c>=0?c<.5?c=-c-.2:c=0:c=-c),o[r]=s.scale("rgb",1+c);var h=0,p;for(r=0;r<u.length;++r){p=u[r],p.color==null?(p.color=o[h].toString(),++h):typeof p.color=="number"&&(p.color=o[p.color].toString());if(p.lines.show==null){var m,g=!0;for(m in p)if(p[m]&&p[m].show){g=!1;break}g&&(p.lines.show=!0)}p.lines.zero==null&&(p.lines.zero=!!p.lines.fill),p.xaxis=O(d,C(p,"x")),p.yaxis=O(v,C(p,"y"))}}function _(){function x(e,t,n){t<e.datamin&&t!=-r&&(e.datamin=t),n>e.datamax&&n!=r&&(e.datamax=n)}var t=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,r=Number.MAX_VALUE,i,s,o,a,f,l,c,h,p,d,v,m,g,y,w,S;e.each(k(),function(e,r){r.datamin=t,r.datamax=n,r.used=!1});for(i=0;i<u.length;++i)l=u[i],l.datapoints={points:[]},E(b.processRawData,[l,l.data,l.datapoints]);for(i=0;i<u.length;++i){l=u[i],w=l.data,S=l.datapoints.format;if(!S){S=[],S.push({x:!0,number:!0,required:!0}),S.push({y:!0,number:!0,required:!0});if(l.bars.show||l.lines.show&&l.lines.fill){var T=!!(l.bars.show&&l.bars.zero||l.lines.show&&l.lines.zero);S.push({y:!0,number:!0,required:!1,defaultValue:0,autoscale:T}),l.bars.horizontal&&(delete S[S.length-1].y,S[S.length-1].x=!0)}l.datapoints.format=S}if(l.datapoints.pointsize!=null)continue;l.datapoints.pointsize=S.length,h=l.datapoints.pointsize,c=l.datapoints.points;var N=l.lines.show&&l.lines.steps;l.xaxis.used=l.yaxis.used=!0;for(s=o=0;s<w.length;++s,o+=h){y=w[s];var C=y==null;if(!C)for(a=0;a<h;++a)m=y[a],g=S[a],g&&(g.number&&m!=null&&(m=+m,isNaN(m)?m=null:m==Infinity?m=r:m==-Infinity&&(m=-r)),m==null&&(g.required&&(C=!0),g.defaultValue!=null&&(m=g.defaultValue))),c[o+a]=m;if(C)for(a=0;a<h;++a)m=c[o+a],m!=null&&(g=S[a],g.autoscale&&(g.x&&x(l.xaxis,m,m),g.y&&x(l.yaxis,m,m))),c[o+a]=null;else if(N&&o>0&&c[o-h]!=null&&c[o-h]!=c[o]&&c[o-h+1]!=c[o+1]){for(a=0;a<h;++a)c[o+h+a]=c[o+a];c[o+1]=c[o-h+1],o+=h}}}for(i=0;i<u.length;++i)l=u[i],E(b.processDatapoints,[l,l.datapoints]);for(i=0;i<u.length;++i){l=u[i],c=l.datapoints.points,h=l.datapoints.pointsize,S=l.datapoints.format;var L=t,A=t,O=n,M=n;for(s=0;s<c.length;s+=h){if(c[s]==null)continue;for(a=0;a<h;++a){m=c[s+a],g=S[a];if(!g||g.autoscale===!1||m==r||m==-r)continue;g.x&&(m<L&&(L=m),m>O&&(O=m)),g.y&&(m<A&&(A=m),m>M&&(M=m))}}if(l.bars.show){var _;switch(l.bars.align){case"left":_=0;break;case"right":_=-l.bars.barWidth;break;case"center":_=-l.bars.barWidth/2;break;default:throw new Error("Invalid bar alignment: "+l.bars.align)}l.bars.horizontal?(A+=_,M+=_+l.bars.barWidth):(L+=_,O+=_+l.bars.barWidth)}x(l.xaxis,L,O),x(l.yaxis,A,M)}e.each(k(),function(e,r){r.datamin==t&&(r.datamin=null),r.datamax==n&&(r.datamax=null)})}function D(){t.css("padding",0).children(":not(.flot-base,.flot-overlay)").remove(),t.css("position")=="static"&&t.css("position","relative"),f=new n("flot-base",t),l=new n("flot-overlay",t),h=f.context,p=l.context,c=e(l.element).unbind();var r=t.data("plot");r&&(r.shutdown(),l.clear()),t.data("plot",w)}function P(){a.grid.hoverable&&(c.mousemove(at),c.bind("mouseleave",ft)),a.grid.clickable&&c.click(lt),E(b.bindEvents,[c])}function H(){ot&&clearTimeout(ot),c.unbind("mousemove",at),c.unbind("mouseleave",ft),c.unbind("click",lt),E(b.shutdown,[c])}function B(e){function t(e){return e}var n,r,i=e.options.transform||t,s=e.options.inverseTransform;e.direction=="x"?(n=e.scale=g/Math.abs(i(e.max)-i(e.min)),r=Math.min(i(e.max),i(e.min))):(n=e.scale=y/Math.abs(i(e.max)-i(e.min)),n=-n,r=Math.max(i(e.max),i(e.min))),i==t?e.p2c=function(e){return(e-r)*n}:e.p2c=function(e){return(i(e)-r)*n},s?e.c2p=function(e){return s(r+e/n)}:e.c2p=function(e){return r+e/n}}function j(e){var t=e.options,n=e.ticks||[],r=t.labelWidth||0,i=t.labelHeight||0,s=r||e.direction=="x"?Math.floor(f.width/(n.length||1)):null;legacyStyles=e.direction+"Axis "+e.direction+e.n+"Axis",layer="flot-"+e.direction+"-axis flot-"+e.direction+e.n+"-axis "+legacyStyles,font=t.font||"flot-tick-label tickLabel";for(var o=0;o<n.length;++o){var u=n[o];if(!u.label)continue;var a=f.getTextInfo(layer,u.label,font,null,s);r=Math.max(r,a.width),i=Math.max(i,a.height)}e.labelWidth=t.labelWidth||r,e.labelHeight=t.labelHeight||i}function F(t){var n=t.labelWidth,r=t.labelHeight,i=t.options.position,s=t.options.tickLength,o=a.grid.axisMargin,u=a.grid.labelMargin,l=t.direction=="x"?d:v,c,h,p=e.grep(l,function(e){return e&&e.options.position==i&&e.reserveSpace});e.inArray(t,p)==p.length-1&&(o=0);if(s==null){var g=e.grep(l,function(e){return e&&e.reserveSpace});h=e.inArray(t,g)==0,h?s="full":s=5}isNaN(+s)||(u+=+s),t.direction=="x"?(r+=u,i=="bottom"?(m.bottom+=r+o,t.box={top:f.height-m.bottom,height:r}):(t.box={top:m.top+o,height:r},m.top+=r+o)):(n+=u,i=="left"?(t.box={left:m.left+o,width:n},m.left+=n+o):(m.right+=n+o,t.box={left:f.width-m.right,width:n})),t.position=i,t.tickLength=s,t.box.padding=u,t.innermost=h}function I(e){e.direction=="x"?(e.box.left=m.left-e.labelWidth/2,e.box.width=f.width-m.left-m.right+e.labelWidth):(e.box.top=m.top-e.labelHeight/2,e.box.height=f.height-m.bottom-m.top+e.labelHeight)}function q(){var t=a.grid.minBorderMargin,n={x:0,y:0},r,i;if(t==null){t=0;for(r=0;r<u.length;++r)t=Math.max(t,2*(u[r].points.radius+u[r].points.lineWidth/2))}n.x=n.y=Math.ceil(t),e.each(k(),function(e,t){var r=t.direction;t.reserveSpace&&(n[r]=Math.ceil(Math.max(n[r],(r=="x"?t.labelWidth:t.labelHeight)/2)))}),m.left=Math.max(n.x,m.left),m.right=Math.max(n.x,m.right),m.top=Math.max(n.y,m.top),m.bottom=Math.max(n.y,m.bottom)}function R(){var t,n=k(),r=a.grid.show;for(var i in m){var s=a.grid.margin||0;m[i]=typeof s=="number"?s:s[i]||0}E(b.processOffset,[m]);for(var i in m)typeof a.grid.borderWidth=="object"?m[i]+=r?a.grid.borderWidth[i]:0:m[i]+=r?a.grid.borderWidth:0;e.each(n,function(e,t){t.show=t.options.show,t.show==null&&(t.show=t.used),t.reserveSpace=t.show||t.options.reserveSpace,U(t)});if(r){var o=e.grep(n,function(e){return e.reserveSpace});e.each(o,function(e,t){z(t),W(t),X(t,t.ticks),j(t)});for(t=o.length-1;t>=0;--t)F(o[t]);q(),e.each(o,function(e,t){I(t)})}g=f.width-m.left-m.right,y=f.height-m.bottom-m.top,e.each(n,function(e,t){B(t)}),r&&G(),it()}function U(e){var t=e.options,n=+(t.min!=null?t.min:e.datamin),r=+(t.max!=null?t.max:e.datamax),i=r-n;if(i==0){var s=r==0?1:.01;t.min==null&&(n-=s);if(t.max==null||t.min!=null)r+=s}else{var o=t.autoscaleMargin;o!=null&&(t.min==null&&(n-=i*o,n<0&&e.datamin!=null&&e.datamin>=0&&(n=0)),t.max==null&&(r+=i*o,r>0&&e.datamax!=null&&e.datamax<=0&&(r=0)))}e.min=n,e.max=r}function z(t){var n=t.options,r;typeof n.ticks=="number"&&n.ticks>0?r=n.ticks:r=.3*Math.sqrt(t.direction=="x"?f.width:f.height);var s=(t.max-t.min)/r,o=-Math.floor(Math.log(s)/Math.LN10),u=n.tickDecimals;u!=null&&o>u&&(o=u);var a=Math.pow(10,-o),l=s/a,c;l<1.5?c=1:l<3?(c=2,l>2.25&&(u==null||o+1<=u)&&(c=2.5,++o)):l<7.5?c=5:c=10,c*=a,n.minTickSize!=null&&c<n.minTickSize&&(c=n.minTickSize),t.delta=s,t.tickDecimals=Math.max(0,u!=null?u:o),t.tickSize=n.tickSize||c;if(n.mode=="time"&&!t.tickGenerator)throw new Error("Time mode requires the flot.time plugin.");t.tickGenerator||(t.tickGenerator=function(e){var t=[],n=i(e.min,e.tickSize),r=0,s=Number.NaN,o;do o=s,s=n+r*e.tickSize,t.push(s),++r;while(s<e.max&&s!=o);return t},t.tickFormatter=function(e,t){var n=t.tickDecimals?Math.pow(10,t.tickDecimals):1,r=""+Math.round(e*n)/n;if(t.tickDecimals!=null){var i=r.indexOf("."),s=i==-1?0:r.length-i-1;if(s<t.tickDecimals)return(s?r:r+".")+(""+n).substr(1,t.tickDecimals-s)}return r}),e.isFunction(n.tickFormatter)&&(t.tickFormatter=function(e,t){return""+n.tickFormatter(e,t)});if(n.alignTicksWithAxis!=null){var h=(t.direction=="x"?d:v)[n.alignTicksWithAxis-1];if(h&&h.used&&h!=t){var p=t.tickGenerator(t);p.length>0&&(n.min==null&&(t.min=Math.min(t.min,p[0])),n.max==null&&p.length>1&&(t.max=Math.max(t.max,p[p.length-1]))),t.tickGenerator=function(e){var t=[],n,r;for(r=0;r<h.ticks.length;++r)n=(h.ticks[r].v-h.min)/(h.max-h.min),n=e.min+n*(e.max-e.min),t.push(n);return t};if(!t.mode&&n.tickDecimals==null){var m=Math.max(0,-Math.floor(Math.log(t.delta)/Math.LN10)+1),g=t.tickGenerator(t);g.length>1&&/\..*0$/.test((g[1]-g[0]).toFixed(m))||(t.tickDecimals=m)}}}}function W(t){var n=t.options.ticks,r=[];n==null||typeof n=="number"&&n>0?r=t.tickGenerator(t):n&&(e.isFunction(n)?r=n(t):r=n);var i,s;t.ticks=[];for(i=0;i<r.length;++i){var o=null,u=r[i];typeof u=="object"?(s=+u[0],u.length>1&&(o=u[1])):s=+u,o==null&&(o=t.tickFormatter(s,t)),isNaN(s)||t.ticks.push({v:s,label:o})}}function X(e,t){e.options.autoscaleMargin&&t.length>0&&(e.options.min==null&&(e.min=Math.min(e.min,t[0].v)),e.options.max==null&&t.length>1&&(e.max=Math.max(e.max,t[t.length-1].v)))}function V(){f.clear(),E(b.drawBackground,[h]);var e=a.grid;e.show&&e.backgroundColor&&K(),e.show&&!e.aboveData&&Q();for(var t=0;t<u.length;++t)E(b.drawSeries,[h,u[t]]),Y(u[t]);E(b.draw,[h]),e.show&&e.aboveData&&Q(),f.render(),ht()}function J(e,t){var n,r,i,s,o=k();for(var u=0;u<o.length;++u){n=o[u];if(n.direction==t){s=t+n.n+"axis",!e[s]&&n.n==1&&(s=t+"axis");if(e[s]){r=e[s].from,i=e[s].to;break}}}e[s]||(n=t=="x"?d[0]:v[0],r=e[t+"1"],i=e[t+"2"]);if(r!=null&&i!=null&&r>i){var a=r;r=i,i=a}return{from:r,to:i,axis:n}}function K(){h.save(),h.translate(m.left,m.top),h.fillStyle=bt(a.grid.backgroundColor,y,0,"rgba(255, 255, 255, 0)"),h.fillRect(0,0,g,y),h.restore()}function Q(){var t,n,r,i;h.save(),h.translate(m.left,m.top);var s=a.grid.markings;if(s){e.isFunction(s)&&(n=w.getAxes(),n.xmin=n.xaxis.min,n.xmax=n.xaxis.max,n.ymin=n.yaxis.min,n.ymax=n.yaxis.max,s=s(n));for(t=0;t<s.length;++t){var o=s[t],u=J(o,"x"),f=J(o,"y");u.from==null&&(u.from=u.axis.min),u.to==null&&(u.to=u.axis.max),f.from==null&&(f.from=f.axis.min),f.to==null&&(f.to=f.axis.max);if(u.to<u.axis.min||u.from>u.axis.max||f.to<f.axis.min||f.from>f.axis.max)continue;u.from=Math.max(u.from,u.axis.min),u.to=Math.min(u.to,u.axis.max),f.from=Math.max(f.from,f.axis.min),f.to=Math.min(f.to,f.axis.max);if(u.from==u.to&&f.from==f.to)continue;u.from=u.axis.p2c(u.from),u.to=u.axis.p2c(u.to),f.from=f.axis.p2c(f.from),f.to=f.axis.p2c(f.to),u.from==u.to||f.from==f.to?(h.beginPath(),h.strokeStyle=o.color||a.grid.markingsColor,h.lineWidth=o.lineWidth||a.grid.markingsLineWidth,h.moveTo(u.from,f.from),h.lineTo(u.to,f.to),h.stroke()):(h.fillStyle=o.color||a.grid.markingsColor,h.fillRect(u.from,f.to,u.to-u.from,f.from-f.to))}}n=k(),r=a.grid.borderWidth;for(var l=0;l<n.length;++l){var c=n[l],p=c.box,d=c.tickLength,v,b,E,S;if(!c.show||c.ticks.length==0)continue;h.lineWidth=1,c.direction=="x"?(v=0,d=="full"?b=c.position=="top"?0:y:b=p.top-m.top+(c.position=="top"?p.height:0)):(b=0,d=="full"?v=c.position=="left"?0:g:v=p.left-m.left+(c.position=="left"?p.width:0)),c.innermost||(h.strokeStyle=c.options.color,h.beginPath(),E=S=0,c.direction=="x"?E=g+1:S=y+1,h.lineWidth==1&&(c.direction=="x"?b=Math.floor(b)+.5:v=Math.floor(v)+.5),h.moveTo(v,b),h.lineTo(v+E,b+S),h.stroke()),h.strokeStyle=c.options.tickColor,h.beginPath();for(t=0;t<c.ticks.length;++t){var x=c.ticks[t].v;E=S=0;if(isNaN(x)||x<c.min||x>c.max||d=="full"&&(typeof r=="object"&&r[c.position]>0||r>0)&&(x==c.min||x==c.max))continue;c.direction=="x"?(v=c.p2c(x),S=d=="full"?-y:d,c.position=="top"&&(S=-S)):(b=c.p2c(x),E=d=="full"?-g:d,c.position=="left"&&(E=-E)),h.lineWidth==1&&(c.direction=="x"?v=Math.floor(v)+.5:b=Math.floor(b)+.5),h.moveTo(v,b),h.lineTo(v+E,b+S)}h.stroke()}r&&(i=a.grid.borderColor,typeof r=="object"||typeof i=="object"?(typeof r!="object"&&(r={top:r,right:r,bottom:r,left:r}),typeof i!="object"&&(i={top:i,right:i,bottom:i,left:i}),r.top>0&&(h.strokeStyle=i.top,h.lineWidth=r.top,h.beginPath(),h.moveTo(0-r.left,0-r.top/2),h.lineTo(g,0-r.top/2),h.stroke()),r.right>0&&(h.strokeStyle=i.right,h.lineWidth=r.right,h.beginPath(),h.moveTo(g+r.right/2,0-r.top),h.lineTo(g+r.right/2,y),h.stroke()),r.bottom>0&&(h.strokeStyle=i.bottom,h.lineWidth=r.bottom,h.beginPath(),h.moveTo(g+r.right,y+r.bottom/2),h.lineTo(0,y+r.bottom/2),h.stroke()),r.left>0&&(h.strokeStyle=i.left,h.lineWidth=r.left,h.beginPath(),h.moveTo(0-r.left/2,y+r.bottom),h.lineTo(0-r.left/2,0),h.stroke())):(h.lineWidth=r,h.strokeStyle=a.grid.borderColor,h.strokeRect(-r/2,-r/2,g+r,y+r))),h.restore()}function G(){e.each(k(),function(e,t){if(!t.show||t.ticks.length==0)return;var n=t.box,r=t.direction+"Axis "+t.direction+t.n+"Axis",i="flot-"+t.direction+"-axis flot-"+t.direction+t.n+"-axis "+r,s=t.options.font||"flot-tick-label tickLabel",o,u,a,l,c;f.removeText(i);for(var h=0;h<t.ticks.length;++h){o=t.ticks[h];if(!o.label||o.v<t.min||o.v>t.max)continue;t.direction=="x"?(l="center",u=m.left+t.p2c(o.v),t.position=="bottom"?a=n.top+n.padding:(a=n.top+n.height-n.padding,c="bottom")):(c="middle",a=m.top+t.p2c(o.v),t.position=="left"?(u=n.left+n.width-n.padding,l="right"):u=n.left+n.padding),f.addText(i,u,a,o.label,s,null,null,l,c)}})}function Y(e){e.lines.show&&Z(e),e.bars.show&&nt(e),e.points.show&&et(e)}function Z(e){function t(e,t,n,r,i){var s=e.points,o=e.pointsize,u=null,a=null;h.beginPath();for(var f=o;f<s.length;f+=o){var l=s[f-o],c=s[f-o+1],p=s[f],d=s[f+1];if(l==null||p==null)continue;if(c<=d&&c<i.min){if(d<i.min)continue;l=(i.min-c)/(d-c)*(p-l)+l,c=i.min}else if(d<=c&&d<i.min){if(c<i.min)continue;p=(i.min-c)/(d-c)*(p-l)+l,d=i.min}if(c>=d&&c>i.max){if(d>i.max)continue;l=(i.max-c)/(d-c)*(p-l)+l,c=i.max}else if(d>=c&&d>i.max){if(c>i.max)continue;p=(i.max-c)/(d-c)*(p-l)+l,d=i.max}if(l<=p&&l<r.min){if(p<r.min)continue;c=(r.min-l)/(p-l)*(d-c)+c,l=r.min}else if(p<=l&&p<r.min){if(l<r.min)continue;d=(r.min-l)/(p-l)*(d-c)+c,p=r.min}if(l>=p&&l>r.max){if(p>r.max)continue;c=(r.max-l)/(p-l)*(d-c)+c,l=r.max}else if(p>=l&&p>r.max){if(l>r.max)continue;d=(r.max-l)/(p-l)*(d-c)+c,p=r.max}(l!=u||c!=a)&&h.moveTo(r.p2c(l)+t,i.p2c(c)+n),u=p,a=d,h.lineTo(r.p2c(p)+t,i.p2c(d)+n)}h.stroke()}function n(e,t,n){var r=e.points,i=e.pointsize,s=Math.min(Math.max(0,n.min),n.max),o=0,u,a=!1,f=1,l=0,c=0;for(;;){if(i>0&&o>r.length+i)break;o+=i;var p=r[o-i],d=r[o-i+f],v=r[o],m=r[o+f];if(a){if(i>0&&p!=null&&v==null){c=o,i=-i,f=2;continue}if(i<0&&o==l+i){h.fill(),a=!1,i=-i,f=1,o=l=c+i;continue}}if(p==null||v==null)continue;if(p<=v&&p<t.min){if(v<t.min)continue;d=(t.min-p)/(v-p)*(m-d)+d,p=t.min}else if(v<=p&&v<t.min){if(p<t.min)continue;m=(t.min-p)/(v-p)*(m-d)+d,v=t.min}if(p>=v&&p>t.max){if(v>t.max)continue;d=(t.max-p)/(v-p)*(m-d)+d,p=t.max}else if(v>=p&&v>t.max){if(p>t.max)continue;m=(t.max-p)/(v-p)*(m-d)+d,v=t.max}a||(h.beginPath(),h.moveTo(t.p2c(p),n.p2c(s)),a=!0);if(d>=n.max&&m>=n.max){h.lineTo(t.p2c(p),n.p2c(n.max)),h.lineTo(t.p2c(v),n.p2c(n.max));continue}if(d<=n.min&&m<=n.min){h.lineTo(t.p2c(p),n.p2c(n.min)),h.lineTo(t.p2c(v),n.p2c(n.min));continue}var g=p,y=v;d<=m&&d<n.min&&m>=n.min?(p=(n.min-d)/(m-d)*(v-p)+p,d=n.min):m<=d&&m<n.min&&d>=n.min&&(v=(n.min-d)/(m-d)*(v-p)+p,m=n.min),d>=m&&d>n.max&&m<=n.max?(p=(n.max-d)/(m-d)*(v-p)+p,d=n.max):m>=d&&m>n.max&&d<=n.max&&(v=(n.max-d)/(m-d)*(v-p)+p,m=n.max),p!=g&&h.lineTo(t.p2c(g),n.p2c(d)),h.lineTo(t.p2c(p),n.p2c(d)),h.lineTo(t.p2c(v),n.p2c(m)),v!=y&&(h.lineTo(t.p2c(v),n.p2c(m)),h.lineTo(t.p2c(y),n.p2c(m)))}}h.save(),h.translate(m.left,m.top),h.lineJoin="round";var r=e.lines.lineWidth,i=e.shadowSize;if(r>0&&i>0){h.lineWidth=i,h.strokeStyle="rgba(0,0,0,0.1)";var s=Math.PI/18;t(e.datapoints,Math.sin(s)*(r/2+i/2),Math.cos(s)*(r/2+i/2),e.xaxis,e.yaxis),h.lineWidth=i/2,t(e.datapoints,Math.sin(s)*(r/2+i/4),Math.cos(s)*(r/2+i/4),e.xaxis,e.yaxis)}h.lineWidth=r,h.strokeStyle=e.color;var o=rt(e.lines,e.color,0,y);o&&(h.fillStyle=o,n(e.datapoints,e.xaxis,e.yaxis)),r>0&&t(e.datapoints,0,0,e.xaxis,e.yaxis),h.restore()}function et(e){function t(e,t,n,r,i,s,o,u){var a=e.points,f=e.pointsize;for(var l=0;l<a.length;l+=f){var c=a[l],p=a[l+1];if(c==null||c<s.min||c>s.max||p<o.min||p>o.max)continue;h.beginPath(),c=s.p2c(c),p=o.p2c(p)+r,u=="circle"?h.arc(c,p,t,0,i?Math.PI:Math.PI*2,!1):u(h,c,p,t,i),h.closePath(),n&&(h.fillStyle=n,h.fill()),h.stroke()}}h.save(),h.translate(m.left,m.top);var n=e.points.lineWidth,r=e.shadowSize,i=e.points.radius,s=e.points.symbol;n==0&&(n=1e-4);if(n>0&&r>0){var o=r/2;h.lineWidth=o,h.strokeStyle="rgba(0,0,0,0.1)",t(e.datapoints,i,null,o+o/2,!0,e.xaxis,e.yaxis,s),h.strokeStyle="rgba(0,0,0,0.2)",t(e.datapoints,i,null,o/2,!0,e.xaxis,e.yaxis,s)}h.lineWidth=n,h.strokeStyle=e.color,t(e.datapoints,i,rt(e.points,e.color),0,!1,e.xaxis,e.yaxis,s),h.restore()}function tt(e,t,n,r,i,s,o,u,a,f,l,c){var h,p,d,v,m,g,y,b,w;l?(b=g=y=!0,m=!1,h=n,p=e,v=t+r,d=t+i,p<h&&(w=p,p=h,h=w,m=!0,g=!1)):(m=g=y=!0,b=!1,h=e+r,p=e+i,d=n,v=t,v<d&&(w=v,v=d,d=w,b=!0,y=!1));if(p<u.min||h>u.max||v<a.min||d>a.max)return;h<u.min&&(h=u.min,m=!1),p>u.max&&(p=u.max,g=!1),d<a.min&&(d=a.min,b=!1),v>a.max&&(v=a.max,y=!1),h=u.p2c(h),d=a.p2c(d),p=u.p2c(p),v=a.p2c(v),o&&(f.beginPath(),f.moveTo(h,d),f.lineTo(h,v),f.lineTo(p,v),f.lineTo(p,d),f.fillStyle=o(d,v),f.fill()),c>0&&(m||g||y||b)&&(f.beginPath(),f.moveTo(h,d+s),m?f.lineTo(h,v+s):f.moveTo(h,v+s),y?f.lineTo(p,v+s):f.moveTo(p,v+s),g?f.lineTo(p,d+s):f.moveTo(p,d+s),b?f.lineTo(h,d+s):f.moveTo(h,d+s),f.stroke())}function nt(e){function t(t,n,r,i,s,o,u){var a=t.points,f=t.pointsize;for(var l=0;l<a.length;l+=f){if(a[l]==null)continue;tt(a[l],a[l+1],a[l+2],n,r,i,s,o,u,h,e.bars.horizontal,e.bars.lineWidth)}}h.save(),h.translate(m.left,m.top),h.lineWidth=e.bars.lineWidth,h.strokeStyle=e.color;var n;switch(e.bars.align){case"left":n=0;break;case"right":n=-e.bars.barWidth;break;case"center":n=-e.bars.barWidth/2;break;default:throw new Error("Invalid bar alignment: "+e.bars.align)}var r=e.bars.fill?function(t,n){return rt(e.bars,e.color,t,n)}:null;t(e.datapoints,n,n+e.bars.barWidth,0,r,e.xaxis,e.yaxis),h.restore()}function rt(t,n,r,i){var s=t.fill;if(!s)return null;if(t.fillColor)return bt(t.fillColor,r,i,n);var o=e.color.parse(n);return o.a=typeof s=="number"?s:.4,o.normalize(),o.toString()}function it(){t.find(".legend").remove();if(!a.legend.show)return;var n=[],r=[],i=!1,s=a.legend.labelFormatter,o,f;for(var l=0;l<u.length;++l)o=u[l],o.label&&(f=s?s(o.label,o):o.label,f&&r.push({label:f,color:o.color}));if(a.legend.sorted)if(e.isFunction(a.legend.sorted))r.sort(a.legend.sorted);else if(a.legend.sorted=="reverse")r.reverse();else{var c=a.legend.sorted!="descending";r.sort(function(e,t){return e.label==t.label?0:e.label<t.label!=c?1:-1})}for(var l=0;l<r.length;++l){var h=r[l];l%a.legend.noColumns==0&&(i&&n.push("</tr>"),n.push("<tr>"),i=!0),n.push('<td class="legendColorBox"><div style="border:1px solid '+a.legend.labelBoxBorderColor+';padding:1px"><div style="width:4px;height:0;border:5px solid '+h.color+';overflow:hidden"></div></div></td>'+'<td class="legendLabel">'+h.label+"</td>")}i&&n.push("</tr>");if(n.length==0)return;var p='<table style="font-size:smaller;color:'+a.grid.color+'">'+n.join("")+"</table>";if(a.legend.container!=null)e(a.legend.container).html(p);else{var d="",v=a.legend.position,g=a.legend.margin;g[0]==null&&(g=[g,g]),v.charAt(0)=="n"?d+="top:"+(g[1]+m.top)+"px;":v.charAt(0)=="s"&&(d+="bottom:"+(g[1]+m.bottom)+"px;"),v.charAt(1)=="e"?d+="right:"+(g[0]+m.right)+"px;":v.charAt(1)=="w"&&(d+="left:"+(g[0]+m.left)+"px;");var y=e('<div class="legend">'+p.replace('style="','style="position:absolute;'+d+";")+"</div>").appendTo(t);if(a.legend.backgroundOpacity!=0){var b=a.legend.backgroundColor;b==null&&(b=a.grid.backgroundColor,b&&typeof b=="string"?b=e.color.parse(b):b=e.color.extract(y,"background-color"),b.a=1,b=b.toString());var w=y.children();e('<div style="position:absolute;width:'+w.width()+"px;height:"+w.height()+"px;"+d+"background-color:"+b+';"> </div>').prependTo(y).css("opacity",a.legend.backgroundOpacity)}}}function ut(e,t,n){var r=a.grid.mouseActiveRadius,i=r*r+1,s=null,o=!1,f,l,c;for(f=u.length-1;f>=0;--f){if(!n(u[f]))continue;var h=u[f],p=h.xaxis,d=h.yaxis,v=h.datapoints.points,m=p.c2p(e),g=d.c2p(t),y=r/p.scale,b=r/d.scale;c=h.datapoints.pointsize,p.options.inverseTransform&&(y=Number.MAX_VALUE),d.options.inverseTransform&&(b=Number.MAX_VALUE);if(h.lines.show||h.points.show)for(l=0;l<v.length;l+=c){var w=v[l],E=v[l+1];if(w==null)continue;if(w-m>y||w-m<-y||E-g>b||E-g<-b)continue;var S=Math.abs(p.p2c(w)-e),x=Math.abs(d.p2c(E)-t),T=S*S+x*x;T<i&&(i=T,s=[f,l/c])}if(h.bars.show&&!s){var N=h.bars.align=="left"?0:-h.bars.barWidth/2,C=N+h.bars.barWidth;for(l=0;l<v.length;l+=c){var w=v[l],E=v[l+1],k=v[l+2];if(w==null)continue;if(u[f].bars.horizontal?m<=Math.max(k,w)&&m>=Math.min(k,w)&&g>=E+N&&g<=E+C:m>=w+N&&m<=w+C&&g>=Math.min(k,E)&&g<=Math.max(k,E))s=[f,l/c]}}}return s?(f=s[0],l=s[1],c=u[f].datapoints.pointsize,{datapoint:u[f].datapoints.points.slice(l*c,(l+1)*c),dataIndex:l,series:u[f],seriesIndex:f}):null}function at(e){a.grid.hoverable&&ct("plothover",e,function(e){return e["hoverable"]!=0})}function ft(e){a.grid.hoverable&&ct("plothover",e,function(e){return!1})}function lt(e){ct("plotclick",e,function(e){return e["clickable"]!=0})}function ct(e,n,r){var i=c.offset(),s=n.pageX-i.left-m.left,o=n.pageY-i.top-m.top,u=L({left:s,top:o});u.pageX=n.pageX,u.pageY=n.pageY;var f=ut(s,o,r);f&&(f.pageX=parseInt(f.series.xaxis.p2c(f.datapoint[0])+i.left+m.left,10),f.pageY=parseInt(f.series.yaxis.p2c(f.datapoint[1])+i.top+m.top,10));if(a.grid.autoHighlight){for(var l=0;l<st.length;++l){var h=st[l];h.auto==e&&(!f||h.series!=f.series||h.point[0]!=f.datapoint[0]||h.point[1]!=f.datapoint[1])&&vt(h.series,h.point)}f&&dt(f.series,f.datapoint,e)}t.trigger(e,[u,f])}function ht(){var e=a.interaction.redrawOverlayInterval;if(e==-1){pt();return}ot||(ot=setTimeout(pt,e))}function pt(){ot=null,p.save(),l.clear(),p.translate(m.left,m.top);var e,t;for(e=0;e<st.length;++e)t=st[e],t.series.bars.show?yt(t.series,t.point):gt(t.series,t.point);p.restore(),E(b.drawOverlay,[p])}function dt(e,t,n){typeof e=="number"&&(e=u[e]);if(typeof t=="number"){var r=e.datapoints.pointsize;t=e.datapoints.points.slice(r*t,r*(t+1))}var i=mt(e,t);i==-1?(st.push({series:e,point:t,auto:n}),ht()):n||(st[i].auto=!1)}function vt(e,t){if(e==null&&t==null){st=[],ht();return}typeof e=="number"&&(e=u[e]);if(typeof t=="number"){var n=e.datapoints.pointsize;t=e.datapoints.points.slice(n*t,n*(t+1))}var r=mt(e,t);r!=-1&&(st.splice(r,1),ht())}function mt(e,t){for(var n=0;n<st.length;++n){var r=st[n];if(r.series==e&&r.point[0]==t[0]&&r.point[1]==t[1])return n}return-1}function gt(t,n){var r=n[0],i=n[1],s=t.xaxis,o=t.yaxis,u=typeof t.highlightColor=="string"?t.highlightColor:e.color.parse(t.color).scale("a",.5).toString();if(r<s.min||r>s.max||i<o.min||i>o.max)return;var a=t.points.radius+t.points.lineWidth/2;p.lineWidth=a,p.strokeStyle=u;var f=1.5*a;r=s.p2c(r),i=o.p2c(i),p.beginPath(),t.points.symbol=="circle"?p.arc(r,i,f,0,2*Math.PI,!1):t.points.symbol(p,r,i,f,!1),p.closePath(),p.stroke()}function yt(t,n){var r=typeof t.highlightColor=="string"?t.highlightColor:e.color.parse(t.color).scale("a",.5).toString(),i=r,s=t.bars.align=="left"?0:-t.bars.barWidth/2;p.lineWidth=t.bars.lineWidth,p.strokeStyle=r,tt(n[0],n[1],n[2]||0,s,s+t.bars.barWidth,0,function(){return i},t.xaxis,t.yaxis,p,t.bars.horizontal,t.bars.lineWidth)}function bt(t,n,r,i){if(typeof t=="string")return t;var s=h.createLinearGradient(0,r,0,n);for(var o=0,u=t.colors.length;o<u;++o){var a=t.colors[o];if(typeof a!="string"){var f=e.color.parse(i);a.brightness!=null&&(f=f.scale("rgb",a.brightness)),a.opacity!=null&&(f.a*=a.opacity),a=f.toString()}s.addColorStop(o/(u-1),a)}return s}var u=[],a={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],legend:{show:!0,noColumns:1,labelFormatter:null,labelBoxBorderColor:"#ccc",container:null,position:"ne",margin:5,backgroundColor:null,backgroundOpacity:.85,sorted:null},xaxis:{show:null,position:"bottom",mode:null,font:null,color:null,tickColor:null,transform:null,inverseTransform:null,min:null,max:null,autoscaleMargin:null,ticks:null,tickFormatter:null,labelWidth:null,labelHeight:null,reserveSpace:null,tickLength:null,alignTicksWithAxis:null,tickDecimals:null,tickSize:null,minTickSize:null},yaxis:{autoscaleMargin:.02,position:"left"},xaxes:[],yaxes:[],series:{points:{show:!1,radius:3,lineWidth:2,fill:!0,fillColor:"#ffffff",symbol:"circle"},lines:{lineWidth:2,fill:!1,fillColor:null,steps:!1},bars:{show:!1,lineWidth:2,barWidth:1,fill:!0,fillColor:null,align:"left",horizontal:!1,zero:!0},shadowSize:3,highlightColor:null},grid:{show:!0,aboveData:!1,color:"#545454",backgroundColor:null,borderColor:null,tickColor:null,margin:0,labelMargin:5,axisMargin:8,borderWidth:2,minBorderMargin:null,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:!1,hoverable:!1,autoHighlight:!0,mouseActiveRadius:10},interaction:{redrawOverlayInterval:1e3/60},hooks:{}},f=null,l=null,c=null,h=null,p=null,d=[],v=[],m={left:0,right:0,top:0,bottom
-:0},g=0,y=0,b={processOptions:[],processRawData:[],processDatapoints:[],processOffset:[],drawBackground:[],drawSeries:[],draw:[],bindEvents:[],drawOverlay:[],shutdown:[]},w=this;w.setData=T,w.setupGrid=R,w.draw=V,w.getPlaceholder=function(){return t},w.getCanvas=function(){return f.element},w.getPlotOffset=function(){return m},w.width=function(){return g},w.height=function(){return y},w.offset=function(){var e=c.offset();return e.left+=m.left,e.top+=m.top,e},w.getData=function(){return u},w.getAxes=function(){var t={},n;return e.each(d.concat(v),function(e,n){n&&(t[n.direction+(n.n!=1?n.n:"")+"axis"]=n)}),t},w.getXAxes=function(){return d},w.getYAxes=function(){return v},w.c2p=L,w.p2c=A,w.getOptions=function(){return a},w.highlight=dt,w.unhighlight=vt,w.triggerRedrawOverlay=ht,w.pointOffset=function(e){return{left:parseInt(d[C(e,"x")-1].p2c(+e.x)+m.left,10),top:parseInt(v[C(e,"y")-1].p2c(+e.y)+m.top,10)}},w.shutdown=H,w.resize=function(){var e=t.width(),n=t.height();f.resize(e,n),l.resize(e,n)},w.hooks=b,S(w),x(s),D(),T(r),R(),V(),P();var st=[],ot=null}function i(e,t){return t*Math.floor(e/t)}var t=Object.prototype.hasOwnProperty;n.prototype.resize=function(e,t){if(e<=0||t<=0)throw new Error("Invalid dimensions for plot, width = "+e+", height = "+t);var n=this.element,r=this.context,i=this.pixelRatio;this.width!=e&&(n.width=e*i,n.style.width=e+"px",this.width=e),this.height!=t&&(n.height=t*i,n.style.height=t+"px",this.height=t),r.restore(),r.save(),r.scale(i,i)},n.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},n.prototype.render=function(){var e=this._textCache;for(var n in e)if(t.call(e,n)){var r=this.getTextLayer(n),i=e[n];r.hide();for(var s in i)if(t.call(i,s)){var o=i[s];for(var u in o)if(t.call(o,u)){var a=o[u].positions;for(var f=0,l;l=a[f];f++)l.active?l.rendered||(r.append(l.element),l.rendered=!0):(a.splice(f--,1),l.rendered&&l.element.detach());a.length==0&&delete o[u]}}r.show()}},n.prototype.getTextLayer=function(t){var n=this.text[t];return n==null&&(this.textContainer==null&&(this.textContainer=e("<div class='flot-text'></div>").css({position:"absolute",top:0,left:0,bottom:0,right:0,"font-size":"smaller",color:"#545454"}).insertAfter(this.element)),n=this.text[t]=e("<div></div>").addClass(t).css({position:"absolute",top:0,left:0,bottom:0,right:0}).appendTo(this.textContainer)),n},n.prototype.getTextInfo=function(t,n,r,i,s){var o,u,a,f;n=""+n,typeof r=="object"?o=r.style+" "+r.variant+" "+r.weight+" "+r.size+"px/"+r.lineHeight+"px "+r.family:o=r,u=this._textCache[t],u==null&&(u=this._textCache[t]={}),a=u[o],a==null&&(a=u[o]={}),f=a[n];if(f==null){var l=e("<div></div>").html(n).css({position:"absolute","max-width":s,top:-9999}).appendTo(this.getTextLayer(t));typeof r=="object"?l.css({font:o,color:r.color}):typeof r=="string"&&l.addClass(r),f=a[n]={width:l.outerWidth(!0),height:l.outerHeight(!0),element:l,positions:[]},l.detach()}return f},n.prototype.addText=function(e,t,n,r,i,s,o,u,a){var f=this.getTextInfo(e,r,i,s,o),l=f.positions;u=="center"?t-=f.width/2:u=="right"&&(t-=f.width),a=="middle"?n-=f.height/2:a=="bottom"&&(n-=f.height);for(var c=0,h;h=l[c];c++)if(h.x==t&&h.y==n){h.active=!0;return}h={active:!0,rendered:!1,element:l.length?f.element.clone():f.element,x:t,y:n},l.push(h),h.element.css({top:Math.round(n),left:Math.round(t),"text-align":u})},n.prototype.removeText=function(e,n,r,i,s,o){if(i==null){var u=this._textCache[e];if(u!=null)for(var a in u)if(t.call(u,a)){var f=u[a];for(var l in f)if(t.call(f,l)){var c=f[l].positions;for(var h=0,p;p=c[h];h++)p.active=!1}}}else{var c=this.getTextInfo(e,i,s,o).positions;for(var h=0,p;p=c[h];h++)p.x==n&&p.y==r&&(p.active=!1)}},e.plot=function(t,n,i){var s=new r(e(t),n,i,e.plot.plugins);return s},e.plot.version="0.8.1",e.plot.plugins=[],e.fn.plot=function(t,n){return this.each(function(){e.plot(this,t,n)})}}(jQuery); \ No newline at end of file
+ */
+(function(b){b.color={};b.color.make=function(d,e,g,f){var c={};c.r=d||0;c.g=e||0;c.b=g||0;c.a=f!=null?f:1;c.add=function(h,j){for(var k=0;k<h.length;++k){c[h.charAt(k)]+=j}return c.normalize()};c.scale=function(h,j){for(var k=0;k<h.length;++k){c[h.charAt(k)]*=j}return c.normalize()};c.toString=function(){if(c.a>=1){return"rgb("+[c.r,c.g,c.b].join(",")+")"}else{return"rgba("+[c.r,c.g,c.b,c.a].join(",")+")"}};c.normalize=function(){function h(k,j,l){return j<k?k:(j>l?l:j)}c.r=h(0,parseInt(c.r),255);c.g=h(0,parseInt(c.g),255);c.b=h(0,parseInt(c.b),255);c.a=h(0,c.a,1);return c};c.clone=function(){return b.color.make(c.r,c.b,c.g,c.a)};return c.normalize()};b.color.extract=function(d,e){var c;do{c=d.css(e).toLowerCase();if(c!=""&&c!="transparent"){break}d=d.parent()}while(!b.nodeName(d.get(0),"body"));if(c=="rgba(0, 0, 0, 0)"){c="transparent"}return b.color.parse(c)};b.color.parse=function(c){var d,f=b.color.make;if(d=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c)){return f(parseInt(d[1],10),parseInt(d[2],10),parseInt(d[3],10))}if(d=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(c)){return f(parseInt(d[1],10),parseInt(d[2],10),parseInt(d[3],10),parseFloat(d[4]))}if(d=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c)){return f(parseFloat(d[1])*2.55,parseFloat(d[2])*2.55,parseFloat(d[3])*2.55)}if(d=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(c)){return f(parseFloat(d[1])*2.55,parseFloat(d[2])*2.55,parseFloat(d[3])*2.55,parseFloat(d[4]))}if(d=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c)){return f(parseInt(d[1],16),parseInt(d[2],16),parseInt(d[3],16))}if(d=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c)){return f(parseInt(d[1]+d[1],16),parseInt(d[2]+d[2],16),parseInt(d[3]+d[3],16))}var e=b.trim(c).toLowerCase();if(e=="transparent"){return f(255,255,255,0)}else{d=a[e]||[0,0,0];return f(d[0],d[1],d[2])}};var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);(function(c){function b(av,ai,J,af){var Q=[],O={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],legend:{show:true,noColumns:1,labelFormatter:null,labelBoxBorderColor:"#ccc",container:null,position:"ne",margin:5,backgroundColor:null,backgroundOpacity:0.85},xaxis:{show:null,position:"bottom",mode:null,color:null,tickColor:null,transform:null,inverseTransform:null,min:null,max:null,autoscaleMargin:null,ticks:null,tickFormatter:null,labelWidth:null,labelHeight:null,reserveSpace:null,tickLength:null,alignTicksWithAxis:null,tickDecimals:null,tickSize:null,minTickSize:null,monthNames:null,timeformat:null,twelveHourClock:false},yaxis:{autoscaleMargin:0.02,position:"left"},xaxes:[],yaxes:[],series:{points:{show:false,radius:3,lineWidth:2,fill:true,fillColor:"#ffffff",symbol:"circle"},lines:{lineWidth:2,fill:false,fillColor:null,steps:false},bars:{show:false,lineWidth:2,barWidth:1,fill:true,fillColor:null,align:"left",horizontal:false},shadowSize:3},grid:{show:true,aboveData:false,color:"#545454",backgroundColor:null,borderColor:null,tickColor:null,labelMargin:5,axisMargin:8,borderWidth:2,minBorderMargin:null,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:false,hoverable:false,autoHighlight:true,mouseActiveRadius:10},hooks:{}},az=null,ad=null,y=null,H=null,A=null,p=[],aw=[],q={left:0,right:0,top:0,bottom:0},G=0,I=0,h=0,w=0,ak={processOptions:[],processRawData:[],processDatapoints:[],drawSeries:[],draw:[],bindEvents:[],drawOverlay:[],shutdown:[]},aq=this;aq.setData=aj;aq.setupGrid=t;aq.draw=W;aq.getPlaceholder=function(){return av};aq.getCanvas=function(){return az};aq.getPlotOffset=function(){return q};aq.width=function(){return h};aq.height=function(){return w};aq.offset=function(){var aB=y.offset();aB.left+=q.left;aB.top+=q.top;return aB};aq.getData=function(){return Q};aq.getAxes=function(){var aC={},aB;c.each(p.concat(aw),function(aD,aE){if(aE){aC[aE.direction+(aE.n!=1?aE.n:"")+"axis"]=aE}});return aC};aq.getXAxes=function(){return p};aq.getYAxes=function(){return aw};aq.c2p=C;aq.p2c=ar;aq.getOptions=function(){return O};aq.highlight=x;aq.unhighlight=T;aq.triggerRedrawOverlay=f;aq.pointOffset=function(aB){return{left:parseInt(p[aA(aB,"x")-1].p2c(+aB.x)+q.left),top:parseInt(aw[aA(aB,"y")-1].p2c(+aB.y)+q.top)}};aq.shutdown=ag;aq.resize=function(){B();g(az);g(ad)};aq.hooks=ak;F(aq);Z(J);X();aj(ai);t();W();ah();function an(aD,aB){aB=[aq].concat(aB);for(var aC=0;aC<aD.length;++aC){aD[aC].apply(this,aB)}}function F(){for(var aB=0;aB<af.length;++aB){var aC=af[aB];aC.init(aq);if(aC.options){c.extend(true,O,aC.options)}}}function Z(aC){var aB;c.extend(true,O,aC);if(O.xaxis.color==null){O.xaxis.color=O.grid.color}if(O.yaxis.color==null){O.yaxis.color=O.grid.color}if(O.xaxis.tickColor==null){O.xaxis.tickColor=O.grid.tickColor}if(O.yaxis.tickColor==null){O.yaxis.tickColor=O.grid.tickColor}if(O.grid.borderColor==null){O.grid.borderColor=O.grid.color}if(O.grid.tickColor==null){O.grid.tickColor=c.color.parse(O.grid.color).scale("a",0.22).toString()}for(aB=0;aB<Math.max(1,O.xaxes.length);++aB){O.xaxes[aB]=c.extend(true,{},O.xaxis,O.xaxes[aB])}for(aB=0;aB<Math.max(1,O.yaxes.length);++aB){O.yaxes[aB]=c.extend(true,{},O.yaxis,O.yaxes[aB])}if(O.xaxis.noTicks&&O.xaxis.ticks==null){O.xaxis.ticks=O.xaxis.noTicks}if(O.yaxis.noTicks&&O.yaxis.ticks==null){O.yaxis.ticks=O.yaxis.noTicks}if(O.x2axis){O.xaxes[1]=c.extend(true,{},O.xaxis,O.x2axis);O.xaxes[1].position="top"}if(O.y2axis){O.yaxes[1]=c.extend(true,{},O.yaxis,O.y2axis);O.yaxes[1].position="right"}if(O.grid.coloredAreas){O.grid.markings=O.grid.coloredAreas}if(O.grid.coloredAreasColor){O.grid.markingsColor=O.grid.coloredAreasColor}if(O.lines){c.extend(true,O.series.lines,O.lines)}if(O.points){c.extend(true,O.series.points,O.points)}if(O.bars){c.extend(true,O.series.bars,O.bars)}if(O.shadowSize!=null){O.series.shadowSize=O.shadowSize}for(aB=0;aB<O.xaxes.length;++aB){V(p,aB+1).options=O.xaxes[aB]}for(aB=0;aB<O.yaxes.length;++aB){V(aw,aB+1).options=O.yaxes[aB]}for(var aD in ak){if(O.hooks[aD]&&O.hooks[aD].length){ak[aD]=ak[aD].concat(O.hooks[aD])}}an(ak.processOptions,[O])}function aj(aB){Q=Y(aB);ax();z()}function Y(aE){var aC=[];for(var aB=0;aB<aE.length;++aB){var aD=c.extend(true,{},O.series);if(aE[aB].data!=null){aD.data=aE[aB].data;delete aE[aB].data;c.extend(true,aD,aE[aB]);aE[aB].data=aD.data}else{aD.data=aE[aB]}aC.push(aD)}return aC}function aA(aC,aD){var aB=aC[aD+"axis"];if(typeof aB=="object"){aB=aB.n}if(typeof aB!="number"){aB=1}return aB}function m(){return c.grep(p.concat(aw),function(aB){return aB})}function C(aE){var aC={},aB,aD;for(aB=0;aB<p.length;++aB){aD=p[aB];if(aD&&aD.used){aC["x"+aD.n]=aD.c2p(aE.left)}}for(aB=0;aB<aw.length;++aB){aD=aw[aB];if(aD&&aD.used){aC["y"+aD.n]=aD.c2p(aE.top)}}if(aC.x1!==undefined){aC.x=aC.x1}if(aC.y1!==undefined){aC.y=aC.y1}return aC}function ar(aF){var aD={},aC,aE,aB;for(aC=0;aC<p.length;++aC){aE=p[aC];if(aE&&aE.used){aB="x"+aE.n;if(aF[aB]==null&&aE.n==1){aB="x"}if(aF[aB]!=null){aD.left=aE.p2c(aF[aB]);break}}}for(aC=0;aC<aw.length;++aC){aE=aw[aC];if(aE&&aE.used){aB="y"+aE.n;if(aF[aB]==null&&aE.n==1){aB="y"}if(aF[aB]!=null){aD.top=aE.p2c(aF[aB]);break}}}return aD}function V(aC,aB){if(!aC[aB-1]){aC[aB-1]={n:aB,direction:aC==p?"x":"y",options:c.extend(true,{},aC==p?O.xaxis:O.yaxis)}}return aC[aB-1]}function ax(){var aG;var aM=Q.length,aB=[],aE=[];for(aG=0;aG<Q.length;++aG){var aJ=Q[aG].color;if(aJ!=null){--aM;if(typeof aJ=="number"){aE.push(aJ)}else{aB.push(c.color.parse(Q[aG].color))}}}for(aG=0;aG<aE.length;++aG){aM=Math.max(aM,aE[aG]+1)}var aC=[],aF=0;aG=0;while(aC.length<aM){var aI;if(O.colors.length==aG){aI=c.color.make(100,100,100)}else{aI=c.color.parse(O.colors[aG])}var aD=aF%2==1?-1:1;aI.scale("rgb",1+aD*Math.ceil(aF/2)*0.2);aC.push(aI);++aG;if(aG>=O.colors.length){aG=0;++aF}}var aH=0,aN;for(aG=0;aG<Q.length;++aG){aN=Q[aG];if(aN.color==null){aN.color=aC[aH].toString();++aH}else{if(typeof aN.color=="number"){aN.color=aC[aN.color].toString()}}if(aN.lines.show==null){var aL,aK=true;for(aL in aN){if(aN[aL]&&aN[aL].show){aK=false;break}}if(aK){aN.lines.show=true}}aN.xaxis=V(p,aA(aN,"x"));aN.yaxis=V(aw,aA(aN,"y"))}}function z(){var aO=Number.POSITIVE_INFINITY,aI=Number.NEGATIVE_INFINITY,aB=Number.MAX_VALUE,aU,aS,aR,aN,aD,aJ,aT,aP,aH,aG,aC,a0,aX,aL;function aF(a3,a2,a1){if(a2<a3.datamin&&a2!=-aB){a3.datamin=a2}if(a1>a3.datamax&&a1!=aB){a3.datamax=a1}}c.each(m(),function(a1,a2){a2.datamin=aO;a2.datamax=aI;a2.used=false});for(aU=0;aU<Q.length;++aU){aJ=Q[aU];aJ.datapoints={points:[]};an(ak.processRawData,[aJ,aJ.data,aJ.datapoints])}for(aU=0;aU<Q.length;++aU){aJ=Q[aU];var aZ=aJ.data,aW=aJ.datapoints.format;if(!aW){aW=[];aW.push({x:true,number:true,required:true});aW.push({y:true,number:true,required:true});if(aJ.bars.show||(aJ.lines.show&&aJ.lines.fill)){aW.push({y:true,number:true,required:false,defaultValue:0});if(aJ.bars.horizontal){delete aW[aW.length-1].y;aW[aW.length-1].x=true}}aJ.datapoints.format=aW}if(aJ.datapoints.pointsize!=null){continue}aJ.datapoints.pointsize=aW.length;aP=aJ.datapoints.pointsize;aT=aJ.datapoints.points;insertSteps=aJ.lines.show&&aJ.lines.steps;aJ.xaxis.used=aJ.yaxis.used=true;for(aS=aR=0;aS<aZ.length;++aS,aR+=aP){aL=aZ[aS];var aE=aL==null;if(!aE){for(aN=0;aN<aP;++aN){a0=aL[aN];aX=aW[aN];if(aX){if(aX.number&&a0!=null){a0=+a0;if(isNaN(a0)){a0=null}else{if(a0==Infinity){a0=aB}else{if(a0==-Infinity){a0=-aB}}}}if(a0==null){if(aX.required){aE=true}if(aX.defaultValue!=null){a0=aX.defaultValue}}}aT[aR+aN]=a0}}if(aE){for(aN=0;aN<aP;++aN){a0=aT[aR+aN];if(a0!=null){aX=aW[aN];if(aX.x){aF(aJ.xaxis,a0,a0)}if(aX.y){aF(aJ.yaxis,a0,a0)}}aT[aR+aN]=null}}else{if(insertSteps&&aR>0&&aT[aR-aP]!=null&&aT[aR-aP]!=aT[aR]&&aT[aR-aP+1]!=aT[aR+1]){for(aN=0;aN<aP;++aN){aT[aR+aP+aN]=aT[aR+aN]}aT[aR+1]=aT[aR-aP+1];aR+=aP}}}}for(aU=0;aU<Q.length;++aU){aJ=Q[aU];an(ak.processDatapoints,[aJ,aJ.datapoints])}for(aU=0;aU<Q.length;++aU){aJ=Q[aU];aT=aJ.datapoints.points,aP=aJ.datapoints.pointsize;var aK=aO,aQ=aO,aM=aI,aV=aI;for(aS=0;aS<aT.length;aS+=aP){if(aT[aS]==null){continue}for(aN=0;aN<aP;++aN){a0=aT[aS+aN];aX=aW[aN];if(!aX||a0==aB||a0==-aB){continue}if(aX.x){if(a0<aK){aK=a0}if(a0>aM){aM=a0}}if(aX.y){if(a0<aQ){aQ=a0}if(a0>aV){aV=a0}}}}if(aJ.bars.show){var aY=aJ.bars.align=="left"?0:-aJ.bars.barWidth/2;if(aJ.bars.horizontal){aQ+=aY;aV+=aY+aJ.bars.barWidth}else{aK+=aY;aM+=aY+aJ.bars.barWidth}}aF(aJ.xaxis,aK,aM);aF(aJ.yaxis,aQ,aV)}c.each(m(),function(a1,a2){if(a2.datamin==aO){a2.datamin=null}if(a2.datamax==aI){a2.datamax=null}})}function j(aB,aC){var aD=document.createElement("canvas");aD.className=aC;aD.width=G;aD.height=I;if(!aB){c(aD).css({position:"absolute",left:0,top:0})}c(aD).appendTo(av);if(!aD.getContext){aD=window.G_vmlCanvasManager.initElement(aD)}aD.getContext("2d").save();return aD}function B(){G=av.width();I=av.height();if(G<=0||I<=0){throw"Invalid dimensions for plot, width = "+G+", height = "+I}}function g(aC){if(aC.width!=G){aC.width=G}if(aC.height!=I){aC.height=I}var aB=aC.getContext("2d");aB.restore();aB.save()}function X(){var aC,aB=av.children("canvas.base"),aD=av.children("canvas.overlay");if(aB.length==0||aD==0){av.html("");av.css({padding:0});if(av.css("position")=="static"){av.css("position","relative")}B();az=j(true,"base");ad=j(false,"overlay");aC=false}else{az=aB.get(0);ad=aD.get(0);aC=true}H=az.getContext("2d");A=ad.getContext("2d");y=c([ad,az]);if(aC){av.data("plot").shutdown();aq.resize();A.clearRect(0,0,G,I);y.unbind();av.children().not([az,ad]).remove()}av.data("plot",aq)}function ah(){if(O.grid.hoverable){y.mousemove(aa);y.mouseleave(l)}if(O.grid.clickable){y.click(R)}an(ak.bindEvents,[y])}function ag(){if(M){clearTimeout(M)}y.unbind("mousemove",aa);y.unbind("mouseleave",l);y.unbind("click",R);an(ak.shutdown,[y])}function r(aG){function aC(aH){return aH}var aF,aB,aD=aG.options.transform||aC,aE=aG.options.inverseTransform;if(aG.direction=="x"){aF=aG.scale=h/Math.abs(aD(aG.max)-aD(aG.min));aB=Math.min(aD(aG.max),aD(aG.min))}else{aF=aG.scale=w/Math.abs(aD(aG.max)-aD(aG.min));aF=-aF;aB=Math.max(aD(aG.max),aD(aG.min))}if(aD==aC){aG.p2c=function(aH){return(aH-aB)*aF}}else{aG.p2c=function(aH){return(aD(aH)-aB)*aF}}if(!aE){aG.c2p=function(aH){return aB+aH/aF}}else{aG.c2p=function(aH){return aE(aB+aH/aF)}}}function L(aD){var aB=aD.options,aF,aJ=aD.ticks||[],aI=[],aE,aK=aB.labelWidth,aG=aB.labelHeight,aC;function aH(aM,aL){return c('<div style="position:absolute;top:-10000px;'+aL+'font-size:smaller"><div class="'+aD.direction+"Axis "+aD.direction+aD.n+'Axis">'+aM.join("")+"</div></div>").appendTo(av)}if(aD.direction=="x"){if(aK==null){aK=Math.floor(G/(aJ.length>0?aJ.length:1))}if(aG==null){aI=[];for(aF=0;aF<aJ.length;++aF){aE=aJ[aF].label;if(aE){aI.push('<div class="tickLabel" style="float:left;width:'+aK+'px">'+aE+"</div>")}}if(aI.length>0){aI.push('<div style="clear:left"></div>');aC=aH(aI,"width:10000px;");aG=aC.height();aC.remove()}}}else{if(aK==null||aG==null){for(aF=0;aF<aJ.length;++aF){aE=aJ[aF].label;if(aE){aI.push('<div class="tickLabel">'+aE+"</div>")}}if(aI.length>0){aC=aH(aI,"");if(aK==null){aK=aC.children().width()}if(aG==null){aG=aC.find("div.tickLabel").height()}aC.remove()}}}if(aK==null){aK=0}if(aG==null){aG=0}aD.labelWidth=aK;aD.labelHeight=aG}function au(aD){var aC=aD.labelWidth,aL=aD.labelHeight,aH=aD.options.position,aF=aD.options.tickLength,aG=O.grid.axisMargin,aJ=O.grid.labelMargin,aK=aD.direction=="x"?p:aw,aE;var aB=c.grep(aK,function(aN){return aN&&aN.options.position==aH&&aN.reserveSpace});if(c.inArray(aD,aB)==aB.length-1){aG=0}if(aF==null){aF="full"}var aI=c.grep(aK,function(aN){return aN&&aN.reserveSpace});var aM=c.inArray(aD,aI)==0;if(!aM&&aF=="full"){aF=5}if(!isNaN(+aF)){aJ+=+aF}if(aD.direction=="x"){aL+=aJ;if(aH=="bottom"){q.bottom+=aL+aG;aD.box={top:I-q.bottom,height:aL}}else{aD.box={top:q.top+aG,height:aL};q.top+=aL+aG}}else{aC+=aJ;if(aH=="left"){aD.box={left:q.left+aG,width:aC};q.left+=aC+aG}else{q.right+=aC+aG;aD.box={left:G-q.right,width:aC}}}aD.position=aH;aD.tickLength=aF;aD.box.padding=aJ;aD.innermost=aM}function U(aB){if(aB.direction=="x"){aB.box.left=q.left;aB.box.width=h}else{aB.box.top=q.top;aB.box.height=w}}function t(){var aC,aE=m();c.each(aE,function(aF,aG){aG.show=aG.options.show;if(aG.show==null){aG.show=aG.used}aG.reserveSpace=aG.show||aG.options.reserveSpace;n(aG)});allocatedAxes=c.grep(aE,function(aF){return aF.reserveSpace});q.left=q.right=q.top=q.bottom=0;if(O.grid.show){c.each(allocatedAxes,function(aF,aG){S(aG);P(aG);ap(aG,aG.ticks);L(aG)});for(aC=allocatedAxes.length-1;aC>=0;--aC){au(allocatedAxes[aC])}var aD=O.grid.minBorderMargin;if(aD==null){aD=0;for(aC=0;aC<Q.length;++aC){aD=Math.max(aD,Q[aC].points.radius+Q[aC].points.lineWidth/2)}}for(var aB in q){q[aB]+=O.grid.borderWidth;q[aB]=Math.max(aD,q[aB])}}h=G-q.left-q.right;w=I-q.bottom-q.top;c.each(aE,function(aF,aG){r(aG)});if(O.grid.show){c.each(allocatedAxes,function(aF,aG){U(aG)});k()}o()}function n(aE){var aF=aE.options,aD=+(aF.min!=null?aF.min:aE.datamin),aB=+(aF.max!=null?aF.max:aE.datamax),aH=aB-aD;if(aH==0){var aC=aB==0?1:0.01;if(aF.min==null){aD-=aC}if(aF.max==null||aF.min!=null){aB+=aC}}else{var aG=aF.autoscaleMargin;if(aG!=null){if(aF.min==null){aD-=aH*aG;if(aD<0&&aE.datamin!=null&&aE.datamin>=0){aD=0}}if(aF.max==null){aB+=aH*aG;if(aB>0&&aE.datamax!=null&&aE.datamax<=0){aB=0}}}}aE.min=aD;aE.max=aB}function S(aG){var aM=aG.options;var aH;if(typeof aM.ticks=="number"&&aM.ticks>0){aH=aM.ticks}else{aH=0.3*Math.sqrt(aG.direction=="x"?G:I)}var aT=(aG.max-aG.min)/aH,aO,aB,aN,aR,aS,aQ,aI;if(aM.mode=="time"){var aJ={second:1000,minute:60*1000,hour:60*60*1000,day:24*60*60*1000,month:30*24*60*60*1000,year:365.2425*24*60*60*1000};var aK=[[1,"second"],[2,"second"],[5,"second"],[10,"second"],[30,"second"],[1,"minute"],[2,"minute"],[5,"minute"],[10,"minute"],[30,"minute"],[1,"hour"],[2,"hour"],[4,"hour"],[8,"hour"],[12,"hour"],[1,"day"],[2,"day"],[3,"day"],[0.25,"month"],[0.5,"month"],[1,"month"],[2,"month"],[3,"month"],[6,"month"],[1,"year"]];var aC=0;if(aM.minTickSize!=null){if(typeof aM.tickSize=="number"){aC=aM.tickSize}else{aC=aM.minTickSize[0]*aJ[aM.minTickSize[1]]}}for(var aS=0;aS<aK.length-1;++aS){if(aT<(aK[aS][0]*aJ[aK[aS][1]]+aK[aS+1][0]*aJ[aK[aS+1][1]])/2&&aK[aS][0]*aJ[aK[aS][1]]>=aC){break}}aO=aK[aS][0];aN=aK[aS][1];if(aN=="year"){aQ=Math.pow(10,Math.floor(Math.log(aT/aJ.year)/Math.LN10));aI=(aT/aJ.year)/aQ;if(aI<1.5){aO=1}else{if(aI<3){aO=2}else{if(aI<7.5){aO=5}else{aO=10}}}aO*=aQ}aG.tickSize=aM.tickSize||[aO,aN];aB=function(aX){var a2=[],a0=aX.tickSize[0],a3=aX.tickSize[1],a1=new Date(aX.min);var aW=a0*aJ[a3];if(a3=="second"){a1.setUTCSeconds(a(a1.getUTCSeconds(),a0))}if(a3=="minute"){a1.setUTCMinutes(a(a1.getUTCMinutes(),a0))}if(a3=="hour"){a1.setUTCHours(a(a1.getUTCHours(),a0))}if(a3=="month"){a1.setUTCMonth(a(a1.getUTCMonth(),a0))}if(a3=="year"){a1.setUTCFullYear(a(a1.getUTCFullYear(),a0))}a1.setUTCMilliseconds(0);if(aW>=aJ.minute){a1.setUTCSeconds(0)}if(aW>=aJ.hour){a1.setUTCMinutes(0)}if(aW>=aJ.day){a1.setUTCHours(0)}if(aW>=aJ.day*4){a1.setUTCDate(1)}if(aW>=aJ.year){a1.setUTCMonth(0)}var a5=0,a4=Number.NaN,aY;do{aY=a4;a4=a1.getTime();a2.push(a4);if(a3=="month"){if(a0<1){a1.setUTCDate(1);var aV=a1.getTime();a1.setUTCMonth(a1.getUTCMonth()+1);var aZ=a1.getTime();a1.setTime(a4+a5*aJ.hour+(aZ-aV)*a0);a5=a1.getUTCHours();a1.setUTCHours(0)}else{a1.setUTCMonth(a1.getUTCMonth()+a0)}}else{if(a3=="year"){a1.setUTCFullYear(a1.getUTCFullYear()+a0)}else{a1.setTime(a4+aW)}}}while(a4<aX.max&&a4!=aY);return a2};aR=function(aV,aY){var a0=new Date(aV);if(aM.timeformat!=null){return c.plot.formatDate(a0,aM.timeformat,aM.monthNames)}var aW=aY.tickSize[0]*aJ[aY.tickSize[1]];var aX=aY.max-aY.min;var aZ=(aM.twelveHourClock)?" %p":"";if(aW<aJ.minute){fmt="%h:%M:%S"+aZ}else{if(aW<aJ.day){if(aX<2*aJ.day){fmt="%h:%M"+aZ}else{fmt="%b %d %h:%M"+aZ}}else{if(aW<aJ.month){fmt="%b %d"}else{if(aW<aJ.year){if(aX<aJ.year){fmt="%b"}else{fmt="%b %y"}}else{fmt="%y"}}}}return c.plot.formatDate(a0,fmt,aM.monthNames)}}else{var aU=aM.tickDecimals;var aP=-Math.floor(Math.log(aT)/Math.LN10);if(aU!=null&&aP>aU){aP=aU}aQ=Math.pow(10,-aP);aI=aT/aQ;if(aI<1.5){aO=1}else{if(aI<3){aO=2;if(aI>2.25&&(aU==null||aP+1<=aU)){aO=2.5;++aP}}else{if(aI<7.5){aO=5}else{aO=10}}}aO*=aQ;if(aM.minTickSize!=null&&aO<aM.minTickSize){aO=aM.minTickSize}aG.tickDecimals=Math.max(0,aU!=null?aU:aP);aG.tickSize=aM.tickSize||aO;aB=function(aX){var aZ=[];var a0=a(aX.min,aX.tickSize),aW=0,aV=Number.NaN,aY;do{aY=aV;aV=a0+aW*aX.tickSize;aZ.push(aV);++aW}while(aV<aX.max&&aV!=aY);return aZ};aR=function(aV,aW){return aV.toFixed(aW.tickDecimals)}}if(aM.alignTicksWithAxis!=null){var aF=(aG.direction=="x"?p:aw)[aM.alignTicksWithAxis-1];if(aF&&aF.used&&aF!=aG){var aL=aB(aG);if(aL.length>0){if(aM.min==null){aG.min=Math.min(aG.min,aL[0])}if(aM.max==null&&aL.length>1){aG.max=Math.max(aG.max,aL[aL.length-1])}}aB=function(aX){var aY=[],aV,aW;for(aW=0;aW<aF.ticks.length;++aW){aV=(aF.ticks[aW].v-aF.min)/(aF.max-aF.min);aV=aX.min+aV*(aX.max-aX.min);aY.push(aV)}return aY};if(aG.mode!="time"&&aM.tickDecimals==null){var aE=Math.max(0,-Math.floor(Math.log(aT)/Math.LN10)+1),aD=aB(aG);if(!(aD.length>1&&/\..*0$/.test((aD[1]-aD[0]).toFixed(aE)))){aG.tickDecimals=aE}}}}aG.tickGenerator=aB;if(c.isFunction(aM.tickFormatter)){aG.tickFormatter=function(aV,aW){return""+aM.tickFormatter(aV,aW)}}else{aG.tickFormatter=aR}}function P(aF){var aH=aF.options.ticks,aG=[];if(aH==null||(typeof aH=="number"&&aH>0)){aG=aF.tickGenerator(aF)}else{if(aH){if(c.isFunction(aH)){aG=aH({min:aF.min,max:aF.max})}else{aG=aH}}}var aE,aB;aF.ticks=[];for(aE=0;aE<aG.length;++aE){var aC=null;var aD=aG[aE];if(typeof aD=="object"){aB=+aD[0];if(aD.length>1){aC=aD[1]}}else{aB=+aD}if(aC==null){aC=aF.tickFormatter(aB,aF)}if(!isNaN(aB)){aF.ticks.push({v:aB,label:aC})}}}function ap(aB,aC){if(aB.options.autoscaleMargin&&aC.length>0){if(aB.options.min==null){aB.min=Math.min(aB.min,aC[0].v)}if(aB.options.max==null&&aC.length>1){aB.max=Math.max(aB.max,aC[aC.length-1].v)}}}function W(){H.clearRect(0,0,G,I);var aC=O.grid;if(aC.show&&aC.backgroundColor){N()}if(aC.show&&!aC.aboveData){ac()}for(var aB=0;aB<Q.length;++aB){an(ak.drawSeries,[H,Q[aB]]);d(Q[aB])}an(ak.draw,[H]);if(aC.show&&aC.aboveData){ac()}}function D(aB,aI){var aE,aH,aG,aD,aF=m();for(i=0;i<aF.length;++i){aE=aF[i];if(aE.direction==aI){aD=aI+aE.n+"axis";if(!aB[aD]&&aE.n==1){aD=aI+"axis"}if(aB[aD]){aH=aB[aD].from;aG=aB[aD].to;break}}}if(!aB[aD]){aE=aI=="x"?p[0]:aw[0];aH=aB[aI+"1"];aG=aB[aI+"2"]}if(aH!=null&&aG!=null&&aH>aG){var aC=aH;aH=aG;aG=aC}return{from:aH,to:aG,axis:aE}}function N(){H.save();H.translate(q.left,q.top);H.fillStyle=am(O.grid.backgroundColor,w,0,"rgba(255, 255, 255, 0)");H.fillRect(0,0,h,w);H.restore()}function ac(){var aF;H.save();H.translate(q.left,q.top);var aH=O.grid.markings;if(aH){if(c.isFunction(aH)){var aK=aq.getAxes();aK.xmin=aK.xaxis.min;aK.xmax=aK.xaxis.max;aK.ymin=aK.yaxis.min;aK.ymax=aK.yaxis.max;aH=aH(aK)}for(aF=0;aF<aH.length;++aF){var aD=aH[aF],aC=D(aD,"x"),aI=D(aD,"y");if(aC.from==null){aC.from=aC.axis.min}if(aC.to==null){aC.to=aC.axis.max}if(aI.from==null){aI.from=aI.axis.min}if(aI.to==null){aI.to=aI.axis.max}if(aC.to<aC.axis.min||aC.from>aC.axis.max||aI.to<aI.axis.min||aI.from>aI.axis.max){continue}aC.from=Math.max(aC.from,aC.axis.min);aC.to=Math.min(aC.to,aC.axis.max);aI.from=Math.max(aI.from,aI.axis.min);aI.to=Math.min(aI.to,aI.axis.max);if(aC.from==aC.to&&aI.from==aI.to){continue}aC.from=aC.axis.p2c(aC.from);aC.to=aC.axis.p2c(aC.to);aI.from=aI.axis.p2c(aI.from);aI.to=aI.axis.p2c(aI.to);if(aC.from==aC.to||aI.from==aI.to){H.beginPath();H.strokeStyle=aD.color||O.grid.markingsColor;H.lineWidth=aD.lineWidth||O.grid.markingsLineWidth;H.moveTo(aC.from,aI.from);H.lineTo(aC.to,aI.to);H.stroke()}else{H.fillStyle=aD.color||O.grid.markingsColor;H.fillRect(aC.from,aI.to,aC.to-aC.from,aI.from-aI.to)}}}var aK=m(),aM=O.grid.borderWidth;for(var aE=0;aE<aK.length;++aE){var aB=aK[aE],aG=aB.box,aQ=aB.tickLength,aN,aL,aP,aJ;if(!aB.show||aB.ticks.length==0){continue}H.strokeStyle=aB.options.tickColor||c.color.parse(aB.options.color).scale("a",0.22).toString();H.lineWidth=1;if(aB.direction=="x"){aN=0;if(aQ=="full"){aL=(aB.position=="top"?0:w)}else{aL=aG.top-q.top+(aB.position=="top"?aG.height:0)}}else{aL=0;if(aQ=="full"){aN=(aB.position=="left"?0:h)}else{aN=aG.left-q.left+(aB.position=="left"?aG.width:0)}}if(!aB.innermost){H.beginPath();aP=aJ=0;if(aB.direction=="x"){aP=h}else{aJ=w}if(H.lineWidth==1){aN=Math.floor(aN)+0.5;aL=Math.floor(aL)+0.5}H.moveTo(aN,aL);H.lineTo(aN+aP,aL+aJ);H.stroke()}H.beginPath();for(aF=0;aF<aB.ticks.length;++aF){var aO=aB.ticks[aF].v;aP=aJ=0;if(aO<aB.min||aO>aB.max||(aQ=="full"&&aM>0&&(aO==aB.min||aO==aB.max))){continue}if(aB.direction=="x"){aN=aB.p2c(aO);aJ=aQ=="full"?-w:aQ;if(aB.position=="top"){aJ=-aJ}}else{aL=aB.p2c(aO);aP=aQ=="full"?-h:aQ;if(aB.position=="left"){aP=-aP}}if(H.lineWidth==1){if(aB.direction=="x"){aN=Math.floor(aN)+0.5}else{aL=Math.floor(aL)+0.5}}H.moveTo(aN,aL);H.lineTo(aN+aP,aL+aJ)}H.stroke()}if(aM){H.lineWidth=aM;H.strokeStyle=O.grid.borderColor;H.strokeRect(-aM/2,-aM/2,h+aM,w+aM)}H.restore()}function k(){av.find(".tickLabels").remove();var aG=['<div class="tickLabels" style="font-size:smaller">'];var aJ=m();for(var aD=0;aD<aJ.length;++aD){var aC=aJ[aD],aF=aC.box;if(!aC.show){continue}aG.push('<div class="'+aC.direction+"Axis "+aC.direction+aC.n+'Axis" style="color:'+aC.options.color+'">');for(var aE=0;aE<aC.ticks.length;++aE){var aH=aC.ticks[aE];if(!aH.label||aH.v<aC.min||aH.v>aC.max){continue}var aK={},aI;if(aC.direction=="x"){aI="center";aK.left=Math.round(q.left+aC.p2c(aH.v)-aC.labelWidth/2);if(aC.position=="bottom"){aK.top=aF.top+aF.padding}else{aK.bottom=I-(aF.top+aF.height-aF.padding)}}else{aK.top=Math.round(q.top+aC.p2c(aH.v)-aC.labelHeight/2);if(aC.position=="left"){aK.right=G-(aF.left+aF.width-aF.padding);aI="right"}else{aK.left=aF.left+aF.padding;aI="left"}}aK.width=aC.labelWidth;var aB=["position:absolute","text-align:"+aI];for(var aL in aK){aB.push(aL+":"+aK[aL]+"px")}aG.push('<div class="tickLabel" style="'+aB.join(";")+'">'+aH.label+"</div>")}aG.push("</div>")}aG.push("</div>");av.append(aG.join(""))}function d(aB){if(aB.lines.show){at(aB)}if(aB.bars.show){e(aB)}if(aB.points.show){ao(aB)}}function at(aE){function aD(aP,aQ,aI,aU,aT){var aV=aP.points,aJ=aP.pointsize,aN=null,aM=null;H.beginPath();for(var aO=aJ;aO<aV.length;aO+=aJ){var aL=aV[aO-aJ],aS=aV[aO-aJ+1],aK=aV[aO],aR=aV[aO+1];if(aL==null||aK==null){continue}if(aS<=aR&&aS<aT.min){if(aR<aT.min){continue}aL=(aT.min-aS)/(aR-aS)*(aK-aL)+aL;aS=aT.min}else{if(aR<=aS&&aR<aT.min){if(aS<aT.min){continue}aK=(aT.min-aS)/(aR-aS)*(aK-aL)+aL;aR=aT.min}}if(aS>=aR&&aS>aT.max){if(aR>aT.max){continue}aL=(aT.max-aS)/(aR-aS)*(aK-aL)+aL;aS=aT.max}else{if(aR>=aS&&aR>aT.max){if(aS>aT.max){continue}aK=(aT.max-aS)/(aR-aS)*(aK-aL)+aL;aR=aT.max}}if(aL<=aK&&aL<aU.min){if(aK<aU.min){continue}aS=(aU.min-aL)/(aK-aL)*(aR-aS)+aS;aL=aU.min}else{if(aK<=aL&&aK<aU.min){if(aL<aU.min){continue}aR=(aU.min-aL)/(aK-aL)*(aR-aS)+aS;aK=aU.min}}if(aL>=aK&&aL>aU.max){if(aK>aU.max){continue}aS=(aU.max-aL)/(aK-aL)*(aR-aS)+aS;aL=aU.max}else{if(aK>=aL&&aK>aU.max){if(aL>aU.max){continue}aR=(aU.max-aL)/(aK-aL)*(aR-aS)+aS;aK=aU.max}}if(aL!=aN||aS!=aM){H.moveTo(aU.p2c(aL)+aQ,aT.p2c(aS)+aI)}aN=aK;aM=aR;H.lineTo(aU.p2c(aK)+aQ,aT.p2c(aR)+aI)}H.stroke()}function aF(aI,aQ,aP){var aW=aI.points,aV=aI.pointsize,aN=Math.min(Math.max(0,aP.min),aP.max),aX=0,aU,aT=false,aM=1,aL=0,aR=0;while(true){if(aV>0&&aX>aW.length+aV){break}aX+=aV;var aZ=aW[aX-aV],aK=aW[aX-aV+aM],aY=aW[aX],aJ=aW[aX+aM];if(aT){if(aV>0&&aZ!=null&&aY==null){aR=aX;aV=-aV;aM=2;continue}if(aV<0&&aX==aL+aV){H.fill();aT=false;aV=-aV;aM=1;aX=aL=aR+aV;continue}}if(aZ==null||aY==null){continue}if(aZ<=aY&&aZ<aQ.min){if(aY<aQ.min){continue}aK=(aQ.min-aZ)/(aY-aZ)*(aJ-aK)+aK;aZ=aQ.min}else{if(aY<=aZ&&aY<aQ.min){if(aZ<aQ.min){continue}aJ=(aQ.min-aZ)/(aY-aZ)*(aJ-aK)+aK;aY=aQ.min}}if(aZ>=aY&&aZ>aQ.max){if(aY>aQ.max){continue}aK=(aQ.max-aZ)/(aY-aZ)*(aJ-aK)+aK;aZ=aQ.max}else{if(aY>=aZ&&aY>aQ.max){if(aZ>aQ.max){continue}aJ=(aQ.max-aZ)/(aY-aZ)*(aJ-aK)+aK;aY=aQ.max}}if(!aT){H.beginPath();H.moveTo(aQ.p2c(aZ),aP.p2c(aN));aT=true}if(aK>=aP.max&&aJ>=aP.max){H.lineTo(aQ.p2c(aZ),aP.p2c(aP.max));H.lineTo(aQ.p2c(aY),aP.p2c(aP.max));continue}else{if(aK<=aP.min&&aJ<=aP.min){H.lineTo(aQ.p2c(aZ),aP.p2c(aP.min));H.lineTo(aQ.p2c(aY),aP.p2c(aP.min));continue}}var aO=aZ,aS=aY;if(aK<=aJ&&aK<aP.min&&aJ>=aP.min){aZ=(aP.min-aK)/(aJ-aK)*(aY-aZ)+aZ;aK=aP.min}else{if(aJ<=aK&&aJ<aP.min&&aK>=aP.min){aY=(aP.min-aK)/(aJ-aK)*(aY-aZ)+aZ;aJ=aP.min}}if(aK>=aJ&&aK>aP.max&&aJ<=aP.max){aZ=(aP.max-aK)/(aJ-aK)*(aY-aZ)+aZ;aK=aP.max}else{if(aJ>=aK&&aJ>aP.max&&aK<=aP.max){aY=(aP.max-aK)/(aJ-aK)*(aY-aZ)+aZ;aJ=aP.max}}if(aZ!=aO){H.lineTo(aQ.p2c(aO),aP.p2c(aK))}H.lineTo(aQ.p2c(aZ),aP.p2c(aK));H.lineTo(aQ.p2c(aY),aP.p2c(aJ));if(aY!=aS){H.lineTo(aQ.p2c(aY),aP.p2c(aJ));H.lineTo(aQ.p2c(aS),aP.p2c(aJ))}}}H.save();H.translate(q.left,q.top);H.lineJoin="round";var aG=aE.lines.lineWidth,aB=aE.shadowSize;if(aG>0&&aB>0){H.lineWidth=aB;H.strokeStyle="rgba(0,0,0,0.1)";var aH=Math.PI/18;aD(aE.datapoints,Math.sin(aH)*(aG/2+aB/2),Math.cos(aH)*(aG/2+aB/2),aE.xaxis,aE.yaxis);H.lineWidth=aB/2;aD(aE.datapoints,Math.sin(aH)*(aG/2+aB/4),Math.cos(aH)*(aG/2+aB/4),aE.xaxis,aE.yaxis)}H.lineWidth=aG;H.strokeStyle=aE.color;var aC=ae(aE.lines,aE.color,0,w);if(aC){H.fillStyle=aC;aF(aE.datapoints,aE.xaxis,aE.yaxis)}if(aG>0){aD(aE.datapoints,0,0,aE.xaxis,aE.yaxis)}H.restore()}function ao(aE){function aH(aN,aM,aU,aK,aS,aT,aQ,aJ){var aR=aN.points,aI=aN.pointsize;for(var aL=0;aL<aR.length;aL+=aI){var aP=aR[aL],aO=aR[aL+1];if(aP==null||aP<aT.min||aP>aT.max||aO<aQ.min||aO>aQ.max){continue}H.beginPath();aP=aT.p2c(aP);aO=aQ.p2c(aO)+aK;if(aJ=="circle"){H.arc(aP,aO,aM,0,aS?Math.PI:Math.PI*2,false)}else{aJ(H,aP,aO,aM,aS)}H.closePath();if(aU){H.fillStyle=aU;H.fill()}H.stroke()}}H.save();H.translate(q.left,q.top);var aG=aE.points.lineWidth,aC=aE.shadowSize,aB=aE.points.radius,aF=aE.points.symbol;if(aG>0&&aC>0){var aD=aC/2;H.lineWidth=aD;H.strokeStyle="rgba(0,0,0,0.1)";aH(aE.datapoints,aB,null,aD+aD/2,true,aE.xaxis,aE.yaxis,aF);H.strokeStyle="rgba(0,0,0,0.2)";aH(aE.datapoints,aB,null,aD/2,true,aE.xaxis,aE.yaxis,aF)}H.lineWidth=aG;H.strokeStyle=aE.color;aH(aE.datapoints,aB,ae(aE.points,aE.color),0,false,aE.xaxis,aE.yaxis,aF);H.restore()}function E(aN,aM,aV,aI,aQ,aF,aD,aL,aK,aU,aR,aC){var aE,aT,aJ,aP,aG,aB,aO,aH,aS;if(aR){aH=aB=aO=true;aG=false;aE=aV;aT=aN;aP=aM+aI;aJ=aM+aQ;if(aT<aE){aS=aT;aT=aE;aE=aS;aG=true;aB=false}}else{aG=aB=aO=true;aH=false;aE=aN+aI;aT=aN+aQ;aJ=aV;aP=aM;if(aP<aJ){aS=aP;aP=aJ;aJ=aS;aH=true;aO=false}}if(aT<aL.min||aE>aL.max||aP<aK.min||aJ>aK.max){return}if(aE<aL.min){aE=aL.min;aG=false}if(aT>aL.max){aT=aL.max;aB=false}if(aJ<aK.min){aJ=aK.min;aH=false}if(aP>aK.max){aP=aK.max;aO=false}aE=aL.p2c(aE);aJ=aK.p2c(aJ);aT=aL.p2c(aT);aP=aK.p2c(aP);if(aD){aU.beginPath();aU.moveTo(aE,aJ);aU.lineTo(aE,aP);aU.lineTo(aT,aP);aU.lineTo(aT,aJ);aU.fillStyle=aD(aJ,aP);aU.fill()}if(aC>0&&(aG||aB||aO||aH)){aU.beginPath();aU.moveTo(aE,aJ+aF);if(aG){aU.lineTo(aE,aP+aF)}else{aU.moveTo(aE,aP+aF)}if(aO){aU.lineTo(aT,aP+aF)}else{aU.moveTo(aT,aP+aF)}if(aB){aU.lineTo(aT,aJ+aF)}else{aU.moveTo(aT,aJ+aF)}if(aH){aU.lineTo(aE,aJ+aF)}else{aU.moveTo(aE,aJ+aF)}aU.stroke()}}function e(aD){function aC(aJ,aI,aL,aG,aK,aN,aM){var aO=aJ.points,aF=aJ.pointsize;for(var aH=0;aH<aO.length;aH+=aF){if(aO[aH]==null){continue}E(aO[aH],aO[aH+1],aO[aH+2],aI,aL,aG,aK,aN,aM,H,aD.bars.horizontal,aD.bars.lineWidth)}}H.save();H.translate(q.left,q.top);H.lineWidth=aD.bars.lineWidth;H.strokeStyle=aD.color;var aB=aD.bars.align=="left"?0:-aD.bars.barWidth/2;var aE=aD.bars.fill?function(aF,aG){return ae(aD.bars,aD.color,aF,aG)}:null;aC(aD.datapoints,aB,aB+aD.bars.barWidth,0,aE,aD.xaxis,aD.yaxis);H.restore()}function ae(aD,aB,aC,aF){var aE=aD.fill;if(!aE){return null}if(aD.fillColor){return am(aD.fillColor,aC,aF,aB)}var aG=c.color.parse(aB);aG.a=typeof aE=="number"?aE:0.4;aG.normalize();return aG.toString()}function o(){av.find(".legend").remove();if(!O.legend.show){return}var aH=[],aF=false,aN=O.legend.labelFormatter,aM,aJ;for(var aE=0;aE<Q.length;++aE){aM=Q[aE];aJ=aM.label;if(!aJ){continue}if(aE%O.legend.noColumns==0){if(aF){aH.push("</tr>")}aH.push("<tr>");aF=true}if(aN){aJ=aN(aJ,aM)}aH.push('<td class="legendColorBox"><div style="border:1px solid '+O.legend.labelBoxBorderColor+';padding:1px"><div style="width:4px;height:0;border:5px solid '+aM.color+';overflow:hidden"></div></div></td><td class="legendLabel">'+aJ+"</td>")}if(aF){aH.push("</tr>")}if(aH.length==0){return}var aL='<table style="font-size:smaller;color:'+O.grid.color+'">'+aH.join("")+"</table>";if(O.legend.container!=null){c(O.legend.container).html(aL)}else{var aI="",aC=O.legend.position,aD=O.legend.margin;if(aD[0]==null){aD=[aD,aD]}if(aC.charAt(0)=="n"){aI+="top:"+(aD[1]+q.top)+"px;"}else{if(aC.charAt(0)=="s"){aI+="bottom:"+(aD[1]+q.bottom)+"px;"}}if(aC.charAt(1)=="e"){aI+="right:"+(aD[0]+q.right)+"px;"}else{if(aC.charAt(1)=="w"){aI+="left:"+(aD[0]+q.left)+"px;"}}var aK=c('<div class="legend">'+aL.replace('style="','style="position:absolute;'+aI+";")+"</div>").appendTo(av);if(O.legend.backgroundOpacity!=0){var aG=O.legend.backgroundColor;if(aG==null){aG=O.grid.backgroundColor;if(aG&&typeof aG=="string"){aG=c.color.parse(aG)}else{aG=c.color.extract(aK,"background-color")}aG.a=1;aG=aG.toString()}var aB=aK.children();c('<div style="position:absolute;width:'+aB.width()+"px;height:"+aB.height()+"px;"+aI+"background-color:"+aG+';"> </div>').prependTo(aK).css("opacity",O.legend.backgroundOpacity)}}}var ab=[],M=null;function K(aI,aG,aD){var aO=O.grid.mouseActiveRadius,a0=aO*aO+1,aY=null,aR=false,aW,aU;for(aW=Q.length-1;aW>=0;--aW){if(!aD(Q[aW])){continue}var aP=Q[aW],aH=aP.xaxis,aF=aP.yaxis,aV=aP.datapoints.points,aT=aP.datapoints.pointsize,aQ=aH.c2p(aI),aN=aF.c2p(aG),aC=aO/aH.scale,aB=aO/aF.scale;if(aH.options.inverseTransform){aC=Number.MAX_VALUE}if(aF.options.inverseTransform){aB=Number.MAX_VALUE}if(aP.lines.show||aP.points.show){for(aU=0;aU<aV.length;aU+=aT){var aK=aV[aU],aJ=aV[aU+1];if(aK==null){continue}if(aK-aQ>aC||aK-aQ<-aC||aJ-aN>aB||aJ-aN<-aB){continue}var aM=Math.abs(aH.p2c(aK)-aI),aL=Math.abs(aF.p2c(aJ)-aG),aS=aM*aM+aL*aL;if(aS<a0){a0=aS;aY=[aW,aU/aT]}}}if(aP.bars.show&&!aY){var aE=aP.bars.align=="left"?0:-aP.bars.barWidth/2,aX=aE+aP.bars.barWidth;for(aU=0;aU<aV.length;aU+=aT){var aK=aV[aU],aJ=aV[aU+1],aZ=aV[aU+2];if(aK==null){continue}if(Q[aW].bars.horizontal?(aQ<=Math.max(aZ,aK)&&aQ>=Math.min(aZ,aK)&&aN>=aJ+aE&&aN<=aJ+aX):(aQ>=aK+aE&&aQ<=aK+aX&&aN>=Math.min(aZ,aJ)&&aN<=Math.max(aZ,aJ))){aY=[aW,aU/aT]}}}}if(aY){aW=aY[0];aU=aY[1];aT=Q[aW].datapoints.pointsize;return{datapoint:Q[aW].datapoints.points.slice(aU*aT,(aU+1)*aT),dataIndex:aU,series:Q[aW],seriesIndex:aW}}return null}function aa(aB){if(O.grid.hoverable){u("plothover",aB,function(aC){return aC.hoverable!=false})}}function l(aB){if(O.grid.hoverable){u("plothover",aB,function(aC){return false})}}function R(aB){u("plotclick",aB,function(aC){return aC.clickable!=false})}function u(aC,aB,aD){var aE=y.offset(),aH=aB.pageX-aE.left-q.left,aF=aB.pageY-aE.top-q.top,aJ=C({left:aH,top:aF});aJ.pageX=aB.pageX;aJ.pageY=aB.pageY;var aK=K(aH,aF,aD);if(aK){aK.pageX=parseInt(aK.series.xaxis.p2c(aK.datapoint[0])+aE.left+q.left);aK.pageY=parseInt(aK.series.yaxis.p2c(aK.datapoint[1])+aE.top+q.top)}if(O.grid.autoHighlight){for(var aG=0;aG<ab.length;++aG){var aI=ab[aG];if(aI.auto==aC&&!(aK&&aI.series==aK.series&&aI.point[0]==aK.datapoint[0]&&aI.point[1]==aK.datapoint[1])){T(aI.series,aI.point)}}if(aK){x(aK.series,aK.datapoint,aC)}}av.trigger(aC,[aJ,aK])}function f(){if(!M){M=setTimeout(s,30)}}function s(){M=null;A.save();A.clearRect(0,0,G,I);A.translate(q.left,q.top);var aC,aB;for(aC=0;aC<ab.length;++aC){aB=ab[aC];if(aB.series.bars.show){v(aB.series,aB.point)}else{ay(aB.series,aB.point)}}A.restore();an(ak.drawOverlay,[A])}function x(aD,aB,aF){if(typeof aD=="number"){aD=Q[aD]}if(typeof aB=="number"){var aE=aD.datapoints.pointsize;aB=aD.datapoints.points.slice(aE*aB,aE*(aB+1))}var aC=al(aD,aB);if(aC==-1){ab.push({series:aD,point:aB,auto:aF});f()}else{if(!aF){ab[aC].auto=false}}}function T(aD,aB){if(aD==null&&aB==null){ab=[];f()}if(typeof aD=="number"){aD=Q[aD]}if(typeof aB=="number"){aB=aD.data[aB]}var aC=al(aD,aB);if(aC!=-1){ab.splice(aC,1);f()}}function al(aD,aE){for(var aB=0;aB<ab.length;++aB){var aC=ab[aB];if(aC.series==aD&&aC.point[0]==aE[0]&&aC.point[1]==aE[1]){return aB}}return -1}function ay(aE,aD){var aC=aD[0],aI=aD[1],aH=aE.xaxis,aG=aE.yaxis;if(aC<aH.min||aC>aH.max||aI<aG.min||aI>aG.max){return}var aF=aE.points.radius+aE.points.lineWidth/2;A.lineWidth=aF;A.strokeStyle=c.color.parse(aE.color).scale("a",0.5).toString();var aB=1.5*aF,aC=aH.p2c(aC),aI=aG.p2c(aI);A.beginPath();if(aE.points.symbol=="circle"){A.arc(aC,aI,aB,0,2*Math.PI,false)}else{aE.points.symbol(A,aC,aI,aB,false)}A.closePath();A.stroke()}function v(aE,aB){A.lineWidth=aE.bars.lineWidth;A.strokeStyle=c.color.parse(aE.color).scale("a",0.5).toString();var aD=c.color.parse(aE.color).scale("a",0.5).toString();var aC=aE.bars.align=="left"?0:-aE.bars.barWidth/2;E(aB[0],aB[1],aB[2]||0,aC,aC+aE.bars.barWidth,0,function(){return aD},aE.xaxis,aE.yaxis,A,aE.bars.horizontal,aE.bars.lineWidth)}function am(aJ,aB,aH,aC){if(typeof aJ=="string"){return aJ}else{var aI=H.createLinearGradient(0,aH,0,aB);for(var aE=0,aD=aJ.colors.length;aE<aD;++aE){var aF=aJ.colors[aE];if(typeof aF!="string"){var aG=c.color.parse(aC);if(aF.brightness!=null){aG=aG.scale("rgb",aF.brightness)}if(aF.opacity!=null){aG.a*=aF.opacity}aF=aG.toString()}aI.addColorStop(aE/(aD-1),aF)}return aI}}}c.plot=function(g,e,d){var f=new b(c(g),e,d,c.plot.plugins);return f};c.plot.version="0.7";c.plot.plugins=[];c.plot.formatDate=function(l,f,h){var o=function(d){d=""+d;return d.length==1?"0"+d:d};var e=[];var p=false,j=false;var n=l.getUTCHours();var k=n<12;if(h==null){h=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}if(f.search(/%p|%P/)!=-1){if(n>12){n=n-12}else{if(n==0){n=12}}}for(var g=0;g<f.length;++g){var m=f.charAt(g);if(p){switch(m){case"h":m=""+n;break;case"H":m=o(n);break;case"M":m=o(l.getUTCMinutes());break;case"S":m=o(l.getUTCSeconds());break;case"d":m=""+l.getUTCDate();break;case"m":m=""+(l.getUTCMonth()+1);break;case"y":m=""+l.getUTCFullYear();break;case"b":m=""+h[l.getUTCMonth()];break;case"p":m=(k)?("am"):("pm");break;case"P":m=(k)?("AM"):("PM");break;case"0":m="";j=true;break}if(m&&j){m=o(m);j=false}e.push(m);if(!j){p=false}}else{if(m=="%"){p=true}else{e.push(m)}}}return e.join("")};function a(e,d){return d*Math.floor(e/d)}})(jQuery); \ No newline at end of file
diff --git a/chromium/third_party/flot/jquery.flot.navigate.min.js b/chromium/third_party/flot/jquery.flot.navigate.min.js
index 0420f160fc8..ecf63c93ba5 100644
--- a/chromium/third_party/flot/jquery.flot.navigate.min.js
+++ b/chromium/third_party/flot/jquery.flot.navigate.min.js
@@ -1,86 +1 @@
-/* Flot plugin for adding the ability to pan and zoom the plot.
-
-Copyright (c) 2007-2013 IOLA and Ole Laursen.
-Licensed under the MIT license.
-
-The default behaviour is double click and scrollwheel up/down to zoom in, drag
-to pan. The plugin defines plot.zoom({ center }), plot.zoomOut() and
-plot.pan( offset ) so you easily can add custom controls. It also fires
-"plotpan" and "plotzoom" events, useful for synchronizing plots.
-
-The plugin supports these options:
-
- zoom: {
- interactive: false
- trigger: "dblclick" // or "click" for single click
- amount: 1.5 // 2 = 200% (zoom in), 0.5 = 50% (zoom out)
- }
-
- pan: {
- interactive: false
- cursor: "move" // CSS mouse cursor value used when dragging, e.g. "pointer"
- frameRate: 20
- }
-
- xaxis, yaxis, x2axis, y2axis: {
- zoomRange: null // or [ number, number ] (min range, max range) or false
- panRange: null // or [ number, number ] (min, max) or false
- }
-
-"interactive" enables the built-in drag/click behaviour. If you enable
-interactive for pan, then you'll have a basic plot that supports moving
-around; the same for zoom.
-
-"amount" specifies the default amount to zoom in (so 1.5 = 150%) relative to
-the current viewport.
-
-"cursor" is a standard CSS mouse cursor string used for visual feedback to the
-user when dragging.
-
-"frameRate" specifies the maximum number of times per second the plot will
-update itself while the user is panning around on it (set to null to disable
-intermediate pans, the plot will then not update until the mouse button is
-released).
-
-"zoomRange" is the interval in which zooming can happen, e.g. with zoomRange:
-[1, 100] the zoom will never scale the axis so that the difference between min
-and max is smaller than 1 or larger than 100. You can set either end to null
-to ignore, e.g. [1, null]. If you set zoomRange to false, zooming on that axis
-will be disabled.
-
-"panRange" confines the panning to stay within a range, e.g. with panRange:
-[-10, 20] panning stops at -10 in one end and at 20 in the other. Either can
-be null, e.g. [-10, null]. If you set panRange to false, panning on that axis
-will be disabled.
-
-Example API usage:
-
- plot = $.plot(...);
-
- // zoom default amount in on the pixel ( 10, 20 )
- plot.zoom({ center: { left: 10, top: 20 } });
-
- // zoom out again
- plot.zoomOut({ center: { left: 10, top: 20 } });
-
- // zoom 200% in on the pixel (10, 20)
- plot.zoom({ amount: 2, center: { left: 10, top: 20 } });
-
- // pan 100 pixels to the left and 20 down
- plot.pan({ left: -100, top: 20 })
-
-Here, "center" specifies where the center of the zooming should happen. Note
-that this is defined in pixel space, not the space of the data points (you can
-use the p2c helpers on the axes in Flot to help you convert between these).
-
-"amount" is the amount to zoom the viewport relative to the current range, so
-1 is 100% (i.e. no change), 1.5 is 150% (zoom in), 0.7 is 70% (zoom out). You
-can set the default in the options.
-
-*/// First two dependencies, jquery.event.drag.js and
-// jquery.mousewheel.js, we put them inline here to save people the
-// effort of downloading them.
-/*
-jquery.event.drag.js ~ v1.5 ~ Copyright (c) 2008, Three Dub Media (http://threedubmedia.com)
-Licensed under the MIT License ~ http://threedubmedia.googlecode.com/files/MIT-LICENSE.txt
-*/(function(e){function t(i){var l,h=this,p=i.data||{};if(p.elem)h=i.dragTarget=p.elem,i.dragProxy=a.proxy||h,i.cursorOffsetX=p.pageX-p.left,i.cursorOffsetY=p.pageY-p.top,i.offsetX=i.pageX-i.cursorOffsetX,i.offsetY=i.pageY-i.cursorOffsetY;else if(a.dragging||p.which>0&&i.which!=p.which||e(i.target).is(p.not))return;switch(i.type){case"mousedown":return e.extend(p,e(h).offset(),{elem:h,target:i.target,pageX:i.pageX,pageY:i.pageY}),o.add(document,"mousemove mouseup",t,p),s(h,!1),a.dragging=null,!1;case!a.dragging&&"mousemove":if(r(i.pageX-p.pageX)+r(i.pageY-p.pageY)<p.distance)break;i.target=p.target,l=n(i,"dragstart",h),l!==!1&&(a.dragging=h,a.proxy=i.dragProxy=e(l||h)[0]);case"mousemove":if(a.dragging){if(l=n(i,"drag",h),u.drop&&(u.drop.allowed=l!==!1,u.drop.handler(i)),l!==!1)break;i.type="mouseup"};case"mouseup":o.remove(document,"mousemove mouseup",t),a.dragging&&(u.drop&&u.drop.handler(i),n(i,"dragend",h)),s(h,!0),a.dragging=a.proxy=p.elem=!1}return!0}function n(t,n,r){t.type=n;var i=e.event.dispatch.call(r,t);return i===!1?!1:i||t.result}function r(e){return Math.pow(e,2)}function i(){return a.dragging===!1}function s(e,t){e&&(e.unselectable=t?"off":"on",e.onselectstart=function(){return t},e.style&&(e.style.MozUserSelect=t?"":"none"))}e.fn.drag=function(e,t,n){return t&&this.bind("dragstart",e),n&&this.bind("dragend",n),e?this.bind("drag",t?t:e):this.trigger("drag")};var o=e.event,u=o.special,a=u.drag={not:":input",distance:0,which:1,dragging:!1,setup:function(n){n=e.extend({distance:a.distance,which:a.which,not:a.not},n||{}),n.distance=r(n.distance),o.add(this,"mousedown",t,n),this.attachEvent&&this.attachEvent("ondragstart",i)},teardown:function(){o.remove(this,"mousedown",t),this===a.dragging&&(a.dragging=a.proxy=!1),s(this,!0),this.detachEvent&&this.detachEvent("ondragstart",i)}};u.dragstart=u.dragend={setup:function(){},teardown:function(){}}})(jQuery),function(e){function t(t){var n=t||window.event,r=[].slice.call(arguments,1),i=0,s=0,o=0,t=e.event.fix(n);return t.type="mousewheel",n.wheelDelta&&(i=n.wheelDelta/120),n.detail&&(i=-n.detail/3),o=i,void 0!==n.axis&&n.axis===n.HORIZONTAL_AXIS&&(o=0,s=-1*i),void 0!==n.wheelDeltaY&&(o=n.wheelDeltaY/120),void 0!==n.wheelDeltaX&&(s=-1*n.wheelDeltaX/120),r.unshift(t,i,s,o),(e.event.dispatch||e.event.handle).apply(this,r)}var n=["DOMMouseScroll","mousewheel"];if(e.event.fixHooks)for(var r=n.length;r;)e.event.fixHooks[n[--r]]=e.event.mouseHooks;e.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var e=n.length;e;)this.addEventListener(n[--e],t,!1);else this.onmousewheel=t},teardown:function(){if(this.removeEventListener)for(var e=n.length;e;)this.removeEventListener(n[--e],t,!1);else this.onmousewheel=null}},e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}(jQuery),function(e){function n(t){function n(e,n){var r=t.offset();r.left=e.pageX-r.left,r.top=e.pageY-r.top,n?t.zoomOut({center:r}):t.zoom({center:r})}function r(e,t){return e.preventDefault(),n(e,t<0),!1}function a(e){if(e.which!=1)return!1;var n=t.getPlaceholder().css("cursor");n&&(i=n),t.getPlaceholder().css("cursor",t.getOptions().pan.cursor),s=e.pageX,o=e.pageY}function f(e){var n=t.getOptions().pan.frameRate;if(u||!n)return;u=setTimeout(function(){t.pan({left:s-e.pageX,top:o-e.pageY}),s=e.pageX,o=e.pageY,u=null},1/n*1e3)}function l(e){u&&(clearTimeout(u),u=null),t.getPlaceholder().css("cursor",i),t.pan({left:s-e.pageX,top:o-e.pageY})}function c(e,t){var i=e.getOptions();i.zoom.interactive&&(t[i.zoom.trigger](n),t.mousewheel(r)),i.pan.interactive&&(t.bind("dragstart",{distance:10},a),t.bind("drag",f),t.bind("dragend",l))}function h(e,t){t.unbind(e.getOptions().zoom.trigger,n),t.unbind("mousewheel",r),t.unbind("dragstart",a),t.unbind("drag",f),t.unbind("dragend",l),u&&clearTimeout(u)}var i="default",s=0,o=0,u=null;t.zoomOut=function(e){e||(e={}),e.amount||(e.amount=t.getOptions().zoom.amount),e.amount=1/e.amount,t.zoom(e)},t.zoom=function(n){n||(n={});var r=n.center,i=n.amount||t.getOptions().zoom.amount,s=t.width(),o=t.height();r||(r={left:s/2,top:o/2});var u=r.left/s,a=r.top/o,f={x:{min:r.left-u*s/i,max:r.left+(1-u)*s/i},y:{min:r.top-a*o/i,max:r.top+(1-a)*o/i}};e.each(t.getAxes(),function(e,t){var n=t.options,r=f[t.direction].min,i=f[t.direction].max,s=n.zoomRange,o=n.panRange;if(s===!1)return;r=t.c2p(r),i=t.c2p(i);if(r>i){var u=r;r=i,i=u}o&&(o[0]!=null&&r<o[0]&&(r=o[0]),o[1]!=null&&i>o[1]&&(i=o[1]));var a=i-r;if(s&&(s[0]!=null&&a<s[0]||s[1]!=null&&a>s[1]))return;n.min=r,n.max=i}),t.setupGrid(),t.draw(),n.preventEvent||t.getPlaceholder().trigger("plotzoom",[t,n])},t.pan=function(n){var r={x:+n.left,y:+n.top};isNaN(r.x)&&(r.x=0),isNaN(r.y)&&(r.y=0),e.each(t.getAxes(),function(e,t){var n=t.options,i,s,o=r[t.direction];i=t.c2p(t.p2c(t.min)+o),s=t.c2p(t.p2c(t.max)+o);var u=n.panRange;if(u===!1)return;u&&(u[0]!=null&&u[0]>i&&(o=u[0]-i,i+=o,s+=o),u[1]!=null&&u[1]<s&&(o=u[1]-s,i+=o,s+=o)),n.min=i,n.max=s}),t.setupGrid(),t.draw(),n.preventEvent||t.getPlaceholder().trigger("plotpan",[t,n])},t.hooks.bindEvents.push(c),t.hooks.shutdown.push(h)}var t={xaxis:{zoomRange:null,panRange:null},zoom:{interactive:!1,trigger:"dblclick",amount:1.5},pan:{interactive:!1,cursor:"move",frameRate:20}};e.plot.plugins.push({init:n,options:t,name:"navigate",version:"1.3"})}(jQuery); \ No newline at end of file
+(function(i){i.fn.drag=function(j,k,l){if(k){this.bind("dragstart",j)}if(l){this.bind("dragend",l)}return !j?this.trigger("drag"):this.bind("drag",k?k:j)};var d=i.event,c=d.special,h=c.drag={not:":input",distance:0,which:1,dragging:false,setup:function(j){j=i.extend({distance:h.distance,which:h.which,not:h.not},j||{});j.distance=e(j.distance);d.add(this,"mousedown",f,j);if(this.attachEvent){this.attachEvent("ondragstart",a)}},teardown:function(){d.remove(this,"mousedown",f);if(this===h.dragging){h.dragging=h.proxy=false}g(this,true);if(this.detachEvent){this.detachEvent("ondragstart",a)}}};c.dragstart=c.dragend={setup:function(){},teardown:function(){}};function f(j){var k=this,l,m=j.data||{};if(m.elem){k=j.dragTarget=m.elem;j.dragProxy=h.proxy||k;j.cursorOffsetX=m.pageX-m.left;j.cursorOffsetY=m.pageY-m.top;j.offsetX=j.pageX-j.cursorOffsetX;j.offsetY=j.pageY-j.cursorOffsetY}else{if(h.dragging||(m.which>0&&j.which!=m.which)||i(j.target).is(m.not)){return}}switch(j.type){case"mousedown":i.extend(m,i(k).offset(),{elem:k,target:j.target,pageX:j.pageX,pageY:j.pageY});d.add(document,"mousemove mouseup",f,m);g(k,false);h.dragging=null;return false;case !h.dragging&&"mousemove":if(e(j.pageX-m.pageX)+e(j.pageY-m.pageY)<m.distance){break}j.target=m.target;l=b(j,"dragstart",k);if(l!==false){h.dragging=k;h.proxy=j.dragProxy=i(l||k)[0]}case"mousemove":if(h.dragging){l=b(j,"drag",k);if(c.drop){c.drop.allowed=(l!==false);c.drop.handler(j)}if(l!==false){break}j.type="mouseup"}case"mouseup":d.remove(document,"mousemove mouseup",f);if(h.dragging){if(c.drop){c.drop.handler(j)}b(j,"dragend",k)}g(k,true);h.dragging=h.proxy=m.elem=false;break}return true}function b(m,k,j){m.type=k;var l=i.event.handle.call(j,m);return l===false?false:l||m.result}function e(j){return Math.pow(j,2)}function a(){return(h.dragging===false)}function g(j,k){if(!j){return}j.unselectable=k?"off":"on";j.onselectstart=function(){return k};if(j.style){j.style.MozUserSelect=k?"":"none"}}})(jQuery);(function(f){var e=["DOMMouseScroll","mousewheel"];f.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var a=e.length;a;){this.addEventListener(e[--a],d,false)}}else{this.onmousewheel=d}},teardown:function(){if(this.removeEventListener){for(var a=e.length;a;){this.removeEventListener(e[--a],d,false)}}else{this.onmousewheel=null}}};f.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}});function d(b){var h=[].slice.call(arguments,1),a=0,c=true;b=f.event.fix(b||window.event);b.type="mousewheel";if(b.wheelDelta){a=b.wheelDelta/120}if(b.detail){a=-b.detail/3}h.unshift(b,a);return f.event.handle.apply(this,h)}})(jQuery);(function(b){var a={xaxis:{zoomRange:null,panRange:null},zoom:{interactive:false,trigger:"dblclick",amount:1.5},pan:{interactive:false,cursor:"move",frameRate:20}};function c(o){function m(q,p){var r=o.offset();r.left=q.pageX-r.left;r.top=q.pageY-r.top;if(p){o.zoomOut({center:r})}else{o.zoom({center:r})}}function d(p,q){m(p,q<0);return false}var i="default",g=0,e=0,n=null;function f(p){if(p.which!=1){return false}var q=o.getPlaceholder().css("cursor");if(q){i=q}o.getPlaceholder().css("cursor",o.getOptions().pan.cursor);g=p.pageX;e=p.pageY}function j(q){var p=o.getOptions().pan.frameRate;if(n||!p){return}n=setTimeout(function(){o.pan({left:g-q.pageX,top:e-q.pageY});g=q.pageX;e=q.pageY;n=null},1/p*1000)}function h(p){if(n){clearTimeout(n);n=null}o.getPlaceholder().css("cursor",i);o.pan({left:g-p.pageX,top:e-p.pageY})}function l(q,p){var r=q.getOptions();if(r.zoom.interactive){p[r.zoom.trigger](m);p.mousewheel(d)}if(r.pan.interactive){p.bind("dragstart",{distance:10},f);p.bind("drag",j);p.bind("dragend",h)}}o.zoomOut=function(p){if(!p){p={}}if(!p.amount){p.amount=o.getOptions().zoom.amount}p.amount=1/p.amount;o.zoom(p)};o.zoom=function(q){if(!q){q={}}var x=q.center,r=q.amount||o.getOptions().zoom.amount,p=o.width(),t=o.height();if(!x){x={left:p/2,top:t/2}}var s=x.left/p,v=x.top/t,u={x:{min:x.left-s*p/r,max:x.left+(1-s)*p/r},y:{min:x.top-v*t/r,max:x.top+(1-v)*t/r}};b.each(o.getAxes(),function(z,C){var D=C.options,B=u[C.direction].min,w=u[C.direction].max,E=D.zoomRange;if(E===false){return}B=C.c2p(B);w=C.c2p(w);if(B>w){var A=B;B=w;w=A}var y=w-B;if(E&&((E[0]!=null&&y<E[0])||(E[1]!=null&&y>E[1]))){return}D.min=B;D.max=w});o.setupGrid();o.draw();if(!q.preventEvent){o.getPlaceholder().trigger("plotzoom",[o])}};o.pan=function(p){var q={x:+p.left,y:+p.top};if(isNaN(q.x)){q.x=0}if(isNaN(q.y)){q.y=0}b.each(o.getAxes(),function(s,u){var v=u.options,t,r,w=q[u.direction];t=u.c2p(u.p2c(u.min)+w),r=u.c2p(u.p2c(u.max)+w);var x=v.panRange;if(x===false){return}if(x){if(x[0]!=null&&x[0]>t){w=x[0]-t;t+=w;r+=w}if(x[1]!=null&&x[1]<r){w=x[1]-r;t+=w;r+=w}}v.min=t;v.max=r});o.setupGrid();o.draw();if(!p.preventEvent){o.getPlaceholder().trigger("plotpan",[o])}};function k(q,p){p.unbind(q.getOptions().zoom.trigger,m);p.unbind("mousewheel",d);p.unbind("dragstart",f);p.unbind("drag",j);p.unbind("dragend",h);if(n){clearTimeout(n)}}o.hooks.bindEvents.push(l);o.hooks.shutdown.push(k)}b.plot.plugins.push({init:c,options:a,name:"navigate",version:"1.3"})})(jQuery); \ No newline at end of file
diff --git a/chromium/third_party/flot/jquery.flot.pie.min.js b/chromium/third_party/flot/jquery.flot.pie.min.js
index 3de8f44c5d0..b7bf870d759 100644
--- a/chromium/third_party/flot/jquery.flot.pie.min.js
+++ b/chromium/third_party/flot/jquery.flot.pie.min.js
@@ -1,56 +1 @@
-/* Flot plugin for rendering pie charts.
-
-Copyright (c) 2007-2013 IOLA and Ole Laursen.
-Licensed under the MIT license.
-
-The plugin assumes that each series has a single data value, and that each
-value is a positive integer or zero. Negative numbers don't make sense for a
-pie chart, and have unpredictable results. The values do NOT need to be
-passed in as percentages; the plugin will calculate the total and per-slice
-percentages internally.
-
-* Created by Brian Medendorp
-
-* Updated with contributions from btburnett3, Anthony Aragues and Xavi Ivars
-
-The plugin supports these options:
-
- series: {
- pie: {
- show: true/false
- radius: 0-1 for percentage of fullsize, or a specified pixel length, or 'auto'
- innerRadius: 0-1 for percentage of fullsize or a specified pixel length, for creating a donut effect
- startAngle: 0-2 factor of PI used for starting angle (in radians) i.e 3/2 starts at the top, 0 and 2 have the same result
- tilt: 0-1 for percentage to tilt the pie, where 1 is no tilt, and 0 is completely flat (nothing will show)
- offset: {
- top: integer value to move the pie up or down
- left: integer value to move the pie left or right, or 'auto'
- },
- stroke: {
- color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#FFF')
- width: integer pixel width of the stroke
- },
- label: {
- show: true/false, or 'auto'
- formatter: a user-defined function that modifies the text/style of the label text
- radius: 0-1 for percentage of fullsize, or a specified pixel length
- background: {
- color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#000')
- opacity: 0-1
- },
- threshold: 0-1 for the percentage value at which to hide labels (if they're too small)
- },
- combine: {
- threshold: 0-1 for the percentage value at which to combine slices (if they're too small)
- color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#CCC'), if null, the plugin will automatically use the color of the first slice to be combined
- label: any text value of what the combined slice should be labeled
- }
- highlight: {
- opacity: 0-1
- }
- }
- }
-
-More detail and specific examples can be found in the included HTML file.
-
-*/(function(e){function r(r){function p(t,n,r){l||(l=!0,s=t.getCanvas(),o=e(s).parent(),i=t.getOptions(),t.setData(d(t.getData())))}function d(t){var n=0,r=0,s=0,o=i.series.pie.combine.color,u=[];for(var a=0;a<t.length;++a){var f=t[a].data;e.isArray(f)&&f.length==1&&(f=f[0]),e.isArray(f)?!isNaN(parseFloat(f[1]))&&isFinite(f[1])?f[1]=+f[1]:f[1]=0:!isNaN(parseFloat(f))&&isFinite(f)?f=[1,+f]:f=[1,0],t[a].data=[f]}for(var a=0;a<t.length;++a)n+=t[a].data[0][1];for(var a=0;a<t.length;++a){var f=t[a].data[0][1];f/n<=i.series.pie.combine.threshold&&(r+=f,s++,o||(o=t[a].color))}for(var a=0;a<t.length;++a){var f=t[a].data[0][1];(s<2||f/n>i.series.pie.combine.threshold)&&u.push({data:[[1,f]],color:t[a].color,label:t[a].label,angle:f*Math.PI*2/n,percent:f/(n/100)})}return s>1&&u.push({data:[[1,r]],color:o,label:i.series.pie.combine.label,angle:r*Math.PI*2/n,percent:r/(n/100)}),u}function v(r,s){function y(){c.clearRect(0,0,h,p),o.children().filter(".pieLabel, .pieLabelBackground").remove()}function b(){var e=i.series.pie.shadow.left,t=i.series.pie.shadow.top,n=10,r=i.series.pie.shadow.alpha,s=i.series.pie.radius>1?i.series.pie.radius:u*i.series.pie.radius;if(s>=h/2-e||s*i.series.pie.tilt>=p/2-t||s<=n)return;c.save(),c.translate(e,t),c.globalAlpha=r,c.fillStyle="#000",c.translate(a,f),c.scale(1,i.series.pie.tilt);for(var o=1;o<=n;o++)c.beginPath(),c.arc(0,0,s,0,Math.PI*2,!1),c.fill(),s-=o;c.restore()}function w(){function l(e,t,i){if(e<=0||isNaN(e))return;i?c.fillStyle=t:(c.strokeStyle=t,c.lineJoin="round"),c.beginPath(),Math.abs(e-Math.PI*2)>1e-9&&c.moveTo(0,0),c.arc(0,0,n,r,r+e/2,!1),c.arc(0,0,n,r+e/2,r+e,!1),c.closePath(),r+=e,i?c.fill():c.stroke()}function d(){function l(t,n,s){if(t.data[0][1]==0)return!0;var u=i.legend.labelFormatter,l,c=i.series.pie.label.formatter;u?l=u(t.label,t):l=t.label,c&&(l=c(l,t));var d=(n+t.angle+n)/2,v=a+Math.round(Math.cos(d)*r),m=f+Math.round(Math.sin(d)*r)*i.series.pie.tilt,g="<span class='pieLabel' id='pieLabel"+s+"' style='position:absolute;top:"+m+"px;left:"+v+"px;'>"+l+"</span>";o.append(g);var y=o.children("#pieLabel"+s),b=m-y.height()/2,w=v-y.width()/2;y.css("top",b),y.css("left",w);if(0-b>0||0-w>0||p-(b+y.height())<0||h-(w+y.width())<0)return!1;if(i.series.pie.label.background.opacity!=0){var E=i.series.pie.label.background.color;E==null&&(E=t.color);var S="top:"+b+"px;left:"+w+"px;";e("<div class='pieLabelBackground' style='position:absolute;width:"+y.width()+"px;height:"+y.height()+"px;"+S+"background-color:"+E+";'></div>").css("opacity",i.series.pie.label.background.opacity).insertBefore(y)}return!0}var n=t,r=i.series.pie.label.radius>1?i.series.pie.label.radius:u*i.series.pie.label.radius;for(var s=0;s<v.length;++s){if(v[s].percent>=i.series.pie.label.threshold*100&&!l(v[s],n,s))return!1;n+=v[s].angle}return!0}var t=Math.PI*i.series.pie.startAngle,n=i.series.pie.radius>1?i.series.pie.radius:u*i.series.pie.radius;c.save(),c.translate(a,f),c.scale(1,i.series.pie.tilt),c.save();var r=t;for(var s=0;s<v.length;++s)v[s].startAngle=r,l(v[s].angle,v[s].color,!0);c.restore();if(i.series.pie.stroke.width>0){c.save(),c.lineWidth=i.series.pie.stroke.width,r=t;for(var s=0;s<v.length;++s)l(v[s].angle,i.series.pie.stroke.color,!1);c.restore()}return m(c),c.restore(),i.series.pie.label.show?d():!0}if(!o)return;var h=r.getPlaceholder().width(),p=r.getPlaceholder().height(),d=o.children().filter(".legend").children().width()||0;c=s,l=!1,u=Math.min(h,p/i.series.pie.tilt)/2,f=p/2+i.series.pie.offset.top,a=h/2,i.series.pie.offset.left=="auto"?i.legend.position.match("w")?a+=d/2:a-=d/2:a+=i.series.pie.offset.left,a<u?a=u:a>h-u&&(a=h-u);var v=r.getData(),g=0;do g>0&&(u*=n),g+=1,y(),i.series.pie.tilt<=.8&&b();while(!w()&&g<t);g>=t&&(y(),o.prepend("<div class='error'>Could not draw pie with labels contained inside canvas</div>")),r.setSeries&&r.insertLegend&&(r.setSeries(v),r.insertLegend())}function m(e){if(i.series.pie.innerRadius>0){e.save();var t=i.series.pie.innerRadius>1?i.series.pie.innerRadius:u*i.series.pie.innerRadius;e.globalCompositeOperation="destination-out",e.beginPath(),e.fillStyle=i.series.pie.stroke.color,e.arc(0,0,t,0,Math.PI*2,!1),e.fill(),e.closePath(),e.restore(),e.save(),e.beginPath(),e.strokeStyle=i.series.pie.stroke.color,e.arc(0,0,t,0,Math.PI*2,!1),e.stroke(),e.closePath(),e.restore()}}function g(e,t){for(var n=!1,r=-1,i=e.length,s=i-1;++r<i;s=r)(e[r][1]<=t[1]&&t[1]<e[s][1]||e[s][1]<=t[1]&&t[1]<e[r][1])&&t[0]<(e[s][0]-e[r][0])*(t[1]-e[r][1])/(e[s][1]-e[r][1])+e[r][0]&&(n=!n);return n}function y(e,t){var n=r.getData(),i=r.getOptions(),s=i.series.pie.radius>1?i.series.pie.radius:u*i.series.pie.radius,o,l;for(var h=0;h<n.length;++h){var p=n[h];if(p.pie.show){c.save(),c.beginPath(),c.moveTo(0,0),c.arc(0,0,s,p.startAngle,p.startAngle+p.angle/2,!1),c.arc(0,0,s,p.startAngle+p.angle/2,p.startAngle+p.angle,!1),c.closePath(),o=e-a,l=t-f;if(c.isPointInPath){if(c.isPointInPath(e-a,t-f))return c.restore(),{datapoint:[p.percent,p.data],dataIndex:0,series:p,seriesIndex:h}}else{var d=s*Math.cos(p.startAngle),v=s*Math.sin(p.startAngle),m=s*Math.cos(p.startAngle+p.angle/4),y=s*Math.sin(p.startAngle+p.angle/4),b=s*Math.cos(p.startAngle+p.angle/2),w=s*Math.sin(p.startAngle+p.angle/2),E=s*Math.cos(p.startAngle+p.angle/1.5),S=s*Math.sin(p.startAngle+p.angle/1.5),x=s*Math.cos(p.startAngle+p.angle),T=s*Math.sin(p.startAngle+p.angle),N=[[0,0],[d,v],[m,y],[b,w],[E,S],[x,T]],C=[o,l];if(g(N,C))return c.restore(),{datapoint:[p.percent,p.data],dataIndex:0,series:p,seriesIndex:h}}c.restore()}}return null}function b(e){E("plothover",e)}function w(e){E("plotclick",e)}function E(e,t){var n=r.offset(),s=parseInt(t.pageX-n.left),u=parseInt(t.pageY-n.top),a=y(s,u);if(i.grid.autoHighlight)for(var f=0;f<h.length;++f){var l=h[f];l.auto==e&&(!a||l.series!=a.series)&&x(l.series)}a&&S(a.series,e);var c={pageX:t.pageX,pageY:t.pageY};o.trigger(e,[c,a])}function S(e,t){var n=T(e);n==-1?(h.push({series:e,auto:t}),r.triggerRedrawOverlay()):t||(h[n].auto=!1)}function x(e){e==null&&(h=[],r.triggerRedrawOverlay());var t=T(e);t!=-1&&(h.splice(t,1),r.triggerRedrawOverlay())}function T(e){for(var t=0;t<h.length;++t){var n=h[t];if(n.series==e)return t}return-1}function N(e,t){function s(e){if(e.angle<=0||isNaN(e.angle))return;t.fillStyle="rgba(255, 255, 255, "+n.series.pie.highlight.opacity+")",t.beginPath(),Math.abs(e.angle-Math.PI*2)>1e-9&&t.moveTo(0,0),t.arc(0,0,r,e.startAngle,e.startAngle+e.angle/2,!1),t.arc(0,0,r,e.startAngle+e.angle/2,e.startAngle+e.angle,!1),t.closePath(),t.fill()}var n=e.getOptions(),r=n.series.pie.radius>1?n.series.pie.radius:u*n.series.pie.radius;t.save(),t.translate(a,f),t.scale(1,n.series.pie.tilt);for(var i=0;i<h.length;++i)s(h[i].series);m(t),t.restore()}var s=null,o=null,u=null,a=null,f=null,l=!1,c=null,h=[];r.hooks.processOptions.push(function(e,t){t.series.pie.show&&(t.grid.show=!1,t.series.pie.label.show=="auto"&&(t.legend.show?t.series.pie.label.show=!1:t.series.pie.label.show=!0),t.series.pie.radius=="auto"&&(t.series.pie.label.show?t.series.pie.radius=.75:t.series.pie.radius=1),t.series.pie.tilt>1?t.series.pie.tilt=1:t.series.pie.tilt<0&&(t.series.pie.tilt=0))}),r.hooks.bindEvents.push(function(e,t){var n=e.getOptions();n.series.pie.show&&(n.grid.hoverable&&t.unbind("mousemove").mousemove(b),n.grid.clickable&&t.unbind("click").click(w))}),r.hooks.processDatapoints.push(function(e,t,n,r){var i=e.getOptions();i.series.pie.show&&p(e,t,n,r)}),r.hooks.drawOverlay.push(function(e,t){var n=e.getOptions();n.series.pie.show&&N(e,t)}),r.hooks.draw.push(function(e,t){var n=e.getOptions();n.series.pie.show&&v(e,t)})}var t=10,n=.95,i={series:{pie:{show:!1,radius:"auto",innerRadius:0,startAngle:1.5,tilt:1,shadow:{left:5,top:15,alpha:.02},offset:{top:0,left:"auto"},stroke:{color:"#fff",width:1},label:{show:"auto",formatter:function(e,t){return"<div style='font-size:x-small;text-align:center;padding:2px;color:"+t.color+";'>"+e+"<br/>"+Math.round(t.percent)+"%</div>"},radius:1,background:{color:null,opacity:0},threshold:0},combine:{threshold:-1,color:null,label:"Other"},highlight:{opacity:.5}}}};e.plot.plugins.push({init:r,options:i,name:"pie",version:"1.1"})})(jQuery); \ No newline at end of file
+(function(b){function c(D){var h=null;var L=null;var n=null;var B=null;var p=null;var M=0;var F=true;var o=10;var w=0.95;var A=0;var d=false;var z=false;var j=[];D.hooks.processOptions.push(g);D.hooks.bindEvents.push(e);function g(O,N){if(N.series.pie.show){N.grid.show=false;if(N.series.pie.label.show=="auto"){if(N.legend.show){N.series.pie.label.show=false}else{N.series.pie.label.show=true}}if(N.series.pie.radius=="auto"){if(N.series.pie.label.show){N.series.pie.radius=3/4}else{N.series.pie.radius=1}}if(N.series.pie.tilt>1){N.series.pie.tilt=1}if(N.series.pie.tilt<0){N.series.pie.tilt=0}O.hooks.processDatapoints.push(E);O.hooks.drawOverlay.push(H);O.hooks.draw.push(r)}}function e(P,N){var O=P.getOptions();if(O.series.pie.show&&O.grid.hoverable){N.unbind("mousemove").mousemove(t)}if(O.series.pie.show&&O.grid.clickable){N.unbind("click").click(l)}}function G(O){var P="";function N(S,T){if(!T){T=0}for(var R=0;R<S.length;++R){for(var Q=0;Q<T;Q++){P+="\t"}if(typeof S[R]=="object"){P+=""+R+":\n";N(S[R],T+1)}else{P+=""+R+": "+S[R]+"\n"}}}N(O);alert(P)}function q(P){for(var N=0;N<P.length;++N){var O=parseFloat(P[N].data[0][1]);if(O){M+=O}}}function E(Q,N,O,P){if(!d){d=true;h=Q.getCanvas();L=b(h).parent();a=Q.getOptions();Q.setData(K(Q.getData()))}}function I(){A=L.children().filter(".legend").children().width();n=Math.min(h.width,(h.height/a.series.pie.tilt))/2;p=(h.height/2)+a.series.pie.offset.top;B=(h.width/2);if(a.series.pie.offset.left=="auto"){if(a.legend.position.match("w")){B+=A/2}else{B-=A/2}}else{B+=a.series.pie.offset.left}if(B<n){B=n}else{if(B>h.width-n){B=h.width-n}}}function v(O){for(var N=0;N<O.length;++N){if(typeof(O[N].data)=="number"){O[N].data=[[1,O[N].data]]}else{if(typeof(O[N].data)=="undefined"||typeof(O[N].data[0])=="undefined"){if(typeof(O[N].data)!="undefined"&&typeof(O[N].data.label)!="undefined"){O[N].label=O[N].data.label}O[N].data=[[1,0]]}}}return O}function K(Q){Q=v(Q);q(Q);var P=0;var S=0;var N=a.series.pie.combine.color;var R=[];for(var O=0;O<Q.length;++O){Q[O].data[0][1]=parseFloat(Q[O].data[0][1]);if(!Q[O].data[0][1]){Q[O].data[0][1]=0}if(Q[O].data[0][1]/M<=a.series.pie.combine.threshold){P+=Q[O].data[0][1];S++;if(!N){N=Q[O].color}}else{R.push({data:[[1,Q[O].data[0][1]]],color:Q[O].color,label:Q[O].label,angle:(Q[O].data[0][1]*(Math.PI*2))/M,percent:(Q[O].data[0][1]/M*100)})}}if(S>0){R.push({data:[[1,P]],color:N,label:a.series.pie.combine.label,angle:(P*(Math.PI*2))/M,percent:(P/M*100)})}return R}function r(S,Q){if(!L){return}ctx=Q;I();var T=S.getData();var P=0;while(F&&P<o){F=false;if(P>0){n*=w}P+=1;N();if(a.series.pie.tilt<=0.8){O()}R()}if(P>=o){N();L.prepend('<div class="error">Could not draw pie with labels contained inside canvas</div>')}if(S.setSeries&&S.insertLegend){S.setSeries(T);S.insertLegend()}function N(){ctx.clearRect(0,0,h.width,h.height);L.children().filter(".pieLabel, .pieLabelBackground").remove()}function O(){var Z=5;var Y=15;var W=10;var X=0.02;if(a.series.pie.radius>1){var U=a.series.pie.radius}else{var U=n*a.series.pie.radius}if(U>=(h.width/2)-Z||U*a.series.pie.tilt>=(h.height/2)-Y||U<=W){return}ctx.save();ctx.translate(Z,Y);ctx.globalAlpha=X;ctx.fillStyle="#000";ctx.translate(B,p);ctx.scale(1,a.series.pie.tilt);for(var V=1;V<=W;V++){ctx.beginPath();ctx.arc(0,0,U,0,Math.PI*2,false);ctx.fill();U-=V}ctx.restore()}function R(){startAngle=Math.PI*a.series.pie.startAngle;if(a.series.pie.radius>1){var U=a.series.pie.radius}else{var U=n*a.series.pie.radius}ctx.save();ctx.translate(B,p);ctx.scale(1,a.series.pie.tilt);ctx.save();var Y=startAngle;for(var W=0;W<T.length;++W){T[W].startAngle=Y;X(T[W].angle,T[W].color,true)}ctx.restore();ctx.save();ctx.lineWidth=a.series.pie.stroke.width;Y=startAngle;for(var W=0;W<T.length;++W){X(T[W].angle,a.series.pie.stroke.color,false)}ctx.restore();J(ctx);if(a.series.pie.label.show){V()}ctx.restore();function X(ab,Z,aa){if(ab<=0){return}if(aa){ctx.fillStyle=Z}else{ctx.strokeStyle=Z;ctx.lineJoin="round"}ctx.beginPath();if(Math.abs(ab-Math.PI*2)>1e-9){ctx.moveTo(0,0)}else{if(b.browser.msie){ab-=0.0001}}ctx.arc(0,0,U,Y,Y+ab,false);ctx.closePath();Y+=ab;if(aa){ctx.fill()}else{ctx.stroke()}}function V(){var ac=startAngle;if(a.series.pie.label.radius>1){var Z=a.series.pie.label.radius}else{var Z=n*a.series.pie.label.radius}for(var ab=0;ab<T.length;++ab){if(T[ab].percent>=a.series.pie.label.threshold*100){aa(T[ab],ac,ab)}ac+=T[ab].angle}function aa(ap,ai,ag){if(ap.data[0][1]==0){return}var ar=a.legend.labelFormatter,aq,ae=a.series.pie.label.formatter;if(ar){aq=ar(ap.label,ap)}else{aq=ap.label}if(ae){aq=ae(aq,ap)}var aj=((ai+ap.angle)+ai)/2;var ao=B+Math.round(Math.cos(aj)*Z);var am=p+Math.round(Math.sin(aj)*Z)*a.series.pie.tilt;var af='<span class="pieLabel" id="pieLabel'+ag+'" style="position:absolute;top:'+am+"px;left:"+ao+'px;">'+aq+"</span>";L.append(af);var an=L.children("#pieLabel"+ag);var ad=(am-an.height()/2);var ah=(ao-an.width()/2);an.css("top",ad);an.css("left",ah);if(0-ad>0||0-ah>0||h.height-(ad+an.height())<0||h.width-(ah+an.width())<0){F=true}if(a.series.pie.label.background.opacity!=0){var ak=a.series.pie.label.background.color;if(ak==null){ak=ap.color}var al="top:"+ad+"px;left:"+ah+"px;";b('<div class="pieLabelBackground" style="position:absolute;width:'+an.width()+"px;height:"+an.height()+"px;"+al+"background-color:"+ak+';"> </div>').insertBefore(an).css("opacity",a.series.pie.label.background.opacity)}}}}}function J(N){if(a.series.pie.innerRadius>0){N.save();innerRadius=a.series.pie.innerRadius>1?a.series.pie.innerRadius:n*a.series.pie.innerRadius;N.globalCompositeOperation="destination-out";N.beginPath();N.fillStyle=a.series.pie.stroke.color;N.arc(0,0,innerRadius,0,Math.PI*2,false);N.fill();N.closePath();N.restore();N.save();N.beginPath();N.strokeStyle=a.series.pie.stroke.color;N.arc(0,0,innerRadius,0,Math.PI*2,false);N.stroke();N.closePath();N.restore()}}function s(Q,R){for(var S=false,P=-1,N=Q.length,O=N-1;++P<N;O=P){((Q[P][1]<=R[1]&&R[1]<Q[O][1])||(Q[O][1]<=R[1]&&R[1]<Q[P][1]))&&(R[0]<(Q[O][0]-Q[P][0])*(R[1]-Q[P][1])/(Q[O][1]-Q[P][1])+Q[P][0])&&(S=!S)}return S}function u(R,P){var T=D.getData(),O=D.getOptions(),N=O.series.pie.radius>1?O.series.pie.radius:n*O.series.pie.radius;for(var Q=0;Q<T.length;++Q){var S=T[Q];if(S.pie.show){ctx.save();ctx.beginPath();ctx.moveTo(0,0);ctx.arc(0,0,N,S.startAngle,S.startAngle+S.angle,false);ctx.closePath();x=R-B;y=P-p;if(ctx.isPointInPath){if(ctx.isPointInPath(R-B,P-p)){ctx.restore();return{datapoint:[S.percent,S.data],dataIndex:0,series:S,seriesIndex:Q}}}else{p1X=(N*Math.cos(S.startAngle));p1Y=(N*Math.sin(S.startAngle));p2X=(N*Math.cos(S.startAngle+(S.angle/4)));p2Y=(N*Math.sin(S.startAngle+(S.angle/4)));p3X=(N*Math.cos(S.startAngle+(S.angle/2)));p3Y=(N*Math.sin(S.startAngle+(S.angle/2)));p4X=(N*Math.cos(S.startAngle+(S.angle/1.5)));p4Y=(N*Math.sin(S.startAngle+(S.angle/1.5)));p5X=(N*Math.cos(S.startAngle+S.angle));p5Y=(N*Math.sin(S.startAngle+S.angle));arrPoly=[[0,0],[p1X,p1Y],[p2X,p2Y],[p3X,p3Y],[p4X,p4Y],[p5X,p5Y]];arrPoint=[x,y];if(s(arrPoly,arrPoint)){ctx.restore();return{datapoint:[S.percent,S.data],dataIndex:0,series:S,seriesIndex:Q}}}ctx.restore()}}return null}function t(N){m("plothover",N)}function l(N){m("plotclick",N)}function m(N,T){var O=D.offset(),R=parseInt(T.pageX-O.left),P=parseInt(T.pageY-O.top),V=u(R,P);if(a.grid.autoHighlight){for(var Q=0;Q<j.length;++Q){var S=j[Q];if(S.auto==N&&!(V&&S.series==V.series)){f(S.series)}}}if(V){k(V.series,N)}var U={pageX:T.pageX,pageY:T.pageY};L.trigger(N,[U,V])}function k(O,P){if(typeof O=="number"){O=series[O]}var N=C(O);if(N==-1){j.push({series:O,auto:P});D.triggerRedrawOverlay()}else{if(!P){j[N].auto=false}}}function f(O){if(O==null){j=[];D.triggerRedrawOverlay()}if(typeof O=="number"){O=series[O]}var N=C(O);if(N!=-1){j.splice(N,1);D.triggerRedrawOverlay()}}function C(P){for(var N=0;N<j.length;++N){var O=j[N];if(O.series==P){return N}}return -1}function H(Q,R){var P=Q.getOptions();var N=P.series.pie.radius>1?P.series.pie.radius:n*P.series.pie.radius;R.save();R.translate(B,p);R.scale(1,P.series.pie.tilt);for(i=0;i<j.length;++i){O(j[i].series)}J(R);R.restore();function O(S){if(S.angle<0){return}R.fillStyle="rgba(255, 255, 255, "+P.series.pie.highlight.opacity+")";R.beginPath();if(Math.abs(S.angle-Math.PI*2)>1e-9){R.moveTo(0,0)}R.arc(0,0,N,S.startAngle,S.startAngle+S.angle,false);R.closePath();R.fill()}}}var a={series:{pie:{show:false,radius:"auto",innerRadius:0,startAngle:3/2,tilt:1,offset:{top:0,left:"auto"},stroke:{color:"#FFF",width:1},label:{show:"auto",formatter:function(d,e){return'<div style="font-size:x-small;text-align:center;padding:2px;color:'+e.color+';">'+d+"<br/>"+Math.round(e.percent)+"%</div>"},radius:1,background:{color:null,opacity:0},threshold:0},combine:{threshold:-1,color:null,label:"Other"},highlight:{opacity:0.5}}}};b.plot.plugins.push({init:c,options:a,name:"pie",version:"1.0"})})(jQuery); \ No newline at end of file
diff --git a/chromium/third_party/flot/jquery.flot.resize.min.js b/chromium/third_party/flot/jquery.flot.resize.min.js
index b2ddec10cc7..1fa0771f570 100644
--- a/chromium/third_party/flot/jquery.flot.resize.min.js
+++ b/chromium/third_party/flot/jquery.flot.resize.min.js
@@ -1,19 +1 @@
-/* Flot plugin for automatically redrawing plots as the placeholder resizes.
-
-Copyright (c) 2007-2013 IOLA and Ole Laursen.
-Licensed under the MIT license.
-
-It works by listening for changes on the placeholder div (through the jQuery
-resize event plugin) - if the size changes, it will redraw the plot.
-
-There are no options. If you need to disable the plugin for some plots, you
-can just fix the size of their placeholders.
-
-*//* Inline dependency:
- * jQuery resize event - v1.1 - 3/14/2010
- * http://benalman.com/projects/jquery-resize-plugin/
- *
- * Copyright (c) 2010 "Cowboy" Ben Alman
- * Dual licensed under the MIT and GPL licenses.
- * http://benalman.com/about/license/
- */(function(e,t,n){function c(){s=t[o](function(){r.each(function(){var t=e(this),n=t.width(),r=t.height(),i=e.data(this,a);(n!==i.w||r!==i.h)&&t.trigger(u,[i.w=n,i.h=r])}),c()},i[f])}var r=e([]),i=e.resize=e.extend(e.resize,{}),s,o="setTimeout",u="resize",a=u+"-special-event",f="delay",l="throttleWindow";i[f]=250,i[l]=!0,e.event.special[u]={setup:function(){if(!i[l]&&this[o])return!1;var t=e(this);r=r.add(t),e.data(this,a,{w:t.width(),h:t.height()}),r.length===1&&c()},teardown:function(){if(!i[l]&&this[o])return!1;var t=e(this);r=r.not(t),t.removeData(a),r.length||clearTimeout(s)},add:function(t){function s(t,i,s){var o=e(this),u=e.data(this,a);u.w=i!==n?i:o.width(),u.h=s!==n?s:o.height(),r.apply(this,arguments)}if(!i[l]&&this[o])return!1;var r;if(e.isFunction(t))return r=t,s;r=t.handler,t.handler=s}}})(jQuery,this),function(e){function n(e){function t(){var t=e.getPlaceholder();if(t.width()==0||t.height()==0)return;e.resize(),e.setupGrid(),e.draw()}function n(e,n){e.getPlaceholder().resize(t)}function r(e,n){e.getPlaceholder().unbind("resize",t)}e.hooks.bindEvents.push(n),e.hooks.shutdown.push(r)}var t={};e.plot.plugins.push({init:n,options:t,name:"resize",version:"1.0"})}(jQuery); \ No newline at end of file
+(function(n,p,u){var w=n([]),s=n.resize=n.extend(n.resize,{}),o,l="setTimeout",m="resize",t=m+"-special-event",v="delay",r="throttleWindow";s[v]=250;s[r]=true;n.event.special[m]={setup:function(){if(!s[r]&&this[l]){return false}var a=n(this);w=w.add(a);n.data(this,t,{w:a.width(),h:a.height()});if(w.length===1){q()}},teardown:function(){if(!s[r]&&this[l]){return false}var a=n(this);w=w.not(a);a.removeData(t);if(!w.length){clearTimeout(o)}},add:function(b){if(!s[r]&&this[l]){return false}var c;function a(d,h,g){var f=n(this),e=n.data(this,t);e.w=h!==u?h:f.width();e.h=g!==u?g:f.height();c.apply(this,arguments)}if(n.isFunction(b)){c=b;return a}else{c=b.handler;b.handler=a}}};function q(){o=p[l](function(){w.each(function(){var d=n(this),a=d.width(),b=d.height(),c=n.data(this,t);if(a!==c.w||b!==c.h){d.trigger(m,[c.w=a,c.h=b])}});q()},s[v])}})(jQuery,this);(function(b){var a={};function c(f){function e(){var h=f.getPlaceholder();if(h.width()==0||h.height()==0){return}f.resize();f.setupGrid();f.draw()}function g(i,h){i.getPlaceholder().resize(e)}function d(i,h){i.getPlaceholder().unbind("resize",e)}f.hooks.bindEvents.push(g);f.hooks.shutdown.push(d)}b.plot.plugins.push({init:c,options:a,name:"resize",version:"1.0"})})(jQuery); \ No newline at end of file
diff --git a/chromium/third_party/flot/jquery.flot.selection.min.js b/chromium/third_party/flot/jquery.flot.selection.min.js
index bbfb975f432..badc0052dbe 100644
--- a/chromium/third_party/flot/jquery.flot.selection.min.js
+++ b/chromium/third_party/flot/jquery.flot.selection.min.js
@@ -1,79 +1 @@
-/* Flot plugin for selecting regions of a plot.
-
-Copyright (c) 2007-2013 IOLA and Ole Laursen.
-Licensed under the MIT license.
-
-The plugin supports these options:
-
-selection: {
- mode: null or "x" or "y" or "xy",
- color: color,
- shape: "round" or "miter" or "bevel",
- minSize: number of pixels
-}
-
-Selection support is enabled by setting the mode to one of "x", "y" or "xy".
-In "x" mode, the user will only be able to specify the x range, similarly for
-"y" mode. For "xy", the selection becomes a rectangle where both ranges can be
-specified. "color" is color of the selection (if you need to change the color
-later on, you can get to it with plot.getOptions().selection.color). "shape"
-is the shape of the corners of the selection.
-
-"minSize" is the minimum size a selection can be in pixels. This value can
-be customized to determine the smallest size a selection can be and still
-have the selection rectangle be displayed. When customizing this value, the
-fact that it refers to pixels, not axis units must be taken into account.
-Thus, for example, if there is a bar graph in time mode with BarWidth set to 1
-minute, setting "minSize" to 1 will not make the minimum selection size 1
-minute, but rather 1 pixel. Note also that setting "minSize" to 0 will prevent
-"plotunselected" events from being fired when the user clicks the mouse without
-dragging.
-
-When selection support is enabled, a "plotselected" event will be emitted on
-the DOM element you passed into the plot function. The event handler gets a
-parameter with the ranges selected on the axes, like this:
-
- placeholder.bind( "plotselected", function( event, ranges ) {
- alert("You selected " + ranges.xaxis.from + " to " + ranges.xaxis.to)
- // similar for yaxis - with multiple axes, the extra ones are in
- // x2axis, x3axis, ...
- });
-
-The "plotselected" event is only fired when the user has finished making the
-selection. A "plotselecting" event is fired during the process with the same
-parameters as the "plotselected" event, in case you want to know what's
-happening while it's happening,
-
-A "plotunselected" event with no arguments is emitted when the user clicks the
-mouse to remove the selection. As stated above, setting "minSize" to 0 will
-destroy this behavior.
-
-The plugin allso adds the following methods to the plot object:
-
-- setSelection( ranges, preventEvent )
-
- Set the selection rectangle. The passed in ranges is on the same form as
- returned in the "plotselected" event. If the selection mode is "x", you
- should put in either an xaxis range, if the mode is "y" you need to put in
- an yaxis range and both xaxis and yaxis if the selection mode is "xy", like
- this:
-
- setSelection({ xaxis: { from: 0, to: 10 }, yaxis: { from: 40, to: 60 } });
-
- setSelection will trigger the "plotselected" event when called. If you don't
- want that to happen, e.g. if you're inside a "plotselected" handler, pass
- true as the second parameter. If you are using multiple axes, you can
- specify the ranges on any of those, e.g. as x2axis/x3axis/... instead of
- xaxis, the plugin picks the first one it sees.
-
-- clearSelection( preventEvent )
-
- Clear the selection rectangle. Pass in true to avoid getting a
- "plotunselected" event.
-
-- getSelection()
-
- Returns the current selection in the same format as the "plotselected"
- event. If there's currently no selection, the function returns null.
-
-*/(function(e){function t(t){function s(e){n.active&&(h(e),t.getPlaceholder().trigger("plotselecting",[a()]))}function o(t){if(t.which!=1)return;document.body.focus(),document.onselectstart!==undefined&&r.onselectstart==null&&(r.onselectstart=document.onselectstart,document.onselectstart=function(){return!1}),document.ondrag!==undefined&&r.ondrag==null&&(r.ondrag=document.ondrag,document.ondrag=function(){return!1}),c(n.first,t),n.active=!0,i=function(e){u(e)},e(document).one("mouseup",i)}function u(e){return i=null,document.onselectstart!==undefined&&(document.onselectstart=r.onselectstart),document.ondrag!==undefined&&(document.ondrag=r.ondrag),n.active=!1,h(e),m()?f():(t.getPlaceholder().trigger("plotunselected",[]),t.getPlaceholder().trigger("plotselecting",[null])),!1}function a(){if(!m())return null;if(!n.show)return null;var r={},i=n.first,s=n.second;return e.each(t.getAxes(),function(e,t){if(t.used){var n=t.c2p(i[t.direction]),o=t.c2p(s[t.direction]);r[e]={from:Math.min(n,o),to:Math.max(n,o)}}}),r}function f(){var e=a();t.getPlaceholder().trigger("plotselected",[e]),e.xaxis&&e.yaxis&&t.getPlaceholder().trigger("selected",[{x1:e.xaxis.from,y1:e.yaxis.from,x2:e.xaxis.to,y2:e.yaxis.to}])}function l(e,t,n){return t<e?e:t>n?n:t}function c(e,r){var i=t.getOptions(),s=t.getPlaceholder().offset(),o=t.getPlotOffset();e.x=l(0,r.pageX-s.left-o.left,t.width()),e.y=l(0,r.pageY-s.top-o.top,t.height()),i.selection.mode=="y"&&(e.x=e==n.first?0:t.width()),i.selection.mode=="x"&&(e.y=e==n.first?0:t.height())}function h(e){if(e.pageX==null)return;c(n.second,e),m()?(n.show=!0,t.triggerRedrawOverlay()):p(!0)}function p(e){n.show&&(n.show=!1,t.triggerRedrawOverlay(),e||t.getPlaceholder().trigger("plotunselected",[]))}function d(e,n){var r,i,s,o,u=t.getAxes();for(var a in u){r=u[a];if(r.direction==n){o=n+r.n+"axis",!e[o]&&r.n==1&&(o=n+"axis");if(e[o]){i=e[o].from,s=e[o].to;break}}}e[o]||(r=n=="x"?t.getXAxes()[0]:t.getYAxes()[0],i=e[n+"1"],s=e[n+"2"]);if(i!=null&&s!=null&&i>s){var f=i;i=s,s=f}return{from:i,to:s,axis:r}}function v(e,r){var i,s,o=t.getOptions();o.selection.mode=="y"?(n.first.x=0,n.second.x=t.width()):(s=d(e,"x"),n.first.x=s.axis.p2c(s.from),n.second.x=s.axis.p2c(s.to)),o.selection.mode=="x"?(n.first.y=0,n.second.y=t.height()):(s=d(e,"y"),n.first.y=s.axis.p2c(s.from),n.second.y=s.axis.p2c(s.to)),n.show=!0,t.triggerRedrawOverlay(),!r&&m()&&f()}function m(){var e=t.getOptions().selection.minSize;return Math.abs(n.second.x-n.first.x)>=e&&Math.abs(n.second.y-n.first.y)>=e}var n={first:{x:-1,y:-1},second:{x:-1,y:-1},show:!1,active:!1},r={},i=null;t.clearSelection=p,t.setSelection=v,t.getSelection=a,t.hooks.bindEvents.push(function(e,t){var n=e.getOptions();n.selection.mode!=null&&(t.mousemove(s),t.mousedown(o))}),t.hooks.drawOverlay.push(function(t,r){if(n.show&&m()){var i=t.getPlotOffset(),s=t.getOptions();r.save(),r.translate(i.left,i.top);var o=e.color.parse(s.selection.color);r.strokeStyle=o.scale("a",.8).toString(),r.lineWidth=1,r.lineJoin=s.selection.shape,r.fillStyle=o.scale("a",.4).toString();var u=Math.min(n.first.x,n.second.x)+.5,a=Math.min(n.first.y,n.second.y)+.5,f=Math.abs(n.second.x-n.first.x)-1,l=Math.abs(n.second.y-n.first.y)-1;r.fillRect(u,a,f,l),r.strokeRect(u,a,f,l),r.restore()}}),t.hooks.shutdown.push(function(t,n){n.unbind("mousemove",s),n.unbind("mousedown",o),i&&e(document).unbind("mouseup",i)})}e.plot.plugins.push({init:t,options:{selection:{mode:null,color:"#e8cfac",shape:"round",minSize:5}},name:"selection",version:"1.1"})})(jQuery); \ No newline at end of file
+(function(a){function b(k){var p={first:{x:-1,y:-1},second:{x:-1,y:-1},show:false,active:false};var m={};var r=null;function e(s){if(p.active){l(s);k.getPlaceholder().trigger("plotselecting",[g()])}}function n(s){if(s.which!=1){return}document.body.focus();if(document.onselectstart!==undefined&&m.onselectstart==null){m.onselectstart=document.onselectstart;document.onselectstart=function(){return false}}if(document.ondrag!==undefined&&m.ondrag==null){m.ondrag=document.ondrag;document.ondrag=function(){return false}}d(p.first,s);p.active=true;r=function(t){j(t)};a(document).one("mouseup",r)}function j(s){r=null;if(document.onselectstart!==undefined){document.onselectstart=m.onselectstart}if(document.ondrag!==undefined){document.ondrag=m.ondrag}p.active=false;l(s);if(f()){i()}else{k.getPlaceholder().trigger("plotunselected",[]);k.getPlaceholder().trigger("plotselecting",[null])}return false}function g(){if(!f()){return null}var u={},t=p.first,s=p.second;a.each(k.getAxes(),function(v,w){if(w.used){var y=w.c2p(t[w.direction]),x=w.c2p(s[w.direction]);u[v]={from:Math.min(y,x),to:Math.max(y,x)}}});return u}function i(){var s=g();k.getPlaceholder().trigger("plotselected",[s]);if(s.xaxis&&s.yaxis){k.getPlaceholder().trigger("selected",[{x1:s.xaxis.from,y1:s.yaxis.from,x2:s.xaxis.to,y2:s.yaxis.to}])}}function h(t,u,s){return u<t?t:(u>s?s:u)}function d(w,t){var v=k.getOptions();var u=k.getPlaceholder().offset();var s=k.getPlotOffset();w.x=h(0,t.pageX-u.left-s.left,k.width());w.y=h(0,t.pageY-u.top-s.top,k.height());if(v.selection.mode=="y"){w.x=w==p.first?0:k.width()}if(v.selection.mode=="x"){w.y=w==p.first?0:k.height()}}function l(s){if(s.pageX==null){return}d(p.second,s);if(f()){p.show=true;k.triggerRedrawOverlay()}else{q(true)}}function q(s){if(p.show){p.show=false;k.triggerRedrawOverlay();if(!s){k.getPlaceholder().trigger("plotunselected",[])}}}function c(s,w){var t,y,z,A,x=k.getAxes();for(var u in x){t=x[u];if(t.direction==w){A=w+t.n+"axis";if(!s[A]&&t.n==1){A=w+"axis"}if(s[A]){y=s[A].from;z=s[A].to;break}}}if(!s[A]){t=w=="x"?k.getXAxes()[0]:k.getYAxes()[0];y=s[w+"1"];z=s[w+"2"]}if(y!=null&&z!=null&&y>z){var v=y;y=z;z=v}return{from:y,to:z,axis:t}}function o(t,s){var v,u,w=k.getOptions();if(w.selection.mode=="y"){p.first.x=0;p.second.x=k.width()}else{u=c(t,"x");p.first.x=u.axis.p2c(u.from);p.second.x=u.axis.p2c(u.to)}if(w.selection.mode=="x"){p.first.y=0;p.second.y=k.height()}else{u=c(t,"y");p.first.y=u.axis.p2c(u.from);p.second.y=u.axis.p2c(u.to)}p.show=true;k.triggerRedrawOverlay();if(!s&&f()){i()}}function f(){var s=5;return Math.abs(p.second.x-p.first.x)>=s&&Math.abs(p.second.y-p.first.y)>=s}k.clearSelection=q;k.setSelection=o;k.getSelection=g;k.hooks.bindEvents.push(function(t,s){var u=t.getOptions();if(u.selection.mode!=null){s.mousemove(e);s.mousedown(n)}});k.hooks.drawOverlay.push(function(v,D){if(p.show&&f()){var t=v.getPlotOffset();var s=v.getOptions();D.save();D.translate(t.left,t.top);var z=a.color.parse(s.selection.color);D.strokeStyle=z.scale("a",0.8).toString();D.lineWidth=1;D.lineJoin="round";D.fillStyle=z.scale("a",0.4).toString();var B=Math.min(p.first.x,p.second.x),A=Math.min(p.first.y,p.second.y),C=Math.abs(p.second.x-p.first.x),u=Math.abs(p.second.y-p.first.y);D.fillRect(B,A,C,u);D.strokeRect(B,A,C,u);D.restore()}});k.hooks.shutdown.push(function(t,s){s.unbind("mousemove",e);s.unbind("mousedown",n);if(r){a(document).unbind("mouseup",r)}})}a.plot.plugins.push({init:b,options:{selection:{mode:null,color:"#e8cfac"}},name:"selection",version:"1.1"})})(jQuery); \ No newline at end of file
diff --git a/chromium/third_party/flot/jquery.flot.stack.min.js b/chromium/third_party/flot/jquery.flot.stack.min.js
index 14e9931fe70..bba2a0e5ff7 100644
--- a/chromium/third_party/flot/jquery.flot.stack.min.js
+++ b/chromium/third_party/flot/jquery.flot.stack.min.js
@@ -1,36 +1 @@
-/* Flot plugin for stacking data sets rather than overlyaing them.
-
-Copyright (c) 2007-2013 IOLA and Ole Laursen.
-Licensed under the MIT license.
-
-The plugin assumes the data is sorted on x (or y if stacking horizontally).
-For line charts, it is assumed that if a line has an undefined gap (from a
-null point), then the line above it should have the same gap - insert zeros
-instead of "null" if you want another behaviour. This also holds for the start
-and end of the chart. Note that stacking a mix of positive and negative values
-in most instances doesn't make sense (so it looks weird).
-
-Two or more series are stacked when their "stack" attribute is set to the same
-key (which can be any number or string or just "true"). To specify the default
-stack, you can set the stack option like this:
-
- series: {
- stack: null/false, true, or a key (number/string)
- }
-
-You can also specify it for a single series, like this:
-
- $.plot( $("#placeholder"), [{
- data: [ ... ],
- stack: true
- }])
-
-The stacking order is determined by the order of the data series in the array
-(later series end up on top of the previous).
-
-Internally, the plugin modifies the datapoints in each series, adding an
-offset to the y value. For line series, extra data points are inserted through
-interpolation. If there's a second y value, it's also adjusted (e.g for bar
-charts or filled areas).
-
-*/(function(e){function n(e){function t(e,t){var n=null;for(var r=0;r<t.length;++r){if(e==t[r])break;t[r].stack==e.stack&&(n=t[r])}return n}function n(e,n,r){if(n.stack==null||n.stack===!1)return;var i=t(n,e.getData());if(!i)return;var s=r.pointsize,o=r.points,u=i.datapoints.pointsize,a=i.datapoints.points,f=[],l,c,h,p,d,v,m=n.lines.show,g=n.bars.horizontal,y=s>2&&(g?r.format[2].x:r.format[2].y),b=m&&n.lines.steps,w=!0,E=g?1:0,S=g?0:1,x=0,T=0,N,C;for(;;){if(x>=o.length)break;N=f.length;if(o[x]==null){for(C=0;C<s;++C)f.push(o[x+C]);x+=s}else if(T>=a.length){if(!m)for(C=0;C<s;++C)f.push(o[x+C]);x+=s}else if(a[T]==null){for(C=0;C<s;++C)f.push(null);w=!0,T+=u}else{l=o[x+E],c=o[x+S],p=a[T+E],d=a[T+S],v=0;if(l==p){for(C=0;C<s;++C)f.push(o[x+C]);f[N+S]+=d,v=d,x+=s,T+=u}else if(l>p){if(m&&x>0&&o[x-s]!=null){h=c+(o[x-s+S]-c)*(p-l)/(o[x-s+E]-l),f.push(p),f.push(h+d);for(C=2;C<s;++C)f.push(o[x+C]);v=d}T+=u}else{if(w&&m){x+=s;continue}for(C=0;C<s;++C)f.push(o[x+C]);m&&T>0&&a[T-u]!=null&&(v=d+(a[T-u+S]-d)*(l-p)/(a[T-u+E]-p)),f[N+S]+=v,x+=s}w=!1,N!=f.length&&y&&(f[N+2]+=v)}if(b&&N!=f.length&&N>0&&f[N]!=null&&f[N]!=f[N-s]&&f[N+1]!=f[N-s+1]){for(C=0;C<s;++C)f[N+s+C]=f[N+C];f[N+1]=f[N-s+1]}}r.points=f}e.hooks.processDatapoints.push(n)}var t={series:{stack:null}};e.plot.plugins.push({init:n,options:t,name:"stack",version:"1.2"})})(jQuery); \ No newline at end of file
+(function(b){var a={series:{stack:null}};function c(f){function d(k,j){var h=null;for(var g=0;g<j.length;++g){if(k==j[g]){break}if(j[g].stack==k.stack){h=j[g]}}return h}function e(C,v,g){if(v.stack==null){return}var p=d(v,C.getData());if(!p){return}var z=g.pointsize,F=g.points,h=p.datapoints.pointsize,y=p.datapoints.points,t=[],x,w,k,J,I,r,u=v.lines.show,G=v.bars.horizontal,o=z>2&&(G?g.format[2].x:g.format[2].y),n=u&&v.lines.steps,E=true,q=G?1:0,H=G?0:1,D=0,B=0,A;while(true){if(D>=F.length){break}A=t.length;if(F[D]==null){for(m=0;m<z;++m){t.push(F[D+m])}D+=z}else{if(B>=y.length){if(!u){for(m=0;m<z;++m){t.push(F[D+m])}}D+=z}else{if(y[B]==null){for(m=0;m<z;++m){t.push(null)}E=true;B+=h}else{x=F[D+q];w=F[D+H];J=y[B+q];I=y[B+H];r=0;if(x==J){for(m=0;m<z;++m){t.push(F[D+m])}t[A+H]+=I;r=I;D+=z;B+=h}else{if(x>J){if(u&&D>0&&F[D-z]!=null){k=w+(F[D-z+H]-w)*(J-x)/(F[D-z+q]-x);t.push(J);t.push(k+I);for(m=2;m<z;++m){t.push(F[D+m])}r=I}B+=h}else{if(E&&u){D+=z;continue}for(m=0;m<z;++m){t.push(F[D+m])}if(u&&B>0&&y[B-h]!=null){r=I+(y[B-h+H]-I)*(x-J)/(y[B-h+q]-J)}t[A+H]+=r;D+=z}}E=false;if(A!=t.length&&o){t[A+2]+=r}}}}if(n&&A!=t.length&&A>0&&t[A]!=null&&t[A]!=t[A-z]&&t[A+1]!=t[A-z+1]){for(m=0;m<z;++m){t[A+z+m]=t[A+m]}t[A+1]=t[A-z+1]}}g.points=t}f.hooks.processDatapoints.push(e)}b.plot.plugins.push({init:c,options:a,name:"stack",version:"1.2"})})(jQuery); \ No newline at end of file
diff --git a/chromium/third_party/flot/jquery.flot.symbol.min.js b/chromium/third_party/flot/jquery.flot.symbol.min.js
index b78ea2ec5be..272e003ab49 100644
--- a/chromium/third_party/flot/jquery.flot.symbol.min.js
+++ b/chromium/third_party/flot/jquery.flot.symbol.min.js
@@ -1,14 +1 @@
-/* Flot plugin that adds some extra symbols for plotting points.
-
-Copyright (c) 2007-2013 IOLA and Ole Laursen.
-Licensed under the MIT license.
-
-The symbols are accessed as strings through the standard symbol options:
-
- series: {
- points: {
- symbol: "square" // or "diamond", "triangle", "cross"
- }
- }
-
-*/(function(e){function t(e,t,n){var r={square:function(e,t,n,r,i){var s=r*Math.sqrt(Math.PI)/2;e.rect(t-s,n-s,s+s,s+s)},diamond:function(e,t,n,r,i){var s=r*Math.sqrt(Math.PI/2);e.moveTo(t-s,n),e.lineTo(t,n-s),e.lineTo(t+s,n),e.lineTo(t,n+s),e.lineTo(t-s,n)},triangle:function(e,t,n,r,i){var s=r*Math.sqrt(2*Math.PI/Math.sin(Math.PI/3)),o=s*Math.sin(Math.PI/3);e.moveTo(t-s/2,n+o/2),e.lineTo(t+s/2,n+o/2),i||(e.lineTo(t,n-o/2),e.lineTo(t-s/2,n+o/2))},cross:function(e,t,n,r,i){var s=r*Math.sqrt(Math.PI)/2;e.moveTo(t-s,n-s),e.lineTo(t+s,n+s),e.moveTo(t-s,n+s),e.lineTo(t+s,n-s)}},i=t.points.symbol;r[i]&&(t.points.symbol=r[i])}function n(e){e.hooks.processDatapoints.push(t)}e.plot.plugins.push({init:n,name:"symbols",version:"1.0"})})(jQuery); \ No newline at end of file
+(function(b){function a(h,e,g){var d={square:function(k,j,n,i,m){var l=i*Math.sqrt(Math.PI)/2;k.rect(j-l,n-l,l+l,l+l)},diamond:function(k,j,n,i,m){var l=i*Math.sqrt(Math.PI/2);k.moveTo(j-l,n);k.lineTo(j,n-l);k.lineTo(j+l,n);k.lineTo(j,n+l);k.lineTo(j-l,n)},triangle:function(l,k,o,j,n){var m=j*Math.sqrt(2*Math.PI/Math.sin(Math.PI/3));var i=m*Math.sin(Math.PI/3);l.moveTo(k-m/2,o+i/2);l.lineTo(k+m/2,o+i/2);if(!n){l.lineTo(k,o-i/2);l.lineTo(k-m/2,o+i/2)}},cross:function(k,j,n,i,m){var l=i*Math.sqrt(Math.PI)/2;k.moveTo(j-l,n-l);k.lineTo(j+l,n+l);k.moveTo(j-l,n+l);k.lineTo(j+l,n-l)}};var f=e.points.symbol;if(d[f]){e.points.symbol=d[f]}}function c(d){d.hooks.processDatapoints.push(a)}b.plot.plugins.push({init:c,name:"symbols",version:"1.0"})})(jQuery); \ No newline at end of file
diff --git a/chromium/third_party/flot/jquery.flot.threshold.min.js b/chromium/third_party/flot/jquery.flot.threshold.min.js
index 1ca88a6ce9b..d8b79dfc93c 100644
--- a/chromium/third_party/flot/jquery.flot.threshold.min.js
+++ b/chromium/third_party/flot/jquery.flot.threshold.min.js
@@ -1,43 +1 @@
-/* Flot plugin for thresholding data.
-
-Copyright (c) 2007-2013 IOLA and Ole Laursen.
-Licensed under the MIT license.
-
-The plugin supports these options:
-
- series: {
- threshold: {
- below: number
- color: colorspec
- }
- }
-
-It can also be applied to a single series, like this:
-
- $.plot( $("#placeholder"), [{
- data: [ ... ],
- threshold: { ... }
- }])
-
-An array can be passed for multiple thresholding, like this:
-
- threshold: [{
- below: number1
- color: color1
- },{
- below: number2
- color: color2
- }]
-
-These multiple threshold objects can be passed in any order since they are
-sorted by the processing function.
-
-The data points below "below" are drawn with the specified color. This makes
-it easy to mark points below 0, e.g. for budget data.
-
-Internally, the plugin works by splitting the data into two series, above and
-below the threshold. The extra series below the threshold will have its label
-cleared and the special "originSeries" attribute set to the original series.
-You may need to check for this in hover events.
-
-*/(function(e){function n(t){function n(t,n,r,i,s){var o=r.pointsize,u,a,f,l,c,h=e.extend({},n);h.datapoints={points:[],pointsize:o,format:r.format},h.label=null,h.color=s,h.threshold=null,h.originSeries=n,h.data=[];var p=r.points,d=n.lines.show,v=[],m=[],g;for(u=0;u<p.length;u+=o){a=p[u],f=p[u+1],c=l,f<i?l=v:l=m;if(d&&c!=l&&a!=null&&u>0&&p[u-o]!=null){var y=a+(i-f)*(a-p[u-o])/(f-p[u-o+1]);c.push(y),c.push(i);for(g=2;g<o;++g)c.push(p[u+g]);l.push(null),l.push(null);for(g=2;g<o;++g)l.push(p[u+g]);l.push(y),l.push(i);for(g=2;g<o;++g)l.push(p[u+g])}l.push(a),l.push(f);for(g=2;g<o;++g)l.push(p[u+g])}r.points=m,h.datapoints.points=v;if(h.datapoints.points.length>0){var b=e.inArray(n,t.getData());t.getData().splice(b+1,0,h)}}function r(t,r,i){if(!r.threshold)return;r.threshold instanceof Array?(r.threshold.sort(function(e,t){return e.below-t.below}),e(r.threshold).each(function(e,o){n(t,r,i,o.below,o.color)})):n(t,r,i,r.threshold.below,r.threshold.color)}t.hooks.processDatapoints.push(r)}var t={series:{threshold:null}};e.plot.plugins.push({init:n,options:t,name:"threshold",version:"1.2"})})(jQuery); \ No newline at end of file
+(function(B){var A={series:{threshold:null}};function C(D){function E(L,S,M){if(!S.threshold){return }var F=M.pointsize,I,O,N,G,K,H=B.extend({},S);H.datapoints={points:[],pointsize:F};H.label=null;H.color=S.threshold.color;H.threshold=null;H.originSeries=S;H.data=[];var P=S.threshold.below,Q=M.points,R=S.lines.show;threspoints=[];newpoints=[];for(I=0;I<Q.length;I+=F){O=Q[I];N=Q[I+1];K=G;if(N<P){G=threspoints}else{G=newpoints}if(R&&K!=G&&O!=null&&I>0&&Q[I-F]!=null){var J=(O-Q[I-F])/(N-Q[I-F+1])*(P-N)+O;K.push(J);K.push(P);for(m=2;m<F;++m){K.push(Q[I+m])}G.push(null);G.push(null);for(m=2;m<F;++m){G.push(Q[I+m])}G.push(J);G.push(P);for(m=2;m<F;++m){G.push(Q[I+m])}}G.push(O);G.push(N)}M.points=newpoints;H.datapoints.points=threspoints;if(H.datapoints.points.length>0){L.getData().push(H)}}D.hooks.processDatapoints.push(E)}B.plot.plugins.push({init:C,options:A,name:"threshold",version:"1.0"})})(jQuery); \ No newline at end of file
diff --git a/chromium/third_party/flot/jquery.flot.time.min.js b/chromium/third_party/flot/jquery.flot.time.min.js
deleted file mode 100644
index 21d84772388..00000000000
--- a/chromium/third_party/flot/jquery.flot.time.min.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/* Pretty handling of time axes.
-
-Copyright (c) 2007-2013 IOLA and Ole Laursen.
-Licensed under the MIT license.
-
-Set axis.mode to "time" to enable. See the section "Time series data" in
-API.txt for details.
-
-*/(function(e){function n(e,t){return t*Math.floor(e/t)}function r(e,t,n,r){if(typeof e.strftime=="function")return e.strftime(t);var i=function(e,t){return e=""+e,t=""+(t==null?"0":t),e.length==1?t+e:e},s=[],o=!1,u=e.getHours(),a=u<12;n==null&&(n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),r==null&&(r=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]);var f;u>12?f=u-12:u==0?f=12:f=u;for(var l=0;l<t.length;++l){var c=t.charAt(l);if(o){switch(c){case"a":c=""+r[e.getDay()];break;case"b":c=""+n[e.getMonth()];break;case"d":c=i(e.getDate());break;case"e":c=i(e.getDate()," ");break;case"h":case"H":c=i(u);break;case"I":c=i(f);break;case"l":c=i(f," ");break;case"m":c=i(e.getMonth()+1);break;case"M":c=i(e.getMinutes());break;case"q":c=""+(Math.floor(e.getMonth()/3)+1);break;case"S":c=i(e.getSeconds());break;case"y":c=i(e.getFullYear()%100);break;case"Y":c=""+e.getFullYear();break;case"p":c=a?"am":"pm";break;case"P":c=a?"AM":"PM";break;case"w":c=""+e.getDay()}s.push(c),o=!1}else c=="%"?o=!0:s.push(c)}return s.join("")}function i(e){function t(e,t,n,r){e[t]=function(){return n[r].apply(n,arguments)}}var n={date:e};e.strftime!=undefined&&t(n,"strftime",e,"strftime"),t(n,"getTime",e,"getTime"),t(n,"setTime",e,"setTime");var r=["Date","Day","FullYear","Hours","Milliseconds","Minutes","Month","Seconds"];for(var i=0;i<r.length;i++)t(n,"get"+r[i],e,"getUTC"+r[i]),t(n,"set"+r[i],e,"setUTC"+r[i]);return n}function s(e,t){if(t.timezone=="browser")return new Date(e);if(!t.timezone||t.timezone=="utc")return i(new Date(e));if(typeof timezoneJS!="undefined"&&typeof timezoneJS.Date!="undefined"){var n=new timezoneJS.Date;return n.setTimezone(t.timezone),n.setTime(e),n}return i(new Date(e))}function l(t){t.hooks.processOptions.push(function(t,i){e.each(t.getAxes(),function(e,t){var i=t.options;i.mode=="time"&&(t.tickGenerator=function(e){var t=[],r=s(e.min,i),u=0,l=i.tickSize&&i.tickSize[1]==="quarter"||i.minTickSize&&i.minTickSize[1]==="quarter"?f:a;i.minTickSize!=null&&(typeof i.tickSize=="number"?u=i.tickSize:u=i.minTickSize[0]*o[i.minTickSize[1]]);for(var c=0;c<l.length-1;++c)if(e.delta<(l[c][0]*o[l[c][1]]+l[c+1][0]*o[l[c+1][1]])/2&&l[c][0]*o[l[c][1]]>=u)break;var h=l[c][0],p=l[c][1];if(p=="year"){if(i.minTickSize!=null&&i.minTickSize[1]=="year")h=Math.floor(i.minTickSize[0]);else{var d=Math.pow(10,Math.floor(Math.log(e.delta/o.year)/Math.LN10)),v=e.delta/o.year/d;v<1.5?h=1:v<3?h=2:v<7.5?h=5:h=10,h*=d}h<1&&(h=1)}e.tickSize=i.tickSize||[h,p];var m=e.tickSize[0];p=e.tickSize[1];var g=m*o[p];p=="second"?r.setSeconds(n(r.getSeconds(),m)):p=="minute"?r.setMinutes(n(r.getMinutes(),m)):p=="hour"?r.setHours(n(r.getHours(),m)):p=="month"?r.setMonth(n(r.getMonth(),m)):p=="quarter"?r.setMonth(3*n(r.getMonth()/3,m)):p=="year"&&r.setFullYear(n(r.getFullYear(),m)),r.setMilliseconds(0),g>=o.minute&&r.setSeconds(0),g>=o.hour&&r.setMinutes(0),g>=o.day&&r.setHours(0),g>=o.day*4&&r.setDate(1),g>=o.month*2&&r.setMonth(n(r.getMonth(),3)),g>=o.quarter*2&&r.setMonth(n(r.getMonth(),6)),g>=o.year&&r.setMonth(0);var y=0,b=Number.NaN,w;do{w=b,b=r.getTime(),t.push(b);if(p=="month"||p=="quarter")if(m<1){r.setDate(1);var E=r.getTime();r.setMonth(r.getMonth()+(p=="quarter"?3:1));var S=r.getTime();r.setTime(b+y*o.hour+(S-E)*m),y=r.getHours(),r.setHours(0)}else r.setMonth(r.getMonth()+m*(p=="quarter"?3:1));else p=="year"?r.setFullYear(r.getFullYear()+m):r.setTime(b+g)}while(b<e.max&&b!=w);return t},t.tickFormatter=function(e,t){var n=s(e,t.options);if(i.timeformat!=null)return r(n,i.timeformat,i.monthNames,i.dayNames);var u=t.options.tickSize&&t.options.tickSize[1]=="quarter"||t.options.minTickSize&&t.options.minTickSize[1]=="quarter",a=t.tickSize[0]*o[t.tickSize[1]],f=t.max-t.min,l=i.twelveHourClock?" %p":"",c=i.twelveHourClock?"%I":"%H",h;a<o.minute?h=c+":%M:%S"+l:a<o.day?f<2*o.day?h=c+":%M"+l:h="%b %d "+c+":%M"+l:a<o.month?h="%b %d":u&&a<o.quarter||!u&&a<o.year?f<o.year?h="%b":h="%b %Y":u&&a<o.year?f<o.year?h="Q%q":h="Q%q %Y":h="%Y";var p=r(n,h,i.monthNames,i.dayNames);return p})})})}var t={xaxis:{timezone:null,timeformat:null,twelveHourClock:!1,monthNames:null}},o={second:1e3,minute:6e4,hour:36e5,day:864e5,month:2592e6,quarter:7776e6,year:525949.2*60*1e3},u=[[1,"second"],[2,"second"],[5,"second"],[10,"second"],[30,"second"],[1,"minute"],[2,"minute"],[5,"minute"],[10,"minute"],[30,"minute"],[1,"hour"],[2,"hour"],[4,"hour"],[8,"hour"],[12,"hour"],[1,"day"],[2,"day"],[3,"day"],[.25,"month"],[.5,"month"],[1,"month"],[2,"month"]],a=u.concat([[3,"month"],[6,"month"],[1,"year"]]),f=u.concat([[1,"quarter"],[2,"quarter"],[1,"year"]]);e.plot.plugins.push({init:l,options:t,name:"time",version:"1.0"}),e.plot.formatDate=r})(jQuery); \ No newline at end of file
diff --git a/chromium/third_party/flot/jquery.min.js b/chromium/third_party/flot/jquery.min.js
index 38837795279..64225231610 100644
--- a/chromium/third_party/flot/jquery.min.js
+++ b/chromium/third_party/flot/jquery.min.js
@@ -1,2 +1,23 @@
-/*! jQuery v1.8.3 jquery.com | jquery.org/license */
-(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r<i;r++)v.event.add(t,n,u[n][r])}o.data&&(o.data=v.extend({},o.data))}function Ot(e,t){var n;if(t.nodeType!==1)return;t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),n==="object"?(t.parentNode&&(t.outerHTML=e.outerHTML),v.support.html5Clone&&e.innerHTML&&!v.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):n==="input"&&Et.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):n==="option"?t.selected=e.defaultSelected:n==="input"||n==="textarea"?t.defaultValue=e.defaultValue:n==="script"&&t.text!==e.text&&(t.text=e.text),t.removeAttribute(v.expando)}function Mt(e){return typeof e.getElementsByTagName!="undefined"?e.getElementsByTagName("*"):typeof e.querySelectorAll!="undefined"?e.querySelectorAll("*"):[]}function _t(e){Et.test(e.type)&&(e.defaultChecked=e.checked)}function Qt(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Jt.length;while(i--){t=Jt[i]+n;if(t in e)return t}return r}function Gt(e,t){return e=t||e,v.css(e,"display")==="none"||!v.contains(e.ownerDocument,e)}function Yt(e,t){var n,r,i=[],s=0,o=e.length;for(;s<o;s++){n=e[s];if(!n.style)continue;i[s]=v._data(n,"olddisplay"),t?(!i[s]&&n.style.display==="none"&&(n.style.display=""),n.style.display===""&&Gt(n)&&(i[s]=v._data(n,"olddisplay",nn(n.nodeName)))):(r=Dt(n,"display"),!i[s]&&r!=="none"&&v._data(n,"olddisplay",r))}for(s=0;s<o;s++){n=e[s];if(!n.style)continue;if(!t||n.style.display==="none"||n.style.display==="")n.style.display=t?i[s]||"":"none"}return e}function Zt(e,t,n){var r=Rt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function en(e,t,n,r){var i=n===(r?"border":"content")?4:t==="width"?1:0,s=0;for(;i<4;i+=2)n==="margin"&&(s+=v.css(e,n+$t[i],!0)),r?(n==="content"&&(s-=parseFloat(Dt(e,"padding"+$t[i]))||0),n!=="margin"&&(s-=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0)):(s+=parseFloat(Dt(e,"padding"+$t[i]))||0,n!=="padding"&&(s+=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0));return s}function tn(e,t,n){var r=t==="width"?e.offsetWidth:e.offsetHeight,i=!0,s=v.support.boxSizing&&v.css(e,"boxSizing")==="border-box";if(r<=0||r==null){r=Dt(e,t);if(r<0||r==null)r=e.style[t];if(Ut.test(r))return r;i=s&&(v.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+en(e,t,n||(s?"border":"content"),i)+"px"}function nn(e){if(Wt[e])return Wt[e];var t=v("<"+e+">").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write("<!doctype html><html><body>"),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u<a;u++)r=o[u],s=/^\+/.test(r),s&&(r=r.substr(1)||"*"),i=e[r]=e[r]||[],i[s?"unshift":"push"](n)}}function kn(e,n,r,i,s,o){s=s||n.dataTypes[0],o=o||{},o[s]=!0;var u,a=e[s],f=0,l=a?a.length:0,c=e===Sn;for(;f<l&&(c||!u);f++)u=a[f](n,r,i),typeof u=="string"&&(!c||o[u]?u=t:(n.dataTypes.unshift(u),u=kn(e,n,r,i,u,o)));return(c||!u)&&!o["*"]&&(u=kn(e,n,r,i,"*",o)),u}function Ln(e,n){var r,i,s=v.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((s[r]?e:i||(i={}))[r]=n[r]);i&&v.extend(!0,e,i)}function An(e,n,r){var i,s,o,u,a=e.contents,f=e.dataTypes,l=e.responseFields;for(s in l)s in r&&(n[l[s]]=r[s]);while(f[0]==="*")f.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("content-type"));if(i)for(s in a)if(a[s]&&a[s].test(i)){f.unshift(s);break}if(f[0]in r)o=f[0];else{for(s in r){if(!f[0]||e.converters[s+" "+f[0]]){o=s;break}u||(u=s)}o=o||u}if(o)return o!==f[0]&&f.unshift(o),r[o]}function On(e,t){var n,r,i,s,o=e.dataTypes.slice(),u=o[0],a={},f=0;e.dataFilter&&(t=e.dataFilter(t,e.dataType));if(o[1])for(n in e.converters)a[n.toLowerCase()]=e.converters[n];for(;i=o[++f];)if(i!=="*"){if(u!=="*"&&u!==i){n=a[u+" "+i]||a["* "+i];if(!n)for(r in a){s=r.split(" ");if(s[1]===i){n=a[u+" "+s[0]]||a["* "+s[0]];if(n){n===!0?n=a[r]:a[r]!==!0&&(i=s[0],o.splice(f--,0,i));break}}}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(l){return{state:"parsererror",error:n?l:"No conversion from "+u+" to "+i}}}u=i}return{state:"success",data:t}}function Fn(){try{return new e.XMLHttpRequest}catch(t){}}function In(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function $n(){return setTimeout(function(){qn=t},0),qn=v.now()}function Jn(e,t){v.each(t,function(t,n){var r=(Vn[t]||[]).concat(Vn["*"]),i=0,s=r.length;for(;i<s;i++)if(r[i].call(e,t,n))return})}function Kn(e,t,n){var r,i=0,s=0,o=Xn.length,u=v.Deferred().always(function(){delete a.elem}),a=function(){var t=qn||$n(),n=Math.max(0,f.startTime+f.duration-t),r=n/f.duration||0,i=1-r,s=0,o=f.tweens.length;for(;s<o;s++)f.tweens[s].run(i);return u.notifyWith(e,[f,i,n]),i<1&&o?n:(u.resolveWith(e,[f]),!1)},f=u.promise({elem:e,props:v.extend({},t),opts:v.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:qn||$n(),duration:n.duration,tweens:[],createTween:function(t,n,r){var i=v.Tween(e,f.opts,t,n,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(i),i},stop:function(t){var n=0,r=t?f.tweens.length:0;for(;n<r;n++)f.tweens[n].run(1);return t?u.resolveWith(e,[f,t]):u.rejectWith(e,[f,t]),this}}),l=f.props;Qn(l,f.opts.specialEasing);for(;i<o;i++){r=Xn[i].call(f,e,l,f.opts);if(r)return r}return Jn(f,l),v.isFunction(f.opts.start)&&f.opts.start.call(e,f),v.fx.timer(v.extend(a,{anim:f,queue:f.opts.queue,elem:e})),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always)}function Qn(e,t){var n,r,i,s,o;for(n in e){r=v.camelCase(n),i=t[r],s=e[n],v.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),o=v.cssHooks[r];if(o&&"expand"in o){s=o.expand(s),delete e[r];for(n in s)n in e||(e[n]=s[n],t[n]=i)}else t[r]=i}}function Gn(e,t,n){var r,i,s,o,u,a,f,l,c,h=this,p=e.style,d={},m=[],g=e.nodeType&&Gt(e);n.queue||(l=v._queueHooks(e,"fx"),l.unqueued==null&&(l.unqueued=0,c=l.empty.fire,l.empty.fire=function(){l.unqueued||c()}),l.unqueued++,h.always(function(){h.always(function(){l.unqueued--,v.queue(e,"fx").length||l.empty.fire()})})),e.nodeType===1&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],v.css(e,"display")==="inline"&&v.css(e,"float")==="none"&&(!v.support.inlineBlockNeedsLayout||nn(e.nodeName)==="inline"?p.display="inline-block":p.zoom=1)),n.overflow&&(p.overflow="hidden",v.support.shrinkWrapBlocks||h.done(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t){s=t[r];if(Un.exec(s)){delete t[r],a=a||s==="toggle";if(s===(g?"hide":"show"))continue;m.push(r)}}o=m.length;if(o){u=v._data(e,"fxshow")||v._data(e,"fxshow",{}),"hidden"in u&&(g=u.hidden),a&&(u.hidden=!g),g?v(e).show():h.done(function(){v(e).hide()}),h.done(function(){var t;v.removeData(e,"fxshow",!0);for(t in d)v.style(e,t,d[t])});for(r=0;r<o;r++)i=m[r],f=h.createTween(i,g?u[i]:0),d[i]=u[i]||v.style(e,i),i in u||(u[i]=f.start,g&&(f.end=f.start,f.start=i==="width"||i==="height"?1:0))}}function Yn(e,t,n,r,i){return new Yn.prototype.init(e,t,n,r,i)}function Zn(e,t){var n,r={height:e},i=0;t=t?1:0;for(;i<4;i+=2-t)n=$t[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function tr(e){return v.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}var n,r,i=e.document,s=e.location,o=e.navigator,u=e.jQuery,a=e.$,f=Array.prototype.push,l=Array.prototype.slice,c=Array.prototype.indexOf,h=Object.prototype.toString,p=Object.prototype.hasOwnProperty,d=String.prototype.trim,v=function(e,t){return new v.fn.init(e,t,n)},m=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,g=/\S/,y=/\s+/,b=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,w=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a<f;a++)if((e=arguments[a])!=null)for(n in e){r=u[n],i=e[n];if(u===i)continue;l&&i&&(v.isPlainObject(i)||(s=v.isArray(i)))?(s?(s=!1,o=r&&v.isArray(r)?r:[]):o=r&&v.isPlainObject(r)?r:{},u[n]=v.extend(l,o,i)):i!==t&&(u[n]=i)}return u},v.extend({noConflict:function(t){return e.$===v&&(e.$=a),t&&e.jQuery===v&&(e.jQuery=u),v},isReady:!1,readyWait:1,holdReady:function(e){e?v.readyWait++:v.ready(!0)},ready:function(e){if(e===!0?--v.readyWait:v.isReady)return;if(!i.body)return setTimeout(v.ready,1);v.isReady=!0;if(e!==!0&&--v.readyWait>0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s<o;)if(n.apply(e[s++],r)===!1)break}else if(u){for(i in e)if(n.call(e[i],i,e[i])===!1)break}else for(;s<o;)if(n.call(e[s],s,e[s++])===!1)break;return e},trim:d&&!d.call("\ufeff\u00a0")?function(e){return e==null?"":d.call(e)}:function(e){return e==null?"":(e+"").replace(b,"")},makeArray:function(e,t){var n,r=t||[];return e!=null&&(n=v.type(e),e.length==null||n==="string"||n==="function"||n==="regexp"||v.isWindow(e)?f.call(r,e):v.merge(r,e)),r},inArray:function(e,t,n){var r;if(t){if(c)return c.call(t,e,n);r=t.length,n=n?n<0?Math.max(0,r+n):n:0;for(;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,s=0;if(typeof r=="number")for(;s<r;s++)e[i++]=n[s];else while(n[s]!==t)e[i++]=n[s++];return e.length=i,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length;n=!!n;for(;s<o;s++)r=!!t(e[s],s),n!==r&&i.push(e[s]);return i},map:function(e,n,r){var i,s,o=[],u=0,a=e.length,f=e instanceof v||a!==t&&typeof a=="number"&&(a>0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u<a;u++)i=n(e[u],u,r),i!=null&&(o[o.length]=i);else for(s in e)i=n(e[s],s,r),i!=null&&(o[o.length]=i);return o.concat.apply([],o)},guid:1,proxy:function(e,n){var r,i,s;return typeof n=="string"&&(r=e[n],n=e,e=r),v.isFunction(e)?(i=l.call(arguments,2),s=function(){return e.apply(n,i.concat(l.call(arguments)))},s.guid=e.guid=e.guid||v.guid++,s):t},access:function(e,n,r,i,s,o,u){var a,f=r==null,l=0,c=e.length;if(r&&typeof r=="object"){for(l in r)v.access(e,n,l,r[l],1,o,i);s=1}else if(i!==t){a=u===t&&v.isFunction(i),f&&(a?(a=n,n=function(e,t,n){return a.call(v(e),n)}):(n.call(e,i),n=null));if(n)for(;l<c;l++)n(e[l],r,a?i.call(e[l],l,n(e[l],r)):i,u);s=1}return s?e:f?n.call(e):c?n(e[0],r):o},now:function(){return(new Date).getTime()}}),v.ready.promise=function(t){if(!r){r=v.Deferred();if(i.readyState==="complete")setTimeout(v.ready,1);else if(i.addEventListener)i.addEventListener("DOMContentLoaded",A,!1),e.addEventListener("load",v.ready,!1);else{i.attachEvent("onreadystatechange",A),e.attachEvent("onload",v.ready);var n=!1;try{n=e.frameElement==null&&i.documentElement}catch(s){}n&&n.doScroll&&function o(){if(!v.isReady){try{n.doScroll("left")}catch(e){return setTimeout(o,50)}v.ready()}}()}}return r.promise(t)},v.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){O["[object "+t+"]"]=t.toLowerCase()}),n=v(i);var M={};v.Callbacks=function(e){e=typeof e=="string"?M[e]||_(e):v.extend({},e);var n,r,i,s,o,u,a=[],f=!e.once&&[],l=function(t){n=e.memory&&t,r=!0,u=s||0,s=0,o=a.length,i=!0;for(;a&&u<o;u++)if(a[u].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}i=!1,a&&(f?f.length&&l(f.shift()):n?a=[]:c.disable())},c={add:function(){if(a){var t=a.length;(function r(t){v.each(t,function(t,n){var i=v.type(n);i==="function"?(!e.unique||!c.has(n))&&a.push(n):n&&n.length&&i!=="string"&&r(n)})})(arguments),i?o=a.length:n&&(s=t,l(n))}return this},remove:function(){return a&&v.each(arguments,function(e,t){var n;while((n=v.inArray(t,a,n))>-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t<r;t++)n[t]&&v.isFunction(n[t].promise)?n[t].promise().done(o(t,f,n)).fail(s.reject).progress(o(t,a,u)):--i}return i||s.resolveWith(f,n),s.promise()}}),v.support=function(){var t,n,r,s,o,u,a,f,l,c,h,p=i.createElement("div");p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="<table><tr><td></td><td>t</td></tr></table>",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="<div></div>",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i<s;i++)delete r[t[i]];if(!(n?B:v.isEmptyObject)(r))return}}if(!n){delete u[a].data;if(!B(u[a]))return}o?v.cleanData([e],!0):v.support.deleteExpando||u!=u.window?delete u[a]:u[a]=null},_data:function(e,t,n){return v.data(e,t,n,!0)},acceptData:function(e){var t=e.nodeName&&v.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),v.fn.extend({data:function(e,n){var r,i,s,o,u,a=this[0],f=0,l=null;if(e===t){if(this.length){l=v.data(a);if(a.nodeType===1&&!v._data(a,"parsedAttrs")){s=a.attributes;for(u=s.length;f<u;f++)o=s[f].name,o.indexOf("data-")||(o=v.camelCase(o.substring(5)),H(a,o,l[o]));v._data(a,"parsedAttrs",!0)}}return l}return typeof e=="object"?this.each(function(){v.data(this,e)}):(r=e.split(".",2),r[1]=r[1]?"."+r[1]:"",i=r[1]+"!",v.access(this,function(n){if(n===t)return l=this.triggerHandler("getData"+i,[r[0]]),l===t&&a&&(l=v.data(a,e),l=H(a,e,l)),l===t&&r[1]?this.data(r[0]):l;r[1]=n,this.each(function(){var t=v(this);t.triggerHandler("setData"+i,r),v.data(this,e,n),t.triggerHandler("changeData"+i,r)})},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length<r?v.queue(this[0],e):n===t?this:this.each(function(){var t=v.queue(this,e,n);v._queueHooks(this,e),e==="fx"&&t[0]!=="inprogress"&&v.dequeue(this,e)})},dequeue:function(e){return this.each(function(){v.dequeue(this,e)})},delay:function(e,t){return e=v.fx?v.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,s=v.Deferred(),o=this,u=this.length,a=function(){--i||s.resolveWith(o,[o])};typeof e!="string"&&(n=e,e=t),e=e||"fx";while(u--)r=v._data(o[u],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(a));return a(),s.promise(n)}});var j,F,I,q=/[\t\r\n]/g,R=/\r/g,U=/^(?:button|input)$/i,z=/^(?:button|input|object|select|textarea)$/i,W=/^a(?:rea|)$/i,X=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,V=v.support.getSetAttribute;v.fn.extend({attr:function(e,t){return v.access(this,v.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n<r;n++){i=this[n];if(i.nodeType===1)if(!i.className&&t.length===1)i.className=e;else{s=" "+i.className+" ";for(o=0,u=t.length;o<u;o++)s.indexOf(" "+t[o]+" ")<0&&(s+=t[o]+" ");i.className=v.trim(s)}}}return this},removeClass:function(e){var n,r,i,s,o,u,a;if(v.isFunction(e))return this.each(function(t){v(this).removeClass(e.call(this,t,this.className))});if(e&&typeof e=="string"||e===t){n=(e||"").split(y);for(u=0,a=this.length;u<a;u++){i=this[u];if(i.nodeType===1&&i.className){r=(" "+i.className+" ").replace(q," ");for(s=0,o=n.length;s<o;s++)while(r.indexOf(" "+n[s]+" ")>=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n<r;n++)if(this[n].nodeType===1&&(" "+this[n].className+" ").replace(q," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a<u;a++){n=r[a];if((n.selected||a===i)&&(v.support.optDisabled?!n.disabled:n.getAttribute("disabled")===null)&&(!n.parentNode.disabled||!v.nodeName(n.parentNode,"optgroup"))){t=v(n).val();if(s)return t;o.push(t)}}return o},set:function(e,t){var n=v.makeArray(t);return v(e).find("option").each(function(){this.selected=v.inArray(v(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o<r.length;o++)i=r[o],i&&(n=v.propFix[i]||i,s=X.test(i),s||v.attr(e,i,""),e.removeAttribute(V?i:n),s&&n in e&&(e[n]=!1))}},attrHooks:{type:{set:function(e,t){if(U.test(e.nodeName)&&e.parentNode)v.error("type property can't be changed");else if(!v.support.radioValue&&t==="radio"&&v.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return j&&v.nodeName(e,"button")?j.get(e,t):t in e?e.value:null},set:function(e,t,n){if(j&&v.nodeName(e,"button"))return j.set(e,t,n);e.value=t}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,s,o,u=e.nodeType;if(!e||u===3||u===8||u===2)return;return o=u!==1||!v.isXMLDoc(e),o&&(n=v.propFix[n]||n,s=v.propHooks[n]),r!==t?s&&"set"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r:s&&"get"in s&&(i=s.get(e,n))!==null?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):z.test(e.nodeName)||W.test(e.nodeName)&&e.href?0:t}}}}),F={get:function(e,n){var r,i=v.prop(e,n);return i===!0||typeof i!="boolean"&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?v.removeAttr(e,n):(r=v.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},V||(I={name:!0,id:!0,coords:!0},j=v.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&(I[n]?r.value!=="":r.specified)?r.value:t},set:function(e,t,n){var r=e.getAttributeNode(n);return r||(r=i.createAttribute(n),e.setAttributeNode(r)),r.value=t+""}},v.each(["width","height"],function(e,t){v.attrHooks[t]=v.extend(v.attrHooks[t],{set:function(e,n){if(n==="")return e.setAttribute(t,"auto"),n}})}),v.attrHooks.contenteditable={get:j.get,set:function(e,t,n){t===""&&(t="false"),j.set(e,t,n)}}),v.support.hrefNormalized||v.each(["href","src","width","height"],function(e,n){v.attrHooks[n]=v.extend(v.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return r===null?t:r}})}),v.support.style||(v.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=t+""}}),v.support.optSelected||(v.propHooks.selected=v.extend(v.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),v.support.enctype||(v.propFix.enctype="encoding"),v.support.checkOn||v.each(["radio","checkbox"],function(){v.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}}),v.each(["radio","checkbox"],function(){v.valHooks[this]=v.extend(v.valHooks[this],{set:function(e,t){if(v.isArray(t))return e.checked=v.inArray(v(e).val(),t)>=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f<n.length;f++){l=J.exec(n[f])||[],c=l[1],h=(l[2]||"").split(".").sort(),g=v.event.special[c]||{},c=(s?g.delegateType:g.bindType)||c,g=v.event.special[c]||{},p=v.extend({type:c,origType:l[1],data:i,handler:r,guid:r.guid,selector:s,needsContext:s&&v.expr.match.needsContext.test(s),namespace:h.join(".")},d),m=a[c];if(!m){m=a[c]=[],m.delegateCount=0;if(!g.setup||g.setup.call(e,i,h,u)===!1)e.addEventListener?e.addEventListener(c,u,!1):e.attachEvent&&e.attachEvent("on"+c,u)}g.add&&(g.add.call(e,p),p.handler.guid||(p.handler.guid=r.guid)),s?m.splice(m.delegateCount++,0,p):m.push(p),v.event.global[c]=!0}e=null},global:{},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,m,g=v.hasData(e)&&v._data(e);if(!g||!(h=g.events))return;t=v.trim(Z(t||"")).split(" ");for(s=0;s<t.length;s++){o=J.exec(t[s])||[],u=a=o[1],f=o[2];if(!u){for(u in h)v.event.remove(e,u+t[s],n,r,!0);continue}p=v.event.special[u]||{},u=(r?p.delegateType:p.bindType)||u,d=h[u]||[],l=d.length,f=f?new RegExp("(^|\\.)"+f.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(c=0;c<d.length;c++)m=d[c],(i||a===m.origType)&&(!n||n.guid===m.guid)&&(!f||f.test(m.namespace))&&(!r||r===m.selector||r==="**"&&m.selector)&&(d.splice(c--,1),m.selector&&d.delegateCount--,p.remove&&p.remove.call(e,m));d.length===0&&l!==d.length&&((!p.teardown||p.teardown.call(e,f,g.handle)===!1)&&v.removeEvent(e,u,g.handle),delete h[u])}v.isEmptyObject(h)&&(delete g.handle,v.removeData(e,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,s,o){if(!s||s.nodeType!==3&&s.nodeType!==8){var u,a,f,l,c,h,p,d,m,g,y=n.type||n,b=[];if(Y.test(y+v.event.triggered))return;y.indexOf("!")>=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f<m.length&&!n.isPropagationStopped();f++)l=m[f][0],n.type=m[f][1],d=(v._data(l,"events")||{})[n.type]&&v._data(l,"handle"),d&&d.apply(l,r),d=h&&l[h],d&&v.acceptData(l)&&d.apply&&d.apply(l,r)===!1&&n.preventDefault();return n.type=y,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(s.ownerDocument,r)===!1)&&(y!=="click"||!v.nodeName(s,"a"))&&v.acceptData(s)&&h&&s[y]&&(y!=="focus"&&y!=="blur"||n.target.offsetWidth!==0)&&!v.isWindow(s)&&(c=s[h],c&&(s[h]=null),v.event.triggered=y,s[y](),v.event.triggered=t,c&&(s[h]=c)),n.result}return},dispatch:function(n){n=v.event.fix(n||e.event);var r,i,s,o,u,a,f,c,h,p,d=(v._data(this,"events")||{})[n.type]||[],m=d.delegateCount,g=l.call(arguments),y=!n.exclusive&&!n.namespace,b=v.event.special[n.type]||{},w=[];g[0]=n,n.delegateTarget=this;if(b.preDispatch&&b.preDispatch.call(this,n)===!1)return;if(m&&(!n.button||n.type!=="click"))for(s=n.target;s!=this;s=s.parentNode||this)if(s.disabled!==!0||n.type!=="click"){u={},f=[];for(r=0;r<m;r++)c=d[r],h=c.selector,u[h]===t&&(u[h]=c.needsContext?v(h,this).index(s)>=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r<w.length&&!n.isPropagationStopped();r++){a=w[r],n.currentTarget=a.elem;for(i=0;i<a.matches.length&&!n.isImmediatePropagationStopped();i++){c=a.matches[i];if(y||!n.namespace&&!c.namespace||n.namespace_re&&n.namespace_re.test(c.namespace))n.data=c.data,n.handleObj=c,o=((v.event.special[c.origType]||{}).handle||c.handler).apply(a.elem,g),o!==t&&(n.result=o,o===!1&&(n.preventDefault(),n.stopPropagation()))}}return b.postDispatch&&b.postDispatch.call(this,n),n.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return e.which==null&&(e.which=t.charCode!=null?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,s,o,u=n.button,a=n.fromElement;return e.pageX==null&&n.clientX!=null&&(r=e.target.ownerDocument||i,s=r.documentElement,o=r.body,e.pageX=n.clientX+(s&&s.scrollLeft||o&&o.scrollLeft||0)-(s&&s.clientLeft||o&&o.clientLeft||0),e.pageY=n.clientY+(s&&s.scrollTop||o&&o.scrollTop||0)-(s&&s.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?n.toElement:a),!e.which&&u!==t&&(e.which=u&1?1:u&2?3:u&4?2:0),e}},fix:function(e){if(e[v.expando])return e;var t,n,r=e,s=v.event.fixHooks[e.type]||{},o=s.props?this.props.concat(s.props):this.props;e=v.Event(r);for(t=o.length;t;)n=o[--t],e[n]=r[n];return e.target||(e.target=r.srcElement||i),e.target.nodeType===3&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,r):e},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){v.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){var i=v.extend(new v.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?v.event.trigger(i,null,t):v.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},v.event.handle=v.event.dispatch,v.removeEvent=i.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]=="undefined"&&(e[r]=null),e.detachEvent(r,n))},v.Event=function(e,t){if(!(this instanceof v.Event))return new v.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?tt:et):this.type=e,t&&v.extend(this,t),this.timeStamp=e&&e.timeStamp||v.now(),this[v.expando]=!0},v.Event.prototype={preventDefault:function(){this.isDefaultPrevented=tt;var e=this.originalEvent;if(!e)return;e.preventDefault?e.preventDefault():e.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=tt;var e=this.originalEvent;if(!e)return;e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=tt,this.stopPropagation()},isDefaultPrevented:et,isPropagationStopped:et,isImmediatePropagationStopped:et},v.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){v.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj,o=s.selector;if(!i||i!==r&&!v.contains(r,i))e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t;return n}}}),v.support.submitBubbles||(v.event.special.submit={setup:function(){if(v.nodeName(this,"form"))return!1;v.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=v.nodeName(n,"input")||v.nodeName(n,"button")?n.form:t;r&&!v._data(r,"_submit_attached")&&(v.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),v._data(r,"_submit_attached",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&v.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(v.nodeName(this,"form"))return!1;v.event.remove(this,"._submit")}}),v.support.changeBubbles||(v.event.special.change={setup:function(){if($.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")v.event.add(this,"propertychange._change",function(e){e.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),v.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),v.event.simulate("change",this,e,!0)});return!1}v.event.add(this,"beforeactivate._change",function(e){var t=e.target;$.test(t.nodeName)&&!v._data(t,"_change_attached")&&(v.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&v.event.simulate("change",this.parentNode,e,!0)}),v._data(t,"_change_attached",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return e.handleObj.handler.apply(this,arguments)},teardown:function(){return v.event.remove(this,"._change"),!$.test(this.nodeName)}}),v.support.focusinBubbles||v.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){v.event.simulate(t,e.target,v.event.fix(e),!0)};v.event.special[t]={setup:function(){n++===0&&i.addEventListener(e,r,!0)},teardown:function(){--n===0&&i.removeEventListener(e,r,!0)}}}),v.fn.extend({on:function(e,n,r,i,s){var o,u;if(typeof e=="object"){typeof n!="string"&&(r=r||n,n=t);for(u in e)this.on(u,n,r,e[u],s);return this}r==null&&i==null?(i=n,r=n=t):i==null&&(typeof n=="string"?(i=r,r=t):(i=r,r=n,n=t));if(i===!1)i=et;else if(!i)return this;return s===1&&(o=i,i=function(e){return v().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=v.guid++)),this.each(function(){v.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,s;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,v(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if(typeof e=="object"){for(s in e)this.off(s,n,e[s]);return this}if(n===!1||typeof n=="function")r=n,n=t;return r===!1&&(r=et),this.each(function(){v.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return v(this.context).on(e,this.selector,t,n),this},die:function(e,t){return v(this.context).off(e,this.selector||"**",t),this},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){v.event.trigger(e,t,this)})},triggerHandler:function(e,t){if(this[0])return v.event.trigger(e,t,this[0],!0)},toggle:function(e){var t=arguments,n=e.guid||v.guid++,r=0,i=function(n){var i=(v._data(this,"lastToggle"+e.guid)||0)%r;return v._data(this,"lastToggle"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};i.guid=n;while(r<t.length)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),v.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){v.fn[t]=function(e,n){return n==null&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u<a;u++)if(s=e[u])if(!n||n(s,r,i))o.push(s),f&&t.push(u);return o}function ct(e,t,n,r,i,s){return r&&!r[d]&&(r=ct(r)),i&&!i[d]&&(i=ct(i,s)),N(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||dt(t||"*",u.nodeType?[u]:u,[]),m=e&&(s||!t)?lt(v,h,e,u,a):v,g=n?i||(s?e:d||r)?[]:o:m;n&&n(m,g,u,a);if(r){f=lt(g,p),r(f,[],u,a),l=f.length;while(l--)if(c=f[l])g[p[l]]=!(m[p[l]]=c)}if(s){if(i||e){if(i){f=[],l=g.length;while(l--)(c=g[l])&&f.push(m[l]=c);i(null,g=[],f,a)}l=g.length;while(l--)(c=g[l])&&(f=i?T.call(s,c):h[l])>-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a<s;a++)if(n=i.relative[e[a].type])h=[at(ft(h),n)];else{n=i.filter[e[a].type].apply(null,e[a].matches);if(n[d]){r=++a;for(;r<s;r++)if(i.relative[e[r].type])break;return ct(a>1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a<r&&ht(e.slice(a,r)),r<s&&ht(e=e.slice(r)),r<s&&e.join(""))}h.push(n)}return ft(h)}function pt(e,t){var r=t.length>0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r<i;r++)nt(e,t[r],n);return n}function vt(e,t,n,r,s){var o,u,f,l,c,h=ut(e),p=h.length;if(!r&&h.length===1){u=h[0]=h[0].slice(0);if(u.length>2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;t<n;t++)if(this[t]===e)return t;return-1},N=function(e,t){return e[d]=t==null||t,e},C=function(){var e={},t=[];return N(function(n,r){return t.push(n)>i.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="<a name='"+d+"'></a><div name='"+d+"'></div>",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:st(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:st(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},f=y.compareDocumentPosition?function(e,t){return e===t?(l=!0,0):(!e.compareDocumentPosition||!t.compareDocumentPosition?e.compareDocumentPosition:e.compareDocumentPosition(t)&4)?-1:1}:function(e,t){if(e===t)return l=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],s=[],o=e.parentNode,u=t.parentNode,a=o;if(o===u)return ot(e,t);if(!o)return-1;if(!u)return 1;while(a)i.unshift(a),a=a.parentNode;a=u;while(a)s.unshift(a),a=a.parentNode;n=i.length,r=s.length;for(var f=0;f<n&&f<r;f++)if(i[f]!==s[f])return ot(i[f],s[f]);return f===n?ot(e,s[f],-1):ot(i[f],t,1)},[0,0].sort(f),h=!l,nt.uniqueSort=function(e){var t,n=[],r=1,i=0;l=h,e.sort(f);if(l){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e},nt.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},a=nt.compile=function(e,t){var n,r=[],i=[],s=A[d][e+" "];if(!s){t||(t=ut(e)),n=t.length;while(n--)s=ht(t[n]),s[d]?r.push(s):i.push(s);s=A(e,pt(i,r))}return s},g.querySelectorAll&&function(){var e,t=vt,n=/'|\\/g,r=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,i=[":focus"],s=[":active"],u=y.matchesSelector||y.mozMatchesSelector||y.webkitMatchesSelector||y.oMatchesSelector||y.msMatchesSelector;K(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="<p test=''></p>",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="<input type='hidden'/>",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t<n;t++)if(v.contains(u[t],this))return!0});o=this.pushStack("","find",e);for(t=0,n=this.length;t<n;t++){r=o.length,v.find(e,this[t],o);if(t>0)for(i=r;i<o.length;i++)for(s=0;s<r;s++)if(o[s]===o[i]){o.splice(i--,1);break}}return o},has:function(e){var t,n=v(e,this),r=n.length;return this.filter(function(){for(t=0;t<r;t++)if(v.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1),"not",e)},filter:function(e){return this.pushStack(ft(this,e,!0),"filter",e)},is:function(e){return!!e&&(typeof e=="string"?st.test(e)?v(e,this.context).index(this[0])>=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r<i;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&n.nodeType!==11){if(o?o.index(n)>-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/<tbody/i,gt=/<|&#?\w+;/,yt=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,wt=new RegExp("<(?:"+ct+")[\\s/>]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,Nt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X<div>","</div>"]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1></$2>");try{for(;r<i;r++)n=this[r]||{},n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return ut(this[0])?this.length?this.pushStack(v(v.isFunction(e)?e():e),"replaceWith",e):this:v.isFunction(e)?this.each(function(t){var n=v(this),r=n.html();n.replaceWith(e.call(this,t,r))}):(typeof e!="string"&&(e=v(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;v(this).remove(),t?v(t).before(e):v(n).append(e)}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=[].concat.apply([],e);var i,s,o,u,a=0,f=e[0],l=[],c=this.length;if(!v.support.checkClone&&c>1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a<c;a++)r.call(n&&v.nodeName(this[a],"table")?Lt(this[a],"tbody"):this[a],a===u?o:v.clone(o,!0,!0))}o=s=null,l.length&&v.each(l,function(e,t){t.src?v.ajax?v.ajax({url:t.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):v.error("no ajax"):v.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Tt,"")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),v.buildFragment=function(e,n,r){var s,o,u,a=e[0];return n=n||i,n=!n.nodeType&&n[0]||n,n=n.ownerDocument||n,e.length===1&&typeof a=="string"&&a.length<512&&n===i&&a.charAt(0)==="<"&&!bt.test(a)&&(v.support.checkClone||!St.test(a))&&(v.support.html5Clone||!wt.test(a))&&(o=!0,s=v.fragments[a],u=s!==t),s||(s=n.createDocumentFragment(),v.clean(e,n,s,r),o&&(v.fragments[a]=u&&s)),{fragment:s,cacheable:o}},v.fragments={},v.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){v.fn[e]=function(n){var r,i=0,s=[],o=v(n),u=o.length,a=this.length===1&&this[0].parentNode;if((a==null||a&&a.nodeType===11&&a.childNodes.length===1)&&u===1)return o[t](this[0]),this;for(;i<u;i++)r=(i>0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1></$2>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]==="<table>"&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("<div>").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r<i;r++)n=e[r],Vn[n]=Vn[n]||[],Vn[n].unshift(t)},prefilter:function(e,t){t?Xn.unshift(e):Xn.push(e)}}),v.Tween=Yn,Yn.prototype={constructor:Yn,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(v.cssNumber[n]?"":"px")},cur:function(){var e=Yn.propHooks[this.prop];return e&&e.get?e.get(this):Yn.propHooks._default.get(this)},run:function(e){var t,n=Yn.propHooks[this.prop];return this.options.duration?this.pos=t=v.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Yn.propHooks._default.set(this),this}},Yn.prototype.init.prototype=Yn.prototype,Yn.propHooks={_default:{get:function(e){var t;return e.elem[e.prop]==null||!!e.elem.style&&e.elem.style[e.prop]!=null?(t=v.css(e.elem,e.prop,!1,""),!t||t==="auto"?0:t):e.elem[e.prop]},set:function(e){v.fx.step[e.prop]?v.fx.step[e.prop](e):e.elem.style&&(e.elem.style[v.cssProps[e.prop]]!=null||v.cssHooks[e.prop])?v.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Yn.propHooks.scrollTop=Yn.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},v.each(["toggle","show","hide"],function(e,t){var n=v.fn[t];v.fn[t]=function(r,i,s){return r==null||typeof r=="boolean"||!e&&v.isFunction(r)&&v.isFunction(i)?n.apply(this,arguments):this.animate(Zn(t,!0),r,i,s)}}),v.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Gt).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=v.isEmptyObject(e),s=v.speed(t,n,r),o=function(){var t=Kn(this,v.extend({},e),s);i&&t.stop(!0)};return i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return typeof e!="string"&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=e!=null&&e+"queueHooks",s=v.timers,o=v._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&Wn.test(n)&&i(o[n]);for(n=s.length;n--;)s[n].elem===this&&(e==null||s[n].queue===e)&&(s[n].anim.stop(r),t=!1,s.splice(n,1));(t||!r)&&v.dequeue(this,e)})}}),v.each({slideDown:Zn("show"),slideUp:Zn("hide"),slideToggle:Zn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){v.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),v.speed=function(e,t,n){var r=e&&typeof e=="object"?v.extend({},e):{complete:n||!n&&t||v.isFunction(e)&&e,duration:e,easing:n&&t||t&&!v.isFunction(t)&&t};r.duration=v.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in v.fx.speeds?v.fx.speeds[r.duration]:v.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(){v.isFunction(r.old)&&r.old.call(this),r.queue&&v.dequeue(this,r.queue)},r},v.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},v.timers=[],v.fx=Yn.prototype.init,v.fx.tick=function(){var e,n=v.timers,r=0;qn=v.now();for(;r<n.length;r++)e=n[r],!e()&&n[r]===e&&n.splice(r--,1);n.length||v.fx.stop(),qn=t},v.fx.timer=function(e){e()&&v.timers.push(e)&&!Rn&&(Rn=setInterval(v.fx.tick,v.fx.interval))},v.fx.interval=13,v.fx.stop=function(){clearInterval(Rn),Rn=null},v.fx.speeds={slow:600,fast:200,_default:400},v.fx.step={},v.expr&&v.expr.filters&&(v.expr.filters.animated=function(e){return v.grep(v.timers,function(t){return e===t.elem}).length});var er=/^(?:body|html)$/i;v.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){v.offset.setOffset(this,e,t)});var n,r,i,s,o,u,a,f={top:0,left:0},l=this[0],c=l&&l.ownerDocument;if(!c)return;return(r=c.body)===l?v.offset.bodyOffset(l):(n=c.documentElement,v.contains(n,l)?(typeof l.getBoundingClientRect!="undefined"&&(f=l.getBoundingClientRect()),i=tr(c),s=n.clientTop||r.clientTop||0,o=n.clientLeft||r.clientLeft||0,u=i.pageYOffset||n.scrollTop,a=i.pageXOffset||n.scrollLeft,{top:f.top+u-s,left:f.left+a-o}):f)},v.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return v.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(v.css(e,"marginTop"))||0,n+=parseFloat(v.css(e,"marginLeft"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=v.css(e,"position");r==="static"&&(e.style.position="relative");var i=v(e),s=i.offset(),o=v.css(e,"top"),u=v.css(e,"left"),a=(r==="absolute"||r==="fixed")&&v.inArray("auto",[o,u])>-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window); \ No newline at end of file
+/*
+ * jQuery JavaScript Library v1.5.1
+ * http://jquery.com/
+ *
+ * Copyright 2011, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Wed Feb 23 13:55:29 2011 -0500
+ */
+(function(aY,H){var al=aY.document;var a=(function(){var bn=function(bI,bJ){return new bn.fn.init(bI,bJ,bl)},bD=aY.jQuery,bp=aY.$,bl,bH=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,bv=/\S/,br=/^\s+/,bm=/\s+$/,bq=/\d/,bj=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bw=/^[\],:{}\s]*$/,bF=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,by=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bs=/(?:^|:|,)(?:\s*\[)+/g,bh=/(webkit)[ \/]([\w.]+)/,bA=/(opera)(?:.*version)?[ \/]([\w.]+)/,bz=/(msie) ([\w.]+)/,bB=/(mozilla)(?:.*? rv:([\w.]+))?/,bG=navigator.userAgent,bE,bC=false,bk,e="then done fail isResolved isRejected promise".split(" "),bd,bu=Object.prototype.toString,bo=Object.prototype.hasOwnProperty,bi=Array.prototype.push,bt=Array.prototype.slice,bx=String.prototype.trim,be=Array.prototype.indexOf,bg={};bn.fn=bn.prototype={constructor:bn,init:function(bI,bM,bL){var bK,bN,bJ,bO;if(!bI){return this}if(bI.nodeType){this.context=this[0]=bI;this.length=1;return this}if(bI==="body"&&!bM&&al.body){this.context=al;this[0]=al.body;this.selector="body";this.length=1;return this}if(typeof bI==="string"){bK=bH.exec(bI);if(bK&&(bK[1]||!bM)){if(bK[1]){bM=bM instanceof bn?bM[0]:bM;bO=(bM?bM.ownerDocument||bM:al);bJ=bj.exec(bI);if(bJ){if(bn.isPlainObject(bM)){bI=[al.createElement(bJ[1])];bn.fn.attr.call(bI,bM,true)}else{bI=[bO.createElement(bJ[1])]}}else{bJ=bn.buildFragment([bK[1]],[bO]);bI=(bJ.cacheable?bn.clone(bJ.fragment):bJ.fragment).childNodes}return bn.merge(this,bI)}else{bN=al.getElementById(bK[2]);if(bN&&bN.parentNode){if(bN.id!==bK[2]){return bL.find(bI)}this.length=1;this[0]=bN}this.context=al;this.selector=bI;return this}}else{if(!bM||bM.jquery){return(bM||bL).find(bI)}else{return this.constructor(bM).find(bI)}}}else{if(bn.isFunction(bI)){return bL.ready(bI)}}if(bI.selector!==H){this.selector=bI.selector;this.context=bI.context}return bn.makeArray(bI,this)},selector:"",jquery:"1.5.1",length:0,size:function(){return this.length},toArray:function(){return bt.call(this,0)},get:function(bI){return bI==null?this.toArray():(bI<0?this[this.length+bI]:this[bI])},pushStack:function(bJ,bL,bI){var bK=this.constructor();if(bn.isArray(bJ)){bi.apply(bK,bJ)}else{bn.merge(bK,bJ)}bK.prevObject=this;bK.context=this.context;if(bL==="find"){bK.selector=this.selector+(this.selector?" ":"")+bI}else{if(bL){bK.selector=this.selector+"."+bL+"("+bI+")"}}return bK},each:function(bJ,bI){return bn.each(this,bJ,bI)},ready:function(bI){bn.bindReady();bk.done(bI);return this},eq:function(bI){return bI===-1?this.slice(bI):this.slice(bI,+bI+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bt.apply(this,arguments),"slice",bt.call(arguments).join(","))},map:function(bI){return this.pushStack(bn.map(this,function(bK,bJ){return bI.call(bK,bJ,bK)}))},end:function(){return this.prevObject||this.constructor(null)},push:bi,sort:[].sort,splice:[].splice};bn.fn.init.prototype=bn.fn;bn.extend=bn.fn.extend=function(){var bR,bK,bI,bJ,bO,bP,bN=arguments[0]||{},bM=1,bL=arguments.length,bQ=false;if(typeof bN==="boolean"){bQ=bN;bN=arguments[1]||{};bM=2}if(typeof bN!=="object"&&!bn.isFunction(bN)){bN={}}if(bL===bM){bN=this;--bM}for(;bM<bL;bM++){if((bR=arguments[bM])!=null){for(bK in bR){bI=bN[bK];bJ=bR[bK];if(bN===bJ){continue}if(bQ&&bJ&&(bn.isPlainObject(bJ)||(bO=bn.isArray(bJ)))){if(bO){bO=false;bP=bI&&bn.isArray(bI)?bI:[]}else{bP=bI&&bn.isPlainObject(bI)?bI:{}}bN[bK]=bn.extend(bQ,bP,bJ)}else{if(bJ!==H){bN[bK]=bJ}}}}}return bN};bn.extend({noConflict:function(bI){aY.$=bp;if(bI){aY.jQuery=bD}return bn},isReady:false,readyWait:1,ready:function(bI){if(bI===true){bn.readyWait--}if(!bn.readyWait||(bI!==true&&!bn.isReady)){if(!al.body){return setTimeout(bn.ready,1)}bn.isReady=true;if(bI!==true&&--bn.readyWait>0){return}bk.resolveWith(al,[bn]);if(bn.fn.trigger){bn(al).trigger("ready").unbind("ready")}}},bindReady:function(){if(bC){return}bC=true;if(al.readyState==="complete"){return setTimeout(bn.ready,1)}if(al.addEventListener){al.addEventListener("DOMContentLoaded",bd,false);aY.addEventListener("load",bn.ready,false)}else{if(al.attachEvent){al.attachEvent("onreadystatechange",bd);aY.attachEvent("onload",bn.ready);var bI=false;try{bI=aY.frameElement==null}catch(bJ){}if(al.documentElement.doScroll&&bI){bf()}}}},isFunction:function(bI){return bn.type(bI)==="function"},isArray:Array.isArray||function(bI){return bn.type(bI)==="array"},isWindow:function(bI){return bI&&typeof bI==="object"&&"setInterval" in bI},isNaN:function(bI){return bI==null||!bq.test(bI)||isNaN(bI)},type:function(bI){return bI==null?String(bI):bg[bu.call(bI)]||"object"},isPlainObject:function(bJ){if(!bJ||bn.type(bJ)!=="object"||bJ.nodeType||bn.isWindow(bJ)){return false}if(bJ.constructor&&!bo.call(bJ,"constructor")&&!bo.call(bJ.constructor.prototype,"isPrototypeOf")){return false}var bI;for(bI in bJ){}return bI===H||bo.call(bJ,bI)},isEmptyObject:function(bJ){for(var bI in bJ){return false}return true},error:function(bI){throw bI},parseJSON:function(bI){if(typeof bI!=="string"||!bI){return null}bI=bn.trim(bI);if(bw.test(bI.replace(bF,"@").replace(by,"]").replace(bs,""))){return aY.JSON&&aY.JSON.parse?aY.JSON.parse(bI):(new Function("return "+bI))()}else{bn.error("Invalid JSON: "+bI)}},parseXML:function(bK,bI,bJ){if(aY.DOMParser){bJ=new DOMParser();bI=bJ.parseFromString(bK,"text/xml")}else{bI=new ActiveXObject("Microsoft.XMLDOM");bI.async="false";bI.loadXML(bK)}bJ=bI.documentElement;if(!bJ||!bJ.nodeName||bJ.nodeName==="parsererror"){bn.error("Invalid XML: "+bK)}return bI},noop:function(){},globalEval:function(bK){if(bK&&bv.test(bK)){var bJ=al.head||al.getElementsByTagName("head")[0]||al.documentElement,bI=al.createElement("script");if(bn.support.scriptEval()){bI.appendChild(al.createTextNode(bK))}else{bI.text=bK}bJ.insertBefore(bI,bJ.firstChild);bJ.removeChild(bI)}},nodeName:function(bJ,bI){return bJ.nodeName&&bJ.nodeName.toUpperCase()===bI.toUpperCase()},each:function(bL,bP,bK){var bJ,bM=0,bN=bL.length,bI=bN===H||bn.isFunction(bL);if(bK){if(bI){for(bJ in bL){if(bP.apply(bL[bJ],bK)===false){break}}}else{for(;bM<bN;){if(bP.apply(bL[bM++],bK)===false){break}}}}else{if(bI){for(bJ in bL){if(bP.call(bL[bJ],bJ,bL[bJ])===false){break}}}else{for(var bO=bL[0];bM<bN&&bP.call(bO,bM,bO)!==false;bO=bL[++bM]){}}}return bL},trim:bx?function(bI){return bI==null?"":bx.call(bI)}:function(bI){return bI==null?"":bI.toString().replace(br,"").replace(bm,"")},makeArray:function(bL,bJ){var bI=bJ||[];if(bL!=null){var bK=bn.type(bL);if(bL.length==null||bK==="string"||bK==="function"||bK==="regexp"||bn.isWindow(bL)){bi.call(bI,bL)}else{bn.merge(bI,bL)}}return bI},inArray:function(bK,bL){if(bL.indexOf){return bL.indexOf(bK)}for(var bI=0,bJ=bL.length;bI<bJ;bI++){if(bL[bI]===bK){return bI}}return -1},merge:function(bM,bK){var bL=bM.length,bJ=0;if(typeof bK.length==="number"){for(var bI=bK.length;bJ<bI;bJ++){bM[bL++]=bK[bJ]}}else{while(bK[bJ]!==H){bM[bL++]=bK[bJ++]}}bM.length=bL;return bM},grep:function(bJ,bO,bI){var bK=[],bN;bI=!!bI;for(var bL=0,bM=bJ.length;bL<bM;bL++){bN=!!bO(bJ[bL],bL);if(bI!==bN){bK.push(bJ[bL])}}return bK},map:function(bJ,bO,bI){var bK=[],bN;for(var bL=0,bM=bJ.length;bL<bM;bL++){bN=bO(bJ[bL],bL,bI);if(bN!=null){bK[bK.length]=bN}}return bK.concat.apply([],bK)},guid:1,proxy:function(bK,bJ,bI){if(arguments.length===2){if(typeof bJ==="string"){bI=bK;bK=bI[bJ];bJ=H}else{if(bJ&&!bn.isFunction(bJ)){bI=bJ;bJ=H}}}if(!bJ&&bK){bJ=function(){return bK.apply(bI||this,arguments)}}if(bK){bJ.guid=bK.guid=bK.guid||bJ.guid||bn.guid++}return bJ},access:function(bI,bQ,bO,bK,bN,bP){var bJ=bI.length;if(typeof bQ==="object"){for(var bL in bQ){bn.access(bI,bL,bQ[bL],bK,bN,bO)}return bI}if(bO!==H){bK=!bP&&bK&&bn.isFunction(bO);for(var bM=0;bM<bJ;bM++){bN(bI[bM],bQ,bK?bO.call(bI[bM],bM,bN(bI[bM],bQ)):bO,bP)}return bI}return bJ?bN(bI[0],bQ):H},now:function(){return(new Date()).getTime()},_Deferred:function(){var bL=[],bM,bJ,bK,bI={done:function(){if(!bK){var bO=arguments,bP,bS,bR,bQ,bN;if(bM){bN=bM;bM=0}for(bP=0,bS=bO.length;bP<bS;bP++){bR=bO[bP];bQ=bn.type(bR);if(bQ==="array"){bI.done.apply(bI,bR)}else{if(bQ==="function"){bL.push(bR)}}}if(bN){bI.resolveWith(bN[0],bN[1])}}return this},resolveWith:function(bO,bN){if(!bK&&!bM&&!bJ){bJ=1;try{while(bL[0]){bL.shift().apply(bO,bN)}}catch(bP){throw bP}finally{bM=[bO,bN];bJ=0}}return this},resolve:function(){bI.resolveWith(bn.isFunction(this.promise)?this.promise():this,arguments);return this},isResolved:function(){return !!(bJ||bM)},cancel:function(){bK=1;bL=[];return this}};return bI},Deferred:function(bJ){var bI=bn._Deferred(),bL=bn._Deferred(),bK;bn.extend(bI,{then:function(bN,bM){bI.done(bN).fail(bM);return this},fail:bL.done,rejectWith:bL.resolveWith,reject:bL.resolve,isRejected:bL.isResolved,promise:function(bN){if(bN==null){if(bK){return bK}bK=bN={}}var bM=e.length;while(bM--){bN[e[bM]]=bI[e[bM]]}return bN}});bI.done(bL.cancel).fail(bI.cancel);delete bI.cancel;if(bJ){bJ.call(bI,bI)}return bI},when:function(bJ){var bO=arguments.length,bI=bO<=1&&bJ&&bn.isFunction(bJ.promise)?bJ:bn.Deferred(),bM=bI.promise();if(bO>1){var bN=bt.call(arguments,0),bL=bO,bK=function(bP){return function(bQ){bN[bP]=arguments.length>1?bt.call(arguments,0):bQ;if(!(--bL)){bI.resolveWith(bM,bN)}}};while((bO--)){bJ=bN[bO];if(bJ&&bn.isFunction(bJ.promise)){bJ.promise().then(bK(bO),bI.reject)}else{--bL}}if(!bL){bI.resolveWith(bM,bN)}}else{if(bI!==bJ){bI.resolve(bJ)}}return bM},uaMatch:function(bJ){bJ=bJ.toLowerCase();var bI=bh.exec(bJ)||bA.exec(bJ)||bz.exec(bJ)||bJ.indexOf("compatible")<0&&bB.exec(bJ)||[];return{browser:bI[1]||"",version:bI[2]||"0"}},sub:function(){function bJ(bL,bM){return new bJ.fn.init(bL,bM)}bn.extend(true,bJ,this);bJ.superclass=this;bJ.fn=bJ.prototype=this();bJ.fn.constructor=bJ;bJ.subclass=this.subclass;bJ.fn.init=function bK(bL,bM){if(bM&&bM instanceof bn&&!(bM instanceof bJ)){bM=bJ(bM)}return bn.fn.init.call(this,bL,bM,bI)};bJ.fn.init.prototype=bJ.fn;var bI=bJ(al);return bJ},browser:{}});bk=bn._Deferred();bn.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(bJ,bI){bg["[object "+bI+"]"]=bI.toLowerCase()});bE=bn.uaMatch(bG);if(bE.browser){bn.browser[bE.browser]=true;bn.browser.version=bE.version}if(bn.browser.webkit){bn.browser.safari=true}if(be){bn.inArray=function(bI,bJ){return be.call(bJ,bI)}}if(bv.test("\xA0")){br=/^[\s\xA0]+/;bm=/[\s\xA0]+$/}bl=bn(al);if(al.addEventListener){bd=function(){al.removeEventListener("DOMContentLoaded",bd,false);bn.ready()}}else{if(al.attachEvent){bd=function(){if(al.readyState==="complete"){al.detachEvent("onreadystatechange",bd);bn.ready()}}}}function bf(){if(bn.isReady){return}try{al.documentElement.doScroll("left")}catch(bI){setTimeout(bf,1);return}bn.ready()}return bn})();(function(){a.support={};var bd=al.createElement("div");bd.style.display="none";bd.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var bm=bd.getElementsByTagName("*"),bk=bd.getElementsByTagName("a")[0],bl=al.createElement("select"),be=bl.appendChild(al.createElement("option")),bj=bd.getElementsByTagName("input")[0];if(!bm||!bm.length||!bk){return}a.support={leadingWhitespace:bd.firstChild.nodeType===3,tbody:!bd.getElementsByTagName("tbody").length,htmlSerialize:!!bd.getElementsByTagName("link").length,style:/red/.test(bk.getAttribute("style")),hrefNormalized:bk.getAttribute("href")==="/a",opacity:/^0.55$/.test(bk.style.opacity),cssFloat:!!bk.style.cssFloat,checkOn:bj.value==="on",optSelected:be.selected,deleteExpando:true,optDisabled:false,checkClone:false,noCloneEvent:true,noCloneChecked:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};bj.checked=true;a.support.noCloneChecked=bj.cloneNode(true).checked;bl.disabled=true;a.support.optDisabled=!be.disabled;var bf=null;a.support.scriptEval=function(){if(bf===null){var bo=al.documentElement,bp=al.createElement("script"),br="script"+a.now();try{bp.appendChild(al.createTextNode("window."+br+"=1;"))}catch(bq){}bo.insertBefore(bp,bo.firstChild);if(aY[br]){bf=true;delete aY[br]}else{bf=false}bo.removeChild(bp);bo=bp=br=null}return bf};try{delete bd.test}catch(bh){a.support.deleteExpando=false}if(!bd.addEventListener&&bd.attachEvent&&bd.fireEvent){bd.attachEvent("onclick",function bn(){a.support.noCloneEvent=false;bd.detachEvent("onclick",bn)});bd.cloneNode(true).fireEvent("onclick")}bd=al.createElement("div");bd.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";var bg=al.createDocumentFragment();bg.appendChild(bd.firstChild);a.support.checkClone=bg.cloneNode(true).cloneNode(true).lastChild.checked;a(function(){var bp=al.createElement("div"),e=al.getElementsByTagName("body")[0];if(!e){return}bp.style.width=bp.style.paddingLeft="1px";e.appendChild(bp);a.boxModel=a.support.boxModel=bp.offsetWidth===2;if("zoom" in bp.style){bp.style.display="inline";bp.style.zoom=1;a.support.inlineBlockNeedsLayout=bp.offsetWidth===2;bp.style.display="";bp.innerHTML="<div style='width:4px;'></div>";a.support.shrinkWrapBlocks=bp.offsetWidth!==2}bp.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";var bo=bp.getElementsByTagName("td");a.support.reliableHiddenOffsets=bo[0].offsetHeight===0;bo[0].style.display="";bo[1].style.display="none";a.support.reliableHiddenOffsets=a.support.reliableHiddenOffsets&&bo[0].offsetHeight===0;bp.innerHTML="";e.removeChild(bp).style.display="none";bp=bo=null});var bi=function(e){var bp=al.createElement("div");e="on"+e;if(!bp.attachEvent){return true}var bo=(e in bp);if(!bo){bp.setAttribute(e,"return;");bo=typeof bp[e]==="function"}bp=null;return bo};a.support.submitBubbles=bi("submit");a.support.changeBubbles=bi("change");bd=bm=bk=null})();var aE=/^(?:\{.*\}|\[.*\])$/;a.extend({cache:{},uuid:0,expando:"jQuery"+(a.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?a.cache[e[a.expando]]:e[a.expando];return !!e&&!P(e)},data:function(bf,bd,bh,bg){if(!a.acceptData(bf)){return}var bk=a.expando,bj=typeof bd==="string",bi,bl=bf.nodeType,e=bl?a.cache:bf,be=bl?bf[a.expando]:bf[a.expando]&&a.expando;if((!be||(bg&&be&&!e[be][bk]))&&bj&&bh===H){return}if(!be){if(bl){bf[a.expando]=be=++a.uuid}else{be=a.expando}}if(!e[be]){e[be]={};if(!bl){e[be].toJSON=a.noop}}if(typeof bd==="object"||typeof bd==="function"){if(bg){e[be][bk]=a.extend(e[be][bk],bd)}else{e[be]=a.extend(e[be],bd)}}bi=e[be];if(bg){if(!bi[bk]){bi[bk]={}}bi=bi[bk]}if(bh!==H){bi[bd]=bh}if(bd==="events"&&!bi[bd]){return bi[bk]&&bi[bk].events}return bj?bi[bd]:bi},removeData:function(bg,be,bh){if(!a.acceptData(bg)){return}var bj=a.expando,bk=bg.nodeType,bd=bk?a.cache:bg,bf=bk?bg[a.expando]:a.expando;if(!bd[bf]){return}if(be){var bi=bh?bd[bf][bj]:bd[bf];if(bi){delete bi[be];if(!P(bi)){return}}}if(bh){delete bd[bf][bj];if(!P(bd[bf])){return}}var e=bd[bf][bj];if(a.support.deleteExpando||bd!=aY){delete bd[bf]}else{bd[bf]=null}if(e){bd[bf]={};if(!bk){bd[bf].toJSON=a.noop}bd[bf][bj]=e}else{if(bk){if(a.support.deleteExpando){delete bg[a.expando]}else{if(bg.removeAttribute){bg.removeAttribute(a.expando)}else{bg[a.expando]=null}}}}},_data:function(bd,e,be){return a.data(bd,e,be,true)},acceptData:function(bd){if(bd.nodeName){var e=a.noData[bd.nodeName.toLowerCase()];if(e){return !(e===true||bd.getAttribute("classid")!==e)}}return true}});a.fn.extend({data:function(bg,bi){var bh=null;if(typeof bg==="undefined"){if(this.length){bh=a.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,be;for(var bf=0,bd=e.length;bf<bd;bf++){be=e[bf].name;if(be.indexOf("data-")===0){be=be.substr(5);aT(this[0],be,bh[be])}}}}return bh}else{if(typeof bg==="object"){return this.each(function(){a.data(this,bg)})}}var bj=bg.split(".");bj[1]=bj[1]?"."+bj[1]:"";if(bi===H){bh=this.triggerHandler("getData"+bj[1]+"!",[bj[0]]);if(bh===H&&this.length){bh=a.data(this[0],bg);bh=aT(this[0],bg,bh)}return bh===H&&bj[1]?this.data(bj[0]):bh}else{return this.each(function(){var bl=a(this),bk=[bj[0],bi];bl.triggerHandler("setData"+bj[1]+"!",bk);a.data(this,bg,bi);bl.triggerHandler("changeData"+bj[1]+"!",bk)})}},removeData:function(e){return this.each(function(){a.removeData(this,e)})}});function aT(be,bd,bf){if(bf===H&&be.nodeType===1){bf=be.getAttribute("data-"+bd);if(typeof bf==="string"){try{bf=bf==="true"?true:bf==="false"?false:bf==="null"?null:!a.isNaN(bf)?parseFloat(bf):aE.test(bf)?a.parseJSON(bf):bf}catch(bg){}a.data(be,bd,bf)}else{bf=H}}return bf}function P(bd){for(var e in bd){if(e!=="toJSON"){return false}}return true}a.extend({queue:function(bd,e,bf){if(!bd){return}e=(e||"fx")+"queue";var be=a._data(bd,e);if(!bf){return be||[]}if(!be||a.isArray(bf)){be=a._data(bd,e,a.makeArray(bf))}else{be.push(bf)}return be},dequeue:function(bf,be){be=be||"fx";var e=a.queue(bf,be),bd=e.shift();if(bd==="inprogress"){bd=e.shift()}if(bd){if(be==="fx"){e.unshift("inprogress")}bd.call(bf,function(){a.dequeue(bf,be)})}if(!e.length){a.removeData(bf,be+"queue",true)}}});a.fn.extend({queue:function(e,bd){if(typeof e!=="string"){bd=e;e="fx"}if(bd===H){return a.queue(this[0],e)}return this.each(function(bf){var be=a.queue(this,e,bd);if(e==="fx"&&be[0]!=="inprogress"){a.dequeue(this,e)}})},dequeue:function(e){return this.each(function(){a.dequeue(this,e)})},delay:function(bd,e){bd=a.fx?a.fx.speeds[bd]||bd:bd;e=e||"fx";return this.queue(e,function(){var be=this;setTimeout(function(){a.dequeue(be,e)},bd)})},clearQueue:function(e){return this.queue(e||"fx",[])}});var aC=/[\n\t\r]/g,a3=/\s+/,aG=/\r/g,a2=/^(?:href|src|style)$/,f=/^(?:button|input)$/i,C=/^(?:button|input|object|select|textarea)$/i,k=/^a(?:rea)?$/i,Q=/^(?:radio|checkbox)$/i;a.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};a.fn.extend({attr:function(e,bd){return a.access(this,e,bd,true,a.attr)},removeAttr:function(e,bd){return this.each(function(){a.attr(this,e,"");if(this.nodeType===1){this.removeAttribute(e)}})},addClass:function(bj){if(a.isFunction(bj)){return this.each(function(bm){var bl=a(this);bl.addClass(bj.call(this,bm,bl.attr("class")))})}if(bj&&typeof bj==="string"){var e=(bj||"").split(a3);for(var bf=0,be=this.length;bf<be;bf++){var bd=this[bf];if(bd.nodeType===1){if(!bd.className){bd.className=bj}else{var bg=" "+bd.className+" ",bi=bd.className;for(var bh=0,bk=e.length;bh<bk;bh++){if(bg.indexOf(" "+e[bh]+" ")<0){bi+=" "+e[bh]}}bd.className=a.trim(bi)}}}}return this},removeClass:function(bh){if(a.isFunction(bh)){return this.each(function(bl){var bk=a(this);bk.removeClass(bh.call(this,bl,bk.attr("class")))})}if((bh&&typeof bh==="string")||bh===H){var bi=(bh||"").split(a3);for(var be=0,bd=this.length;be<bd;be++){var bg=this[be];if(bg.nodeType===1&&bg.className){if(bh){var bf=(" "+bg.className+" ").replace(aC," ");for(var bj=0,e=bi.length;bj<e;bj++){bf=bf.replace(" "+bi[bj]+" "," ")}bg.className=a.trim(bf)}else{bg.className=""}}}}return this},toggleClass:function(bf,bd){var be=typeof bf,e=typeof bd==="boolean";if(a.isFunction(bf)){return this.each(function(bh){var bg=a(this);bg.toggleClass(bf.call(this,bh,bg.attr("class"),bd),bd)})}return this.each(function(){if(be==="string"){var bi,bh=0,bg=a(this),bj=bd,bk=bf.split(a3);while((bi=bk[bh++])){bj=e?bj:!bg.hasClass(bi);bg[bj?"addClass":"removeClass"](bi)}}else{if(be==="undefined"||be==="boolean"){if(this.className){a._data(this,"__className__",this.className)}this.className=this.className||bf===false?"":a._data(this,"__className__")||""}}})},hasClass:function(e){var bf=" "+e+" ";for(var be=0,bd=this.length;be<bd;be++){if((" "+this[be].className+" ").replace(aC," ").indexOf(bf)>-1){return true}}return false},val:function(bk){if(!arguments.length){var be=this[0];if(be){if(a.nodeName(be,"option")){var bd=be.attributes.value;return !bd||bd.specified?be.value:be.text}if(a.nodeName(be,"select")){var bi=be.selectedIndex,bl=[],bm=be.options,bh=be.type==="select-one";if(bi<0){return null}for(var bf=bh?bi:0,bj=bh?bi+1:bm.length;bf<bj;bf++){var bg=bm[bf];if(bg.selected&&(a.support.optDisabled?!bg.disabled:bg.getAttribute("disabled")===null)&&(!bg.parentNode.disabled||!a.nodeName(bg.parentNode,"optgroup"))){bk=a(bg).val();if(bh){return bk}bl.push(bk)}}if(bh&&!bl.length&&bm.length){return a(bm[bi]).val()}return bl}if(Q.test(be.type)&&!a.support.checkOn){return be.getAttribute("value")===null?"on":be.value}return(be.value||"").replace(aG,"")}return H}var e=a.isFunction(bk);return this.each(function(bp){var bo=a(this),bq=bk;if(this.nodeType!==1){return}if(e){bq=bk.call(this,bp,bo.val())}if(bq==null){bq=""}else{if(typeof bq==="number"){bq+=""}else{if(a.isArray(bq)){bq=a.map(bq,function(br){return br==null?"":br+""})}}}if(a.isArray(bq)&&Q.test(this.type)){this.checked=a.inArray(bo.val(),bq)>=0}else{if(a.nodeName(this,"select")){var bn=a.makeArray(bq);a("option",this).each(function(){this.selected=a.inArray(a(this).val(),bn)>=0});if(!bn.length){this.selectedIndex=-1}}else{this.value=bq}}})}});a.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bd,e,bi,bl){if(!bd||bd.nodeType===3||bd.nodeType===8||bd.nodeType===2){return H}if(bl&&e in a.attrFn){return a(bd)[e](bi)}var be=bd.nodeType!==1||!a.isXMLDoc(bd),bh=bi!==H;e=be&&a.props[e]||e;if(bd.nodeType===1){var bg=a2.test(e);if(e==="selected"&&!a.support.optSelected){var bj=bd.parentNode;if(bj){bj.selectedIndex;if(bj.parentNode){bj.parentNode.selectedIndex}}}if((e in bd||bd[e]!==H)&&be&&!bg){if(bh){if(e==="type"&&f.test(bd.nodeName)&&bd.parentNode){a.error("type property can't be changed")}if(bi===null){if(bd.nodeType===1){bd.removeAttribute(e)}}else{bd[e]=bi}}if(a.nodeName(bd,"form")&&bd.getAttributeNode(e)){return bd.getAttributeNode(e).nodeValue}if(e==="tabIndex"){var bk=bd.getAttributeNode("tabIndex");return bk&&bk.specified?bk.value:C.test(bd.nodeName)||k.test(bd.nodeName)&&bd.href?0:H}return bd[e]}if(!a.support.style&&be&&e==="style"){if(bh){bd.style.cssText=""+bi}return bd.style.cssText}if(bh){bd.setAttribute(e,""+bi)}if(!bd.attributes[e]&&(bd.hasAttribute&&!bd.hasAttribute(e))){return H}var bf=!a.support.hrefNormalized&&be&&bg?bd.getAttribute(e,2):bd.getAttribute(e);return bf===null?H:bf}if(bh){bd[e]=bi}return bd[e]}});var aP=/\.(.*)$/,a0=/^(?:textarea|input|select)$/i,K=/\./g,aa=/ /g,aw=/[^\w\s.|`]/g,E=function(e){return e.replace(aw,"\\$&")};a.event={add:function(bg,bk,br,bi){if(bg.nodeType===3||bg.nodeType===8){return}try{if(a.isWindow(bg)&&(bg!==aY&&!bg.frameElement)){bg=aY}}catch(bl){}if(br===false){br=a5}else{if(!br){return}}var be,bp;if(br.handler){be=br;br=be.handler}if(!br.guid){br.guid=a.guid++}var bm=a._data(bg);if(!bm){return}var bq=bm.events,bj=bm.handle;if(!bq){bm.events=bq={}}if(!bj){bm.handle=bj=function(){return typeof a!=="undefined"&&!a.event.triggered?a.event.handle.apply(bj.elem,arguments):H}}bj.elem=bg;bk=bk.split(" ");var bo,bh=0,bd;while((bo=bk[bh++])){bp=be?a.extend({},be):{handler:br,data:bi};if(bo.indexOf(".")>-1){bd=bo.split(".");bo=bd.shift();bp.namespace=bd.slice(0).sort().join(".")}else{bd=[];bp.namespace=""}bp.type=bo;if(!bp.guid){bp.guid=br.guid}var bf=bq[bo],bn=a.event.special[bo]||{};if(!bf){bf=bq[bo]=[];if(!bn.setup||bn.setup.call(bg,bi,bd,bj)===false){if(bg.addEventListener){bg.addEventListener(bo,bj,false)}else{if(bg.attachEvent){bg.attachEvent("on"+bo,bj)}}}}if(bn.add){bn.add.call(bg,bp);if(!bp.handler.guid){bp.handler.guid=br.guid}}bf.push(bp);a.event.global[bo]=true}bg=null},global:{},remove:function(br,bm,be,bi){if(br.nodeType===3||br.nodeType===8){return}if(be===false){be=a5}var bu,bh,bj,bo,bp=0,bf,bk,bn,bg,bl,e,bt,bq=a.hasData(br)&&a._data(br),bd=bq&&bq.events;if(!bq||!bd){return}if(bm&&bm.type){be=bm.handler;bm=bm.type}if(!bm||typeof bm==="string"&&bm.charAt(0)==="."){bm=bm||"";for(bh in bd){a.event.remove(br,bh+bm)}return}bm=bm.split(" ");while((bh=bm[bp++])){bt=bh;e=null;bf=bh.indexOf(".")<0;bk=[];if(!bf){bk=bh.split(".");bh=bk.shift();bn=new RegExp("(^|\\.)"+a.map(bk.slice(0).sort(),E).join("\\.(?:.*\\.)?")+"(\\.|$)")}bl=bd[bh];if(!bl){continue}if(!be){for(bo=0;bo<bl.length;bo++){e=bl[bo];if(bf||bn.test(e.namespace)){a.event.remove(br,bt,e.handler,bo);bl.splice(bo--,1)}}continue}bg=a.event.special[bh]||{};for(bo=bi||0;bo<bl.length;bo++){e=bl[bo];if(be.guid===e.guid){if(bf||bn.test(e.namespace)){if(bi==null){bl.splice(bo--,1)}if(bg.remove){bg.remove.call(br,e)}}if(bi!=null){break}}}if(bl.length===0||bi!=null&&bl.length===1){if(!bg.teardown||bg.teardown.call(br,bk)===false){a.removeEvent(br,bh,bq.handle)}bu=null;delete bd[bh]}}if(a.isEmptyObject(bd)){var bs=bq.handle;if(bs){bs.elem=null}delete bq.events;delete bq.handle;if(a.isEmptyObject(bq)){a.removeData(br,H,true)}}},trigger:function(bd,bi,bf){var bm=bd.type||bd,bh=arguments[3];if(!bh){bd=typeof bd==="object"?bd[a.expando]?bd:a.extend(a.Event(bm),bd):a.Event(bm);if(bm.indexOf("!")>=0){bd.type=bm=bm.slice(0,-1);bd.exclusive=true}if(!bf){bd.stopPropagation();if(a.event.global[bm]){a.each(a.cache,function(){var br=a.expando,bq=this[br];if(bq&&bq.events&&bq.events[bm]){a.event.trigger(bd,bi,bq.handle.elem)}})}}if(!bf||bf.nodeType===3||bf.nodeType===8){return H}bd.result=H;bd.target=bf;bi=a.makeArray(bi);bi.unshift(bd)}bd.currentTarget=bf;var bj=a._data(bf,"handle");if(bj){bj.apply(bf,bi)}var bo=bf.parentNode||bf.ownerDocument;try{if(!(bf&&bf.nodeName&&a.noData[bf.nodeName.toLowerCase()])){if(bf["on"+bm]&&bf["on"+bm].apply(bf,bi)===false){bd.result=false;bd.preventDefault()}}}catch(bn){}if(!bd.isPropagationStopped()&&bo){a.event.trigger(bd,bi,bo,true)}else{if(!bd.isDefaultPrevented()){var be,bk=bd.target,e=bm.replace(aP,""),bp=a.nodeName(bk,"a")&&e==="click",bl=a.event.special[e]||{};if((!bl._default||bl._default.call(bf,bd)===false)&&!bp&&!(bk&&bk.nodeName&&a.noData[bk.nodeName.toLowerCase()])){try{if(bk[e]){be=bk["on"+e];if(be){bk["on"+e]=null}a.event.triggered=true;bk[e]()}}catch(bg){}if(be){bk["on"+e]=be}a.event.triggered=false}}}},handle:function(e){var bl,be,bd,bn,bm,bh=[],bj=a.makeArray(arguments);e=bj[0]=a.event.fix(e||aY.event);e.currentTarget=this;bl=e.type.indexOf(".")<0&&!e.exclusive;if(!bl){bd=e.type.split(".");e.type=bd.shift();bh=bd.slice(0).sort();bn=new RegExp("(^|\\.)"+bh.join("\\.(?:.*\\.)?")+"(\\.|$)")}e.namespace=e.namespace||bh.join(".");bm=a._data(this,"events");be=(bm||{})[e.type];if(bm&&be){be=be.slice(0);for(var bg=0,bf=be.length;bg<bf;bg++){var bk=be[bg];if(bl||bn.test(bk.namespace)){e.handler=bk.handler;e.data=bk.data;e.handleObj=bk;var bi=bk.handler.apply(this,bj);if(bi!==H){e.result=bi;if(bi===false){e.preventDefault();e.stopPropagation()}}if(e.isImmediatePropagationStopped()){break}}}}return e.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(bf){if(bf[a.expando]){return bf}var bd=bf;bf=a.Event(bd);for(var be=this.props.length,bh;be;){bh=this.props[--be];bf[bh]=bd[bh]}if(!bf.target){bf.target=bf.srcElement||al}if(bf.target.nodeType===3){bf.target=bf.target.parentNode}if(!bf.relatedTarget&&bf.fromElement){bf.relatedTarget=bf.fromElement===bf.target?bf.toElement:bf.fromElement}if(bf.pageX==null&&bf.clientX!=null){var bg=al.documentElement,e=al.body;bf.pageX=bf.clientX+(bg&&bg.scrollLeft||e&&e.scrollLeft||0)-(bg&&bg.clientLeft||e&&e.clientLeft||0);bf.pageY=bf.clientY+(bg&&bg.scrollTop||e&&e.scrollTop||0)-(bg&&bg.clientTop||e&&e.clientTop||0)}if(bf.which==null&&(bf.charCode!=null||bf.keyCode!=null)){bf.which=bf.charCode!=null?bf.charCode:bf.keyCode}if(!bf.metaKey&&bf.ctrlKey){bf.metaKey=bf.ctrlKey}if(!bf.which&&bf.button!==H){bf.which=(bf.button&1?1:(bf.button&2?3:(bf.button&4?2:0)))}return bf},guid:100000000,proxy:a.proxy,special:{ready:{setup:a.bindReady,teardown:a.noop},live:{add:function(e){a.event.add(this,n(e.origType,e.selector),a.extend({},e,{handler:af,guid:e.handler.guid}))},remove:function(e){a.event.remove(this,n(e.origType,e.selector),e)}},beforeunload:{setup:function(be,bd,e){if(a.isWindow(this)){this.onbeforeunload=e}},teardown:function(bd,e){if(this.onbeforeunload===e){this.onbeforeunload=null}}}}};a.removeEvent=al.removeEventListener?function(bd,e,be){if(bd.removeEventListener){bd.removeEventListener(e,be,false)}}:function(bd,e,be){if(bd.detachEvent){bd.detachEvent("on"+e,be)}};a.Event=function(e){if(!this.preventDefault){return new a.Event(e)}if(e&&e.type){this.originalEvent=e;this.type=e.type;this.isDefaultPrevented=(e.defaultPrevented||e.returnValue===false||e.getPreventDefault&&e.getPreventDefault())?h:a5}else{this.type=e}this.timeStamp=a.now();this[a.expando]=true};function a5(){return false}function h(){return true}a.Event.prototype={preventDefault:function(){this.isDefaultPrevented=h;var bd=this.originalEvent;if(!bd){return}if(bd.preventDefault){bd.preventDefault()}else{bd.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=h;var bd=this.originalEvent;if(!bd){return}if(bd.stopPropagation){bd.stopPropagation()}bd.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=h;this.stopPropagation()},isDefaultPrevented:a5,isPropagationStopped:a5,isImmediatePropagationStopped:a5};var Z=function(be){var bd=be.relatedTarget;try{if(bd!==al&&!bd.parentNode){return}while(bd&&bd!==this){bd=bd.parentNode}if(bd!==this){be.type=be.data;a.event.handle.apply(this,arguments)}}catch(bf){}},aK=function(e){e.type=e.data;a.event.handle.apply(this,arguments)};a.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(bd,e){a.event.special[bd]={setup:function(be){a.event.add(this,e,be&&be.selector?aK:Z,bd)},teardown:function(be){a.event.remove(this,e,be&&be.selector?aK:Z)}}});if(!a.support.submitBubbles){a.event.special.submit={setup:function(bd,e){if(this.nodeName&&this.nodeName.toLowerCase()!=="form"){a.event.add(this,"click.specialSubmit",function(bg){var bf=bg.target,be=bf.type;if((be==="submit"||be==="image")&&a(bf).closest("form").length){aN("submit",this,arguments)}});a.event.add(this,"keypress.specialSubmit",function(bg){var bf=bg.target,be=bf.type;if((be==="text"||be==="password")&&a(bf).closest("form").length&&bg.keyCode===13){aN("submit",this,arguments)}})}else{return false}},teardown:function(e){a.event.remove(this,".specialSubmit")}}}if(!a.support.changeBubbles){var a6,j=function(bd){var e=bd.type,be=bd.value;if(e==="radio"||e==="checkbox"){be=bd.checked}else{if(e==="select-multiple"){be=bd.selectedIndex>-1?a.map(bd.options,function(bf){return bf.selected}).join("-"):""}else{if(bd.nodeName.toLowerCase()==="select"){be=bd.selectedIndex}}}return be},X=function X(bf){var bd=bf.target,be,bg;if(!a0.test(bd.nodeName)||bd.readOnly){return}be=a._data(bd,"_change_data");bg=j(bd);if(bf.type!=="focusout"||bd.type!=="radio"){a._data(bd,"_change_data",bg)}if(be===H||bg===be){return}if(be!=null||bg){bf.type="change";bf.liveFired=H;a.event.trigger(bf,arguments[1],bd)}};a.event.special.change={filters:{focusout:X,beforedeactivate:X,click:function(bf){var be=bf.target,bd=be.type;if(bd==="radio"||bd==="checkbox"||be.nodeName.toLowerCase()==="select"){X.call(this,bf)}},keydown:function(bf){var be=bf.target,bd=be.type;if((bf.keyCode===13&&be.nodeName.toLowerCase()!=="textarea")||(bf.keyCode===32&&(bd==="checkbox"||bd==="radio"))||bd==="select-multiple"){X.call(this,bf)}},beforeactivate:function(be){var bd=be.target;a._data(bd,"_change_data",j(bd))}},setup:function(be,bd){if(this.type==="file"){return false}for(var e in a6){a.event.add(this,e+".specialChange",a6[e])}return a0.test(this.nodeName)},teardown:function(e){a.event.remove(this,".specialChange");return a0.test(this.nodeName)}};a6=a.event.special.change.filters;a6.focus=a6.beforeactivate}function aN(bd,bf,e){var be=a.extend({},e[0]);be.type=bd;be.originalEvent={};be.liveFired=H;a.event.handle.call(bf,be);if(be.isDefaultPrevented()){e[0].preventDefault()}}if(al.addEventListener){a.each({focus:"focusin",blur:"focusout"},function(be,e){a.event.special[e]={setup:function(){this.addEventListener(be,bd,true)},teardown:function(){this.removeEventListener(be,bd,true)}};function bd(bf){bf=a.event.fix(bf);bf.type=e;return a.event.handle.call(this,bf)}})}a.each(["bind","one"],function(bd,e){a.fn[e]=function(bj,bk,bi){if(typeof bj==="object"){for(var bg in bj){this[e](bg,bk,bj[bg],bi)}return this}if(a.isFunction(bk)||bk===false){bi=bk;bk=H}var bh=e==="one"?a.proxy(bi,function(bl){a(this).unbind(bl,bh);return bi.apply(this,arguments)}):bi;if(bj==="unload"&&e!=="one"){this.one(bj,bk,bi)}else{for(var bf=0,be=this.length;bf<be;bf++){a.event.add(this[bf],bj,bh,bk)}}return this}});a.fn.extend({unbind:function(bg,bf){if(typeof bg==="object"&&!bg.preventDefault){for(var be in bg){this.unbind(be,bg[be])}}else{for(var bd=0,e=this.length;bd<e;bd++){a.event.remove(this[bd],bg,bf)}}return this},delegate:function(e,bd,bf,be){return this.live(bd,bf,be,e)},undelegate:function(e,bd,be){if(arguments.length===0){return this.unbind("live")}else{return this.die(bd,null,be,e)}},trigger:function(e,bd){return this.each(function(){a.event.trigger(e,bd,this)})},triggerHandler:function(e,be){if(this[0]){var bd=a.Event(e);bd.preventDefault();bd.stopPropagation();a.event.trigger(bd,be,this[0]);return bd.result}},toggle:function(be){var e=arguments,bd=1;while(bd<e.length){a.proxy(be,e[bd++])}return this.click(a.proxy(be,function(bf){var bg=(a._data(this,"lastToggle"+be.guid)||0)%bd;a._data(this,"lastToggle"+be.guid,bg+1);bf.preventDefault();return e[bg].apply(this,arguments)||false}))},hover:function(e,bd){return this.mouseenter(e).mouseleave(bd||e)}});var aH={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};a.each(["live","die"],function(bd,e){a.fn[e]=function(bn,bk,bp,bg){var bo,bl=0,bm,bf,br,bi=bg||this.selector,be=bg?this:a(this.context);if(typeof bn==="object"&&!bn.preventDefault){for(var bq in bn){be[e](bq,bk,bn[bq],bi)}return this}if(a.isFunction(bk)){bp=bk;bk=H}bn=(bn||"").split(" ");while((bo=bn[bl++])!=null){bm=aP.exec(bo);bf="";if(bm){bf=bm[0];bo=bo.replace(aP,"")}if(bo==="hover"){bn.push("mouseenter"+bf,"mouseleave"+bf);continue}br=bo;if(bo==="focus"||bo==="blur"){bn.push(aH[bo]+bf);bo=bo+bf}else{bo=(aH[bo]||bo)+bf}if(e==="live"){for(var bj=0,bh=be.length;bj<bh;bj++){a.event.add(be[bj],"live."+n(bo,bi),{data:bk,selector:bi,handler:bp,origType:bo,origHandler:bp,preType:br})}}else{be.unbind("live."+n(bo,bi),bp)}}return this}});function af(bn){var bk,bf,bt,bh,e,bp,bm,bo,bl,bs,bj,bi,br,bq=[],bg=[],bd=a._data(this,"events");if(bn.liveFired===this||!bd||!bd.live||bn.target.disabled||bn.button&&bn.type==="click"){return}if(bn.namespace){bi=new RegExp("(^|\\.)"+bn.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")}bn.liveFired=this;var be=bd.live.slice(0);for(bm=0;bm<be.length;bm++){e=be[bm];if(e.origType.replace(aP,"")===bn.type){bg.push(e.selector)}else{be.splice(bm--,1)}}bh=a(bn.target).closest(bg,bn.currentTarget);for(bo=0,bl=bh.length;bo<bl;bo++){bj=bh[bo];for(bm=0;bm<be.length;bm++){e=be[bm];if(bj.selector===e.selector&&(!bi||bi.test(e.namespace))&&!bj.elem.disabled){bp=bj.elem;bt=null;if(e.preType==="mouseenter"||e.preType==="mouseleave"){bn.type=e.preType;bt=a(bn.relatedTarget).closest(e.selector)[0]}if(!bt||bt!==bp){bq.push({elem:bp,handleObj:e,level:bj.level})}}}}for(bo=0,bl=bq.length;bo<bl;bo++){bh=bq[bo];if(bf&&bh.level>bf){break}bn.currentTarget=bh.elem;bn.data=bh.handleObj.data;bn.handleObj=bh.handleObj;br=bh.handleObj.origHandler.apply(bh.elem,arguments);if(br===false||bn.isPropagationStopped()){bf=bh.level;if(br===false){bk=false}if(bn.isImmediatePropagationStopped()){break}}}return bk}function n(bd,e){return(bd&&bd!=="*"?bd+".":"")+e.replace(K,"`").replace(aa,"&")}a.each(("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error").split(" "),function(bd,e){a.fn[e]=function(bf,be){if(be==null){be=bf;bf=null}return arguments.length>0?this.bind(e,bf,be):this.trigger(e)};if(a.attrFn){a.attrFn[e]=true}});
+/*
+ * Sizzle CSS Selector Engine
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ * More information: http://sizzlejs.com/
+ */
+(function(){var bn=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bo=0,br=Object.prototype.toString,bi=false,bh=true,bp=/\\/g,bv=/\W/;[0,0].sort(function(){bh=false;return 0});var bf=function(bA,e,bD,bE){bD=bD||[];e=e||al;var bG=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bA||typeof bA!=="string"){return bD}var bx,bI,bL,bw,bH,bK,bJ,bC,bz=true,by=bf.isXML(e),bB=[],bF=bA;do{bn.exec("");bx=bn.exec(bF);if(bx){bF=bx[3];bB.push(bx[1]);if(bx[2]){bw=bx[3];break}}}while(bx);if(bB.length>1&&bj.exec(bA)){if(bB.length===2&&bk.relative[bB[0]]){bI=bs(bB[0]+bB[1],e)}else{bI=bk.relative[bB[0]]?[e]:bf(bB.shift(),e);while(bB.length){bA=bB.shift();if(bk.relative[bA]){bA+=bB.shift()}bI=bs(bA,bI)}}}else{if(!bE&&bB.length>1&&e.nodeType===9&&!by&&bk.match.ID.test(bB[0])&&!bk.match.ID.test(bB[bB.length-1])){bH=bf.find(bB.shift(),e,by);e=bH.expr?bf.filter(bH.expr,bH.set)[0]:bH.set[0]}if(e){bH=bE?{expr:bB.pop(),set:bl(bE)}:bf.find(bB.pop(),bB.length===1&&(bB[0]==="~"||bB[0]==="+")&&e.parentNode?e.parentNode:e,by);bI=bH.expr?bf.filter(bH.expr,bH.set):bH.set;if(bB.length>0){bL=bl(bI)}else{bz=false}while(bB.length){bK=bB.pop();bJ=bK;if(!bk.relative[bK]){bK=""}else{bJ=bB.pop()}if(bJ==null){bJ=e}bk.relative[bK](bL,bJ,by)}}else{bL=bB=[]}}if(!bL){bL=bI}if(!bL){bf.error(bK||bA)}if(br.call(bL)==="[object Array]"){if(!bz){bD.push.apply(bD,bL)}else{if(e&&e.nodeType===1){for(bC=0;bL[bC]!=null;bC++){if(bL[bC]&&(bL[bC]===true||bL[bC].nodeType===1&&bf.contains(e,bL[bC]))){bD.push(bI[bC])}}}else{for(bC=0;bL[bC]!=null;bC++){if(bL[bC]&&bL[bC].nodeType===1){bD.push(bI[bC])}}}}}else{bl(bL,bD)}if(bw){bf(bw,bG,bD,bE);bf.uniqueSort(bD)}return bD};bf.uniqueSort=function(bw){if(bq){bi=bh;bw.sort(bq);if(bi){for(var e=1;e<bw.length;e++){if(bw[e]===bw[e-1]){bw.splice(e--,1)}}}}return bw};bf.matches=function(e,bw){return bf(e,null,null,bw)};bf.matchesSelector=function(e,bw){return bf(bw,null,null,[e]).length>0};bf.find=function(bC,e,bD){var bB;if(!bC){return[]}for(var by=0,bx=bk.order.length;by<bx;by++){var bz,bA=bk.order[by];if((bz=bk.leftMatch[bA].exec(bC))){var bw=bz[1];bz.splice(1,1);if(bw.substr(bw.length-1)!=="\\"){bz[1]=(bz[1]||"").replace(bp,"");bB=bk.find[bA](bz,e,bD);if(bB!=null){bC=bC.replace(bk.match[bA],"");break}}}}if(!bB){bB=typeof e.getElementsByTagName!=="undefined"?e.getElementsByTagName("*"):[]}return{set:bB,expr:bC}};bf.filter=function(bG,bF,bJ,bz){var bB,e,bx=bG,bL=[],bD=bF,bC=bF&&bF[0]&&bf.isXML(bF[0]);while(bG&&bF.length){for(var bE in bk.filter){if((bB=bk.leftMatch[bE].exec(bG))!=null&&bB[2]){var bK,bI,bw=bk.filter[bE],by=bB[1];e=false;bB.splice(1,1);if(by.substr(by.length-1)==="\\"){continue}if(bD===bL){bL=[]}if(bk.preFilter[bE]){bB=bk.preFilter[bE](bB,bD,bJ,bL,bz,bC);if(!bB){e=bK=true}else{if(bB===true){continue}}}if(bB){for(var bA=0;(bI=bD[bA])!=null;bA++){if(bI){bK=bw(bI,bB,bA,bD);var bH=bz^!!bK;if(bJ&&bK!=null){if(bH){e=true}else{bD[bA]=false}}else{if(bH){bL.push(bI);e=true}}}}}if(bK!==H){if(!bJ){bD=bL}bG=bG.replace(bk.match[bE],"");if(!e){return[]}break}}}if(bG===bx){if(e==null){bf.error(bG)}else{break}}bx=bG}return bD};bf.error=function(e){throw"Syntax error, unrecognized expression: "+e};var bk=bf.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(bB,bw){var by=typeof bw==="string",bA=by&&!bv.test(bw),bC=by&&!bA;if(bA){bw=bw.toLowerCase()}for(var bx=0,e=bB.length,bz;bx<e;bx++){if((bz=bB[bx])){while((bz=bz.previousSibling)&&bz.nodeType!==1){}bB[bx]=bC||bz&&bz.nodeName.toLowerCase()===bw?bz||false:bz===bw}}if(bC){bf.filter(bw,bB,true)}},">":function(bB,bw){var bA,bz=typeof bw==="string",bx=0,e=bB.length;if(bz&&!bv.test(bw)){bw=bw.toLowerCase();for(;bx<e;bx++){bA=bB[bx];if(bA){var by=bA.parentNode;bB[bx]=by.nodeName.toLowerCase()===bw?by:false}}}else{for(;bx<e;bx++){bA=bB[bx];if(bA){bB[bx]=bz?bA.parentNode:bA.parentNode===bw}}if(bz){bf.filter(bw,bB,true)}}},"":function(by,bw,bA){var bz,bx=bo++,e=bt;if(typeof bw==="string"&&!bv.test(bw)){bw=bw.toLowerCase();bz=bw;e=bd}e("parentNode",bw,bx,by,bz,bA)},"~":function(by,bw,bA){var bz,bx=bo++,e=bt;if(typeof bw==="string"&&!bv.test(bw)){bw=bw.toLowerCase();bz=bw;e=bd}e("previousSibling",bw,bx,by,bz,bA)}},find:{ID:function(bw,bx,by){if(typeof bx.getElementById!=="undefined"&&!by){var e=bx.getElementById(bw[1]);return e&&e.parentNode?[e]:[]}},NAME:function(bx,bA){if(typeof bA.getElementsByName!=="undefined"){var bw=[],bz=bA.getElementsByName(bx[1]);for(var by=0,e=bz.length;by<e;by++){if(bz[by].getAttribute("name")===bx[1]){bw.push(bz[by])}}return bw.length===0?null:bw}},TAG:function(e,bw){if(typeof bw.getElementsByTagName!=="undefined"){return bw.getElementsByTagName(e[1])}}},preFilter:{CLASS:function(by,bw,bx,e,bB,bC){by=" "+by[1].replace(bp,"")+" ";if(bC){return by}for(var bz=0,bA;(bA=bw[bz])!=null;bz++){if(bA){if(bB^(bA.className&&(" "+bA.className+" ").replace(/[\t\n\r]/g," ").indexOf(by)>=0)){if(!bx){e.push(bA)}}else{if(bx){bw[bz]=false}}}}return false},ID:function(e){return e[1].replace(bp,"")},TAG:function(bw,e){return bw[1].replace(bp,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){bf.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bw=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bw[1]+(bw[2]||1))-0;e[3]=bw[3]-0}else{if(e[2]){bf.error(e[0])}}e[0]=bo++;return e},ATTR:function(bz,bw,bx,e,bA,bB){var by=bz[1]=bz[1].replace(bp,"");if(!bB&&bk.attrMap[by]){bz[1]=bk.attrMap[by]}bz[4]=(bz[4]||bz[5]||"").replace(bp,"");if(bz[2]==="~="){bz[4]=" "+bz[4]+" "}return bz},PSEUDO:function(bz,bw,bx,e,bA){if(bz[1]==="not"){if((bn.exec(bz[3])||"").length>1||/^\w/.test(bz[3])){bz[3]=bf(bz[3],null,null,bw)}else{var by=bf.filter(bz[3],bw,bx,true^bA);if(!bx){e.push.apply(e,by)}return false}}else{if(bk.match.POS.test(bz[0])||bk.match.CHILD.test(bz[0])){return true}}return bz},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bx,bw,e){return !!bf(e[3],bx).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(e){return"text"===e.getAttribute("type")},radio:function(e){return"radio"===e.type},checkbox:function(e){return"checkbox"===e.type},file:function(e){return"file"===e.type},password:function(e){return"password"===e.type},submit:function(e){return"submit"===e.type},image:function(e){return"image"===e.type},reset:function(e){return"reset"===e.type},button:function(e){return"button"===e.type||e.nodeName.toLowerCase()==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)}},setFilters:{first:function(bw,e){return e===0},last:function(bx,bw,e,by){return bw===by.length-1},even:function(bw,e){return e%2===0},odd:function(bw,e){return e%2===1},lt:function(bx,bw,e){return bw<e[3]-0},gt:function(bx,bw,e){return bw>e[3]-0},nth:function(bx,bw,e){return e[3]-0===bw},eq:function(bx,bw,e){return e[3]-0===bw}},filter:{PSEUDO:function(bx,bC,bB,bD){var e=bC[1],bw=bk.filters[e];if(bw){return bw(bx,bB,bC,bD)}else{if(e==="contains"){return(bx.textContent||bx.innerText||bf.getText([bx])||"").indexOf(bC[3])>=0}else{if(e==="not"){var by=bC[3];for(var bA=0,bz=by.length;bA<bz;bA++){if(by[bA]===bx){return false}}return true}else{bf.error(e)}}}},CHILD:function(e,by){var bB=by[1],bw=e;switch(bB){case"only":case"first":while((bw=bw.previousSibling)){if(bw.nodeType===1){return false}}if(bB==="first"){return true}bw=e;case"last":while((bw=bw.nextSibling)){if(bw.nodeType===1){return false}}return true;case"nth":var bx=by[2],bE=by[3];if(bx===1&&bE===0){return true}var bA=by[0],bD=e.parentNode;if(bD&&(bD.sizcache!==bA||!e.nodeIndex)){var bz=0;for(bw=bD.firstChild;bw;bw=bw.nextSibling){if(bw.nodeType===1){bw.nodeIndex=++bz}}bD.sizcache=bA}var bC=e.nodeIndex-bE;if(bx===0){return bC===0}else{return(bC%bx===0&&bC/bx>=0)}}},ID:function(bw,e){return bw.nodeType===1&&bw.getAttribute("id")===e},TAG:function(bw,e){return(e==="*"&&bw.nodeType===1)||bw.nodeName.toLowerCase()===e},CLASS:function(bw,e){return(" "+(bw.className||bw.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bA,by){var bx=by[1],e=bk.attrHandle[bx]?bk.attrHandle[bx](bA):bA[bx]!=null?bA[bx]:bA.getAttribute(bx),bB=e+"",bz=by[2],bw=by[4];return e==null?bz==="!=":bz==="="?bB===bw:bz==="*="?bB.indexOf(bw)>=0:bz==="~="?(" "+bB+" ").indexOf(bw)>=0:!bw?bB&&e!==false:bz==="!="?bB!==bw:bz==="^="?bB.indexOf(bw)===0:bz==="$="?bB.substr(bB.length-bw.length)===bw:bz==="|="?bB===bw||bB.substr(0,bw.length+1)===bw+"-":false},POS:function(bz,bw,bx,bA){var e=bw[2],by=bk.setFilters[e];if(by){return by(bz,bx,bw,bA)}}}};var bj=bk.match.POS,be=function(bw,e){return"\\"+(e-0+1)};for(var bg in bk.match){bk.match[bg]=new RegExp(bk.match[bg].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bk.leftMatch[bg]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bk.match[bg].source.replace(/\\(\d+)/g,be))}var bl=function(bw,e){bw=Array.prototype.slice.call(bw,0);if(e){e.push.apply(e,bw);return e}return bw};try{Array.prototype.slice.call(al.documentElement.childNodes,0)[0].nodeType}catch(bu){bl=function(bz,by){var bx=0,bw=by||[];if(br.call(bz)==="[object Array]"){Array.prototype.push.apply(bw,bz)}else{if(typeof bz.length==="number"){for(var e=bz.length;bx<e;bx++){bw.push(bz[bx])}}else{for(;bz[bx];bx++){bw.push(bz[bx])}}}return bw}}var bq,bm;if(al.documentElement.compareDocumentPosition){bq=function(bw,e){if(bw===e){bi=true;return 0}if(!bw.compareDocumentPosition||!e.compareDocumentPosition){return bw.compareDocumentPosition?-1:1}return bw.compareDocumentPosition(e)&4?-1:1}}else{bq=function(bD,bC){var bA,bw,bx=[],e=[],bz=bD.parentNode,bB=bC.parentNode,bE=bz;if(bD===bC){bi=true;return 0}else{if(bz===bB){return bm(bD,bC)}else{if(!bz){return -1}else{if(!bB){return 1}}}}while(bE){bx.unshift(bE);bE=bE.parentNode}bE=bB;while(bE){e.unshift(bE);bE=bE.parentNode}bA=bx.length;bw=e.length;for(var by=0;by<bA&&by<bw;by++){if(bx[by]!==e[by]){return bm(bx[by],e[by])}}return by===bA?bm(bD,e[by],-1):bm(bx[by],bC,1)};bm=function(bw,e,bx){if(bw===e){return bx}var by=bw.nextSibling;while(by){if(by===e){return -1}by=by.nextSibling}return 1}}bf.getText=function(e){var bw="",by;for(var bx=0;e[bx];bx++){by=e[bx];if(by.nodeType===3||by.nodeType===4){bw+=by.nodeValue}else{if(by.nodeType!==8){bw+=bf.getText(by.childNodes)}}}return bw};(function(){var bw=al.createElement("div"),bx="script"+(new Date()).getTime(),e=al.documentElement;bw.innerHTML="<a name='"+bx+"'/>";e.insertBefore(bw,e.firstChild);if(al.getElementById(bx)){bk.find.ID=function(bz,bA,bB){if(typeof bA.getElementById!=="undefined"&&!bB){var by=bA.getElementById(bz[1]);return by?by.id===bz[1]||typeof by.getAttributeNode!=="undefined"&&by.getAttributeNode("id").nodeValue===bz[1]?[by]:H:[]}};bk.filter.ID=function(bA,by){var bz=typeof bA.getAttributeNode!=="undefined"&&bA.getAttributeNode("id");return bA.nodeType===1&&bz&&bz.nodeValue===by}}e.removeChild(bw);e=bw=null})();(function(){var e=al.createElement("div");e.appendChild(al.createComment(""));if(e.getElementsByTagName("*").length>0){bk.find.TAG=function(bw,bA){var bz=bA.getElementsByTagName(bw[1]);if(bw[1]==="*"){var by=[];for(var bx=0;bz[bx];bx++){if(bz[bx].nodeType===1){by.push(bz[bx])}}bz=by}return bz}}e.innerHTML="<a href='#'></a>";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bk.attrHandle.href=function(bw){return bw.getAttribute("href",2)}}e=null})();if(al.querySelectorAll){(function(){var e=bf,by=al.createElement("div"),bx="__sizzle__";by.innerHTML="<p class='TEST'></p>";if(by.querySelectorAll&&by.querySelectorAll(".TEST").length===0){return}bf=function(bJ,bA,bE,bI){bA=bA||al;if(!bI&&!bf.isXML(bA)){var bH=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(bJ);if(bH&&(bA.nodeType===1||bA.nodeType===9)){if(bH[1]){return bl(bA.getElementsByTagName(bJ),bE)}else{if(bH[2]&&bk.find.CLASS&&bA.getElementsByClassName){return bl(bA.getElementsByClassName(bH[2]),bE)}}}if(bA.nodeType===9){if(bJ==="body"&&bA.body){return bl([bA.body],bE)}else{if(bH&&bH[3]){var bD=bA.getElementById(bH[3]);if(bD&&bD.parentNode){if(bD.id===bH[3]){return bl([bD],bE)}}else{return bl([],bE)}}}try{return bl(bA.querySelectorAll(bJ),bE)}catch(bF){}}else{if(bA.nodeType===1&&bA.nodeName.toLowerCase()!=="object"){var bB=bA,bC=bA.getAttribute("id"),bz=bC||bx,bL=bA.parentNode,bK=/^\s*[+~]/.test(bJ);if(!bC){bA.setAttribute("id",bz)}else{bz=bz.replace(/'/g,"\\$&")}if(bK&&bL){bA=bA.parentNode}try{if(!bK||bL){return bl(bA.querySelectorAll("[id='"+bz+"'] "+bJ),bE)}}catch(bG){}finally{if(!bC){bB.removeAttribute("id")}}}}}return e(bJ,bA,bE,bI)};for(var bw in e){bf[bw]=e[bw]}by=null})()}(function(){var e=al.documentElement,bx=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector,bw=false;try{bx.call(al.documentElement,"[test!='']:sizzle")}catch(by){bw=true}if(bx){bf.matchesSelector=function(bz,bB){bB=bB.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!bf.isXML(bz)){try{if(bw||!bk.match.PSEUDO.test(bB)&&!/!=/.test(bB)){return bx.call(bz,bB)}}catch(bA){}}return bf(bB,null,null,[bz]).length>0}}})();(function(){var e=al.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bk.order.splice(1,0,"CLASS");bk.find.CLASS=function(bw,bx,by){if(typeof bx.getElementsByClassName!=="undefined"&&!by){return bx.getElementsByClassName(bw[1])}};e=null})();function bd(bw,bB,bA,bE,bC,bD){for(var by=0,bx=bE.length;by<bx;by++){var e=bE[by];if(e){var bz=false;e=e[bw];while(e){if(e.sizcache===bA){bz=bE[e.sizset];break}if(e.nodeType===1&&!bD){e.sizcache=bA;e.sizset=by}if(e.nodeName.toLowerCase()===bB){bz=e;break}e=e[bw]}bE[by]=bz}}}function bt(bw,bB,bA,bE,bC,bD){for(var by=0,bx=bE.length;by<bx;by++){var e=bE[by];if(e){var bz=false;e=e[bw];while(e){if(e.sizcache===bA){bz=bE[e.sizset];break}if(e.nodeType===1){if(!bD){e.sizcache=bA;e.sizset=by}if(typeof bB!=="string"){if(e===bB){bz=true;break}}else{if(bf.filter(bB,[e]).length>0){bz=e;break}}}e=e[bw]}bE[by]=bz}}}if(al.documentElement.contains){bf.contains=function(bw,e){return bw!==e&&(bw.contains?bw.contains(e):true)}}else{if(al.documentElement.compareDocumentPosition){bf.contains=function(bw,e){return !!(bw.compareDocumentPosition(e)&16)}}else{bf.contains=function(){return false}}}bf.isXML=function(e){var bw=(e?e.ownerDocument||e:0).documentElement;return bw?bw.nodeName!=="HTML":false};var bs=function(e,bC){var bA,by=[],bz="",bx=bC.nodeType?[bC]:bC;while((bA=bk.match.PSEUDO.exec(e))){bz+=bA[0];e=e.replace(bk.match.PSEUDO,"")}e=bk.relative[e]?e+"*":e;for(var bB=0,bw=bx.length;bB<bw;bB++){bf(e,bx[bB],by)}return bf.filter(bz,by)};a.find=bf;a.expr=bf.selectors;a.expr[":"]=a.expr.filters;a.unique=bf.uniqueSort;a.text=bf.getText;a.isXMLDoc=bf.isXML;a.contains=bf.contains})();var W=/Until$/,ai=/^(?:parents|prevUntil|prevAll)/,aW=/,/,a9=/^.[^:#\[\.,]*$/,M=Array.prototype.slice,F=a.expr.match.POS,ao={children:true,contents:true,next:true,prev:true};a.fn.extend({find:function(e){var be=this.pushStack("","find",e),bh=0;for(var bf=0,bd=this.length;bf<bd;bf++){bh=be.length;a.find(e,this[bf],be);if(bf>0){for(var bi=bh;bi<be.length;bi++){for(var bg=0;bg<bh;bg++){if(be[bg]===be[bi]){be.splice(bi--,1);break}}}}}return be},has:function(bd){var e=a(bd);return this.filter(function(){for(var bf=0,be=e.length;bf<be;bf++){if(a.contains(this,e[bf])){return true}}})},not:function(e){return this.pushStack(av(this,e,false),"not",e)},filter:function(e){return this.pushStack(av(this,e,true),"filter",e)},is:function(e){return !!e&&a.filter(e,this).length>0},closest:function(bm,bd){var bj=[],bg,be,bl=this[0];if(a.isArray(bm)){var bi,bf,bh={},e=1;if(bl&&bm.length){for(bg=0,be=bm.length;bg<be;bg++){bf=bm[bg];if(!bh[bf]){bh[bf]=a.expr.match.POS.test(bf)?a(bf,bd||this.context):bf}}while(bl&&bl.ownerDocument&&bl!==bd){for(bf in bh){bi=bh[bf];if(bi.jquery?bi.index(bl)>-1:a(bl).is(bi)){bj.push({selector:bf,elem:bl,level:e})}}bl=bl.parentNode;e++}}return bj}var bk=F.test(bm)?a(bm,bd||this.context):null;for(bg=0,be=this.length;bg<be;bg++){bl=this[bg];while(bl){if(bk?bk.index(bl)>-1:a.find.matchesSelector(bl,bm)){bj.push(bl);break}else{bl=bl.parentNode;if(!bl||!bl.ownerDocument||bl===bd){break}}}}bj=bj.length>1?a.unique(bj):bj;return this.pushStack(bj,"closest",bm)},index:function(e){if(!e||typeof e==="string"){return a.inArray(this[0],e?a(e):this.parent().children())}return a.inArray(e.jquery?e[0]:e,this)},add:function(e,bd){var bf=typeof e==="string"?a(e,bd):a.makeArray(e),be=a.merge(this.get(),bf);return this.pushStack(B(bf[0])||B(be[0])?be:a.unique(be))},andSelf:function(){return this.add(this.prevObject)}});function B(e){return !e||!e.parentNode||e.parentNode.nodeType===11}a.each({parent:function(bd){var e=bd.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return a.dir(e,"parentNode")},parentsUntil:function(bd,e,be){return a.dir(bd,"parentNode",be)},next:function(e){return a.nth(e,2,"nextSibling")},prev:function(e){return a.nth(e,2,"previousSibling")},nextAll:function(e){return a.dir(e,"nextSibling")},prevAll:function(e){return a.dir(e,"previousSibling")},nextUntil:function(bd,e,be){return a.dir(bd,"nextSibling",be)},prevUntil:function(bd,e,be){return a.dir(bd,"previousSibling",be)},siblings:function(e){return a.sibling(e.parentNode.firstChild,e)},children:function(e){return a.sibling(e.firstChild)},contents:function(e){return a.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:a.makeArray(e.childNodes)}},function(e,bd){a.fn[e]=function(bh,be){var bg=a.map(this,bd,bh),bf=M.call(arguments);if(!W.test(e)){be=bh}if(be&&typeof be==="string"){bg=a.filter(be,bg)}bg=this.length>1&&!ao[e]?a.unique(bg):bg;if((this.length>1||aW.test(be))&&ai.test(e)){bg=bg.reverse()}return this.pushStack(bg,e,bf.join(","))}});a.extend({filter:function(be,e,bd){if(bd){be=":not("+be+")"}return e.length===1?a.find.matchesSelector(e[0],be)?[e[0]]:[]:a.find.matches(be,e)},dir:function(be,bd,bg){var e=[],bf=be[bd];while(bf&&bf.nodeType!==9&&(bg===H||bf.nodeType!==1||!a(bf).is(bg))){if(bf.nodeType===1){e.push(bf)}bf=bf[bd]}return e},nth:function(bg,e,be,bf){e=e||1;var bd=0;for(;bg;bg=bg[be]){if(bg.nodeType===1&&++bd===e){break}}return bg},sibling:function(be,bd){var e=[];for(;be;be=be.nextSibling){if(be.nodeType===1&&be!==bd){e.push(be)}}return e}});function av(bf,be,e){if(a.isFunction(be)){return a.grep(bf,function(bh,bg){var bi=!!be.call(bh,bg,bh);return bi===e})}else{if(be.nodeType){return a.grep(bf,function(bh,bg){return(bh===be)===e})}else{if(typeof be==="string"){var bd=a.grep(bf,function(bg){return bg.nodeType===1});if(a9.test(be)){return a.filter(be,bd,!e)}else{be=a.filter(be,bd)}}}}return a.grep(bf,function(bh,bg){return(a.inArray(bh,be)>=0)===e})}var ab=/ jQuery\d+="(?:\d+|null)"/g,aj=/^\s+/,O=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,c=/<([\w:]+)/,v=/<tbody/i,T=/<|&#?\w+;/,L=/<(?:script|object|embed|option|style)/i,m=/checked\s*(?:[^=]|=\s*.checked.)/i,an={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};an.optgroup=an.option;an.tbody=an.tfoot=an.colgroup=an.caption=an.thead;an.th=an.td;if(!a.support.htmlSerialize){an._default=[1,"div<div>","</div>"]}a.fn.extend({text:function(e){if(a.isFunction(e)){return this.each(function(be){var bd=a(this);bd.text(e.call(this,be,bd.text()))})}if(typeof e!=="object"&&e!==H){return this.empty().append((this[0]&&this[0].ownerDocument||al).createTextNode(e))}return a.text(this)},wrapAll:function(e){if(a.isFunction(e)){return this.each(function(be){a(this).wrapAll(e.call(this,be))})}if(this[0]){var bd=a(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bd.insertBefore(this[0])}bd.map(function(){var be=this;while(be.firstChild&&be.firstChild.nodeType===1){be=be.firstChild}return be}).append(this)}return this},wrapInner:function(e){if(a.isFunction(e)){return this.each(function(bd){a(this).wrapInner(e.call(this,bd))})}return this.each(function(){var bd=a(this),be=bd.contents();if(be.length){be.wrapAll(e)}else{bd.append(e)}})},wrap:function(e){return this.each(function(){a(this).wrapAll(e)})},unwrap:function(){return this.parent().each(function(){if(!a.nodeName(this,"body")){a(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bd){this.parentNode.insertBefore(bd,this)})}else{if(arguments.length){var e=a(arguments[0]);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bd){this.parentNode.insertBefore(bd,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,a(arguments[0]).toArray());return e}}},remove:function(e,bf){for(var bd=0,be;(be=this[bd])!=null;bd++){if(!e||a.filter(e,[be]).length){if(!bf&&be.nodeType===1){a.cleanData(be.getElementsByTagName("*"));a.cleanData([be])}if(be.parentNode){be.parentNode.removeChild(be)}}}return this},empty:function(){for(var e=0,bd;(bd=this[e])!=null;e++){if(bd.nodeType===1){a.cleanData(bd.getElementsByTagName("*"))}while(bd.firstChild){bd.removeChild(bd.firstChild)}}return this},clone:function(bd,e){bd=bd==null?false:bd;e=e==null?bd:e;return this.map(function(){return a.clone(this,bd,e)})},html:function(bf){if(bf===H){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ab,""):null}else{if(typeof bf==="string"&&!L.test(bf)&&(a.support.leadingWhitespace||!aj.test(bf))&&!an[(c.exec(bf)||["",""])[1].toLowerCase()]){bf=bf.replace(O,"<$1></$2>");try{for(var be=0,bd=this.length;be<bd;be++){if(this[be].nodeType===1){a.cleanData(this[be].getElementsByTagName("*"));this[be].innerHTML=bf}}}catch(bg){this.empty().append(bf)}}else{if(a.isFunction(bf)){this.each(function(bh){var e=a(this);e.html(bf.call(this,bh,e.html()))})}else{this.empty().append(bf)}}}return this},replaceWith:function(e){if(this[0]&&this[0].parentNode){if(a.isFunction(e)){return this.each(function(bf){var be=a(this),bd=be.html();be.replaceWith(e.call(this,bf,bd))})}if(typeof e!=="string"){e=a(e).detach()}return this.each(function(){var be=this.nextSibling,bd=this.parentNode;a(this).remove();if(be){a(be).before(e)}else{a(bd).append(e)}})}else{return this.pushStack(a(a.isFunction(e)?e():e),"replaceWith",e)}},detach:function(e){return this.remove(e,true)},domManip:function(bj,bn,bm){var bf,bg,bi,bl,bk=bj[0],bd=[];if(!a.support.checkClone&&arguments.length===3&&typeof bk==="string"&&m.test(bk)){return this.each(function(){a(this).domManip(bj,bn,bm,true)})}if(a.isFunction(bk)){return this.each(function(bp){var bo=a(this);bj[0]=bk.call(this,bp,bn?bo.html():H);bo.domManip(bj,bn,bm)})}if(this[0]){bl=bk&&bk.parentNode;if(a.support.parentNode&&bl&&bl.nodeType===11&&bl.childNodes.length===this.length){bf={fragment:bl}}else{bf=a.buildFragment(bj,this,bd)}bi=bf.fragment;if(bi.childNodes.length===1){bg=bi=bi.firstChild}else{bg=bi.firstChild}if(bg){bn=bn&&a.nodeName(bg,"tr");for(var be=0,e=this.length,bh=e-1;be<e;be++){bm.call(bn?aX(this[be],bg):this[be],bf.cacheable||(e>1&&be<bh)?a.clone(bi,true,true):bi)}}if(bd.length){a.each(bd,a8)}}return this}});function aX(e,bd){return a.nodeName(e,"table")?(e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody"))):e}function s(e,bj){if(bj.nodeType!==1||!a.hasData(e)){return}var bi=a.expando,bf=a.data(e),bg=a.data(bj,bf);if((bf=bf[bi])){var bk=bf.events;bg=bg[bi]=a.extend({},bf);if(bk){delete bg.handle;bg.events={};for(var bh in bk){for(var be=0,bd=bk[bh].length;be<bd;be++){a.event.add(bj,bh+(bk[bh][be].namespace?".":"")+bk[bh][be].namespace,bk[bh][be],bk[bh][be].data)}}}}}function ac(bd,e){if(e.nodeType!==1){return}var be=e.nodeName.toLowerCase();e.clearAttributes();e.mergeAttributes(bd);if(be==="object"){e.outerHTML=bd.outerHTML}else{if(be==="input"&&(bd.type==="checkbox"||bd.type==="radio")){if(bd.checked){e.defaultChecked=e.checked=bd.checked}if(e.value!==bd.value){e.value=bd.value}}else{if(be==="option"){e.selected=bd.defaultSelected}else{if(be==="input"||be==="textarea"){e.defaultValue=bd.defaultValue}}}}e.removeAttribute(a.expando)}a.buildFragment=function(bh,bf,bd){var bg,e,be,bi=(bf&&bf[0]?bf[0].ownerDocument||bf[0]:al);if(bh.length===1&&typeof bh[0]==="string"&&bh[0].length<512&&bi===al&&bh[0].charAt(0)==="<"&&!L.test(bh[0])&&(a.support.checkClone||!m.test(bh[0]))){e=true;be=a.fragments[bh[0]];if(be){if(be!==1){bg=be}}}if(!bg){bg=bi.createDocumentFragment();a.clean(bh,bi,bg,bd)}if(e){a.fragments[bh[0]]=be?bg:1}return{fragment:bg,cacheable:e}};a.fragments={};a.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,bd){a.fn[e]=function(be){var bh=[],bk=a(be),bj=this.length===1&&this[0].parentNode;if(bj&&bj.nodeType===11&&bj.childNodes.length===1&&bk.length===1){bk[bd](this[0]);return this}else{for(var bi=0,bf=bk.length;bi<bf;bi++){var bg=(bi>0?this.clone(true):this).get();a(bk[bi])[bd](bg);bh=bh.concat(bg)}return this.pushStack(bh,e,bk.selector)}}});function a1(e){if("getElementsByTagName" in e){return e.getElementsByTagName("*")}else{if("querySelectorAll" in e){return e.querySelectorAll("*")}else{return[]}}}a.extend({clone:function(bg,bi,be){var bh=bg.cloneNode(true),e,bd,bf;if((!a.support.noCloneEvent||!a.support.noCloneChecked)&&(bg.nodeType===1||bg.nodeType===11)&&!a.isXMLDoc(bg)){ac(bg,bh);e=a1(bg);bd=a1(bh);for(bf=0;e[bf];++bf){ac(e[bf],bd[bf])}}if(bi){s(bg,bh);if(be){e=a1(bg);bd=a1(bh);for(bf=0;e[bf];++bf){s(e[bf],bd[bf])}}}return bh},clean:function(be,bg,bn,bi){bg=bg||al;if(typeof bg.createElement==="undefined"){bg=bg.ownerDocument||bg[0]&&bg[0].ownerDocument||al}var bo=[];for(var bm=0,bh;(bh=be[bm])!=null;bm++){if(typeof bh==="number"){bh+=""}if(!bh){continue}if(typeof bh==="string"&&!T.test(bh)){bh=bg.createTextNode(bh)}else{if(typeof bh==="string"){bh=bh.replace(O,"<$1></$2>");var bp=(c.exec(bh)||["",""])[1].toLowerCase(),bf=an[bp]||an._default,bl=bf[0],bd=bg.createElement("div");bd.innerHTML=bf[1]+bh+bf[2];while(bl--){bd=bd.lastChild}if(!a.support.tbody){var e=v.test(bh),bk=bp==="table"&&!e?bd.firstChild&&bd.firstChild.childNodes:bf[1]==="<table>"&&!e?bd.childNodes:[];for(var bj=bk.length-1;bj>=0;--bj){if(a.nodeName(bk[bj],"tbody")&&!bk[bj].childNodes.length){bk[bj].parentNode.removeChild(bk[bj])}}}if(!a.support.leadingWhitespace&&aj.test(bh)){bd.insertBefore(bg.createTextNode(aj.exec(bh)[0]),bd.firstChild)}bh=bd.childNodes}}if(bh.nodeType){bo.push(bh)}else{bo=a.merge(bo,bh)}}if(bn){for(bm=0;bo[bm];bm++){if(bi&&a.nodeName(bo[bm],"script")&&(!bo[bm].type||bo[bm].type.toLowerCase()==="text/javascript")){bi.push(bo[bm].parentNode?bo[bm].parentNode.removeChild(bo[bm]):bo[bm])}else{if(bo[bm].nodeType===1){bo.splice.apply(bo,[bm+1,0].concat(a.makeArray(bo[bm].getElementsByTagName("script"))))}bn.appendChild(bo[bm])}}}return bo},cleanData:function(bd){var bg,be,e=a.cache,bl=a.expando,bj=a.event.special,bi=a.support.deleteExpando;for(var bh=0,bf;(bf=bd[bh])!=null;bh++){if(bf.nodeName&&a.noData[bf.nodeName.toLowerCase()]){continue}be=bf[a.expando];if(be){bg=e[be]&&e[be][bl];if(bg&&bg.events){for(var bk in bg.events){if(bj[bk]){a.event.remove(bf,bk)}else{a.removeEvent(bf,bk,bg.handle)}}if(bg.handle){bg.handle.elem=null}}if(bi){delete bf[a.expando]}else{if(bf.removeAttribute){bf.removeAttribute(a.expando)}}delete e[be]}}}});function a8(e,bd){if(bd.src){a.ajax({url:bd.src,async:false,dataType:"script"})}else{a.globalEval(bd.text||bd.textContent||bd.innerHTML||"")}if(bd.parentNode){bd.parentNode.removeChild(bd)}}var ae=/alpha\([^)]*\)/i,ak=/opacity=([^)]*)/,aM=/-([a-z])/ig,y=/([A-Z])/g,aZ=/^-?\d+(?:px)?$/i,a7=/^-?\d/,aV={position:"absolute",visibility:"hidden",display:"block"},ag=["Left","Right"],aR=["Top","Bottom"],U,ay,aL,l=function(e,bd){return bd.toUpperCase()};a.fn.css=function(e,bd){if(arguments.length===2&&bd===H){return this}return a.access(this,e,bd,true,function(bf,be,bg){return bg!==H?a.style(bf,be,bg):a.css(bf,be)})};a.extend({cssHooks:{opacity:{get:function(be,bd){if(bd){var e=U(be,"opacity","opacity");return e===""?"1":e}else{return be.style.opacity}}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,zoom:true,lineHeight:true},cssProps:{"float":a.support.cssFloat?"cssFloat":"styleFloat"},style:function(bf,be,bk,bg){if(!bf||bf.nodeType===3||bf.nodeType===8||!bf.style){return}var bj,bh=a.camelCase(be),bd=bf.style,bl=a.cssHooks[bh];be=a.cssProps[bh]||bh;if(bk!==H){if(typeof bk==="number"&&isNaN(bk)||bk==null){return}if(typeof bk==="number"&&!a.cssNumber[bh]){bk+="px"}if(!bl||!("set" in bl)||(bk=bl.set(bf,bk))!==H){try{bd[be]=bk}catch(bi){}}}else{if(bl&&"get" in bl&&(bj=bl.get(bf,false,bg))!==H){return bj}return bd[be]}},css:function(bh,bg,bd){var bf,be=a.camelCase(bg),e=a.cssHooks[be];bg=a.cssProps[be]||be;if(e&&"get" in e&&(bf=e.get(bh,true,bd))!==H){return bf}else{if(U){return U(bh,bg,be)}}},swap:function(bf,be,bg){var e={};for(var bd in be){e[bd]=bf.style[bd];bf.style[bd]=be[bd]}bg.call(bf);for(bd in be){bf.style[bd]=e[bd]}},camelCase:function(e){return e.replace(aM,l)}});a.curCSS=a.css;a.each(["height","width"],function(bd,e){a.cssHooks[e]={get:function(bg,bf,be){var bh;if(bf){if(bg.offsetWidth!==0){bh=o(bg,e,be)}else{a.swap(bg,aV,function(){bh=o(bg,e,be)})}if(bh<=0){bh=U(bg,e,e);if(bh==="0px"&&aL){bh=aL(bg,e,e)}if(bh!=null){return bh===""||bh==="auto"?"0px":bh}}if(bh<0||bh==null){bh=bg.style[e];return bh===""||bh==="auto"?"0px":bh}return typeof bh==="string"?bh:bh+"px"}},set:function(be,bf){if(aZ.test(bf)){bf=parseFloat(bf);if(bf>=0){return bf+"px"}}else{return bf}}}});if(!a.support.opacity){a.cssHooks.opacity={get:function(bd,e){return ak.test((e&&bd.currentStyle?bd.currentStyle.filter:bd.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(bf,bg){var be=bf.style;be.zoom=1;var e=a.isNaN(bg)?"":"alpha(opacity="+bg*100+")",bd=be.filter||"";be.filter=ae.test(bd)?bd.replace(ae,e):be.filter+" "+e}}}if(al.defaultView&&al.defaultView.getComputedStyle){ay=function(bh,e,bf){var be,bg,bd;bf=bf.replace(y,"-$1").toLowerCase();if(!(bg=bh.ownerDocument.defaultView)){return H}if((bd=bg.getComputedStyle(bh,null))){be=bd.getPropertyValue(bf);if(be===""&&!a.contains(bh.ownerDocument.documentElement,bh)){be=a.style(bh,bf)}}return be}}if(al.documentElement.currentStyle){aL=function(bg,be){var bh,bd=bg.currentStyle&&bg.currentStyle[be],e=bg.runtimeStyle&&bg.runtimeStyle[be],bf=bg.style;if(!aZ.test(bd)&&a7.test(bd)){bh=bf.left;if(e){bg.runtimeStyle.left=bg.currentStyle.left}bf.left=be==="fontSize"?"1em":(bd||0);bd=bf.pixelLeft+"px";bf.left=bh;if(e){bg.runtimeStyle.left=e}}return bd===""?"auto":bd}}U=ay||aL;function o(be,bd,e){var bg=bd==="width"?ag:aR,bf=bd==="width"?be.offsetWidth:be.offsetHeight;if(e==="border"){return bf}a.each(bg,function(){if(!e){bf-=parseFloat(a.css(be,"padding"+this))||0}if(e==="margin"){bf+=parseFloat(a.css(be,"margin"+this))||0}else{bf-=parseFloat(a.css(be,"border"+this+"Width"))||0}});return bf}if(a.expr&&a.expr.filters){a.expr.filters.hidden=function(be){var bd=be.offsetWidth,e=be.offsetHeight;return(bd===0&&e===0)||(!a.support.reliableHiddenOffsets&&(be.style.display||a.css(be,"display"))==="none")};a.expr.filters.visible=function(e){return !a.expr.filters.hidden(e)}}var i=/%20/g,ah=/\[\]$/,bc=/\r?\n/g,ba=/#.*$/,ar=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,aO=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,aB=/(?:^file|^widget|\-extension):$/,aD=/^(?:GET|HEAD)$/,b=/^\/\//,I=/\?/,aU=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,p=/^(?:select|textarea)/i,g=/\s+/,bb=/([?&])_=[^&]*/,R=/(^|\-)([a-z])/g,aJ=function(bd,e,be){return e+be.toUpperCase()},G=/^([\w\+\.\-]+:)\/\/([^\/?#:]*)(?::(\d+))?/,z=a.fn.load,V={},q={},au,r;try{au=al.location.href}catch(am){au=al.createElement("a");au.href="";au=au.href}r=G.exec(au.toLowerCase());function d(e){return function(bg,bi){if(typeof bg!=="string"){bi=bg;bg="*"}if(a.isFunction(bi)){var bf=bg.toLowerCase().split(g),be=0,bh=bf.length,bd,bj,bk;for(;be<bh;be++){bd=bf[be];bk=/^\+/.test(bd);if(bk){bd=bd.substr(1)||"*"}bj=e[bd]=e[bd]||[];bj[bk?"unshift":"push"](bi)}}}}function aI(bd,bm,bh,bl,bj,bf){bj=bj||bm.dataTypes[0];bf=bf||{};bf[bj]=true;var bi=bd[bj],be=0,e=bi?bi.length:0,bg=(bd===V),bk;for(;be<e&&(bg||!bk);be++){bk=bi[be](bm,bh,bl);if(typeof bk==="string"){if(!bg||bf[bk]){bk=H}else{bm.dataTypes.unshift(bk);bk=aI(bd,bm,bh,bl,bk,bf)}}}if((bg||!bk)&&!bf["*"]){bk=aI(bd,bm,bh,bl,"*",bf)}return bk}a.fn.extend({load:function(be,bh,bi){if(typeof be!=="string"&&z){return z.apply(this,arguments)}else{if(!this.length){return this}}var bg=be.indexOf(" ");if(bg>=0){var e=be.slice(bg,be.length);be=be.slice(0,bg)}var bf="GET";if(bh){if(a.isFunction(bh)){bi=bh;bh=H}else{if(typeof bh==="object"){bh=a.param(bh,a.ajaxSettings.traditional);bf="POST"}}}var bd=this;a.ajax({url:be,type:bf,dataType:"html",data:bh,complete:function(bk,bj,bl){bl=bk.responseText;if(bk.isResolved()){bk.done(function(bm){bl=bm});bd.html(e?a("<div>").append(bl.replace(aU,"")).find(e):bl)}if(bi){bd.each(bi,[bl,bj,bk])}}});return this},serialize:function(){return a.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?a.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||p.test(this.nodeName)||aO.test(this.type))}).map(function(e,bd){var be=a(this).val();return be==null?null:a.isArray(be)?a.map(be,function(bg,bf){return{name:bd.name,value:bg.replace(bc,"\r\n")}}):{name:bd.name,value:be.replace(bc,"\r\n")}}).get()}});a.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bd){a.fn[bd]=function(be){return this.bind(bd,be)}});a.each(["get","post"],function(e,bd){a[bd]=function(be,bg,bh,bf){if(a.isFunction(bg)){bf=bf||bh;bh=bg;bg=H}return a.ajax({type:bd,url:be,data:bg,success:bh,dataType:bf})}});a.extend({getScript:function(e,bd){return a.get(e,H,bd,"script")},getJSON:function(e,bd,be){return a.get(e,bd,be,"json")},ajaxSetup:function(be,e){if(!e){e=be;be=a.extend(true,a.ajaxSettings,e)}else{a.extend(true,be,a.ajaxSettings,e)}for(var bd in {context:1,url:1}){if(bd in e){be[bd]=e[bd]}else{if(bd in a.ajaxSettings){be[bd]=a.ajaxSettings[bd]}}}return be},ajaxSettings:{url:au,isLocal:aB.test(r[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":aY.String,"text html":true,"text json":a.parseJSON,"text xml":a.parseXML}},ajaxPrefilter:d(V),ajaxTransport:d(q),ajax:function(bh,bf){if(typeof bh==="object"){bf=bh;bh=H}bf=bf||{};var bl=a.ajaxSetup({},bf),bz=bl.context||bl,bo=bz!==bl&&(bz.nodeType||bz instanceof a)?a(bz):a.event,by=a.Deferred(),bv=a._Deferred(),bj=bl.statusCode||{},bk,bp={},bx,bg,bt,bm,bq,bi=0,be,bs,br={readyState:0,setRequestHeader:function(e,bA){if(!bi){bp[e.toLowerCase().replace(R,aJ)]=bA}return this},getAllResponseHeaders:function(){return bi===2?bx:null},getResponseHeader:function(bA){var e;if(bi===2){if(!bg){bg={};while((e=ar.exec(bx))){bg[e[1].toLowerCase()]=e[2]}}e=bg[bA.toLowerCase()]}return e===H?null:e},overrideMimeType:function(e){if(!bi){bl.mimeType=e}return this},abort:function(e){e=e||"abort";if(bt){bt.abort(e)}bn(0,e);return this}};function bn(bF,bD,bG,bC){if(bi===2){return}bi=2;if(bm){clearTimeout(bm)}bt=H;bx=bC||"";br.readyState=bF?4:0;var bA,bK,bJ,bE=bG?a4(bl,br,bG):H,bB,bI;if(bF>=200&&bF<300||bF===304){if(bl.ifModified){if((bB=br.getResponseHeader("Last-Modified"))){a.lastModified[bk]=bB}if((bI=br.getResponseHeader("Etag"))){a.etag[bk]=bI}}if(bF===304){bD="notmodified";bA=true}else{try{bK=D(bl,bE);bD="success";bA=true}catch(bH){bD="parsererror";bJ=bH}}}else{bJ=bD;if(!bD||bF){bD="error";if(bF<0){bF=0}}}br.status=bF;br.statusText=bD;if(bA){by.resolveWith(bz,[bK,bD,br])}else{by.rejectWith(bz,[br,bD,bJ])}br.statusCode(bj);bj=H;if(be){bo.trigger("ajax"+(bA?"Success":"Error"),[br,bl,bA?bK:bJ])}bv.resolveWith(bz,[br,bD]);if(be){bo.trigger("ajaxComplete",[br,bl]);if(!(--a.active)){a.event.trigger("ajaxStop")}}}by.promise(br);br.success=br.done;br.error=br.fail;br.complete=bv.done;br.statusCode=function(bA){if(bA){var e;if(bi<2){for(e in bA){bj[e]=[bj[e],bA[e]]}}else{e=bA[br.status];br.then(e,e)}}return this};bl.url=((bh||bl.url)+"").replace(ba,"").replace(b,r[1]+"//");bl.dataTypes=a.trim(bl.dataType||"*").toLowerCase().split(g);if(!bl.crossDomain){bq=G.exec(bl.url.toLowerCase());bl.crossDomain=!!(bq&&(bq[1]!=r[1]||bq[2]!=r[2]||(bq[3]||(bq[1]==="http:"?80:443))!=(r[3]||(r[1]==="http:"?80:443))))}if(bl.data&&bl.processData&&typeof bl.data!=="string"){bl.data=a.param(bl.data,bl.traditional)}aI(V,bl,bf,br);if(bi===2){return false}be=bl.global;bl.type=bl.type.toUpperCase();bl.hasContent=!aD.test(bl.type);if(be&&a.active++===0){a.event.trigger("ajaxStart")}if(!bl.hasContent){if(bl.data){bl.url+=(I.test(bl.url)?"&":"?")+bl.data}bk=bl.url;if(bl.cache===false){var bd=a.now(),bw=bl.url.replace(bb,"$1_="+bd);bl.url=bw+((bw===bl.url)?(I.test(bl.url)?"&":"?")+"_="+bd:"")}}if(bl.data&&bl.hasContent&&bl.contentType!==false||bf.contentType){bp["Content-Type"]=bl.contentType}if(bl.ifModified){bk=bk||bl.url;if(a.lastModified[bk]){bp["If-Modified-Since"]=a.lastModified[bk]}if(a.etag[bk]){bp["If-None-Match"]=a.etag[bk]}}bp.Accept=bl.dataTypes[0]&&bl.accepts[bl.dataTypes[0]]?bl.accepts[bl.dataTypes[0]]+(bl.dataTypes[0]!=="*"?", */*; q=0.01":""):bl.accepts["*"];for(bs in bl.headers){br.setRequestHeader(bs,bl.headers[bs])}if(bl.beforeSend&&(bl.beforeSend.call(bz,br,bl)===false||bi===2)){br.abort();return false}for(bs in {success:1,error:1,complete:1}){br[bs](bl[bs])}bt=aI(q,bl,bf,br);if(!bt){bn(-1,"No Transport")}else{br.readyState=1;if(be){bo.trigger("ajaxSend",[br,bl])}if(bl.async&&bl.timeout>0){bm=setTimeout(function(){br.abort("timeout")},bl.timeout)}try{bi=1;bt.send(bp,bn)}catch(bu){if(status<2){bn(-1,bu)}else{a.error(bu)}}}return br},param:function(e,be){var bd=[],bg=function(bh,bi){bi=a.isFunction(bi)?bi():bi;bd[bd.length]=encodeURIComponent(bh)+"="+encodeURIComponent(bi)};if(be===H){be=a.ajaxSettings.traditional}if(a.isArray(e)||(e.jquery&&!a.isPlainObject(e))){a.each(e,function(){bg(this.name,this.value)})}else{for(var bf in e){u(bf,e[bf],be,bg)}}return bd.join("&").replace(i,"+")}});function u(be,bg,bd,bf){if(a.isArray(bg)&&bg.length){a.each(bg,function(bi,bh){if(bd||ah.test(be)){bf(be,bh)}else{u(be+"["+(typeof bh==="object"||a.isArray(bh)?bi:"")+"]",bh,bd,bf)}})}else{if(!bd&&bg!=null&&typeof bg==="object"){if(a.isArray(bg)||a.isEmptyObject(bg)){bf(be,"")}else{for(var e in bg){u(be+"["+e+"]",bg[e],bd,bf)}}}else{bf(be,bg)}}}a.extend({active:0,lastModified:{},etag:{}});function a4(bl,bk,bh){var bd=bl.contents,bj=bl.dataTypes,be=bl.responseFields,bg,bi,bf,e;for(bi in be){if(bi in bh){bk[be[bi]]=bh[bi]}}while(bj[0]==="*"){bj.shift();if(bg===H){bg=bl.mimeType||bk.getResponseHeader("content-type")}}if(bg){for(bi in bd){if(bd[bi]&&bd[bi].test(bg)){bj.unshift(bi);break}}}if(bj[0] in bh){bf=bj[0]}else{for(bi in bh){if(!bj[0]||bl.converters[bi+" "+bj[0]]){bf=bi;break}if(!e){e=bi}}bf=bf||e}if(bf){if(bf!==bj[0]){bj.unshift(bf)}return bh[bf]}}function D(bp,bh){if(bp.dataFilter){bh=bp.dataFilter(bh,bp.dataType)}var bl=bp.dataTypes,bo={},bi,bm,be=bl.length,bj,bk=bl[0],bf,bg,bn,bd,e;for(bi=1;bi<be;bi++){if(bi===1){for(bm in bp.converters){if(typeof bm==="string"){bo[bm.toLowerCase()]=bp.converters[bm]}}}bf=bk;bk=bl[bi];if(bk==="*"){bk=bf}else{if(bf!=="*"&&bf!==bk){bg=bf+" "+bk;bn=bo[bg]||bo["* "+bk];if(!bn){e=H;for(bd in bo){bj=bd.split(" ");if(bj[0]===bf||bj[0]==="*"){e=bo[bj[1]+" "+bk];if(e){bd=bo[bd];if(bd===true){bn=e}else{if(e===true){bn=bd}}break}}}}if(!(bn||e)){a.error("No conversion from "+bg.replace(" "," to "))}if(bn!==true){bh=bn?bn(bh):e(bd(bh))}}}}return bh}var aq=a.now(),t=/(\=)\?(&|$)|()\?\?()/i;a.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return a.expando+"_"+(aq++)}});a.ajaxPrefilter("json jsonp",function(bm,bi,bl){var bk=(typeof bm.data==="string");if(bm.dataTypes[0]==="jsonp"||bi.jsonpCallback||bi.jsonp!=null||bm.jsonp!==false&&(t.test(bm.url)||bk&&t.test(bm.data))){var bj,be=bm.jsonpCallback=a.isFunction(bm.jsonpCallback)?bm.jsonpCallback():bm.jsonpCallback,bh=aY[be],e=bm.url,bg=bm.data,bd="$1"+be+"$2",bf=function(){aY[be]=bh;if(bj&&a.isFunction(bh)){aY[be](bj[0])}};if(bm.jsonp!==false){e=e.replace(t,bd);if(bm.url===e){if(bk){bg=bg.replace(t,bd)}if(bm.data===bg){e+=(/\?/.test(e)?"&":"?")+bm.jsonp+"="+be}}}bm.url=e;bm.data=bg;aY[be]=function(bn){bj=[bn]};bl.then(bf,bf);bm.converters["script json"]=function(){if(!bj){a.error(be+" was not called")}return bj[0]};bm.dataTypes[0]="json";return"script"}});a.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){a.globalEval(e);return e}}});a.ajaxPrefilter("script",function(e){if(e.cache===H){e.cache=false}if(e.crossDomain){e.type="GET";e.global=false}});a.ajaxTransport("script",function(be){if(be.crossDomain){var e,bd=al.head||al.getElementsByTagName("head")[0]||al.documentElement;return{send:function(bf,bg){e=al.createElement("script");e.async="async";if(be.scriptCharset){e.charset=be.scriptCharset}e.src=be.url;e.onload=e.onreadystatechange=function(bi,bh){if(!e.readyState||/loaded|complete/.test(e.readyState)){e.onload=e.onreadystatechange=null;if(bd&&e.parentNode){bd.removeChild(e)}e=H;if(!bh){bg(200,"success")}}};bd.insertBefore(e,bd.firstChild)},abort:function(){if(e){e.onload(0,1)}}}}});var x=a.now(),J,at;function A(){a(aY).unload(function(){for(var e in J){J[e](0,1)}})}function aA(){try{return new aY.XMLHttpRequest()}catch(bd){}}function ad(){try{return new aY.ActiveXObject("Microsoft.XMLHTTP")}catch(bd){}}a.ajaxSettings.xhr=aY.ActiveXObject?function(){return !this.isLocal&&aA()||ad()}:aA;at=a.ajaxSettings.xhr();a.support.ajax=!!at;a.support.cors=at&&("withCredentials" in at);at=H;if(a.support.ajax){a.ajaxTransport(function(e){if(!e.crossDomain||a.support.cors){var bd;return{send:function(bj,be){var bi=e.xhr(),bh,bg;if(e.username){bi.open(e.type,e.url,e.async,e.username,e.password)}else{bi.open(e.type,e.url,e.async)}if(e.xhrFields){for(bg in e.xhrFields){bi[bg]=e.xhrFields[bg]}}if(e.mimeType&&bi.overrideMimeType){bi.overrideMimeType(e.mimeType)}if(!(e.crossDomain&&!e.hasContent)&&!bj["X-Requested-With"]){bj["X-Requested-With"]="XMLHttpRequest"}try{for(bg in bj){bi.setRequestHeader(bg,bj[bg])}}catch(bf){}bi.send((e.hasContent&&e.data)||null);bd=function(bs,bm){var bn,bl,bk,bq,bp;try{if(bd&&(bm||bi.readyState===4)){bd=H;if(bh){bi.onreadystatechange=a.noop;delete J[bh]}if(bm){if(bi.readyState!==4){bi.abort()}}else{bn=bi.status;bk=bi.getAllResponseHeaders();bq={};bp=bi.responseXML;if(bp&&bp.documentElement){bq.xml=bp}bq.text=bi.responseText;try{bl=bi.statusText}catch(br){bl=""}if(!bn&&e.isLocal&&!e.crossDomain){bn=bq.text?200:404}else{if(bn===1223){bn=204}}}}}catch(bo){if(!bm){be(-1,bo)}}if(bq){be(bn,bl,bq,bk)}};if(!e.async||bi.readyState===4){bd()}else{if(!J){J={};A()}bh=x++;bi.onreadystatechange=J[bh]=bd}},abort:function(){if(bd){bd(0,1)}}}}})}var N={},ap=/^(?:toggle|show|hide)$/,aF=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,aS,ax=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];a.fn.extend({show:function(bf,bi,bh){var be,bg;if(bf||bf===0){return this.animate(aQ("show",3),bf,bi,bh)}else{for(var bd=0,e=this.length;bd<e;bd++){be=this[bd];bg=be.style.display;if(!a._data(be,"olddisplay")&&bg==="none"){bg=be.style.display=""}if(bg===""&&a.css(be,"display")==="none"){a._data(be,"olddisplay",w(be.nodeName))}}for(bd=0;bd<e;bd++){be=this[bd];bg=be.style.display;if(bg===""||bg==="none"){be.style.display=a._data(be,"olddisplay")||""}}return this}},hide:function(be,bh,bg){if(be||be===0){return this.animate(aQ("hide",3),be,bh,bg)}else{for(var bd=0,e=this.length;bd<e;bd++){var bf=a.css(this[bd],"display");if(bf!=="none"&&!a._data(this[bd],"olddisplay")){a._data(this[bd],"olddisplay",bf)}}for(bd=0;bd<e;bd++){this[bd].style.display="none"}return this}},_toggle:a.fn.toggle,toggle:function(be,bd,bf){var e=typeof be==="boolean";if(a.isFunction(be)&&a.isFunction(bd)){this._toggle.apply(this,arguments)}else{if(be==null||e){this.each(function(){var bg=e?be:a(this).is(":hidden");a(this)[bg?"show":"hide"]()})}else{this.animate(aQ("toggle",3),be,bd,bf)}}return this},fadeTo:function(e,bf,be,bd){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:bf},e,be,bd)},animate:function(bg,bd,bf,be){var e=a.speed(bd,bf,be);if(a.isEmptyObject(bg)){return this.each(e.complete)}return this[e.queue===false?"each":"queue"](function(){var bj=a.extend({},e),bn,bk=this.nodeType===1,bl=bk&&a(this).is(":hidden"),bh=this;for(bn in bg){var bi=a.camelCase(bn);if(bn!==bi){bg[bi]=bg[bn];delete bg[bn];bn=bi}if(bg[bn]==="hide"&&bl||bg[bn]==="show"&&!bl){return bj.complete.call(this)}if(bk&&(bn==="height"||bn==="width")){bj.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(a.css(this,"display")==="inline"&&a.css(this,"float")==="none"){if(!a.support.inlineBlockNeedsLayout){this.style.display="inline-block"}else{var bm=w(this.nodeName);if(bm==="inline"){this.style.display="inline-block"}else{this.style.display="inline";this.style.zoom=1}}}}if(a.isArray(bg[bn])){(bj.specialEasing=bj.specialEasing||{})[bn]=bg[bn][1];bg[bn]=bg[bn][0]}}if(bj.overflow!=null){this.style.overflow="hidden"}bj.curAnim=a.extend({},bg);a.each(bg,function(bp,bt){var bs=new a.fx(bh,bj,bp);if(ap.test(bt)){bs[bt==="toggle"?bl?"show":"hide":bt](bg)}else{var br=aF.exec(bt),bu=bs.cur();if(br){var bo=parseFloat(br[2]),bq=br[3]||(a.cssNumber[bp]?"":"px");if(bq!=="px"){a.style(bh,bp,(bo||1)+bq);bu=((bo||1)/bs.cur())*bu;a.style(bh,bp,bu+bq)}if(br[1]){bo=((br[1]==="-="?-1:1)*bo)+bu}bs.custom(bu,bo,bq)}else{bs.custom(bu,bt,"")}}});return true})},stop:function(bd,e){var be=a.timers;if(bd){this.queue([])}this.each(function(){for(var bf=be.length-1;bf>=0;bf--){if(be[bf].elem===this){if(e){be[bf](true)}be.splice(bf,1)}}});if(!e){this.dequeue()}return this}});function aQ(bd,e){var be={};a.each(ax.concat.apply([],ax.slice(0,e)),function(){be[this]=bd});return be}a.each({slideDown:aQ("show",1),slideUp:aQ("hide",1),slideToggle:aQ("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,bd){a.fn[e]=function(be,bg,bf){return this.animate(bd,be,bg,bf)}});a.extend({speed:function(be,bf,bd){var e=be&&typeof be==="object"?a.extend({},be):{complete:bd||!bd&&bf||a.isFunction(be)&&be,duration:be,easing:bd&&bf||bf&&!a.isFunction(bf)&&bf};e.duration=a.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in a.fx.speeds?a.fx.speeds[e.duration]:a.fx.speeds._default;e.old=e.complete;e.complete=function(){if(e.queue!==false){a(this).dequeue()}if(a.isFunction(e.old)){e.old.call(this)}};return e},easing:{linear:function(be,bf,e,bd){return e+bd*be},swing:function(be,bf,e,bd){return((-Math.cos(be*Math.PI)/2)+0.5)*bd+e}},timers:[],fx:function(bd,e,be){this.options=e;this.elem=bd;this.prop=be;if(!e.orig){e.orig={}}}});a.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(a.fx.step[this.prop]||a.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var e,bd=a.css(this.elem,this.prop);return isNaN(e=parseFloat(bd))?!bd||bd==="auto"?0:bd:e},custom:function(bh,bg,bf){var e=this,be=a.fx;this.startTime=a.now();this.start=bh;this.end=bg;this.unit=bf||this.unit||(a.cssNumber[this.prop]?"":"px");this.now=this.start;this.pos=this.state=0;function bd(bi){return e.step(bi)}bd.elem=this.elem;if(bd()&&a.timers.push(bd)&&!aS){aS=setInterval(be.tick,be.interval)}},show:function(){this.options.orig[this.prop]=a.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());a(this.elem).show()},hide:function(){this.options.orig[this.prop]=a.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(bf){var bk=a.now(),bg=true;if(bf||bk>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var bh in this.options.curAnim){if(this.options.curAnim[bh]!==true){bg=false}}if(bg){if(this.options.overflow!=null&&!a.support.shrinkWrapBlocks){var be=this.elem,bl=this.options;a.each(["","X","Y"],function(bm,bn){be.style["overflow"+bn]=bl.overflow[bm]})}if(this.options.hide){a(this.elem).hide()}if(this.options.hide||this.options.show){for(var e in this.options.curAnim){a.style(this.elem,e,this.options.orig[e])}}this.options.complete.call(this.elem)}return false}else{var bd=bk-this.startTime;this.state=bd/this.options.duration;var bi=this.options.specialEasing&&this.options.specialEasing[this.prop];var bj=this.options.easing||(a.easing.swing?"swing":"linear");this.pos=a.easing[bi||bj](this.state,bd,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};a.extend(a.fx,{tick:function(){var bd=a.timers;for(var e=0;e<bd.length;e++){if(!bd[e]()){bd.splice(e--,1)}}if(!bd.length){a.fx.stop()}},interval:13,stop:function(){clearInterval(aS);aS=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(e){a.style(e.elem,"opacity",e.now)},_default:function(e){if(e.elem.style&&e.elem.style[e.prop]!=null){e.elem.style[e.prop]=(e.prop==="width"||e.prop==="height"?Math.max(0,e.now):e.now)+e.unit}else{e.elem[e.prop]=e.now}}}});if(a.expr&&a.expr.filters){a.expr.filters.animated=function(e){return a.grep(a.timers,function(bd){return e===bd.elem}).length}}function w(be){if(!N[be]){var e=a("<"+be+">").appendTo("body"),bd=e.css("display");e.remove();if(bd==="none"||bd===""){bd="block"}N[be]=bd}return N[be]}var S=/^t(?:able|d|h)$/i,Y=/^(?:body|html)$/i;if("getBoundingClientRect" in al.documentElement){a.fn.offset=function(bq){var bg=this[0],bj;if(bq){return this.each(function(e){a.offset.setOffset(this,bq,e)})}if(!bg||!bg.ownerDocument){return null}if(bg===bg.ownerDocument.body){return a.offset.bodyOffset(bg)}try{bj=bg.getBoundingClientRect()}catch(bn){}var bp=bg.ownerDocument,be=bp.documentElement;if(!bj||!a.contains(be,bg)){return bj?{top:bj.top,left:bj.left}:{top:0,left:0}}var bk=bp.body,bl=az(bp),bi=be.clientTop||bk.clientTop||0,bm=be.clientLeft||bk.clientLeft||0,bd=(bl.pageYOffset||a.support.boxModel&&be.scrollTop||bk.scrollTop),bh=(bl.pageXOffset||a.support.boxModel&&be.scrollLeft||bk.scrollLeft),bo=bj.top+bd-bi,bf=bj.left+bh-bm;return{top:bo,left:bf}}}else{a.fn.offset=function(bn){var bh=this[0];if(bn){return this.each(function(bo){a.offset.setOffset(this,bn,bo)})}if(!bh||!bh.ownerDocument){return null}if(bh===bh.ownerDocument.body){return a.offset.bodyOffset(bh)}a.offset.initialize();var bk,be=bh.offsetParent,bd=bh,bm=bh.ownerDocument,bf=bm.documentElement,bi=bm.body,bj=bm.defaultView,e=bj?bj.getComputedStyle(bh,null):bh.currentStyle,bl=bh.offsetTop,bg=bh.offsetLeft;while((bh=bh.parentNode)&&bh!==bi&&bh!==bf){if(a.offset.supportsFixedPosition&&e.position==="fixed"){break}bk=bj?bj.getComputedStyle(bh,null):bh.currentStyle;bl-=bh.scrollTop;bg-=bh.scrollLeft;if(bh===be){bl+=bh.offsetTop;bg+=bh.offsetLeft;if(a.offset.doesNotAddBorder&&!(a.offset.doesAddBorderForTableAndCells&&S.test(bh.nodeName))){bl+=parseFloat(bk.borderTopWidth)||0;bg+=parseFloat(bk.borderLeftWidth)||0}bd=be;be=bh.offsetParent}if(a.offset.subtractsBorderForOverflowNotVisible&&bk.overflow!=="visible"){bl+=parseFloat(bk.borderTopWidth)||0;bg+=parseFloat(bk.borderLeftWidth)||0}e=bk}if(e.position==="relative"||e.position==="static"){bl+=bi.offsetTop;bg+=bi.offsetLeft}if(a.offset.supportsFixedPosition&&e.position==="fixed"){bl+=Math.max(bf.scrollTop,bi.scrollTop);bg+=Math.max(bf.scrollLeft,bi.scrollLeft)}return{top:bl,left:bg}}}a.offset={initialize:function(){var e=al.body,bd=al.createElement("div"),bg,bi,bh,bj,be=parseFloat(a.css(e,"marginTop"))||0,bf="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.extend(bd.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});bd.innerHTML=bf;e.insertBefore(bd,e.firstChild);bg=bd.firstChild;bi=bg.firstChild;bj=bg.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(bi.offsetTop!==5);this.doesAddBorderForTableAndCells=(bj.offsetTop===5);bi.style.position="fixed";bi.style.top="20px";this.supportsFixedPosition=(bi.offsetTop===20||bi.offsetTop===15);bi.style.position=bi.style.top="";bg.style.overflow="hidden";bg.style.position="relative";this.subtractsBorderForOverflowNotVisible=(bi.offsetTop===-5);this.doesNotIncludeMarginInBodyOffset=(e.offsetTop!==be);e.removeChild(bd);e=bd=bg=bi=bh=bj=null;a.offset.initialize=a.noop},bodyOffset:function(e){var be=e.offsetTop,bd=e.offsetLeft;a.offset.initialize();if(a.offset.doesNotIncludeMarginInBodyOffset){be+=parseFloat(a.css(e,"marginTop"))||0;bd+=parseFloat(a.css(e,"marginLeft"))||0}return{top:be,left:bd}},setOffset:function(bf,bo,bi){var bj=a.css(bf,"position");if(bj==="static"){bf.style.position="relative"}var bh=a(bf),bd=bh.offset(),e=a.css(bf,"top"),bm=a.css(bf,"left"),bn=(bj==="absolute"&&a.inArray("auto",[e,bm])>-1),bl={},bk={},be,bg;if(bn){bk=bh.position()}be=bn?bk.top:parseInt(e,10)||0;bg=bn?bk.left:parseInt(bm,10)||0;if(a.isFunction(bo)){bo=bo.call(bf,bi,bd)}if(bo.top!=null){bl.top=(bo.top-bd.top)+be}if(bo.left!=null){bl.left=(bo.left-bd.left)+bg}if("using" in bo){bo.using.call(bf,bl)}else{bh.css(bl)}}};a.fn.extend({position:function(){if(!this[0]){return null}var be=this[0],bd=this.offsetParent(),bf=this.offset(),e=Y.test(bd[0].nodeName)?{top:0,left:0}:bd.offset();bf.top-=parseFloat(a.css(be,"marginTop"))||0;bf.left-=parseFloat(a.css(be,"marginLeft"))||0;e.top+=parseFloat(a.css(bd[0],"borderTopWidth"))||0;e.left+=parseFloat(a.css(bd[0],"borderLeftWidth"))||0;return{top:bf.top-e.top,left:bf.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||al.body;while(e&&(!Y.test(e.nodeName)&&a.css(e,"position")==="static")){e=e.offsetParent}return e})}});a.each(["Left","Top"],function(bd,e){var be="scroll"+e;a.fn[be]=function(bh){var bf=this[0],bg;if(!bf){return null}if(bh!==H){return this.each(function(){bg=az(this);if(bg){bg.scrollTo(!bd?bh:a(bg).scrollLeft(),bd?bh:a(bg).scrollTop())}else{this[be]=bh}})}else{bg=az(bf);return bg?("pageXOffset" in bg)?bg[bd?"pageYOffset":"pageXOffset"]:a.support.boxModel&&bg.document.documentElement[be]||bg.document.body[be]:bf[be]}}});function az(e){return a.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}a.each(["Height","Width"],function(bd,e){var be=e.toLowerCase();a.fn["inner"+e]=function(){return this[0]?parseFloat(a.css(this[0],be,"padding")):null};a.fn["outer"+e]=function(bf){return this[0]?parseFloat(a.css(this[0],be,bf?"margin":"border")):null};a.fn[be]=function(bg){var bh=this[0];if(!bh){return bg==null?null:this}if(a.isFunction(bg)){return this.each(function(bl){var bk=a(this);bk[be](bg.call(this,bl,bk[be]()))})}if(a.isWindow(bh)){var bi=bh.document.documentElement["client"+e];return bh.document.compatMode==="CSS1Compat"&&bi||bh.document.body["client"+e]||bi}else{if(bh.nodeType===9){return Math.max(bh.documentElement["client"+e],bh.body["scroll"+e],bh.documentElement["scroll"+e],bh.body["offset"+e],bh.documentElement["offset"+e])}else{if(bg===H){var bj=a.css(bh,be),bf=parseFloat(bj);return a.isNaN(bf)?bj:bf}else{return this.css(be,typeof bg==="string"?bg:bg+"px")}}}}});aY.jQuery=aY.$=a})(window); \ No newline at end of file
diff --git a/chromium/third_party/guava/guava.gyp b/chromium/third_party/guava/guava.gyp
index e300460271f..bfe2a30fe86 100644
--- a/chromium/third_party/guava/guava.gyp
+++ b/chromium/third_party/guava/guava.gyp
@@ -9,8 +9,6 @@
'type': 'none',
'variables': {
'java_in_dir': 'src/guava',
- 'proguard_preprocess': 1,
- 'proguard_config': 'proguard.flags',
},
'dependencies': [
'../../third_party/jsr-305/jsr-305.gyp:jsr_305_javalib',
diff --git a/chromium/third_party/guava/proguard.flags b/chromium/third_party/guava/proguard.flags
deleted file mode 100644
index 015d703a305..00000000000
--- a/chromium/third_party/guava/proguard.flags
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
--keep class com.google.common.base.** {
- *;
-}
-
--keep class com.google.common.annotations.** {
- *;
-}
-
--keep class com.google.common.collect.** {
- *;
-}
-
--keepattributes Signature
-
-# Don't complain about usage of sun.misc.Unsafe. Guava imports this,
-# but does not use it unless it exists.
-# The gyp-target that uses this is guava.gyp:guava_javalib.
--dontwarn sun.misc.Unsafe
-# Striped64 uses reflection to access some local fields.
--dontnote com.google.common.cache.Striped64
--dontnote com.google.common.cache.Striped64$Cell
-
-# Keep all enum values and valueOf methods. See
-# http://proguard.sourceforge.net/index.html#manual/examples.html
-# for the reason for this. Also, see http://crbug.com/248037.
--keepclassmembers enum * {
- public static **[] values();
- public static ** valueOf(java.lang.String);
-}
diff --git a/chromium/third_party/libusb/README.chromium b/chromium/third_party/libusb/README.chromium
index b0e8ada6ad1..348d919814a 100644
--- a/chromium/third_party/libusb/README.chromium
+++ b/chromium/third_party/libusb/README.chromium
@@ -15,3 +15,4 @@ Local Modifications:
- Exposing an API (libusb_interrupt_handle_event) to explicitly interrupt
libusb_handle_event.
- windows-build.patch has been applied.
+- darwin-sigfpe.patch has been applied.
diff --git a/chromium/third_party/libusb/darwin-sigfpe.patch b/chromium/third_party/libusb/darwin-sigfpe.patch
new file mode 100644
index 00000000000..3c74db18570
--- /dev/null
+++ b/chromium/third_party/libusb/darwin-sigfpe.patch
@@ -0,0 +1,22 @@
+diff --git a/libusb/os/darwin_usb.c b/libusb/os/darwin_usb.c
+index b0ee5b2..fe40899 100644
+--- a/libusb/os/darwin_usb.c
++++ b/libusb/os/darwin_usb.c
+@@ -1449,8 +1449,14 @@ static int submit_bulk_transfer(struct usbi_transfer *itransfer) {
+
+ cInterface = &priv->interfaces[iface];
+
+- (*(cInterface->interface))->GetPipeProperties (cInterface->interface, pipeRef, &direction, &number,
+- &transferType, &maxPacketSize, &interval);
++ ret = (*(cInterface->interface))->GetPipeProperties (cInterface->interface, pipeRef, &direction, &number,
++ &transferType, &maxPacketSize, &interval);
++
++ if (ret) {
++ usbi_err (TRANSFER_CTX (transfer), "bulk transfer failed (dir = %s): %s (code = 0x%08x)", IS_XFERIN(transfer) ? "In" : "Out",
++ darwin_error_str(ret), ret);
++ return darwin_to_libusb (ret);
++ }
+
+ if (0 != (transfer->length % maxPacketSize)) {
+ /* do not need a zero packet */
+
diff --git a/chromium/third_party/libusb/src/libusb/os/darwin_usb.c b/chromium/third_party/libusb/src/libusb/os/darwin_usb.c
index a24558cb593..3f315e84be6 100644
--- a/chromium/third_party/libusb/src/libusb/os/darwin_usb.c
+++ b/chromium/third_party/libusb/src/libusb/os/darwin_usb.c
@@ -1448,8 +1448,14 @@ static int submit_bulk_transfer(struct usbi_transfer *itransfer) {
cInterface = &priv->interfaces[iface];
- (*(cInterface->interface))->GetPipeProperties (cInterface->interface, pipeRef, &direction, &number,
- &transferType, &maxPacketSize, &interval);
+ ret = (*(cInterface->interface))->GetPipeProperties (cInterface->interface, pipeRef, &direction, &number,
+ &transferType, &maxPacketSize, &interval);
+
+ if (ret) {
+ usbi_err (TRANSFER_CTX (transfer), "bulk transfer failed (dir = %s): %s (code = 0x%08x)", IS_XFERIN(transfer) ? "In" : "Out",
+ darwin_error_str(ret), ret);
+ return darwin_to_libusb (ret);
+ }
if (0 != (transfer->length % maxPacketSize)) {
/* do not need a zero packet */
diff --git a/chromium/third_party/libxml/chromium/libxml_utils.h b/chromium/third_party/libxml/chromium/libxml_utils.h
index 80d05f67d8d..d230c5d9b23 100644
--- a/chromium/third_party/libxml/chromium/libxml_utils.h
+++ b/chromium/third_party/libxml/chromium/libxml_utils.h
@@ -133,12 +133,6 @@ class XmlWriter {
return xmlTextWriterEndElement(writer_) >= 0;
}
- // Appends to the content of the current open element.
- bool AppendElementContent(const std::string& content) {
- return xmlTextWriterWriteString(writer_,
- BAD_CAST content.c_str()) >= 0;
- }
-
// Adds an attribute to the current open element. Returns false on error.
bool AddAttribute(const std::string& attribute_name,
const std::string& attribute_value) {
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_access.so b/chromium/third_party/lighttpd/mac/lib/mod_access.so
new file mode 100755
index 00000000000..d09acb9331e
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_access.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_accesslog.so b/chromium/third_party/lighttpd/mac/lib/mod_accesslog.so
new file mode 100755
index 00000000000..7d035d88d58
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_accesslog.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_alias.so b/chromium/third_party/lighttpd/mac/lib/mod_alias.so
new file mode 100755
index 00000000000..af17ad09379
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_alias.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_auth.so b/chromium/third_party/lighttpd/mac/lib/mod_auth.so
new file mode 100755
index 00000000000..46c23a4263d
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_auth.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_cgi.so b/chromium/third_party/lighttpd/mac/lib/mod_cgi.so
new file mode 100755
index 00000000000..cd20b6d9d79
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_cgi.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_cml.so b/chromium/third_party/lighttpd/mac/lib/mod_cml.so
new file mode 100755
index 00000000000..b0e6bbec1e1
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_cml.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_compress.so b/chromium/third_party/lighttpd/mac/lib/mod_compress.so
new file mode 100755
index 00000000000..b68aa5a0544
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_compress.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_dirlisting.so b/chromium/third_party/lighttpd/mac/lib/mod_dirlisting.so
new file mode 100755
index 00000000000..439a1068a47
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_dirlisting.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_evasive.so b/chromium/third_party/lighttpd/mac/lib/mod_evasive.so
new file mode 100755
index 00000000000..35fda5748a8
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_evasive.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_evhost.so b/chromium/third_party/lighttpd/mac/lib/mod_evhost.so
new file mode 100755
index 00000000000..c44f3342fa8
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_evhost.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_expire.so b/chromium/third_party/lighttpd/mac/lib/mod_expire.so
new file mode 100755
index 00000000000..e27d4c0d458
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_expire.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_extforward.so b/chromium/third_party/lighttpd/mac/lib/mod_extforward.so
new file mode 100755
index 00000000000..dca4598d60c
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_extforward.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_fastcgi.so b/chromium/third_party/lighttpd/mac/lib/mod_fastcgi.so
new file mode 100755
index 00000000000..617b3f5a727
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_fastcgi.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_flv_streaming.so b/chromium/third_party/lighttpd/mac/lib/mod_flv_streaming.so
new file mode 100755
index 00000000000..e9803cc7c57
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_flv_streaming.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_indexfile.so b/chromium/third_party/lighttpd/mac/lib/mod_indexfile.so
new file mode 100755
index 00000000000..5f0b7b83edb
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_indexfile.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_magnet.so b/chromium/third_party/lighttpd/mac/lib/mod_magnet.so
new file mode 100755
index 00000000000..194337fe2b3
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_magnet.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_mysql_vhost.so b/chromium/third_party/lighttpd/mac/lib/mod_mysql_vhost.so
new file mode 100755
index 00000000000..673d158f1ca
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_mysql_vhost.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_proxy.so b/chromium/third_party/lighttpd/mac/lib/mod_proxy.so
new file mode 100755
index 00000000000..6fa369fb567
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_proxy.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_redirect.so b/chromium/third_party/lighttpd/mac/lib/mod_redirect.so
new file mode 100755
index 00000000000..a2d4d7ad90a
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_redirect.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_rewrite.so b/chromium/third_party/lighttpd/mac/lib/mod_rewrite.so
new file mode 100755
index 00000000000..60b855459e0
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_rewrite.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_rrdtool.so b/chromium/third_party/lighttpd/mac/lib/mod_rrdtool.so
new file mode 100755
index 00000000000..c05cada52c1
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_rrdtool.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_scgi.so b/chromium/third_party/lighttpd/mac/lib/mod_scgi.so
new file mode 100755
index 00000000000..78fb25b8c4b
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_scgi.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_secdownload.so b/chromium/third_party/lighttpd/mac/lib/mod_secdownload.so
new file mode 100755
index 00000000000..c8fb1afc983
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_secdownload.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_setenv.so b/chromium/third_party/lighttpd/mac/lib/mod_setenv.so
new file mode 100755
index 00000000000..c7421b1d5a7
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_setenv.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_simple_vhost.so b/chromium/third_party/lighttpd/mac/lib/mod_simple_vhost.so
new file mode 100755
index 00000000000..82400689e51
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_simple_vhost.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_ssi.so b/chromium/third_party/lighttpd/mac/lib/mod_ssi.so
new file mode 100755
index 00000000000..be52e10f664
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_ssi.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_staticfile.so b/chromium/third_party/lighttpd/mac/lib/mod_staticfile.so
new file mode 100755
index 00000000000..8f9d612c85d
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_staticfile.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_status.so b/chromium/third_party/lighttpd/mac/lib/mod_status.so
new file mode 100755
index 00000000000..4697030e536
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_status.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_trigger_b4_dl.so b/chromium/third_party/lighttpd/mac/lib/mod_trigger_b4_dl.so
new file mode 100755
index 00000000000..cc2f3957024
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_trigger_b4_dl.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_userdir.so b/chromium/third_party/lighttpd/mac/lib/mod_userdir.so
new file mode 100755
index 00000000000..4a6b3b72ad5
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_userdir.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_usertrack.so b/chromium/third_party/lighttpd/mac/lib/mod_usertrack.so
new file mode 100755
index 00000000000..df27e63f186
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_usertrack.so
Binary files differ
diff --git a/chromium/third_party/lighttpd/mac/lib/mod_webdav.so b/chromium/third_party/lighttpd/mac/lib/mod_webdav.so
new file mode 100755
index 00000000000..57a373ef0ba
--- /dev/null
+++ b/chromium/third_party/lighttpd/mac/lib/mod_webdav.so
Binary files differ
diff --git a/chromium/third_party/protobuf/README.chromium b/chromium/third_party/protobuf/README.chromium
index 50c39c02c72..c8e411f030f 100644
--- a/chromium/third_party/protobuf/README.chromium
+++ b/chromium/third_party/protobuf/README.chromium
@@ -4,7 +4,7 @@ URL: http://protobuf.googlecode.com/svn/trunk
License: BSD
License File: COPYING.txt
Version: unknown
-Revision: r476
+Revision: r428
Security Critical: yes
Local files (not taken from upstream):
@@ -26,7 +26,7 @@ This code has been patched to make the target protobuf_lite a component so that
targets that depend on it can be componentized. See http://crbug.com/172800 for
details, and r179806 for the patch.
-Revision 504 was cherry-picked from upstream.
+Revisions r430, r475, r476 and 504 were cherry-picked from upstream.
Notes about Java:
We have not forked the Java version of protobuf-lite, so the Java version does
diff --git a/chromium/third_party/protobuf/README.txt b/chromium/third_party/protobuf/README.txt
index 17551a5a0cb..a8f66044829 100644
--- a/chromium/third_party/protobuf/README.txt
+++ b/chromium/third_party/protobuf/README.txt
@@ -115,7 +115,7 @@ For advanced usage information on configure and make, see INSTALL.txt.
C++ Installation - Windows
==========================
-If you are using Microsoft Visual C++, see vsprojects/readme.txt.
+If you are using Micosoft Visual C++, see vsprojects/readme.txt.
If you are using Cygwin or MinGW, follow the Unix installation
instructions, above.
diff --git a/chromium/third_party/protobuf/java/pom.xml b/chromium/third_party/protobuf/java/pom.xml
index 9f464c140a3..7ec6d918a4b 100644
--- a/chromium/third_party/protobuf/java/pom.xml
+++ b/chromium/third_party/protobuf/java/pom.xml
@@ -10,8 +10,8 @@
</parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
- <version>2.5.0-pre</version>
- <packaging>bundle</packaging>
+ <version>2.4.2-pre</version>
+ <packaging>jar</packaging>
<name>Protocol Buffer Java API</name>
<description>
Protocol Buffers are a way of encoding structured data in an efficient yet
@@ -132,16 +132,6 @@
</execution>
</executions>
</plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Export-Package>*</Export-Package>
- </instructions>
- </configuration>
- </plugin>
</plugins>
</build>
<profiles>
diff --git a/chromium/third_party/protobuf/java/src/main/java/com/google/protobuf/ByteString.java b/chromium/third_party/protobuf/java/src/main/java/com/google/protobuf/ByteString.java
index 73d831f6eec..1b18169e9e1 100644
--- a/chromium/third_party/protobuf/java/src/main/java/com/google/protobuf/ByteString.java
+++ b/chromium/third_party/protobuf/java/src/main/java/com/google/protobuf/ByteString.java
@@ -37,6 +37,7 @@ import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.nio.ByteBuffer;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
@@ -775,15 +776,6 @@ public abstract class ByteString implements Iterable<Byte> {
flushLastBuffer();
return ByteString.copyFrom(flushedBuffers);
}
-
- /**
- * Implement java.util.Arrays.copyOf() for jdk 1.5.
- */
- private byte[] copyArray(byte[] buffer, int length) {
- byte[] result = new byte[length];
- System.arraycopy(buffer, 0, result, 0, Math.min(buffer.length, length));
- return result;
- }
/**
* Writes the complete contents of this byte array output stream to
@@ -808,7 +800,7 @@ public abstract class ByteString implements Iterable<Byte> {
byteString.writeTo(out);
}
- out.write(copyArray(cachedBuffer, cachedBufferPos));
+ out.write(Arrays.copyOf(cachedBuffer, cachedBufferPos));
}
/**
@@ -861,7 +853,7 @@ public abstract class ByteString implements Iterable<Byte> {
private void flushLastBuffer() {
if (bufferPos < buffer.length) {
if (bufferPos > 0) {
- byte[] bufferCopy = copyArray(buffer, bufferPos);
+ byte[] bufferCopy = Arrays.copyOf(buffer, bufferPos);
flushedBuffers.add(new LiteralByteString(bufferCopy));
}
// We reuse this buffer for further writes.
diff --git a/chromium/third_party/protobuf/java/src/main/java/com/google/protobuf/LazyField.java b/chromium/third_party/protobuf/java/src/main/java/com/google/protobuf/LazyField.java
index c4f9201cdc2..df9425eb360 100644
--- a/chromium/third_party/protobuf/java/src/main/java/com/google/protobuf/LazyField.java
+++ b/chromium/third_party/protobuf/java/src/main/java/com/google/protobuf/LazyField.java
@@ -157,10 +157,12 @@ class LazyField {
this.entry = entry;
}
+ @Override
public K getKey() {
return entry.getKey();
}
+ @Override
public Object getValue() {
LazyField field = entry.getValue();
if (field == null) {
@@ -173,6 +175,7 @@ class LazyField {
return entry.getValue();
}
+ @Override
public Object setValue(Object value) {
if (!(value instanceof MessageLite)) {
throw new IllegalArgumentException(
@@ -190,11 +193,13 @@ class LazyField {
this.iterator = iterator;
}
+ @Override
public boolean hasNext() {
return iterator.hasNext();
}
@SuppressWarnings("unchecked")
+ @Override
public Entry<K, Object> next() {
Entry<K, ?> entry = iterator.next();
if (entry.getValue() instanceof LazyField) {
@@ -203,6 +208,7 @@ class LazyField {
return (Entry<K, Object>) entry;
}
+ @Override
public void remove() {
iterator.remove();
}
diff --git a/chromium/third_party/protobuf/java/src/main/java/com/google/protobuf/LazyStringArrayList.java b/chromium/third_party/protobuf/java/src/main/java/com/google/protobuf/LazyStringArrayList.java
index a5f0bd901fd..75c6a4b73d3 100644
--- a/chromium/third_party/protobuf/java/src/main/java/com/google/protobuf/LazyStringArrayList.java
+++ b/chromium/third_party/protobuf/java/src/main/java/com/google/protobuf/LazyStringArrayList.java
@@ -172,6 +172,7 @@ public class LazyStringArrayList extends AbstractList<String>
}
}
+ @Override
public List<?> getUnderlyingElements() {
return Collections.unmodifiableList(list);
}
diff --git a/chromium/third_party/protobuf/java/src/main/java/com/google/protobuf/RopeByteString.java b/chromium/third_party/protobuf/java/src/main/java/com/google/protobuf/RopeByteString.java
index 46997823469..8d44d117723 100644
--- a/chromium/third_party/protobuf/java/src/main/java/com/google/protobuf/RopeByteString.java
+++ b/chromium/third_party/protobuf/java/src/main/java/com/google/protobuf/RopeByteString.java
@@ -36,12 +36,13 @@ import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.io.ByteArrayInputStream;
import java.nio.ByteBuffer;
+import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Deque;
import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
-import java.util.Stack;
/**
* Class to represent {@code ByteStrings} formed by concatenation of other
@@ -589,7 +590,8 @@ class RopeByteString extends ByteString {
// Stack containing the part of the string, starting from the left, that
// we've already traversed. The final string should be the equivalent of
// concatenating the strings on the stack from bottom to top.
- private final Stack<ByteString> prefixesStack = new Stack<ByteString>();
+ private final Deque<ByteString> prefixesStack =
+ new ArrayDeque<ByteString>(minLengthByDepth.length);
private ByteString balance(ByteString left, ByteString right) {
doBalance(left);
@@ -701,8 +703,8 @@ class RopeByteString extends ByteString {
*/
private static class PieceIterator implements Iterator<LiteralByteString> {
- private final Stack<RopeByteString> breadCrumbs =
- new Stack<RopeByteString>();
+ private final Deque<RopeByteString> breadCrumbs =
+ new ArrayDeque<RopeByteString>(minLengthByDepth.length);
private LiteralByteString next;
private PieceIterator(ByteString root) {
diff --git a/chromium/third_party/protobuf/java/src/main/java/com/google/protobuf/UnmodifiableLazyStringList.java b/chromium/third_party/protobuf/java/src/main/java/com/google/protobuf/UnmodifiableLazyStringList.java
index 591bca54091..f80f09680bb 100644
--- a/chromium/third_party/protobuf/java/src/main/java/com/google/protobuf/UnmodifiableLazyStringList.java
+++ b/chromium/third_party/protobuf/java/src/main/java/com/google/protobuf/UnmodifiableLazyStringList.java
@@ -145,6 +145,7 @@ public class UnmodifiableLazyStringList extends AbstractList<String>
};
}
+ @Override
public List<?> getUnderlyingElements() {
// The returned value is already unmodifiable.
return list.getUnderlyingElements();
diff --git a/chromium/third_party/protobuf/protobuf_lite.gypi b/chromium/third_party/protobuf/protobuf_lite.gypi
index bbdc072715d..e66d29f758b 100644
--- a/chromium/third_party/protobuf/protobuf_lite.gypi
+++ b/chromium/third_party/protobuf/protobuf_lite.gypi
@@ -32,6 +32,7 @@
'src/google/protobuf/stubs/once.cc',
'src/google/protobuf/stubs/hash.h',
'src/google/protobuf/stubs/map-util.h',
+ 'src/google/protobuf/stubs/stl_util-inl.h',
'src/google/protobuf/extension_set.cc',
'src/google/protobuf/generated_message_util.cc',
'src/google/protobuf/message_lite.cc',
diff --git a/chromium/third_party/protobuf/python/google/protobuf/pyext/python-proto2.cc b/chromium/third_party/protobuf/python/google/protobuf/pyext/python-proto2.cc
index eebb752b780..627534135d8 100644
--- a/chromium/third_party/protobuf/python/google/protobuf/pyext/python-proto2.cc
+++ b/chromium/third_party/protobuf/python/google/protobuf/pyext/python-proto2.cc
@@ -427,6 +427,9 @@ static bool CheckAndSetString(
GOOGLE_DCHECK(descriptor->type() == google::protobuf::FieldDescriptor::TYPE_STRING ||
descriptor->type() == google::protobuf::FieldDescriptor::TYPE_BYTES);
if (descriptor->type() == google::protobuf::FieldDescriptor::TYPE_STRING) {
+#else
+ if (descriptor->file()->options().cc_api_version() == 2 &&
+ descriptor->type() == google::protobuf::FieldDescriptor::TYPE_STRING) {
if (!PyString_Check(arg) && !PyUnicode_Check(arg)) {
FormatTypeError(arg, "str, unicode");
return false;
@@ -454,6 +457,9 @@ static bool CheckAndSetString(
PyObject* encoded_string = NULL;
if (descriptor->type() == google::protobuf::FieldDescriptor::TYPE_STRING) {
+#else
+ if (descriptor->file()->options().cc_api_version() == 2 &&
+ descriptor->type() == google::protobuf::FieldDescriptor::TYPE_STRING) {
if (PyString_Check(arg)) {
encoded_string = PyString_AsEncodedObject(arg, "utf-8", NULL);
} else {
diff --git a/chromium/third_party/protobuf/python/setup.py b/chromium/third_party/protobuf/python/setup.py
index 8a986298664..fbe2766030c 100755
--- a/chromium/third_party/protobuf/python/setup.py
+++ b/chromium/third_party/protobuf/python/setup.py
@@ -26,9 +26,7 @@ from distutils.spawn import find_executable
maintainer_email = "protobuf@googlegroups.com"
# Find the Protocol Compiler.
-if 'PROTOC' in os.environ and os.path.exists(os.environ['PROTOC']):
- protoc = os.environ['PROTOC']
-elif os.path.exists("../src/protoc"):
+if os.path.exists("../src/protoc"):
protoc = "../src/protoc"
elif os.path.exists("../src/protoc.exe"):
protoc = "../src/protoc.exe"
@@ -156,7 +154,7 @@ if __name__ == '__main__':
libraries = [ "protobuf" ]))
setup(name = 'protobuf',
- version = '2.5.0-pre',
+ version = '2.4.2-pre',
packages = [ 'google' ],
namespace_packages = [ 'google' ],
test_suite = 'setup.MakeTestSuite',
@@ -167,7 +165,6 @@ if __name__ == '__main__':
'google.protobuf.internal.cpp_message',
'google.protobuf.internal.decoder',
'google.protobuf.internal.encoder',
- 'google.protobuf.internal.enum_type_wrapper',
'google.protobuf.internal.message_listener',
'google.protobuf.internal.python_message',
'google.protobuf.internal.type_checkers',
diff --git a/chromium/third_party/protobuf/src/Makefile.am b/chromium/third_party/protobuf/src/Makefile.am
index df733d9b874..172d0cdddfc 100644
--- a/chromium/third_party/protobuf/src/Makefile.am
+++ b/chromium/third_party/protobuf/src/Makefile.am
@@ -37,63 +37,57 @@ CLEANFILES = $(protoc_outputs) unittest_proto_middleman \
MAINTAINERCLEANFILES = \
Makefile.in
-nobase_include_HEADERS = \
- google/protobuf/stubs/atomicops.h \
- google/protobuf/stubs/atomicops_internals_arm_gcc.h \
- google/protobuf/stubs/atomicops_internals_arm_qnx.h \
- google/protobuf/stubs/atomicops_internals_atomicword_compat.h \
- google/protobuf/stubs/atomicops_internals_macosx.h \
- google/protobuf/stubs/atomicops_internals_mips_gcc.h \
- google/protobuf/stubs/atomicops_internals_pnacl.h \
- google/protobuf/stubs/atomicops_internals_x86_gcc.h \
- google/protobuf/stubs/atomicops_internals_x86_msvc.h \
- google/protobuf/stubs/common.h \
- google/protobuf/stubs/platform_macros.h \
- google/protobuf/stubs/once.h \
- google/protobuf/stubs/template_util.h \
- google/protobuf/stubs/type_traits.h \
- google/protobuf/descriptor.h \
- google/protobuf/descriptor.pb.h \
- google/protobuf/descriptor_database.h \
- google/protobuf/dynamic_message.h \
- google/protobuf/extension_set.h \
- google/protobuf/generated_enum_reflection.h \
- google/protobuf/generated_message_util.h \
- google/protobuf/generated_message_reflection.h \
- google/protobuf/message.h \
- google/protobuf/message_lite.h \
- google/protobuf/reflection_ops.h \
- google/protobuf/repeated_field.h \
- google/protobuf/service.h \
- google/protobuf/text_format.h \
- google/protobuf/unknown_field_set.h \
- google/protobuf/wire_format.h \
- google/protobuf/wire_format_lite.h \
- google/protobuf/wire_format_lite_inl.h \
- google/protobuf/io/coded_stream.h \
- $(GZHEADERS) \
- google/protobuf/io/printer.h \
- google/protobuf/io/tokenizer.h \
- google/protobuf/io/zero_copy_stream.h \
- google/protobuf/io/zero_copy_stream_impl.h \
- google/protobuf/io/zero_copy_stream_impl_lite.h \
- google/protobuf/compiler/code_generator.h \
- google/protobuf/compiler/command_line_interface.h \
- google/protobuf/compiler/importer.h \
- google/protobuf/compiler/parser.h \
- google/protobuf/compiler/plugin.h \
- google/protobuf/compiler/plugin.pb.h \
- google/protobuf/compiler/cpp/cpp_generator.h \
- google/protobuf/compiler/java/java_generator.h \
+nobase_include_HEADERS = \
+ google/protobuf/stubs/atomicops.h \
+ google/protobuf/stubs/atomicops_internals_arm_gcc.h \
+ google/protobuf/stubs/atomicops_internals_macosx.h \
+ google/protobuf/stubs/atomicops_internals_mips_gcc.h \
+ google/protobuf/stubs/atomicops_internals_x86_gcc.h \
+ google/protobuf/stubs/atomicops_internals_x86_msvc.h \
+ google/protobuf/stubs/common.h \
+ google/protobuf/stubs/platform_macros.h \
+ google/protobuf/stubs/once.h \
+ google/protobuf/descriptor.h \
+ google/protobuf/descriptor.pb.h \
+ google/protobuf/descriptor_database.h \
+ google/protobuf/dynamic_message.h \
+ google/protobuf/extension_set.h \
+ google/protobuf/generated_enum_reflection.h \
+ google/protobuf/generated_message_util.h \
+ google/protobuf/generated_message_reflection.h \
+ google/protobuf/message.h \
+ google/protobuf/message_lite.h \
+ google/protobuf/reflection_ops.h \
+ google/protobuf/repeated_field.h \
+ google/protobuf/service.h \
+ google/protobuf/text_format.h \
+ google/protobuf/unknown_field_set.h \
+ google/protobuf/wire_format.h \
+ google/protobuf/wire_format_lite.h \
+ google/protobuf/wire_format_lite_inl.h \
+ google/protobuf/io/coded_stream.h \
+ $(GZHEADERS) \
+ google/protobuf/io/printer.h \
+ google/protobuf/io/tokenizer.h \
+ google/protobuf/io/zero_copy_stream.h \
+ google/protobuf/io/zero_copy_stream_impl.h \
+ google/protobuf/io/zero_copy_stream_impl_lite.h \
+ google/protobuf/compiler/code_generator.h \
+ google/protobuf/compiler/command_line_interface.h \
+ google/protobuf/compiler/importer.h \
+ google/protobuf/compiler/parser.h \
+ google/protobuf/compiler/plugin.h \
+ google/protobuf/compiler/plugin.pb.h \
+ google/protobuf/compiler/cpp/cpp_generator.h \
+ google/protobuf/compiler/java/java_generator.h \
google/protobuf/compiler/python/python_generator.h
lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la
libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS)
-libprotobuf_lite_la_LDFLAGS = -version-info 8:0:0 -export-dynamic -no-undefined
+libprotobuf_lite_la_LDFLAGS = -version-info 7:0:0 -export-dynamic -no-undefined
libprotobuf_lite_la_SOURCES = \
google/protobuf/stubs/atomicops_internals_x86_gcc.cc \
- google/protobuf/stubs/atomicops_internals_x86_msvc.cc \
google/protobuf/stubs/common.cc \
google/protobuf/stubs/once.cc \
google/protobuf/stubs/hash.h \
@@ -101,6 +95,8 @@ libprotobuf_lite_la_SOURCES = \
google/protobuf/stubs/stl_util.h \
google/protobuf/stubs/stringprintf.cc \
google/protobuf/stubs/stringprintf.h \
+ google/protobuf/stubs/template_util.h \
+ google/protobuf/stubs/type_traits.h \
google/protobuf/extension_set.cc \
google/protobuf/generated_message_util.cc \
google/protobuf/message_lite.cc \
@@ -112,7 +108,7 @@ libprotobuf_lite_la_SOURCES = \
google/protobuf/io/zero_copy_stream_impl_lite.cc
libprotobuf_la_LIBADD = $(PTHREAD_LIBS)
-libprotobuf_la_LDFLAGS = -version-info 8:0:0 -export-dynamic -no-undefined
+libprotobuf_la_LDFLAGS = -version-info 7:0:0 -export-dynamic -no-undefined
libprotobuf_la_SOURCES = \
$(libprotobuf_lite_la_SOURCES) \
google/protobuf/stubs/strutil.cc \
@@ -140,7 +136,7 @@ libprotobuf_la_SOURCES = \
google/protobuf/compiler/parser.cc
libprotoc_la_LIBADD = $(PTHREAD_LIBS) libprotobuf.la
-libprotoc_la_LDFLAGS = -version-info 8:0:0 -export-dynamic -no-undefined
+libprotoc_la_LDFLAGS = -version-info 7:0:0 -export-dynamic -no-undefined
libprotoc_la_SOURCES = \
google/protobuf/compiler/code_generator.cc \
google/protobuf/compiler/command_line_interface.cc \
diff --git a/chromium/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_unittest.cc b/chromium/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_unittest.cc
index 1eae29b531f..b5f9ab58fdd 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_unittest.cc
+++ b/chromium/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_unittest.cc
@@ -381,6 +381,7 @@ TEST(GeneratedMessageTest, StringCharStarLength) {
EXPECT_EQ("wx", message.repeated_string(0));
}
+
TEST(GeneratedMessageTest, CopyFrom) {
unittest::TestAllTypes message1, message2;
@@ -393,6 +394,7 @@ TEST(GeneratedMessageTest, CopyFrom) {
TestUtil::ExpectAllFieldsSet(message2);
}
+
TEST(GeneratedMessageTest, SwapWithEmpty) {
unittest::TestAllTypes message1, message2;
TestUtil::SetAllFields(&message1);
@@ -491,8 +493,6 @@ TEST(GeneratedMessageTest, CopyAssignmentOperator) {
TestUtil::ExpectAllFieldsSet(message2);
}
-#if !defined(PROTOBUF_TEST_NO_DESCRIPTORS) || \
- !defined(GOOGLE_PROTOBUF_NO_RTTI)
TEST(GeneratedMessageTest, UpcastCopyFrom) {
// Test the CopyFrom method that takes in the generic const Message&
// parameter.
@@ -505,7 +505,6 @@ TEST(GeneratedMessageTest, UpcastCopyFrom) {
TestUtil::ExpectAllFieldsSet(message2);
}
-#endif
#ifndef PROTOBUF_TEST_NO_DESCRIPTORS
@@ -557,9 +556,7 @@ TEST(GeneratedMessageTest, NonEmptyMergeFrom) {
TestUtil::ExpectAllFieldsSet(message1);
}
-#if !defined(PROTOBUF_TEST_NO_DESCRIPTORS) || \
- !defined(GOOGLE_PROTOBUF_NO_RTTI)
-#ifdef PROTOBUF_HAS_DEATH_TEST
+#ifdef GTEST_HAS_DEATH_TEST
TEST(GeneratedMessageTest, MergeFromSelf) {
unittest::TestAllTypes message;
@@ -568,8 +565,7 @@ TEST(GeneratedMessageTest, MergeFromSelf) {
"&from");
}
-#endif // PROTOBUF_HAS_DEATH_TEST
-#endif // !PROTOBUF_TEST_NO_DESCRIPTORS || !GOOGLE_PROTOBUF_NO_RTTI
+#endif // GTEST_HAS_DEATH_TEST
// Test the generated SerializeWithCachedSizesToArray(),
TEST(GeneratedMessageTest, SerializationToArray) {
@@ -1203,7 +1199,7 @@ TEST_F(GeneratedServiceTest, CallMethod) {
TEST_F(GeneratedServiceTest, CallMethodTypeFailure) {
// Verify death if we call Foo() with Bar's message types.
-#ifdef PROTOBUF_HAS_DEATH_TEST // death tests do not work on Windows yet
+#ifdef GTEST_HAS_DEATH_TEST // death tests do not work on Windows yet
EXPECT_DEBUG_DEATH(
mock_service_.CallMethod(foo_, &mock_controller_,
&foo_request_, &bar_response_, done_.get()),
@@ -1214,7 +1210,7 @@ TEST_F(GeneratedServiceTest, CallMethodTypeFailure) {
mock_service_.CallMethod(foo_, &mock_controller_,
&bar_request_, &foo_response_, done_.get()),
"dynamic_cast");
-#endif // PROTOBUF_HAS_DEATH_TEST
+#endif // GTEST_HAS_DEATH_TEST
}
TEST_F(GeneratedServiceTest, GetPrototypes) {
diff --git a/chromium/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc b/chromium/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc
index 88559b8fcaf..7b0b1f92478 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc
+++ b/chromium/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc
@@ -139,9 +139,7 @@ void protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto() {
"atorResponse\022\r\n\005error\030\001 \001(\t\022B\n\004file\030\017 \003("
"\01324.google.protobuf.compiler.CodeGenerat"
"orResponse.File\032>\n\004File\022\014\n\004name\030\001 \001(\t\022\027\n"
- "\017insertion_point\030\002 \001(\t\022\017\n\007content\030\017 \001(\tB"
- ",\n\034com.google.protobuf.compilerB\014PluginP"
- "rotos", 445);
+ "\017insertion_point\030\002 \001(\t\022\017\n\007content\030\017 \001(\t", 399);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"google/protobuf/compiler/plugin.proto", &protobuf_RegisterTypes);
CodeGeneratorRequest::default_instance_ = new CodeGeneratorRequest();
diff --git a/chromium/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.h b/chromium/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.h
index 68cc21c7f8f..46478c739c1 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.h
+++ b/chromium/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.h
@@ -8,12 +8,12 @@
#include <google/protobuf/stubs/common.h>
-#if GOOGLE_PROTOBUF_VERSION < 2005000
+#if GOOGLE_PROTOBUF_VERSION < 2004000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#if 2004002 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
diff --git a/chromium/third_party/protobuf/src/google/protobuf/compiler/plugin.proto b/chromium/third_party/protobuf/src/google/protobuf/compiler/plugin.proto
index 77b888f37ed..651ed10c222 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/compiler/plugin.proto
+++ b/chromium/third_party/protobuf/src/google/protobuf/compiler/plugin.proto
@@ -45,8 +45,6 @@
// flag "--${NAME}_out" is passed to protoc.
package google.protobuf.compiler;
-option java_package = "com.google.protobuf.compiler";
-option java_outer_classname = "PluginProtos";
import "google/protobuf/descriptor.proto";
diff --git a/chromium/third_party/protobuf/src/google/protobuf/compiler/subprocess.cc b/chromium/third_party/protobuf/src/google/protobuf/compiler/subprocess.cc
index 67da120d622..860fc8755c4 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/compiler/subprocess.cc
+++ b/chromium/third_party/protobuf/src/google/protobuf/compiler/subprocess.cc
@@ -295,8 +295,8 @@ void Subprocess::Start(const string& program, SearchMode search_mode) {
int stdin_pipe[2];
int stdout_pipe[2];
- GOOGLE_CHECK(pipe(stdin_pipe) != -1);
- GOOGLE_CHECK(pipe(stdout_pipe) != -1);
+ pipe(stdin_pipe);
+ pipe(stdout_pipe);
char* argv[2] = { strdup(program.c_str()), NULL };
@@ -324,11 +324,9 @@ void Subprocess::Start(const string& program, SearchMode search_mode) {
// Write directly to STDERR_FILENO to avoid stdio code paths that may do
// stuff that is unsafe here.
- int ignored;
- ignored = write(STDERR_FILENO, argv[0], strlen(argv[0]));
+ write(STDERR_FILENO, argv[0], strlen(argv[0]));
const char* message = ": program not found or is not executable\n";
- ignored = write(STDERR_FILENO, message, strlen(message));
- (void) ignored;
+ write(STDERR_FILENO, message, strlen(message));
// Must use _exit() rather than exit() to avoid flushing output buffers
// that will also be flushed by the parent.
diff --git a/chromium/third_party/protobuf/src/google/protobuf/descriptor.cc b/chromium/third_party/protobuf/src/google/protobuf/descriptor.cc
index bcbf1e079f6..45293fef7d3 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/descriptor.cc
+++ b/chromium/third_party/protobuf/src/google/protobuf/descriptor.cc
@@ -2987,11 +2987,7 @@ template<class DescriptorT> void DescriptorBuilder::AllocateOptionsImpl(
// tables_->AllocateMessage<typename DescriptorT::OptionsType>();
typename DescriptorT::OptionsType* const dummy = NULL;
typename DescriptorT::OptionsType* options = tables_->AllocateMessage(dummy);
- // Avoid using MergeFrom()/CopyFrom() in this class to make it -fno-rtti
- // friendly. Without RTTI, MergeFrom() and CopyFrom() will fallback to the
- // reflection based method, which requires the Descriptor. However, we are in
- // the middle of building the descriptors, thus the deadlock.
- options->ParseFromString(orig_options.SerializeAsString());
+ options->CopyFrom(orig_options);
descriptor->options_ = options;
// Don't add to options_to_interpret_ unless there were uninterpreted
@@ -4132,26 +4128,16 @@ void DescriptorBuilder::ValidateFieldOptions(FieldDescriptor* field,
void DescriptorBuilder::ValidateEnumOptions(EnumDescriptor* enm,
const EnumDescriptorProto& proto) {
VALIDATE_OPTIONS_FROM_ARRAY(enm, value, EnumValue);
- if (!enm->options().has_allow_alias() || !enm->options().allow_alias()) {
+ if (!enm->options().allow_alias()) {
map<int, string> used_values;
for (int i = 0; i < enm->value_count(); ++i) {
const EnumValueDescriptor* enum_value = enm->value(i);
if (used_values.find(enum_value->number()) != used_values.end()) {
- string error =
- "\"" + enum_value->full_name() +
- "\" uses the same enum value as \"" +
- used_values[enum_value->number()] + "\". If this is intended, set "
- "'option allow_alias = true;' to the enum definition.";
- if (!enm->options().allow_alias()) {
- // Generate error if duplicated enum values are explicitly disallowed.
- AddError(enm->full_name(), proto,
- DescriptorPool::ErrorCollector::NUMBER,
- error);
- } else {
- // Generate warning if duplicated values are found but the option
- // isn't set.
- GOOGLE_LOG(ERROR) << error;
- }
+ AddError(enm->full_name(), proto,
+ DescriptorPool::ErrorCollector::NUMBER,
+ "\"" + enum_value->full_name() +
+ "\" uses the same enum value as \"" +
+ used_values[enum_value->number()] + "\"");
} else {
used_values[enum_value->number()] = enum_value->full_name();
}
diff --git a/chromium/third_party/protobuf/src/google/protobuf/descriptor.h b/chromium/third_party/protobuf/src/google/protobuf/descriptor.h
index 33e3af7241b..410d3ed4df4 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/descriptor.h
+++ b/chromium/third_party/protobuf/src/google/protobuf/descriptor.h
@@ -58,10 +58,6 @@
#include <vector>
#include <google/protobuf/stubs/common.h>
-// TYPE_BOOL is defined in the MacOS's ConditionalMacros.h.
-#ifdef TYPE_BOOL
-#undef TYPE_BOOL
-#endif // TYPE_BOOL
namespace google {
namespace protobuf {
@@ -1338,7 +1334,7 @@ PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, extension_range,
const Descriptor::ExtensionRange*)
PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, extension,
const FieldDescriptor*)
-PROTOBUF_DEFINE_OPTIONS_ACCESSOR(Descriptor, MessageOptions)
+PROTOBUF_DEFINE_OPTIONS_ACCESSOR(Descriptor, MessageOptions);
PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, name)
PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, full_name)
@@ -1355,7 +1351,7 @@ PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, message_type, const Descriptor*)
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, enum_type, const EnumDescriptor*)
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, experimental_map_key,
const FieldDescriptor*)
-PROTOBUF_DEFINE_OPTIONS_ACCESSOR(FieldDescriptor, FieldOptions)
+PROTOBUF_DEFINE_OPTIONS_ACCESSOR(FieldDescriptor, FieldOptions);
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, has_default_value, bool)
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_int32 , int32 )
PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_int64 , int64 )
@@ -1375,13 +1371,13 @@ PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, containing_type, const Descriptor*)
PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, value_count, int)
PROTOBUF_DEFINE_ARRAY_ACCESSOR(EnumDescriptor, value,
const EnumValueDescriptor*)
-PROTOBUF_DEFINE_OPTIONS_ACCESSOR(EnumDescriptor, EnumOptions)
+PROTOBUF_DEFINE_OPTIONS_ACCESSOR(EnumDescriptor, EnumOptions);
PROTOBUF_DEFINE_STRING_ACCESSOR(EnumValueDescriptor, name)
PROTOBUF_DEFINE_STRING_ACCESSOR(EnumValueDescriptor, full_name)
PROTOBUF_DEFINE_ACCESSOR(EnumValueDescriptor, number, int)
PROTOBUF_DEFINE_ACCESSOR(EnumValueDescriptor, type, const EnumDescriptor*)
-PROTOBUF_DEFINE_OPTIONS_ACCESSOR(EnumValueDescriptor, EnumValueOptions)
+PROTOBUF_DEFINE_OPTIONS_ACCESSOR(EnumValueDescriptor, EnumValueOptions);
PROTOBUF_DEFINE_STRING_ACCESSOR(ServiceDescriptor, name)
PROTOBUF_DEFINE_STRING_ACCESSOR(ServiceDescriptor, full_name)
@@ -1389,14 +1385,14 @@ PROTOBUF_DEFINE_ACCESSOR(ServiceDescriptor, file, const FileDescriptor*)
PROTOBUF_DEFINE_ACCESSOR(ServiceDescriptor, method_count, int)
PROTOBUF_DEFINE_ARRAY_ACCESSOR(ServiceDescriptor, method,
const MethodDescriptor*)
-PROTOBUF_DEFINE_OPTIONS_ACCESSOR(ServiceDescriptor, ServiceOptions)
+PROTOBUF_DEFINE_OPTIONS_ACCESSOR(ServiceDescriptor, ServiceOptions);
PROTOBUF_DEFINE_STRING_ACCESSOR(MethodDescriptor, name)
PROTOBUF_DEFINE_STRING_ACCESSOR(MethodDescriptor, full_name)
PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, service, const ServiceDescriptor*)
PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, input_type, const Descriptor*)
PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, output_type, const Descriptor*)
-PROTOBUF_DEFINE_OPTIONS_ACCESSOR(MethodDescriptor, MethodOptions)
+PROTOBUF_DEFINE_OPTIONS_ACCESSOR(MethodDescriptor, MethodOptions);
PROTOBUF_DEFINE_STRING_ACCESSOR(FileDescriptor, name)
PROTOBUF_DEFINE_STRING_ACCESSOR(FileDescriptor, package)
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, pool, const DescriptorPool*)
@@ -1407,7 +1403,7 @@ PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, message_type_count, int)
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, enum_type_count, int)
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, service_count, int)
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, extension_count, int)
-PROTOBUF_DEFINE_OPTIONS_ACCESSOR(FileDescriptor, FileOptions)
+PROTOBUF_DEFINE_OPTIONS_ACCESSOR(FileDescriptor, FileOptions);
PROTOBUF_DEFINE_ARRAY_ACCESSOR(FileDescriptor, message_type, const Descriptor*)
PROTOBUF_DEFINE_ARRAY_ACCESSOR(FileDescriptor, enum_type, const EnumDescriptor*)
diff --git a/chromium/third_party/protobuf/src/google/protobuf/descriptor.pb.h b/chromium/third_party/protobuf/src/google/protobuf/descriptor.pb.h
index f6b83cea5ae..5c1175cb7d7 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/descriptor.pb.h
+++ b/chromium/third_party/protobuf/src/google/protobuf/descriptor.pb.h
@@ -8,12 +8,12 @@
#include <google/protobuf/stubs/common.h>
-#if GOOGLE_PROTOBUF_VERSION < 2005000
+#if GOOGLE_PROTOBUF_VERSION < 2004000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
-#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#if 2004002 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
diff --git a/chromium/third_party/protobuf/src/google/protobuf/descriptor_unittest.cc b/chromium/third_party/protobuf/src/google/protobuf/descriptor_unittest.cc
index 86e6a49d8c8..3503f13ecdb 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/descriptor_unittest.cc
+++ b/chromium/third_party/protobuf/src/google/protobuf/descriptor_unittest.cc
@@ -1739,7 +1739,7 @@ TEST_F(MiscTest, DefaultValues) {
message->field(3)->default_value_uint64());
EXPECT_EQ(4.5 , message->field(4)->default_value_float ());
EXPECT_EQ(10e100 , message->field(5)->default_value_double());
- EXPECT_TRUE( message->field(6)->default_value_bool ());
+ EXPECT_EQ(true , message->field(6)->default_value_bool ());
EXPECT_EQ("hello" , message->field(7)->default_value_string());
EXPECT_EQ("\001\002\003" , message->field(8)->default_value_string());
EXPECT_EQ(enum_value_b , message->field(9)->default_value_enum ());
@@ -1762,7 +1762,7 @@ TEST_F(MiscTest, DefaultValues) {
EXPECT_EQ(0 , message->field(14)->default_value_uint64());
EXPECT_EQ(0.0f , message->field(15)->default_value_float ());
EXPECT_EQ(0.0 , message->field(16)->default_value_double());
- EXPECT_FALSE( message->field(17)->default_value_bool ());
+ EXPECT_EQ(false, message->field(17)->default_value_bool ());
EXPECT_EQ("" , message->field(18)->default_value_string());
EXPECT_EQ("" , message->field(19)->default_value_string());
EXPECT_EQ(enum_value_a, message->field(20)->default_value_enum());
@@ -2167,7 +2167,7 @@ TEST(CustomOptions, OptionTypes) {
options =
&protobuf_unittest::CustomOptionMinIntegerValues::descriptor()->options();
- EXPECT_FALSE( options->GetExtension(protobuf_unittest::bool_opt));
+ EXPECT_EQ(false , options->GetExtension(protobuf_unittest::bool_opt));
EXPECT_EQ(kint32min, options->GetExtension(protobuf_unittest::int32_opt));
EXPECT_EQ(kint64min, options->GetExtension(protobuf_unittest::int64_opt));
EXPECT_EQ(0 , options->GetExtension(protobuf_unittest::uint32_opt));
@@ -2181,7 +2181,7 @@ TEST(CustomOptions, OptionTypes) {
options =
&protobuf_unittest::CustomOptionMaxIntegerValues::descriptor()->options();
- EXPECT_TRUE( options->GetExtension(protobuf_unittest::bool_opt));
+ EXPECT_EQ(true , options->GetExtension(protobuf_unittest::bool_opt));
EXPECT_EQ(kint32max , options->GetExtension(protobuf_unittest::int32_opt));
EXPECT_EQ(kint64max , options->GetExtension(protobuf_unittest::int64_opt));
EXPECT_EQ(kuint32max, options->GetExtension(protobuf_unittest::uint32_opt));
@@ -4001,9 +4001,7 @@ TEST_F(ValidationErrorTest, DisallowEnumAlias) {
" options { allow_alias: false }"
"}",
"foo.proto: Bar: NUMBER: "
- "\"ENUM_B\" uses the same enum value as \"ENUM_A\". "
- "If this is intended, set 'option allow_alias = true;' to the enum "
- "definition.\n");
+ "\"ENUM_B\" uses the same enum value as \"ENUM_A\"\n");
}
// ===================================================================
diff --git a/chromium/third_party/protobuf/src/google/protobuf/dynamic_message.cc b/chromium/third_party/protobuf/src/google/protobuf/dynamic_message.cc
index 09bec54363a..e4bebb2531c 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/dynamic_message.cc
+++ b/chromium/third_party/protobuf/src/google/protobuf/dynamic_message.cc
@@ -208,6 +208,14 @@ class DynamicMessage : public Message {
Metadata GetMetadata() const;
+ // We actually allocate more memory than sizeof(*this) when this
+ // class's memory is allocated via the global operator new. Thus, we need to
+ // manually call the global operator delete. Calling the destructor is taken
+ // care of for us.
+ static void operator delete(void* ptr) {
+ ::operator delete(ptr);
+ }
+
private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(DynamicMessage);
diff --git a/chromium/third_party/protobuf/src/google/protobuf/extension_set_unittest.cc b/chromium/third_party/protobuf/src/google/protobuf/extension_set_unittest.cc
index 559de6e138f..1e7c5a5e8d9 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/extension_set_unittest.cc
+++ b/chromium/third_party/protobuf/src/google/protobuf/extension_set_unittest.cc
@@ -550,7 +550,7 @@ TEST(ExtensionSetTest, SpaceUsedExcludingSelf) {
}
}
-#ifdef PROTOBUF_HAS_DEATH_TEST
+#ifdef GTEST_HAS_DEATH_TEST
TEST(ExtensionSetTest, InvalidEnumDeath) {
unittest::TestAllExtensions message;
@@ -560,7 +560,7 @@ TEST(ExtensionSetTest, InvalidEnumDeath) {
"IsValid");
}
-#endif // PROTOBUF_HAS_DEATH_TEST
+#endif // GTEST_HAS_DEATH_TEST
TEST(ExtensionSetTest, DynamicExtensions) {
// Test adding a dynamic extension to a compiled-in message object.
@@ -695,11 +695,7 @@ TEST(ExtensionSetTest, DynamicExtensions) {
const Message& sub_message =
message.GetReflection()->GetMessage(message, message_extension);
const unittest::ForeignMessage* typed_sub_message =
-#ifdef GOOGLE_PROTOBUF_NO_RTTI
- static_cast<const unittest::ForeignMessage*>(&sub_message);
-#else
dynamic_cast<const unittest::ForeignMessage*>(&sub_message);
-#endif
ASSERT_TRUE(typed_sub_message != NULL);
EXPECT_EQ(456, typed_sub_message->c());
}
diff --git a/chromium/third_party/protobuf/src/google/protobuf/generated_message_reflection.h b/chromium/third_party/protobuf/src/google/protobuf/generated_message_reflection.h
index c1c142fa8aa..e6670aea4cd 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/generated_message_reflection.h
+++ b/chromium/third_party/protobuf/src/google/protobuf/generated_message_reflection.h
@@ -50,9 +50,9 @@
namespace google {
namespace upb {
-namespace google_opensource {
-class GMR_Handlers;
-} // namespace google_opensource
+namespace proto2_bridge_opensource {
+class FieldAccessor;
+} // namespace protobuf_bridge_google3
} // namespace upb
namespace protobuf {
@@ -287,9 +287,9 @@ class LIBPROTOBUF_EXPORT GeneratedMessageReflection : public Reflection {
private:
friend class GeneratedMessage;
- // To parse directly into a proto2 generated class, the class GMR_Handlers
- // needs access to member offsets and hasbits.
- friend class LIBPROTOBUF_EXPORT upb::google_opensource::GMR_Handlers;
+ // To parse directly into a proto2 generated class, FieldAccessor needs
+ // access to member offsets and hasbits.
+ friend class LIBPROTOBUF_EXPORT upb::proto2_bridge_opensource::FieldAccessor;
const Descriptor* descriptor_;
const Message* default_instance_;
diff --git a/chromium/third_party/protobuf/src/google/protobuf/generated_message_reflection_unittest.cc b/chromium/third_party/protobuf/src/google/protobuf/generated_message_reflection_unittest.cc
index 39aa55fb4a5..f60e430d589 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/generated_message_reflection_unittest.cc
+++ b/chromium/third_party/protobuf/src/google/protobuf/generated_message_reflection_unittest.cc
@@ -427,7 +427,7 @@ TEST(GeneratedMessageReflectionTest, ReleaseExtensionMessageTest) {
TestUtil::ExpectAllExtensionsSet(message);
}
-#ifdef PROTOBUF_HAS_DEATH_TEST
+#ifdef GTEST_HAS_DEATH_TEST
TEST(GeneratedMessageReflectionTest, UsageErrors) {
unittest::TestAllTypes message;
@@ -476,7 +476,7 @@ TEST(GeneratedMessageReflectionTest, UsageErrors) {
#undef f
}
-#endif // PROTOBUF_HAS_DEATH_TEST
+#endif // GTEST_HAS_DEATH_TEST
} // namespace
diff --git a/chromium/third_party/protobuf/src/google/protobuf/io/gzip_stream.h b/chromium/third_party/protobuf/src/google/protobuf/io/gzip_stream.h
index 365e9ea5f58..7ee24bc3183 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/io/gzip_stream.h
+++ b/chromium/third_party/protobuf/src/google/protobuf/io/gzip_stream.h
@@ -118,7 +118,7 @@ class LIBPROTOBUF_EXPORT GzipOutputStream : public ZeroCopyOutputStream {
ZLIB = 2,
};
- struct LIBPROTOBUF_EXPORT Options {
+ struct Options {
// Defaults to GZIP.
Format format;
diff --git a/chromium/third_party/protobuf/src/google/protobuf/io/printer_unittest.cc b/chromium/third_party/protobuf/src/google/protobuf/io/printer_unittest.cc
index c9b3035960f..399395c81e1 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/io/printer_unittest.cc
+++ b/chromium/third_party/protobuf/src/google/protobuf/io/printer_unittest.cc
@@ -220,7 +220,7 @@ TEST(Printer, Indenting) {
}
// Death tests do not work on Windows as of yet.
-#ifdef PROTOBUF_HAS_DEATH_TEST
+#ifdef GTEST_HAS_DEATH_TEST
TEST(Printer, Death) {
char buffer[8192];
@@ -231,7 +231,7 @@ TEST(Printer, Death) {
EXPECT_DEBUG_DEATH(printer.Print("$unclosed"), "Unclosed variable name");
EXPECT_DEBUG_DEATH(printer.Outdent(), "without matching Indent");
}
-#endif // PROTOBUF__HAS_DEATH_TEST
+#endif // GTEST_HAS_DEATH_TEST
TEST(Printer, WriteFailurePartial) {
char buffer[17];
diff --git a/chromium/third_party/protobuf/src/google/protobuf/io/tokenizer_unittest.cc b/chromium/third_party/protobuf/src/google/protobuf/io/tokenizer_unittest.cc
index dbb5be4f601..8de43939be8 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/io/tokenizer_unittest.cc
+++ b/chromium/third_party/protobuf/src/google/protobuf/io/tokenizer_unittest.cc
@@ -741,7 +741,7 @@ TEST_F(TokenizerTest, ParseInteger) {
EXPECT_EQ(0, ParseInteger("0x"));
uint64 i;
-#ifdef PROTOBUF_HASDEATH_TEST // death tests do not work on Windows yet
+#ifdef GTEST_HAS_DEATH_TEST // death tests do not work on Windows yet
// Test invalid integers that will never be tokenized as integers.
EXPECT_DEBUG_DEATH(Tokenizer::ParseInteger("zxy", kuint64max, &i),
"passed text that could not have been tokenized as an integer");
@@ -753,7 +753,7 @@ TEST_F(TokenizerTest, ParseInteger) {
"passed text that could not have been tokenized as an integer");
EXPECT_DEBUG_DEATH(Tokenizer::ParseInteger("-1", kuint64max, &i),
"passed text that could not have been tokenized as an integer");
-#endif // PROTOBUF_HASDEATH_TEST
+#endif // GTEST_HAS_DEATH_TEST
// Test overflows.
EXPECT_TRUE (Tokenizer::ParseInteger("0", 0, &i));
@@ -796,7 +796,7 @@ TEST_F(TokenizerTest, ParseFloat) {
EXPECT_EQ( 0.0, Tokenizer::ParseFloat("1e-9999999999999999999999999999"));
EXPECT_EQ(HUGE_VAL, Tokenizer::ParseFloat("1e+9999999999999999999999999999"));
-#ifdef PROTOBUF_HASDEATH_TEST // death tests do not work on Windows yet
+#ifdef GTEST_HAS_DEATH_TEST // death tests do not work on Windows yet
// Test invalid integers that will never be tokenized as integers.
EXPECT_DEBUG_DEATH(Tokenizer::ParseFloat("zxy"),
"passed text that could not have been tokenized as a float");
@@ -804,7 +804,7 @@ TEST_F(TokenizerTest, ParseFloat) {
"passed text that could not have been tokenized as a float");
EXPECT_DEBUG_DEATH(Tokenizer::ParseFloat("-1.0"),
"passed text that could not have been tokenized as a float");
-#endif // PROTOBUF_HASDEATH_TEST
+#endif // GTEST_HAS_DEATH_TEST
}
TEST_F(TokenizerTest, ParseString) {
@@ -843,10 +843,10 @@ TEST_F(TokenizerTest, ParseString) {
EXPECT_EQ("u0", output);
// Test invalid strings that will never be tokenized as strings.
-#ifdef PROTOBUF_HASDEATH_TEST // death tests do not work on Windows yet
+#ifdef GTEST_HAS_DEATH_TEST // death tests do not work on Windows yet
EXPECT_DEBUG_DEATH(Tokenizer::ParseString("", &output),
"passed text that could not have been tokenized as a string");
-#endif // PROTOBUF_HASDEATH_TEST
+#endif // GTEST_HAS_DEATH_TEST
}
TEST_F(TokenizerTest, ParseStringAppend) {
diff --git a/chromium/third_party/protobuf/src/google/protobuf/message.h b/chromium/third_party/protobuf/src/google/protobuf/message.h
index 0f90bc1a15b..77faa9a77a5 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/message.h
+++ b/chromium/third_party/protobuf/src/google/protobuf/message.h
@@ -750,27 +750,6 @@ class LIBPROTOBUF_EXPORT MessageFactory {
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageFactory);
};
-#define DECLARE_GET_REPEATED_FIELD(TYPE) \
-template<> \
-LIBPROTOBUF_EXPORT \
-const RepeatedField<TYPE>& Reflection::GetRepeatedField<TYPE>( \
- const Message& message, const FieldDescriptor* field) const; \
- \
-template<> \
-LIBPROTOBUF_EXPORT \
-RepeatedField<TYPE>* Reflection::MutableRepeatedField<TYPE>( \
- Message* message, const FieldDescriptor* field) const;
-
-DECLARE_GET_REPEATED_FIELD(int32)
-DECLARE_GET_REPEATED_FIELD(int64)
-DECLARE_GET_REPEATED_FIELD(uint32)
-DECLARE_GET_REPEATED_FIELD(uint64)
-DECLARE_GET_REPEATED_FIELD(float)
-DECLARE_GET_REPEATED_FIELD(double)
-DECLARE_GET_REPEATED_FIELD(bool)
-
-#undef DECLARE_GET_REPEATED_FIELD
-
// =============================================================================
// Implementation details for {Get,Mutable}RawRepeatedPtrField. We provide
// specializations for <string>, <StringPieceField> and <Message> and handle
diff --git a/chromium/third_party/protobuf/src/google/protobuf/message_unittest.cc b/chromium/third_party/protobuf/src/google/protobuf/message_unittest.cc
index a1449c76f47..8aaeabb4be9 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/message_unittest.cc
+++ b/chromium/third_party/protobuf/src/google/protobuf/message_unittest.cc
@@ -205,7 +205,7 @@ TEST(MessageTest, InitializationErrorString) {
EXPECT_EQ("a, b, c", message.InitializationErrorString());
}
-#ifdef PROTOBUF_HAS_DEATH_TEST
+#ifdef GTEST_HAS_DEATH_TEST // death tests do not work on Windows yet.
TEST(MessageTest, SerializeFailsIfNotInitialized) {
unittest::TestRequired message;
@@ -222,7 +222,7 @@ TEST(MessageTest, CheckInitialized) {
"fields: a, b, c");
}
-#endif // PROTOBUF_HAS_DEATH_TEST
+#endif // GTEST_HAS_DEATH_TEST
TEST(MessageTest, BypassInitializationCheckOnSerialize) {
unittest::TestRequired message;
diff --git a/chromium/third_party/protobuf/src/google/protobuf/reflection_ops_unittest.cc b/chromium/third_party/protobuf/src/google/protobuf/reflection_ops_unittest.cc
index 29229b5a7e4..1cd56f1e64e 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/reflection_ops_unittest.cc
+++ b/chromium/third_party/protobuf/src/google/protobuf/reflection_ops_unittest.cc
@@ -152,7 +152,7 @@ TEST(ReflectionOpsTest, MergeUnknown) {
EXPECT_EQ(2, message1.unknown_fields().field(1).varint());
}
-#ifdef PROTOBUF_HAS_DEATH_TEST
+#ifdef GTEST_HAS_DEATH_TEST
TEST(ReflectionOpsTest, MergeFromSelf) {
// Note: Copy is implemented in terms of Merge() so technically the Copy
@@ -165,7 +165,7 @@ TEST(ReflectionOpsTest, MergeFromSelf) {
"&from");
}
-#endif // PROTOBUF_HAS_DEATH_TEST
+#endif // GTEST_HAS_DEATH_TEST
TEST(ReflectionOpsTest, Clear) {
unittest::TestAllTypes message;
diff --git a/chromium/third_party/protobuf/src/google/protobuf/repeated_field.h b/chromium/third_party/protobuf/src/google/protobuf/repeated_field.h
index 570d4b75129..b9db2b61dd3 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/repeated_field.h
+++ b/chromium/third_party/protobuf/src/google/protobuf/repeated_field.h
@@ -57,9 +57,9 @@
namespace google {
namespace upb {
-namespace google_opensource {
-class GMR_Handlers;
-} // namespace google_opensource
+namespace proto2_bridge_opensource {
+class FieldAccessor;
+} // namespace protobuf_bridge_opensource
} // namespace upb
namespace protobuf {
@@ -235,9 +235,9 @@ class LIBPROTOBUF_EXPORT RepeatedPtrFieldBase {
// use of AddFromCleared(), which is not part of the public interface.
friend class ExtensionSet;
- // To parse directly into a proto2 generated class, the upb class GMR_Handlers
+ // To parse directly into a proto2 generated class, the upb FieldAccessor
// needs to be able to modify a RepeatedPtrFieldBase directly.
- friend class LIBPROTOBUF_EXPORT upb::google_opensource::GMR_Handlers;
+ friend class LIBPROTOBUF_EXPORT upb::proto2_bridge_opensource::FieldAccessor;
RepeatedPtrFieldBase();
diff --git a/chromium/third_party/protobuf/src/google/protobuf/repeated_field_reflection_unittest.cc b/chromium/third_party/protobuf/src/google/protobuf/repeated_field_reflection_unittest.cc
index a40162d0b78..5fcfb007b67 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/repeated_field_reflection_unittest.cc
+++ b/chromium/third_party/protobuf/src/google/protobuf/repeated_field_reflection_unittest.cc
@@ -120,7 +120,7 @@ TEST(RepeatedFieldReflectionTest, RegularFields) {
EXPECT_EQ(rf_double.Get(i), Func(i, 2));
EXPECT_EQ(rpf_string.Get(i), StrFunc(i, 5));
EXPECT_EQ(rpf_foreign_message.Get(i).c(), Func(i, 6));
- EXPECT_EQ(down_cast<const ForeignMessage*>(&rpf_message.Get(i))->c(),
+ EXPECT_EQ(down_cast<const ForeignMessage&>(rpf_message.Get(i)).c(),
Func(i, 6));
// Check gets through mutable objects.
@@ -128,7 +128,7 @@ TEST(RepeatedFieldReflectionTest, RegularFields) {
EXPECT_EQ(mrf_double->Get(i), Func(i, 2));
EXPECT_EQ(mrpf_string->Get(i), StrFunc(i, 5));
EXPECT_EQ(mrpf_foreign_message->Get(i).c(), Func(i, 6));
- EXPECT_EQ(down_cast<const ForeignMessage*>(&mrpf_message->Get(i))->c(),
+ EXPECT_EQ(down_cast<const ForeignMessage&>(mrpf_message->Get(i)).c(),
Func(i, 6));
// Check sets through mutable objects.
@@ -144,7 +144,6 @@ TEST(RepeatedFieldReflectionTest, RegularFields) {
EXPECT_EQ(message.repeated_foreign_message(i).c(), Func(i, 7));
}
-#ifdef PROTOBUF_HAS_DEATH_TEST
// Make sure types are checked correctly at runtime.
const FieldDescriptor* fd_optional_int32 =
desc->FindFieldByName("optional_int32");
@@ -154,7 +153,6 @@ TEST(RepeatedFieldReflectionTest, RegularFields) {
message, fd_repeated_int32), "not the right type");
EXPECT_DEATH(refl->GetRepeatedPtrField<TestAllTypes>(
message, fd_repeated_foreign_message), "wrong submessage type");
-#endif // PROTOBUF_HAS_DEATH_TEST
}
diff --git a/chromium/third_party/protobuf/src/google/protobuf/repeated_field_unittest.cc b/chromium/third_party/protobuf/src/google/protobuf/repeated_field_unittest.cc
index 257701eb317..99d5842d593 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/repeated_field_unittest.cc
+++ b/chromium/third_party/protobuf/src/google/protobuf/repeated_field_unittest.cc
@@ -331,7 +331,7 @@ TEST(RepeatedField, Truncate) {
// Truncations that don't change the size are allowed, but growing is not
// allowed.
field.Truncate(field.size());
-#ifdef PROTOBUF_HAS_DEATH_TEST
+#ifdef GTEST_HAS_DEATH_TEST
EXPECT_DEBUG_DEATH(field.Truncate(field.size() + 1), "new_size");
#endif
}
@@ -1007,13 +1007,11 @@ class RepeatedPtrFieldPtrsIteratorTest : public testing::Test {
TEST_F(RepeatedPtrFieldPtrsIteratorTest, ConvertiblePtr) {
RepeatedPtrField<string>::pointer_iterator iter =
proto_array_.pointer_begin();
- (void) iter;
}
TEST_F(RepeatedPtrFieldPtrsIteratorTest, ConvertibleConstPtr) {
RepeatedPtrField<string>::const_pointer_iterator iter =
const_proto_array_->pointer_begin();
- (void) iter;
}
TEST_F(RepeatedPtrFieldPtrsIteratorTest, MutablePtrIteration) {
@@ -1138,6 +1136,8 @@ TEST_F(RepeatedPtrFieldPtrsIteratorTest, PtrSTLAlgorithms_lower_bound) {
proto_array_.Add()->assign("y");
{
+ RepeatedPtrField<string>::pointer_iterator iter =
+ proto_array_.pointer_begin();
string v = "f";
RepeatedPtrField<string>::pointer_iterator it =
lower_bound(proto_array_.pointer_begin(), proto_array_.pointer_end(),
@@ -1149,6 +1149,8 @@ TEST_F(RepeatedPtrFieldPtrsIteratorTest, PtrSTLAlgorithms_lower_bound) {
EXPECT_TRUE(it == proto_array_.pointer_begin() + 3);
}
{
+ RepeatedPtrField<string>::const_pointer_iterator iter =
+ const_proto_array_->pointer_begin();
string v = "f";
RepeatedPtrField<string>::const_pointer_iterator it =
lower_bound(const_proto_array_->pointer_begin(),
diff --git a/chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops.h b/chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops.h
index ab935b02c6b..9b795ee4bfc 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops.h
+++ b/chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops.h
@@ -54,7 +54,7 @@
#define GOOGLE_PROTOBUF_ATOMICOPS_H_
// Don't include this file for people not concerned about thread safety.
-#ifndef GOOGLE_PROTOBUF_NO_THREAD_SAFETY
+#ifndef GOOGLE_PROTOBUF_NO_THREADSAFETY
#include <google/protobuf/stubs/platform_macros.h>
@@ -181,12 +181,8 @@ GOOGLE_PROTOBUF_ATOMICOPS_ERROR
#include <google/protobuf/stubs/atomicops_internals_x86_gcc.h>
#elif defined(GOOGLE_PROTOBUF_ARCH_ARM)
#include <google/protobuf/stubs/atomicops_internals_arm_gcc.h>
-#elif defined(GOOGLE_PROTOBUF_ARCH_ARM_QNX)
-#include <google/protobuf/stubs/atomicops_internals_arm_qnx.h>
#elif defined(GOOGLE_PROTOBUF_ARCH_MIPS)
#include <google/protobuf/stubs/atomicops_internals_mips_gcc.h>
-#elif defined(__pnacl__)
-#include <google/protobuf/stubs/atomicops_internals_pnacl.h>
#else
GOOGLE_PROTOBUF_ATOMICOPS_ERROR
#endif
@@ -204,6 +200,6 @@ GOOGLE_PROTOBUF_ATOMICOPS_ERROR
#undef GOOGLE_PROTOBUF_ATOMICOPS_ERROR
-#endif // GOOGLE_PROTOBUF_NO_THREAD_SAFETY
+#endif // GOOGLE_PROTOBUF_NO_THREADSAFETY
#endif // GOOGLE_PROTOBUF_ATOMICOPS_H_
diff --git a/chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_arm_qnx.h b/chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_arm_qnx.h
deleted file mode 100644
index f0507697868..00000000000
--- a/chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_arm_qnx.h
+++ /dev/null
@@ -1,146 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2012 Google Inc. All rights reserved.
-// http://code.google.com/p/protobuf/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// This file is an internal atomic implementation, use atomicops.h instead.
-
-#ifndef GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_ARM_QNX_H_
-#define GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_ARM_QNX_H_
-
-// For _smp_cmpxchg()
-#include <pthread.h>
-
-namespace google {
-namespace protobuf {
-namespace internal {
-
-inline Atomic32 QNXCmpxchg(Atomic32 old_value,
- Atomic32 new_value,
- volatile Atomic32* ptr) {
- return static_cast<Atomic32>(
- _smp_cmpxchg((volatile unsigned *)ptr,
- (unsigned)old_value,
- (unsigned)new_value));
-}
-
-
-inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
- Atomic32 old_value,
- Atomic32 new_value) {
- Atomic32 prev_value = *ptr;
- do {
- if (!QNXCmpxchg(old_value, new_value,
- const_cast<Atomic32*>(ptr))) {
- return old_value;
- }
- prev_value = *ptr;
- } while (prev_value == old_value);
- return prev_value;
-}
-
-inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
- Atomic32 new_value) {
- Atomic32 old_value;
- do {
- old_value = *ptr;
- } while (QNXCmpxchg(old_value, new_value,
- const_cast<Atomic32*>(ptr)));
- return old_value;
-}
-
-inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
- Atomic32 increment) {
- return Barrier_AtomicIncrement(ptr, increment);
-}
-
-inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
- Atomic32 increment) {
- for (;;) {
- // Atomic exchange the old value with an incremented one.
- Atomic32 old_value = *ptr;
- Atomic32 new_value = old_value + increment;
- if (QNXCmpxchg(old_value, new_value,
- const_cast<Atomic32*>(ptr)) == 0) {
- // The exchange took place as expected.
- return new_value;
- }
- // Otherwise, *ptr changed mid-loop and we need to retry.
- }
-}
-
-inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
- Atomic32 old_value,
- Atomic32 new_value) {
- return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
-}
-
-inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
- Atomic32 old_value,
- Atomic32 new_value) {
- return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
-}
-
-inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
- *ptr = value;
-}
-
-inline void MemoryBarrier() {
- __sync_synchronize();
-}
-
-inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
- *ptr = value;
- MemoryBarrier();
-}
-
-inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
- MemoryBarrier();
- *ptr = value;
-}
-
-inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) {
- return *ptr;
-}
-
-inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
- Atomic32 value = *ptr;
- MemoryBarrier();
- return value;
-}
-
-inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
- MemoryBarrier();
- return *ptr;
-}
-
-} // namespace internal
-} // namespace protobuf
-} // namespace google
-
-#endif // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_ARM_QNX_H_
diff --git a/chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_atomicword_compat.h b/chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_atomicword_compat.h
index e9d86797b53..8d9a726c280 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_atomicword_compat.h
+++ b/chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_atomicword_compat.h
@@ -44,7 +44,7 @@
// On LP64 platforms, AtomicWord and Atomic64 are both always long,
// so this problem doesn't occur.
-#if !defined(GOOGLE_PROTOBUF_ARCH_64_BIT)
+#if !defined(GOOGLE_PROTOBUF_HOST_ARCH_64_BIT)
namespace google {
namespace protobuf {
@@ -117,6 +117,6 @@ inline AtomicWord Release_Load(volatile const AtomicWord* ptr) {
} // namespace protobuf
} // namespace google
-#endif // !defined(GOOGLE_PROTOBUF_ARCH_64_BIT)
+#endif // !defined(GOOGLE_PROTOBUF_HOST_ARCH_64_BIT)
#endif // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_ATOMICWORD_COMPAT_H_
diff --git a/chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_macosx.h b/chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_macosx.h
index f9b7581ad56..9af6d636d6c 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_macosx.h
+++ b/chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_macosx.h
@@ -136,7 +136,7 @@ inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr,
Atomic64 prev_value;
do {
if (OSAtomicCompareAndSwap64(old_value, new_value,
- reinterpret_cast<volatile int64_t*>(ptr))) {
+ const_cast<Atomic64*>(ptr))) {
return old_value;
}
prev_value = *ptr;
@@ -150,19 +150,18 @@ inline Atomic64 NoBarrier_AtomicExchange(volatile Atomic64* ptr,
do {
old_value = *ptr;
} while (!OSAtomicCompareAndSwap64(old_value, new_value,
- reinterpret_cast<volatile int64_t*>(ptr)));
+ const_cast<Atomic64*>(ptr)));
return old_value;
}
inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr,
Atomic64 increment) {
- return OSAtomicAdd64(increment, reinterpret_cast<volatile int64_t*>(ptr));
+ return OSAtomicAdd64(increment, const_cast<Atomic64*>(ptr));
}
inline Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr,
Atomic64 increment) {
- return OSAtomicAdd64Barrier(increment,
- reinterpret_cast<volatile int64_t*>(ptr));
+ return OSAtomicAdd64Barrier(increment, const_cast<Atomic64*>(ptr));
}
inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
@@ -170,8 +169,8 @@ inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
Atomic64 new_value) {
Atomic64 prev_value;
do {
- if (OSAtomicCompareAndSwap64Barrier(
- old_value, new_value, reinterpret_cast<volatile int64_t*>(ptr))) {
+ if (OSAtomicCompareAndSwap64Barrier(old_value, new_value,
+ const_cast<Atomic64*>(ptr))) {
return old_value;
}
prev_value = *ptr;
diff --git a/chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_pnacl.h b/chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_pnacl.h
deleted file mode 100644
index 04a91a83f87..00000000000
--- a/chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_pnacl.h
+++ /dev/null
@@ -1,73 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2012 Google Inc. All rights reserved.
-// http://code.google.com/p/protobuf/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// This file is an internal atomic implementation, use atomicops.h instead.
-
-#ifndef GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_PNACL_H_
-#define GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_PNACL_H_
-
-namespace google {
-namespace protobuf {
-namespace internal {
-
-inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
- Atomic32 old_value,
- Atomic32 new_value) {
- return __sync_val_compare_and_swap(ptr, old_value, new_value);
-}
-
-inline void MemoryBarrier() {
- __sync_synchronize();
-}
-
-inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
- Atomic32 old_value,
- Atomic32 new_value) {
- Atomic32 ret = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
- MemoryBarrier();
- return ret;
-}
-
-inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
- MemoryBarrier();
- *ptr = value;
-}
-
-inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
- Atomic32 value = *ptr;
- MemoryBarrier();
- return value;
-}
-
-} // namespace internal
-} // namespace protobuf
-} // namespace google
-
-#endif // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_PNACL_H_
diff --git a/chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc b/chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc
index 0b359796ed2..8366a891069 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc
+++ b/chromium/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc
@@ -32,7 +32,7 @@
// Therefore we move the code depending on windows.h to this separate cc file.
// Don't compile this file for people not concerned about thread safety.
-#ifndef GOOGLE_PROTOBUF_NO_THREAD_SAFETY
+#ifndef GOOGLE_PROTOBUF_NO_THREADSAFETY
#include <google/protobuf/stubs/atomicops.h>
@@ -109,4 +109,4 @@ Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr,
} // namespace google
#endif // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_X86_MSVC_H_
-#endif // GOOGLE_PROTOBUF_NO_THREAD_SAFETY
+#endif // GOOGLE_PROTOBUF_NO_THREADSAFETY
diff --git a/chromium/third_party/protobuf/src/google/protobuf/stubs/common.cc b/chromium/third_party/protobuf/src/google/protobuf/stubs/common.cc
index e6045026774..16d7852820b 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/stubs/common.cc
+++ b/chromium/third_party/protobuf/src/google/protobuf/stubs/common.cc
@@ -110,7 +110,7 @@ void DefaultLogHandler(LogLevel level, const char* filename, int line,
// We use fprintf() instead of cerr because we want this to work at static
// initialization time.
- fprintf(stderr, "[libprotobuf %s %s:%d] %s\n",
+ fprintf(stderr, "libprotobuf %s %s:%d] %s\n",
level_names[level], filename, line, message.c_str());
fflush(stderr); // Needed on MSVC.
}
@@ -183,15 +183,15 @@ void LogMessage::Finish() {
if (level_ != LOGLEVEL_FATAL) {
InitLogSilencerCountOnce();
MutexLock lock(log_silencer_count_mutex_);
- suppress = log_silencer_count_ > 0;
+ suppress = internal::log_silencer_count_ > 0;
}
if (!suppress) {
- log_handler_(level_, filename_, line_, message_);
+ internal::log_handler_(level_, filename_, line_, message_);
}
if (level_ == LOGLEVEL_FATAL) {
-#if PROTOBUF_USE_EXCEPTIONS
+#ifdef PROTOBUF_USE_EXCEPTIONS
throw FatalException(filename_, line_, message_);
#else
abort();
@@ -383,7 +383,7 @@ void ShutdownProtobufLibrary() {
internal::shutdown_functions_mutex = NULL;
}
-#if PROTOBUF_USE_EXCEPTIONS
+#ifdef PROTOBUF_USE_EXCEPTIONS
FatalException::~FatalException() throw() {}
const char* FatalException::what() const throw() {
diff --git a/chromium/third_party/protobuf/src/google/protobuf/stubs/common.h b/chromium/third_party/protobuf/src/google/protobuf/stubs/common.h
index e9d0e352556..4c3e0cb313f 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/stubs/common.h
+++ b/chromium/third_party/protobuf/src/google/protobuf/stubs/common.h
@@ -48,17 +48,12 @@
#include <stdint.h>
#endif
-#ifndef PROTOBUF_USE_EXCEPTIONS
#if defined(_MSC_VER) && defined(_CPPUNWIND)
- #define PROTOBUF_USE_EXCEPTIONS 1
+ #define PROTOBUF_USE_EXCEPTIONS
#elif defined(__EXCEPTIONS)
- #define PROTOBUF_USE_EXCEPTIONS 1
-#else
- #define PROTOBUF_USE_EXCEPTIONS 0
-#endif
+ #define PROTOBUF_USE_EXCEPTIONS
#endif
-
-#if PROTOBUF_USE_EXCEPTIONS
+#ifdef PROTOBUF_USE_EXCEPTIONS
#include <exception>
#endif
@@ -128,24 +123,24 @@ namespace internal {
// The current version, represented as a single integer to make comparison
// easier: major * 10^6 + minor * 10^3 + micro
-#define GOOGLE_PROTOBUF_VERSION 2005000
+#define GOOGLE_PROTOBUF_VERSION 2004002
// The minimum library version which works with the current version of the
// headers.
-#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION 2005000
+#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION 2004000
// The minimum header version which works with the current version of
// the library. This constant should only be used by protoc's C++ code
// generator.
-static const int kMinHeaderVersionForLibrary = 2005000;
+static const int kMinHeaderVersionForLibrary = 2004000;
// The minimum protoc version which works with the current version of the
// headers.
-#define GOOGLE_PROTOBUF_MIN_PROTOC_VERSION 2005000
+#define GOOGLE_PROTOBUF_MIN_PROTOC_VERSION 2004000
// The minimum header version which works with the current version of
// protoc. This constant should only be used in VerifyVersion().
-static const int kMinHeaderVersionForProtoc = 2005000;
+static const int kMinHeaderVersionForProtoc = 2004000;
// Verifies that the headers and libraries are compatible. Use the macro
// below to call this.
@@ -361,6 +356,12 @@ inline To down_cast(From* f) { // so we only accept pointers
return static_cast<To>(f);
}
+// Simplified down_cast for reference type.
+template<typename To, typename From>
+inline To down_cast(From& f) {
+ return static_cast<To>(f);
+}
+
} // namespace internal
// We made these internal so that they would show up as such in the docs,
@@ -1208,7 +1209,7 @@ LIBPROTOBUF_EXPORT void OnShutdown(void (*func)());
} // namespace internal
-#if PROTOBUF_USE_EXCEPTIONS
+#ifdef PROTOBUF_USE_EXCEPTIONS
class FatalException : public std::exception {
public:
FatalException(const char* filename, int line, const std::string& message)
diff --git a/chromium/third_party/protobuf/src/google/protobuf/stubs/common_unittest.cc b/chromium/third_party/protobuf/src/google/protobuf/stubs/common_unittest.cc
index 43cd6d010be..4109a52cb95 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/stubs/common_unittest.cc
+++ b/chromium/third_party/protobuf/src/google/protobuf/stubs/common_unittest.cc
@@ -94,9 +94,9 @@ TEST(LoggingTest, DefaultLogging) {
string text = GetCapturedTestStderr();
EXPECT_EQ(
- "[libprotobuf INFO "__FILE__":" + SimpleItoa(line + 1) + "] A message.\n"
- "[libprotobuf WARNING "__FILE__":" + SimpleItoa(line + 2) + "] A warning.\n"
- "[libprotobuf ERROR "__FILE__":" + SimpleItoa(line + 3) + "] An error.\n",
+ "libprotobuf INFO "__FILE__":" + SimpleItoa(line + 1) + "] A message.\n"
+ "libprotobuf WARNING "__FILE__":" + SimpleItoa(line + 2) + "] A warning.\n"
+ "libprotobuf ERROR "__FILE__":" + SimpleItoa(line + 3) + "] An error.\n",
text);
}
diff --git a/chromium/third_party/protobuf/src/google/protobuf/stubs/once.h b/chromium/third_party/protobuf/src/google/protobuf/stubs/once.h
index 7fbc117fe43..ead86fbd59e 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/stubs/once.h
+++ b/chromium/third_party/protobuf/src/google/protobuf/stubs/once.h
@@ -118,8 +118,8 @@ typedef internal::AtomicWord ProtobufOnceType;
#define GOOGLE_PROTOBUF_ONCE_INIT ::google::protobuf::ONCE_STATE_UNINITIALIZED
-LIBPROTOBUF_EXPORT
-void GoogleOnceInitImpl(ProtobufOnceType* once, Closure* closure);
+LIBPROTOBUF_EXPORT void GoogleOnceInitImpl(ProtobufOnceType* once,
+ Closure* closure);
inline void GoogleOnceInit(ProtobufOnceType* once, void (*init_func)()) {
if (internal::Acquire_Load(once) != ONCE_STATE_DONE) {
diff --git a/chromium/third_party/protobuf/src/google/protobuf/stubs/platform_macros.h b/chromium/third_party/protobuf/src/google/protobuf/stubs/platform_macros.h
index b1df60e4679..cba9fbd029e 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/stubs/platform_macros.h
+++ b/chromium/third_party/protobuf/src/google/protobuf/stubs/platform_macros.h
@@ -43,9 +43,6 @@
#elif defined(_M_IX86) || defined(__i386__)
#define GOOGLE_PROTOBUF_ARCH_IA32 1
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
-#elif defined(__QNX__)
-#define GOOGLE_PROTOBUF_ARCH_ARM_QNX 1
-#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
#elif defined(__ARMEL__)
#define GOOGLE_PROTOBUF_ARCH_ARM 1
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
@@ -54,9 +51,6 @@
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
#elif defined(__pnacl__)
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
-#elif defined(__ppc__)
-#define GOOGLE_PROTOBUF_ARCH_PPC 1
-#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
#else
#error Host architecture was not detected as supported by protobuf
#endif
diff --git a/chromium/third_party/protobuf/src/google/protobuf/stubs/stl_util-inl.h b/chromium/third_party/protobuf/src/google/protobuf/stubs/stl_util-inl.h
new file mode 100644
index 00000000000..a2e671bb746
--- /dev/null
+++ b/chromium/third_party/protobuf/src/google/protobuf/stubs/stl_util-inl.h
@@ -0,0 +1,121 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// http://code.google.com/p/protobuf/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// from google3/util/gtl/stl_util-inl.h
+
+#ifndef GOOGLE_PROTOBUF_STUBS_STL_UTIL_INL_H__
+#define GOOGLE_PROTOBUF_STUBS_STL_UTIL_INL_H__
+
+#include <google/protobuf/stubs/common.h>
+
+namespace google {
+namespace protobuf {
+
+// STLDeleteContainerPointers()
+// For a range within a container of pointers, calls delete
+// (non-array version) on these pointers.
+// NOTE: for these three functions, we could just implement a DeleteObject
+// functor and then call for_each() on the range and functor, but this
+// requires us to pull in all of algorithm.h, which seems expensive.
+// For hash_[multi]set, it is important that this deletes behind the iterator
+// because the hash_set may call the hash function on the iterator when it is
+// advanced, which could result in the hash function trying to deference a
+// stale pointer.
+template <class ForwardIterator>
+void STLDeleteContainerPointers(ForwardIterator begin,
+ ForwardIterator end) {
+ while (begin != end) {
+ ForwardIterator temp = begin;
+ ++begin;
+ delete *temp;
+ }
+}
+
+// Inside Google, this function implements a horrible, disgusting hack in which
+// we reach into the string's private implementation and resize it without
+// initializing the new bytes. In some cases doing this can significantly
+// improve performance. However, since it's totally non-portable it has no
+// place in open source code. Feel free to fill this function in with your
+// own disgusting hack if you want the perf boost.
+inline void STLStringResizeUninitialized(string* s, size_t new_size) {
+ s->resize(new_size);
+}
+
+// Return a mutable char* pointing to a string's internal buffer,
+// which may not be null-terminated. Writing through this pointer will
+// modify the string.
+//
+// string_as_array(&str)[i] is valid for 0 <= i < str.size() until the
+// next call to a string method that invalidates iterators.
+//
+// As of 2006-04, there is no standard-blessed way of getting a
+// mutable reference to a string's internal buffer. However, issue 530
+// (http://www.open-std.org/JTC1/SC22/WG21/docs/lwg-active.html#530)
+// proposes this as the method. According to Matt Austern, this should
+// already work on all current implementations.
+inline char* string_as_array(string* str) {
+ // DO NOT USE const_cast<char*>(str->data())! See the unittest for why.
+ return str->empty() ? NULL : &*str->begin();
+}
+
+// STLDeleteElements() deletes all the elements in an STL container and clears
+// the container. This function is suitable for use with a vector, set,
+// hash_set, or any other STL container which defines sensible begin(), end(),
+// and clear() methods.
+//
+// If container is NULL, this function is a no-op.
+//
+// As an alternative to calling STLDeleteElements() directly, consider
+// ElementDeleter (defined below), which ensures that your container's elements
+// are deleted when the ElementDeleter goes out of scope.
+template <class T>
+void STLDeleteElements(T *container) {
+ if (!container) return;
+ STLDeleteContainerPointers(container->begin(), container->end());
+ container->clear();
+}
+
+// Given an STL container consisting of (key, value) pairs, STLDeleteValues
+// deletes all the "value" components and clears the container. Does nothing
+// in the case it's given a NULL pointer.
+
+template <class T>
+void STLDeleteValues(T *v) {
+ if (!v) return;
+ for (typename T::iterator i = v->begin(); i != v->end(); ++i) {
+ delete i->second;
+ }
+ v->clear();
+}
+
+} // namespace protobuf
+} // namespace google
+
+#endif // GOOGLE_PROTOBUF_STUBS_STL_UTIL_INL_H__
diff --git a/chromium/third_party/protobuf/src/google/protobuf/stubs/stringprintf.h b/chromium/third_party/protobuf/src/google/protobuf/stubs/stringprintf.h
index 4a03e5ff99a..573f30f3aef 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/stubs/stringprintf.h
+++ b/chromium/third_party/protobuf/src/google/protobuf/stubs/stringprintf.h
@@ -50,25 +50,25 @@ namespace google {
namespace protobuf {
// Return a C++ string
-LIBPROTOBUF_EXPORT extern string StringPrintf(const char* format, ...);
+extern string StringPrintf(const char* format, ...);
// Store result into a supplied string and return it
-LIBPROTOBUF_EXPORT extern const string& SStringPrintf(string* dst, const char* format, ...);
+extern const string& SStringPrintf(string* dst, const char* format, ...);
// Append result to a supplied string
-LIBPROTOBUF_EXPORT extern void StringAppendF(string* dst, const char* format, ...);
+extern void StringAppendF(string* dst, const char* format, ...);
// Lower-level routine that takes a va_list and appends to a specified
// string. All other routines are just convenience wrappers around it.
-LIBPROTOBUF_EXPORT extern void StringAppendV(string* dst, const char* format, va_list ap);
+extern void StringAppendV(string* dst, const char* format, va_list ap);
// The max arguments supported by StringPrintfVector
-LIBPROTOBUF_EXPORT extern const int kStringPrintfVectorMaxArgs;
+extern const int kStringPrintfVectorMaxArgs;
// You can use this version when all your arguments are strings, but
// you don't know how many arguments you'll have at compile time.
// StringPrintfVector will LOG(FATAL) if v.size() > kStringPrintfVectorMaxArgs
-LIBPROTOBUF_EXPORT extern string StringPrintfVector(const char* format, const vector<string>& v);
+extern string StringPrintfVector(const char* format, const vector<string>& v);
} // namespace protobuf
} // namespace google
diff --git a/chromium/third_party/protobuf/src/google/protobuf/stubs/type_traits.h b/chromium/third_party/protobuf/src/google/protobuf/stubs/type_traits.h
index e41f5e6f699..997f35d4d6e 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/stubs/type_traits.h
+++ b/chromium/third_party/protobuf/src/google/protobuf/stubs/type_traits.h
@@ -333,4 +333,14 @@ struct is_convertible
} // namespace protobuf
} // namespace google
+// Right now these macros are no-ops, and mostly just document the fact
+// these types are PODs, for human use. They may be made more contentful
+// later. The typedef is just to make it legal to put a semicolon after
+// these macros.
+#define DECLARE_POD(TypeName) typedef int Dummy_Type_For_DECLARE_POD
+#define DECLARE_NESTED_POD(TypeName) DECLARE_POD(TypeName)
+#define PROPAGATE_POD_FROM_TEMPLATE_ARGUMENT(TemplateName) \
+ typedef int Dummy_Type_For_PROPAGATE_POD_FROM_TEMPLATE_ARGUMENT
+#define ENFORCE_POD(TypeName) typedef int Dummy_Type_For_ENFORCE_POD
+
#endif // GOOGLE_PROTOBUF_TYPE_TRAITS_H_
diff --git a/chromium/third_party/protobuf/src/google/protobuf/stubs/type_traits_unittest.cc b/chromium/third_party/protobuf/src/google/protobuf/stubs/type_traits_unittest.cc
index 7a8cbfb8b28..00e5a47636b 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/stubs/type_traits_unittest.cc
+++ b/chromium/third_party/protobuf/src/google/protobuf/stubs/type_traits_unittest.cc
@@ -47,6 +47,27 @@ using std::string;
using std::vector;
using std::pair;
+using google::protobuf::internal::add_reference;
+using google::protobuf::internal::has_trivial_assign;
+using google::protobuf::internal::has_trivial_constructor;
+using google::protobuf::internal::has_trivial_copy;
+using google::protobuf::internal::has_trivial_destructor;
+#if !defined(_MSC_VER) && !(defined(__GNUC__) && __GNUC__ <= 3)
+using google::protobuf::internal::is_convertible;
+using google::protobuf::internal::is_enum;
+#endif
+using google::protobuf::internal::is_floating_point;
+using google::protobuf::internal::is_integral;
+using google::protobuf::internal::is_pointer;
+using google::protobuf::internal::is_pod;
+using google::protobuf::internal::is_reference;
+using google::protobuf::internal::is_same;
+using google::protobuf::internal::remove_const;
+using google::protobuf::internal::remove_cv;
+using google::protobuf::internal::remove_pointer;
+using google::protobuf::internal::remove_reference;
+using google::protobuf::internal::remove_volatile;
+
// This assertion produces errors like "error: invalid use of
// incomplete type 'struct <unnamed>::AssertTypesEq<const int, int>'"
@@ -154,7 +175,6 @@ class J {
namespace google {
namespace protobuf {
-namespace internal {
namespace {
// A base class and a derived class that inherits from it, used for
@@ -623,6 +643,5 @@ TEST(TypeTraitsTest, TestConvertible) {
}
} // anonymous namespace
-} // namespace internal
} // namespace protobuf
} // namespace google
diff --git a/chromium/third_party/protobuf/src/google/protobuf/test_util.cc b/chromium/third_party/protobuf/src/google/protobuf/test_util.cc
index a9666fe409f..841f4b30b7c 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/test_util.cc
+++ b/chromium/third_party/protobuf/src/google/protobuf/test_util.cc
@@ -309,7 +309,7 @@ void TestUtil::ExpectAllFieldsSet(const unittest::TestAllTypes& message) {
EXPECT_EQ(110 , message.optional_sfixed64());
EXPECT_EQ(111 , message.optional_float ());
EXPECT_EQ(112 , message.optional_double ());
- EXPECT_TRUE( message.optional_bool ());
+ EXPECT_EQ(true , message.optional_bool ());
EXPECT_EQ("115", message.optional_string ());
EXPECT_EQ("116", message.optional_bytes ());
@@ -369,7 +369,7 @@ void TestUtil::ExpectAllFieldsSet(const unittest::TestAllTypes& message) {
EXPECT_EQ(210 , message.repeated_sfixed64(0));
EXPECT_EQ(211 , message.repeated_float (0));
EXPECT_EQ(212 , message.repeated_double (0));
- EXPECT_TRUE( message.repeated_bool (0));
+ EXPECT_EQ(true , message.repeated_bool (0));
EXPECT_EQ("215", message.repeated_string (0));
EXPECT_EQ("216", message.repeated_bytes (0));
@@ -396,7 +396,7 @@ void TestUtil::ExpectAllFieldsSet(const unittest::TestAllTypes& message) {
EXPECT_EQ(310 , message.repeated_sfixed64(1));
EXPECT_EQ(311 , message.repeated_float (1));
EXPECT_EQ(312 , message.repeated_double (1));
- EXPECT_FALSE( message.repeated_bool (1));
+ EXPECT_EQ(false, message.repeated_bool (1));
EXPECT_EQ("315", message.repeated_string (1));
EXPECT_EQ("316", message.repeated_bytes (1));
@@ -446,7 +446,7 @@ void TestUtil::ExpectAllFieldsSet(const unittest::TestAllTypes& message) {
EXPECT_EQ(410 , message.default_sfixed64());
EXPECT_EQ(411 , message.default_float ());
EXPECT_EQ(412 , message.default_double ());
- EXPECT_FALSE( message.default_bool ());
+ EXPECT_EQ(false, message.default_bool ());
EXPECT_EQ("415", message.default_string ());
EXPECT_EQ("416", message.default_bytes ());
@@ -503,7 +503,7 @@ void TestUtil::ExpectClear(const unittest::TestAllTypes& message) {
EXPECT_EQ(0 , message.optional_sfixed64());
EXPECT_EQ(0 , message.optional_float ());
EXPECT_EQ(0 , message.optional_double ());
- EXPECT_FALSE( message.optional_bool ());
+ EXPECT_EQ(false, message.optional_bool ());
EXPECT_EQ("" , message.optional_string ());
EXPECT_EQ("" , message.optional_bytes ());
@@ -592,7 +592,7 @@ void TestUtil::ExpectClear(const unittest::TestAllTypes& message) {
EXPECT_EQ(-50 , message.default_sfixed64());
EXPECT_EQ( 51.5 , message.default_float ());
EXPECT_EQ( 52e3 , message.default_double ());
- EXPECT_TRUE( message.default_bool ());
+ EXPECT_EQ(true , message.default_bool ());
EXPECT_EQ("hello", message.default_string ());
EXPECT_EQ("world", message.default_bytes ());
@@ -651,7 +651,7 @@ void TestUtil::ExpectRepeatedFieldsModified(
EXPECT_EQ(210 , message.repeated_sfixed64(0));
EXPECT_EQ(211 , message.repeated_float (0));
EXPECT_EQ(212 , message.repeated_double (0));
- EXPECT_TRUE( message.repeated_bool (0));
+ EXPECT_EQ(true , message.repeated_bool (0));
EXPECT_EQ("215", message.repeated_string (0));
EXPECT_EQ("216", message.repeated_bytes (0));
@@ -679,7 +679,7 @@ void TestUtil::ExpectRepeatedFieldsModified(
EXPECT_EQ(510 , message.repeated_sfixed64(1));
EXPECT_EQ(511 , message.repeated_float (1));
EXPECT_EQ(512 , message.repeated_double (1));
- EXPECT_TRUE( message.repeated_bool (1));
+ EXPECT_EQ(true , message.repeated_bool (1));
EXPECT_EQ("515", message.repeated_string (1));
EXPECT_EQ("516", message.repeated_bytes (1));
@@ -812,7 +812,7 @@ void TestUtil::ExpectPackedFieldsSet(const unittest::TestPackedTypes& message) {
EXPECT_EQ(610 , message.packed_sfixed64(0));
EXPECT_EQ(611 , message.packed_float (0));
EXPECT_EQ(612 , message.packed_double (0));
- EXPECT_TRUE( message.packed_bool (0));
+ EXPECT_EQ(true , message.packed_bool (0));
EXPECT_EQ(unittest::FOREIGN_BAR, message.packed_enum(0));
EXPECT_EQ(701 , message.packed_int32 (1));
@@ -827,7 +827,7 @@ void TestUtil::ExpectPackedFieldsSet(const unittest::TestPackedTypes& message) {
EXPECT_EQ(710 , message.packed_sfixed64(1));
EXPECT_EQ(711 , message.packed_float (1));
EXPECT_EQ(712 , message.packed_double (1));
- EXPECT_FALSE( message.packed_bool (1));
+ EXPECT_EQ(false, message.packed_bool (1));
EXPECT_EQ(unittest::FOREIGN_BAZ, message.packed_enum(1));
}
@@ -862,7 +862,7 @@ void TestUtil::ExpectUnpackedFieldsSet(
EXPECT_EQ(610 , message.unpacked_sfixed64(0));
EXPECT_EQ(611 , message.unpacked_float (0));
EXPECT_EQ(612 , message.unpacked_double (0));
- EXPECT_TRUE( message.unpacked_bool (0));
+ EXPECT_EQ(true , message.unpacked_bool (0));
EXPECT_EQ(unittest::FOREIGN_BAR, message.unpacked_enum(0));
EXPECT_EQ(701 , message.unpacked_int32 (1));
@@ -877,7 +877,7 @@ void TestUtil::ExpectUnpackedFieldsSet(
EXPECT_EQ(710 , message.unpacked_sfixed64(1));
EXPECT_EQ(711 , message.unpacked_float (1));
EXPECT_EQ(712 , message.unpacked_double (1));
- EXPECT_FALSE( message.unpacked_bool (1));
+ EXPECT_EQ(false, message.unpacked_bool (1));
EXPECT_EQ(unittest::FOREIGN_BAZ, message.unpacked_enum(1));
}
@@ -934,7 +934,7 @@ void TestUtil::ExpectPackedFieldsModified(
EXPECT_EQ(610 , message.packed_sfixed64(0));
EXPECT_EQ(611 , message.packed_float (0));
EXPECT_EQ(612 , message.packed_double (0));
- EXPECT_TRUE( message.packed_bool (0));
+ EXPECT_EQ(true , message.packed_bool (0));
EXPECT_EQ(unittest::FOREIGN_BAR, message.packed_enum(0));
// Actually verify the second (modified) elements now.
EXPECT_EQ(801 , message.packed_int32 (1));
@@ -949,7 +949,7 @@ void TestUtil::ExpectPackedFieldsModified(
EXPECT_EQ(810 , message.packed_sfixed64(1));
EXPECT_EQ(811 , message.packed_float (1));
EXPECT_EQ(812 , message.packed_double (1));
- EXPECT_TRUE( message.packed_bool (1));
+ EXPECT_EQ(true , message.packed_bool (1));
EXPECT_EQ(unittest::FOREIGN_FOO, message.packed_enum(1));
}
@@ -1178,7 +1178,7 @@ void TestUtil::ExpectAllExtensionsSet(
EXPECT_EQ(110 , message.GetExtension(unittest::optional_sfixed64_extension));
EXPECT_EQ(111 , message.GetExtension(unittest::optional_float_extension ));
EXPECT_EQ(112 , message.GetExtension(unittest::optional_double_extension ));
- EXPECT_TRUE( message.GetExtension(unittest::optional_bool_extension ));
+ EXPECT_EQ(true , message.GetExtension(unittest::optional_bool_extension ));
EXPECT_EQ("115", message.GetExtension(unittest::optional_string_extension ));
EXPECT_EQ("116", message.GetExtension(unittest::optional_bytes_extension ));
@@ -1238,7 +1238,7 @@ void TestUtil::ExpectAllExtensionsSet(
EXPECT_EQ(210 , message.GetExtension(unittest::repeated_sfixed64_extension, 0));
EXPECT_EQ(211 , message.GetExtension(unittest::repeated_float_extension , 0));
EXPECT_EQ(212 , message.GetExtension(unittest::repeated_double_extension , 0));
- EXPECT_TRUE( message.GetExtension(unittest::repeated_bool_extension , 0));
+ EXPECT_EQ(true , message.GetExtension(unittest::repeated_bool_extension , 0));
EXPECT_EQ("215", message.GetExtension(unittest::repeated_string_extension , 0));
EXPECT_EQ("216", message.GetExtension(unittest::repeated_bytes_extension , 0));
@@ -1267,7 +1267,7 @@ void TestUtil::ExpectAllExtensionsSet(
EXPECT_EQ(310 , message.GetExtension(unittest::repeated_sfixed64_extension, 1));
EXPECT_EQ(311 , message.GetExtension(unittest::repeated_float_extension , 1));
EXPECT_EQ(312 , message.GetExtension(unittest::repeated_double_extension , 1));
- EXPECT_FALSE( message.GetExtension(unittest::repeated_bool_extension , 1));
+ EXPECT_EQ(false, message.GetExtension(unittest::repeated_bool_extension , 1));
EXPECT_EQ("315", message.GetExtension(unittest::repeated_string_extension , 1));
EXPECT_EQ("316", message.GetExtension(unittest::repeated_bytes_extension , 1));
@@ -1321,7 +1321,7 @@ void TestUtil::ExpectAllExtensionsSet(
EXPECT_EQ(410 , message.GetExtension(unittest::default_sfixed64_extension));
EXPECT_EQ(411 , message.GetExtension(unittest::default_float_extension ));
EXPECT_EQ(412 , message.GetExtension(unittest::default_double_extension ));
- EXPECT_FALSE( message.GetExtension(unittest::default_bool_extension ));
+ EXPECT_EQ(false, message.GetExtension(unittest::default_bool_extension ));
EXPECT_EQ("415", message.GetExtension(unittest::default_string_extension ));
EXPECT_EQ("416", message.GetExtension(unittest::default_bytes_extension ));
@@ -1386,7 +1386,7 @@ void TestUtil::ExpectExtensionsClear(
EXPECT_EQ(0 , message.GetExtension(unittest::optional_sfixed64_extension));
EXPECT_EQ(0 , message.GetExtension(unittest::optional_float_extension ));
EXPECT_EQ(0 , message.GetExtension(unittest::optional_double_extension ));
- EXPECT_FALSE( message.GetExtension(unittest::optional_bool_extension ));
+ EXPECT_EQ(false, message.GetExtension(unittest::optional_bool_extension ));
EXPECT_EQ("" , message.GetExtension(unittest::optional_string_extension ));
EXPECT_EQ("" , message.GetExtension(unittest::optional_bytes_extension ));
@@ -1479,7 +1479,7 @@ void TestUtil::ExpectExtensionsClear(
EXPECT_EQ(-50 , message.GetExtension(unittest::default_sfixed64_extension));
EXPECT_EQ( 51.5 , message.GetExtension(unittest::default_float_extension ));
EXPECT_EQ( 52e3 , message.GetExtension(unittest::default_double_extension ));
- EXPECT_TRUE( message.GetExtension(unittest::default_bool_extension ));
+ EXPECT_EQ(true , message.GetExtension(unittest::default_bool_extension ));
EXPECT_EQ("hello", message.GetExtension(unittest::default_string_extension ));
EXPECT_EQ("world", message.GetExtension(unittest::default_bytes_extension ));
@@ -1538,7 +1538,7 @@ void TestUtil::ExpectRepeatedExtensionsModified(
EXPECT_EQ(210 , message.GetExtension(unittest::repeated_sfixed64_extension, 0));
EXPECT_EQ(211 , message.GetExtension(unittest::repeated_float_extension , 0));
EXPECT_EQ(212 , message.GetExtension(unittest::repeated_double_extension , 0));
- EXPECT_TRUE( message.GetExtension(unittest::repeated_bool_extension , 0));
+ EXPECT_EQ(true , message.GetExtension(unittest::repeated_bool_extension , 0));
EXPECT_EQ("215", message.GetExtension(unittest::repeated_string_extension , 0));
EXPECT_EQ("216", message.GetExtension(unittest::repeated_bytes_extension , 0));
@@ -1568,7 +1568,7 @@ void TestUtil::ExpectRepeatedExtensionsModified(
EXPECT_EQ(510 , message.GetExtension(unittest::repeated_sfixed64_extension, 1));
EXPECT_EQ(511 , message.GetExtension(unittest::repeated_float_extension , 1));
EXPECT_EQ(512 , message.GetExtension(unittest::repeated_double_extension , 1));
- EXPECT_TRUE( message.GetExtension(unittest::repeated_bool_extension , 1));
+ EXPECT_EQ(true , message.GetExtension(unittest::repeated_bool_extension , 1));
EXPECT_EQ("515", message.GetExtension(unittest::repeated_string_extension , 1));
EXPECT_EQ("516", message.GetExtension(unittest::repeated_bytes_extension , 1));
@@ -1671,7 +1671,7 @@ void TestUtil::ExpectPackedExtensionsSet(
EXPECT_EQ(610 , message.GetExtension(unittest::packed_sfixed64_extension, 0));
EXPECT_EQ(611 , message.GetExtension(unittest::packed_float_extension , 0));
EXPECT_EQ(612 , message.GetExtension(unittest::packed_double_extension , 0));
- EXPECT_TRUE( message.GetExtension(unittest::packed_bool_extension , 0));
+ EXPECT_EQ(true , message.GetExtension(unittest::packed_bool_extension , 0));
EXPECT_EQ(unittest::FOREIGN_BAR,
message.GetExtension(unittest::packed_enum_extension, 0));
EXPECT_EQ(701 , message.GetExtension(unittest::packed_int32_extension , 1));
@@ -1686,7 +1686,7 @@ void TestUtil::ExpectPackedExtensionsSet(
EXPECT_EQ(710 , message.GetExtension(unittest::packed_sfixed64_extension, 1));
EXPECT_EQ(711 , message.GetExtension(unittest::packed_float_extension , 1));
EXPECT_EQ(712 , message.GetExtension(unittest::packed_double_extension , 1));
- EXPECT_FALSE( message.GetExtension(unittest::packed_bool_extension , 1));
+ EXPECT_EQ(false, message.GetExtension(unittest::packed_bool_extension , 1));
EXPECT_EQ(unittest::FOREIGN_BAZ,
message.GetExtension(unittest::packed_enum_extension, 1));
}
@@ -1741,7 +1741,7 @@ void TestUtil::ExpectPackedExtensionsModified(
EXPECT_EQ(610 , message.GetExtension(unittest::packed_sfixed64_extension, 0));
EXPECT_EQ(611 , message.GetExtension(unittest::packed_float_extension , 0));
EXPECT_EQ(612 , message.GetExtension(unittest::packed_double_extension , 0));
- EXPECT_TRUE( message.GetExtension(unittest::packed_bool_extension , 0));
+ EXPECT_EQ(true , message.GetExtension(unittest::packed_bool_extension , 0));
EXPECT_EQ(unittest::FOREIGN_BAR,
message.GetExtension(unittest::packed_enum_extension, 0));
@@ -1758,7 +1758,7 @@ void TestUtil::ExpectPackedExtensionsModified(
EXPECT_EQ(810 , message.GetExtension(unittest::packed_sfixed64_extension, 1));
EXPECT_EQ(811 , message.GetExtension(unittest::packed_float_extension , 1));
EXPECT_EQ(812 , message.GetExtension(unittest::packed_double_extension , 1));
- EXPECT_TRUE( message.GetExtension(unittest::packed_bool_extension , 1));
+ EXPECT_EQ(true , message.GetExtension(unittest::packed_bool_extension , 1));
EXPECT_EQ(unittest::FOREIGN_FOO,
message.GetExtension(unittest::packed_enum_extension, 1));
}
@@ -1835,7 +1835,7 @@ void TestUtil::ExpectLastRepeatedsRemoved(
EXPECT_EQ(210 , message.repeated_sfixed64(0));
EXPECT_EQ(211 , message.repeated_float (0));
EXPECT_EQ(212 , message.repeated_double (0));
- EXPECT_TRUE( message.repeated_bool (0));
+ EXPECT_EQ(true , message.repeated_bool (0));
EXPECT_EQ("215", message.repeated_string (0));
EXPECT_EQ("216", message.repeated_bytes (0));
@@ -1895,7 +1895,7 @@ void TestUtil::ExpectLastRepeatedExtensionsRemoved(
EXPECT_EQ(210 , message.GetExtension(unittest::repeated_sfixed64_extension, 0));
EXPECT_EQ(211 , message.GetExtension(unittest::repeated_float_extension , 0));
EXPECT_EQ(212 , message.GetExtension(unittest::repeated_double_extension , 0));
- EXPECT_TRUE( message.GetExtension(unittest::repeated_bool_extension , 0));
+ EXPECT_EQ(true , message.GetExtension(unittest::repeated_bool_extension , 0));
EXPECT_EQ("215", message.GetExtension(unittest::repeated_string_extension , 0));
EXPECT_EQ("216", message.GetExtension(unittest::repeated_bytes_extension , 0));
@@ -1988,7 +1988,7 @@ void TestUtil::ExpectRepeatedsSwapped(
EXPECT_EQ(210 , message.repeated_sfixed64(1));
EXPECT_EQ(211 , message.repeated_float (1));
EXPECT_EQ(212 , message.repeated_double (1));
- EXPECT_TRUE( message.repeated_bool (1));
+ EXPECT_EQ(true , message.repeated_bool (1));
EXPECT_EQ("215", message.repeated_string (1));
EXPECT_EQ("216", message.repeated_bytes (1));
@@ -2014,7 +2014,7 @@ void TestUtil::ExpectRepeatedsSwapped(
EXPECT_EQ(310 , message.repeated_sfixed64(0));
EXPECT_EQ(311 , message.repeated_float (0));
EXPECT_EQ(312 , message.repeated_double (0));
- EXPECT_FALSE( message.repeated_bool (0));
+ EXPECT_EQ(false, message.repeated_bool (0));
EXPECT_EQ("315", message.repeated_string (0));
EXPECT_EQ("316", message.repeated_bytes (0));
@@ -2072,7 +2072,7 @@ void TestUtil::ExpectRepeatedExtensionsSwapped(
EXPECT_EQ(210 , message.GetExtension(unittest::repeated_sfixed64_extension, 1));
EXPECT_EQ(211 , message.GetExtension(unittest::repeated_float_extension , 1));
EXPECT_EQ(212 , message.GetExtension(unittest::repeated_double_extension , 1));
- EXPECT_TRUE( message.GetExtension(unittest::repeated_bool_extension , 1));
+ EXPECT_EQ(true , message.GetExtension(unittest::repeated_bool_extension , 1));
EXPECT_EQ("215", message.GetExtension(unittest::repeated_string_extension , 1));
EXPECT_EQ("216", message.GetExtension(unittest::repeated_bytes_extension , 1));
@@ -2101,7 +2101,7 @@ void TestUtil::ExpectRepeatedExtensionsSwapped(
EXPECT_EQ(310 , message.GetExtension(unittest::repeated_sfixed64_extension, 0));
EXPECT_EQ(311 , message.GetExtension(unittest::repeated_float_extension , 0));
EXPECT_EQ(312 , message.GetExtension(unittest::repeated_double_extension , 0));
- EXPECT_FALSE( message.GetExtension(unittest::repeated_bool_extension , 0));
+ EXPECT_EQ(false, message.GetExtension(unittest::repeated_bool_extension , 0));
EXPECT_EQ("315", message.GetExtension(unittest::repeated_string_extension , 0));
EXPECT_EQ("316", message.GetExtension(unittest::repeated_bytes_extension , 0));
@@ -2443,7 +2443,7 @@ void TestUtil::ReflectionTester::ExpectAllFieldsSetViaReflection1(
EXPECT_EQ(110 , reflection->GetInt64 (message, F("optional_sfixed64")));
EXPECT_EQ(111 , reflection->GetFloat (message, F("optional_float" )));
EXPECT_EQ(112 , reflection->GetDouble(message, F("optional_double" )));
- EXPECT_TRUE( reflection->GetBool (message, F("optional_bool" )));
+ EXPECT_EQ(true , reflection->GetBool (message, F("optional_bool" )));
EXPECT_EQ("115", reflection->GetString(message, F("optional_string" )));
EXPECT_EQ("116", reflection->GetString(message, F("optional_bytes" )));
@@ -2523,7 +2523,7 @@ void TestUtil::ReflectionTester::ExpectAllFieldsSetViaReflection2(
EXPECT_EQ(210 , reflection->GetRepeatedInt64 (message, F("repeated_sfixed64"), 0));
EXPECT_EQ(211 , reflection->GetRepeatedFloat (message, F("repeated_float" ), 0));
EXPECT_EQ(212 , reflection->GetRepeatedDouble(message, F("repeated_double" ), 0));
- EXPECT_TRUE( reflection->GetRepeatedBool (message, F("repeated_bool" ), 0));
+ EXPECT_EQ(true , reflection->GetRepeatedBool (message, F("repeated_bool" ), 0));
EXPECT_EQ("215", reflection->GetRepeatedString(message, F("repeated_string" ), 0));
EXPECT_EQ("216", reflection->GetRepeatedString(message, F("repeated_bytes" ), 0));
@@ -2565,7 +2565,7 @@ void TestUtil::ReflectionTester::ExpectAllFieldsSetViaReflection2(
EXPECT_EQ(310 , reflection->GetRepeatedInt64 (message, F("repeated_sfixed64"), 1));
EXPECT_EQ(311 , reflection->GetRepeatedFloat (message, F("repeated_float" ), 1));
EXPECT_EQ(312 , reflection->GetRepeatedDouble(message, F("repeated_double" ), 1));
- EXPECT_FALSE( reflection->GetRepeatedBool (message, F("repeated_bool" ), 1));
+ EXPECT_EQ(false, reflection->GetRepeatedBool (message, F("repeated_bool" ), 1));
EXPECT_EQ("315", reflection->GetRepeatedString(message, F("repeated_string" ), 1));
EXPECT_EQ("316", reflection->GetRepeatedString(message, F("repeated_bytes" ), 1));
@@ -2640,7 +2640,7 @@ void TestUtil::ReflectionTester::ExpectAllFieldsSetViaReflection3(
EXPECT_EQ(410 , reflection->GetInt64 (message, F("default_sfixed64")));
EXPECT_EQ(411 , reflection->GetFloat (message, F("default_float" )));
EXPECT_EQ(412 , reflection->GetDouble(message, F("default_double" )));
- EXPECT_FALSE( reflection->GetBool (message, F("default_bool" )));
+ EXPECT_EQ(false, reflection->GetBool (message, F("default_bool" )));
EXPECT_EQ("415", reflection->GetString(message, F("default_string" )));
EXPECT_EQ("416", reflection->GetString(message, F("default_bytes" )));
@@ -2690,7 +2690,7 @@ void TestUtil::ReflectionTester::ExpectPackedFieldsSetViaReflection(
EXPECT_EQ(610 , reflection->GetRepeatedInt64 (message, F("packed_sfixed64"), 0));
EXPECT_EQ(611 , reflection->GetRepeatedFloat (message, F("packed_float" ), 0));
EXPECT_EQ(612 , reflection->GetRepeatedDouble(message, F("packed_double" ), 0));
- EXPECT_TRUE( reflection->GetRepeatedBool (message, F("packed_bool" ), 0));
+ EXPECT_EQ(true , reflection->GetRepeatedBool (message, F("packed_bool" ), 0));
EXPECT_EQ(foreign_bar_,
reflection->GetRepeatedEnum(message, F("packed_enum"), 0));
@@ -2706,7 +2706,7 @@ void TestUtil::ReflectionTester::ExpectPackedFieldsSetViaReflection(
EXPECT_EQ(710 , reflection->GetRepeatedInt64 (message, F("packed_sfixed64"), 1));
EXPECT_EQ(711 , reflection->GetRepeatedFloat (message, F("packed_float" ), 1));
EXPECT_EQ(712 , reflection->GetRepeatedDouble(message, F("packed_double" ), 1));
- EXPECT_FALSE( reflection->GetRepeatedBool (message, F("packed_bool" ), 1));
+ EXPECT_EQ(false, reflection->GetRepeatedBool (message, F("packed_bool" ), 1));
EXPECT_EQ(foreign_baz_,
reflection->GetRepeatedEnum(message, F("packed_enum"), 1));
}
@@ -2763,7 +2763,7 @@ void TestUtil::ReflectionTester::ExpectClearViaReflection(
EXPECT_EQ(0 , reflection->GetInt64 (message, F("optional_sfixed64")));
EXPECT_EQ(0 , reflection->GetFloat (message, F("optional_float" )));
EXPECT_EQ(0 , reflection->GetDouble(message, F("optional_double" )));
- EXPECT_FALSE( reflection->GetBool (message, F("optional_bool" )));
+ EXPECT_EQ(false, reflection->GetBool (message, F("optional_bool" )));
EXPECT_EQ("" , reflection->GetString(message, F("optional_string" )));
EXPECT_EQ("" , reflection->GetString(message, F("optional_bytes" )));
@@ -2867,7 +2867,7 @@ void TestUtil::ReflectionTester::ExpectClearViaReflection(
EXPECT_EQ(-50 , reflection->GetInt64 (message, F("default_sfixed64")));
EXPECT_EQ( 51.5 , reflection->GetFloat (message, F("default_float" )));
EXPECT_EQ( 52e3 , reflection->GetDouble(message, F("default_double" )));
- EXPECT_TRUE( reflection->GetBool (message, F("default_bool" )));
+ EXPECT_EQ(true , reflection->GetBool (message, F("default_bool" )));
EXPECT_EQ("hello", reflection->GetString(message, F("default_string" )));
EXPECT_EQ("world", reflection->GetString(message, F("default_bytes" )));
diff --git a/chromium/third_party/protobuf/src/google/protobuf/testing/googletest.h b/chromium/third_party/protobuf/src/google/protobuf/testing/googletest.h
index 003be106072..6b17ae4ff82 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/testing/googletest.h
+++ b/chromium/third_party/protobuf/src/google/protobuf/testing/googletest.h
@@ -38,11 +38,6 @@
#include <vector>
#include <google/protobuf/stubs/common.h>
-// Disable death tests if we use exceptions in CHECK().
-#if !PROTOBUF_USE_EXCEPTIONS && defined(GTEST_HAS_DEATH_TEST)
-#define PROTOBUF_HAS_DEATH_TEST
-#endif
-
namespace google {
namespace protobuf {
diff --git a/chromium/third_party/protobuf/src/google/protobuf/text_format.cc b/chromium/third_party/protobuf/src/google/protobuf/text_format.cc
index cabb99ed9ce..1ee3df50ded 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/text_format.cc
+++ b/chromium/third_party/protobuf/src/google/protobuf/text_format.cc
@@ -434,8 +434,8 @@ class TextFormat::Parser::ParserImpl {
// If a parse info tree exists, add the location for the parsed
// field.
if (parse_info_tree_ != NULL) {
- RecordLocation(parse_info_tree_, field,
- ParseLocation(start_line, start_column));
+ parse_info_tree_->RecordLocation(field,
+ ParseLocation(start_line, start_column));
}
return true;
@@ -483,7 +483,7 @@ class TextFormat::Parser::ParserImpl {
// for the nested message.
ParseInfoTree* parent = parse_info_tree_;
if (parent != NULL) {
- parse_info_tree_ = CreateNested(parent, field);
+ parse_info_tree_ = parent->CreateNested(field);
}
string delimeter;
diff --git a/chromium/third_party/protobuf/src/google/protobuf/text_format.h b/chromium/third_party/protobuf/src/google/protobuf/text_format.h
index 01f3ffb0865..0974139708a 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/text_format.h
+++ b/chromium/third_party/protobuf/src/google/protobuf/text_format.h
@@ -339,30 +339,9 @@ class LIBPROTOBUF_EXPORT TextFormat {
};
private:
- // Hack: ParseInfoTree declares TextFormat as a friend which should extend
- // the friendship to TextFormat::Parser::ParserImpl, but unfortunately some
- // old compilers (e.g. GCC 3.4.6) don't implement this correctly. We provide
- // helpers for ParserImpl to call methods of ParseInfoTree.
- static inline void RecordLocation(ParseInfoTree* info_tree,
- const FieldDescriptor* field,
- ParseLocation location);
- static inline ParseInfoTree* CreateNested(ParseInfoTree* info_tree,
- const FieldDescriptor* field);
-
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TextFormat);
};
-inline void TextFormat::RecordLocation(ParseInfoTree* info_tree,
- const FieldDescriptor* field,
- ParseLocation location) {
- info_tree->RecordLocation(field, location);
-}
-
-inline TextFormat::ParseInfoTree* TextFormat::CreateNested(
- ParseInfoTree* info_tree, const FieldDescriptor* field) {
- return info_tree->CreateNested(field);
-}
-
} // namespace protobuf
} // namespace google
diff --git a/chromium/third_party/protobuf/src/google/protobuf/text_format_unittest.cc b/chromium/third_party/protobuf/src/google/protobuf/text_format_unittest.cc
index 304fb844048..353a5e49b8e 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/text_format_unittest.cc
+++ b/chromium/third_party/protobuf/src/google/protobuf/text_format_unittest.cc
@@ -858,12 +858,6 @@ TEST_F(TextFormatParserTest, ParseFieldValueFromString) {
EXPECT_EQ(value, message->optional_##name()); \
EXPECT_TRUE(message->has_optional_##name());
-#define EXPECT_BOOL_FIELD(name, value, valuestring) \
- EXPECT_TRUE(TextFormat::ParseFieldValueFromString( \
- valuestring, d->FindFieldByName("optional_" #name), message.get())); \
- EXPECT_TRUE(message->optional_##name() == value); \
- EXPECT_TRUE(message->has_optional_##name());
-
#define EXPECT_FLOAT_FIELD(name, value, valuestring) \
EXPECT_TRUE(TextFormat::ParseFieldValueFromString( \
valuestring, d->FindFieldByName("optional_" #name), message.get())); \
@@ -921,12 +915,12 @@ TEST_F(TextFormatParserTest, ParseFieldValueFromString) {
EXPECT_INVALID(fixed64, "1,2");
// bool
- EXPECT_BOOL_FIELD(bool, true, "true");
- EXPECT_BOOL_FIELD(bool, false, "false");
- EXPECT_BOOL_FIELD(bool, true, "1");
- EXPECT_BOOL_FIELD(bool, true, "t");
- EXPECT_BOOL_FIELD(bool, false, "0");
- EXPECT_BOOL_FIELD(bool, false, "f");
+ EXPECT_FIELD(bool, true, "true");
+ EXPECT_FIELD(bool, false, "false");
+ EXPECT_FIELD(bool, true, "1");
+ EXPECT_FIELD(bool, true, "t");
+ EXPECT_FIELD(bool, false, "0");
+ EXPECT_FIELD(bool, false, "f");
EXPECT_INVALID(bool, "2");
EXPECT_INVALID(bool, "-0");
EXPECT_INVALID(bool, "on");
@@ -968,7 +962,6 @@ TEST_F(TextFormatParserTest, ParseFieldValueFromString) {
EXPECT_INVALID(nested_message, "any");
#undef EXPECT_FIELD
-#undef EXPECT_BOOL_FIELD
#undef EXPECT_FLOAT_FIELD
#undef EXPECT_DOUBLE_FIELD
#undef EXPECT_INVALID
diff --git a/chromium/third_party/protobuf/src/google/protobuf/unittest.proto b/chromium/third_party/protobuf/src/google/protobuf/unittest.proto
index 6eb2d86f51f..0305be6534f 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/unittest.proto
+++ b/chromium/third_party/protobuf/src/google/protobuf/unittest.proto
@@ -434,7 +434,6 @@ message TestNestedMessageHasBits {
// Test an enum that has multiple values with the same number.
enum TestEnumWithDupValue {
- option allow_alias = true;
FOO1 = 1;
BAR1 = 2;
BAZ = 3;
diff --git a/chromium/third_party/protobuf/src/google/protobuf/wire_format.h b/chromium/third_party/protobuf/src/google/protobuf/wire_format.h
index fc60f51bf6d..8a89881bec0 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/wire_format.h
+++ b/chromium/third_party/protobuf/src/google/protobuf/wire_format.h
@@ -230,9 +230,6 @@ inline void WireFormat::VerifyUTF8String(const char* data, int size,
WireFormat::Operation op) {
#ifdef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
WireFormat::VerifyUTF8StringFallback(data, size, op);
-#else
- // Avoid the compiler warning about unsued variables.
- (void)data; (void)size; (void)op;
#endif
}
diff --git a/chromium/third_party/protobuf/src/google/protobuf/wire_format_lite_inl.h b/chromium/third_party/protobuf/src/google/protobuf/wire_format_lite_inl.h
index 641cc92f65b..0f97386d8ac 100644
--- a/chromium/third_party/protobuf/src/google/protobuf/wire_format_lite_inl.h
+++ b/chromium/third_party/protobuf/src/google/protobuf/wire_format_lite_inl.h
@@ -299,12 +299,12 @@ inline bool WireFormatLite::ReadRepeatedPrimitive< \
tag_size, tag, input, values); \
}
-READ_REPEATED_FIXED_SIZE_PRIMITIVE(uint32, TYPE_FIXED32)
-READ_REPEATED_FIXED_SIZE_PRIMITIVE(uint64, TYPE_FIXED64)
-READ_REPEATED_FIXED_SIZE_PRIMITIVE(int32, TYPE_SFIXED32)
-READ_REPEATED_FIXED_SIZE_PRIMITIVE(int64, TYPE_SFIXED64)
-READ_REPEATED_FIXED_SIZE_PRIMITIVE(float, TYPE_FLOAT)
-READ_REPEATED_FIXED_SIZE_PRIMITIVE(double, TYPE_DOUBLE)
+READ_REPEATED_FIXED_SIZE_PRIMITIVE(uint32, TYPE_FIXED32);
+READ_REPEATED_FIXED_SIZE_PRIMITIVE(uint64, TYPE_FIXED64);
+READ_REPEATED_FIXED_SIZE_PRIMITIVE(int32, TYPE_SFIXED32);
+READ_REPEATED_FIXED_SIZE_PRIMITIVE(int64, TYPE_SFIXED64);
+READ_REPEATED_FIXED_SIZE_PRIMITIVE(float, TYPE_FLOAT);
+READ_REPEATED_FIXED_SIZE_PRIMITIVE(double, TYPE_DOUBLE);
#undef READ_REPEATED_FIXED_SIZE_PRIMITIVE
diff --git a/chromium/third_party/protobuf/vsprojects/extract_includes.bat b/chromium/third_party/protobuf/vsprojects/extract_includes.bat
index a92d114bdf5..4dcb4e1446e 100755
--- a/chromium/third_party/protobuf/vsprojects/extract_includes.bat
+++ b/chromium/third_party/protobuf/vsprojects/extract_includes.bat
@@ -12,8 +12,6 @@ copy ..\src\google\protobuf\stubs\atomicops_internals_x86_msvc.h include\google\
copy ..\src\google\protobuf\stubs\common.h include\google\protobuf\stubs\common.h
copy ..\src\google\protobuf\stubs\once.h include\google\protobuf\stubs\once.h
copy ..\src\google\protobuf\stubs\platform_macros.h include\google\protobuf\stubs\platform_macros.h
-copy ..\src\google\protobuf\stubs\template_util.h include\google\protobuf\stubs\template_util.h
-copy ..\src\google\protobuf\stubs\type_traits.h include\google\protobuf\stubs\type_traits.h
copy ..\src\google\protobuf\descriptor.h include\google\protobuf\descriptor.h
copy ..\src\google\protobuf\descriptor.pb.h include\google\protobuf\descriptor.pb.h
copy ..\src\google\protobuf\descriptor_database.h include\google\protobuf\descriptor_database.h
diff --git a/chromium/third_party/skia/gyp/gmslides.gypi b/chromium/third_party/skia/gyp/gmslides.gypi
index bc0fc65415b..87c46e776fd 100644
--- a/chromium/third_party/skia/gyp/gmslides.gypi
+++ b/chromium/third_party/skia/gyp/gmslides.gypi
@@ -19,7 +19,6 @@
'../gm/blurs.cpp',
'../gm/blurquickreject.cpp',
'../gm/blurrect.cpp',
- '../gm/canvasstate.cpp',
'../gm/circles.cpp',
'../gm/circularclips.cpp',
'../gm/colorfilterimagefilter.cpp',
diff --git a/chromium/third_party/skia/include/core/SkCanvas.h b/chromium/third_party/skia/include/core/SkCanvas.h
index a368182cb4d..b4853f7f336 100644
--- a/chromium/third_party/skia/include/core/SkCanvas.h
+++ b/chromium/third_party/skia/include/core/SkCanvas.h
@@ -239,12 +239,6 @@ public:
operate on this copy.
When the balancing call to restore() is made, the previous matrix, clip,
and drawFilter are restored.
- @param flags The flags govern what portion of the Matrix/Clip/drawFilter
- state the save (and matching restore) effect. For example,
- if only kMatrix is specified, then only the matrix state
- will be pushed and popped. Likewise for the clip if kClip
- is specified. However, the drawFilter is always affected
- by calls to save/restore.
@return The value to pass to restoreToCount() to balance this save()
*/
virtual int save(SaveFlags flags = kMatrixClip_SaveFlag);
diff --git a/chromium/third_party/skia/src/core/SkPictureRecord.cpp b/chromium/third_party/skia/src/core/SkPictureRecord.cpp
index 2c2d334caf0..915736373d0 100644
--- a/chromium/third_party/skia/src/core/SkPictureRecord.cpp
+++ b/chromium/third_party/skia/src/core/SkPictureRecord.cpp
@@ -24,7 +24,6 @@ enum {
// A lot of basic types get stored as a uint32_t: bools, ints, paint indices, etc.
static int const kUInt32Size = 4;
-static const uint32_t kSaveSize = 2 * kUInt32Size;
static const uint32_t kSaveLayerNoBoundsSize = 4 * kUInt32Size;
static const uint32_t kSaveLayerWithBoundsSize = 4 * kUInt32Size + sizeof(SkRect);
@@ -149,7 +148,7 @@ int SkPictureRecord::save(SaveFlags flags) {
fRestoreOffsetStack.push(-(int32_t)fWriter.size());
// op + flags
- uint32_t size = kSaveSize;
+ uint32_t size = 2 * kUInt32Size;
uint32_t initialOffset = this->addDraw(SAVE, &size);
addInt(flags);
@@ -480,16 +479,6 @@ static bool collapse_save_clip_restore(SkWriter32* writer, int32_t offset,
return false;
}
SkASSERT(SAVE == op);
- SkASSERT(kSaveSize == opSize);
-
- // get the save flag (last 4-bytes of the space allocated for the opSize)
- SkCanvas::SaveFlags saveFlags = (SkCanvas::SaveFlags) *writer->peek32(offset+4);
- if (SkCanvas::kMatrixClip_SaveFlag != saveFlags) {
- // This function's optimization is only correct for kMatrixClip style saves.
- // TODO: set checkMatrix & checkClip booleans here and then check for the
- // offending operations in the following loop.
- return false;
- }
// Walk forward until we get back to either a draw-verb (abort) or we hit
// our restore (success).
diff --git a/chromium/third_party/skia/src/core/SkTypefaceCache.cpp b/chromium/third_party/skia/src/core/SkTypefaceCache.cpp
index f864e1c9dc5..b75b2a9af95 100644
--- a/chromium/third_party/skia/src/core/SkTypefaceCache.cpp
+++ b/chromium/third_party/skia/src/core/SkTypefaceCache.cpp
@@ -13,21 +13,6 @@
#define TYPEFACE_CACHE_LIMIT 1024
-SkTypefaceCache::SkTypefaceCache() {}
-
-SkTypefaceCache::~SkTypefaceCache() {
- const Rec* curr = fArray.begin();
- const Rec* stop = fArray.end();
- while (curr < stop) {
- if (curr->fStrong) {
- curr->fFace->unref();
- } else {
- curr->fFace->weak_unref();
- }
- curr += 1;
- }
-}
-
void SkTypefaceCache::add(SkTypeface* face,
SkTypeface::Style requestedStyle,
bool strong) {
diff --git a/chromium/third_party/skia/src/core/SkTypefaceCache.h b/chromium/third_party/skia/src/core/SkTypefaceCache.h
index ae37ab76ec4..b6cab8163fa 100644
--- a/chromium/third_party/skia/src/core/SkTypefaceCache.h
+++ b/chromium/third_party/skia/src/core/SkTypefaceCache.h
@@ -23,9 +23,6 @@
class SkTypefaceCache {
public:
- SkTypefaceCache();
- ~SkTypefaceCache();
-
/**
* Callback for FindByProc. Returns true if the given typeface is a match
* for the given context. The passed typeface is owned by the cache and is
@@ -34,12 +31,20 @@ public:
typedef bool (*FindProc)(SkTypeface*, SkTypeface::Style, void* context);
/**
+ * Helper: returns a unique fontID to pass to the constructor of
+ * your subclass of SkTypeface
+ */
+ static SkFontID NewFontID();
+
+ /**
* Add a typeface to the cache. This ref()s the typeface, so that the
* cache is also an owner. Later, if we need to purge the cache, typefaces
* whose refcnt is 1 (meaning only the cache is an owner) will be
* unref()ed.
*/
- void add(SkTypeface*, SkTypeface::Style requested, bool strong = true);
+ static void Add(SkTypeface*,
+ SkTypeface::Style requested,
+ bool strong = true);
/**
* Search the cache for a typeface with the specified fontID (uniqueID).
@@ -47,14 +52,14 @@ public:
* is found, return NULL. The reference count is unmodified as it is
* assumed that the stack will contain a ref to the typeface.
*/
- SkTypeface* findByID(SkFontID findID) const;
+ static SkTypeface* FindByID(SkFontID fontID);
/**
* Iterate through the cache, calling proc(typeface, ctx) with each
* typeface. If proc returns true, then we return that typeface (this
* ref()s the typeface). If it never returns true, we return NULL.
*/
- SkTypeface* findByProcAndRef(FindProc proc, void* ctx) const;
+ static SkTypeface* FindByProcAndRef(FindProc proc, void* ctx);
/**
* This will unref all of the typefaces in the cache for which the cache
@@ -62,21 +67,6 @@ public:
* This function is exposed for clients that explicitly want to purge the
* cache (e.g. to look for leaks).
*/
- void purgeAll();
-
- /**
- * Helper: returns a unique fontID to pass to the constructor of
- * your subclass of SkTypeface
- */
- static SkFontID NewFontID();
-
- // These are static wrappers around a global instance of a cache.
-
- static void Add(SkTypeface*,
- SkTypeface::Style requested,
- bool strong = true);
- static SkTypeface* FindByID(SkFontID fontID);
- static SkTypeface* FindByProcAndRef(FindProc proc, void* ctx);
static void PurgeAll();
/**
@@ -87,7 +77,11 @@ public:
private:
static SkTypefaceCache& Get();
+ void add(SkTypeface*, SkTypeface::Style requested, bool strong = true);
+ SkTypeface* findByID(SkFontID findID) const;
+ SkTypeface* findByProcAndRef(FindProc proc, void* ctx) const;
void purge(int count);
+ void purgeAll();
struct Rec {
SkTypeface* fFace;
diff --git a/chromium/third_party/skia/src/ports/SkFontHost_win.cpp b/chromium/third_party/skia/src/ports/SkFontHost_win.cpp
index 017c1eab765..708c66fdf72 100755
--- a/chromium/third_party/skia/src/ports/SkFontHost_win.cpp
+++ b/chromium/third_party/skia/src/ports/SkFontHost_win.cpp
@@ -357,6 +357,15 @@ void SkLOGFONTFromTypeface(const SkTypeface* face, LOGFONT* lf) {
}
}
+static void GetLogFontByID(SkFontID fontID, LOGFONT* lf) {
+ LogFontTypeface* face = static_cast<LogFontTypeface*>(SkTypefaceCache::FindByID(fontID));
+ if (face) {
+ *lf = face->fLogFont;
+ } else {
+ sk_bzero(lf, sizeof(LOGFONT));
+ }
+}
+
// Construct Glyph to Unicode table.
// Unicode code points that require conjugate pairs in utf16 are not
// supported.
diff --git a/chromium/third_party/skia/src/ports/SkFontHost_win_dw.cpp b/chromium/third_party/skia/src/ports/SkFontHost_win_dw.cpp
index e1685e63b07..5df90b47f38 100644
--- a/chromium/third_party/skia/src/ports/SkFontHost_win_dw.cpp
+++ b/chromium/third_party/skia/src/ports/SkFontHost_win_dw.cpp
@@ -725,6 +725,9 @@ void SkDWriteFontFromTypeface(const SkTypeface* face, IDWriteFont** font) {
*font = SkRefComPtr(static_cast<const DWriteFontTypeface*>(face)->fDWriteFont.get());
}
}
+static DWriteFontTypeface* GetDWriteFontByID(SkFontID fontID) {
+ return static_cast<DWriteFontTypeface*>(SkTypefaceCache::FindByID(fontID));
+}
SkScalerContext_DW::SkScalerContext_DW(DWriteFontTypeface* typeface,
const SkDescriptor* desc)