From 34bd937aea27fabbfac964b80bc0ab50d677277e Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Thu, 1 Oct 2009 11:45:01 +0200 Subject: Updated WebKit from /home/joce/dev/qtwebkit/ to qtwebkit-4.6-snapshot-30092009-2 ( 284ebfc0df42d408d99838507c1ed335fba9bcf0 ) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes in WebKit/qt since the last update: ++ b/WebKit/qt/ChangeLog 2009-09-29 Andras Becsi Reviewed by Tor Arne Vestbø. [Qt] Default font size reconciliation to 16px/13px to match other platform's de-facto standard. This fixes https://bugs.webkit.org/show_bug.cgi?id=19674. * Api/qwebsettings.cpp: (QWebSettings::QWebSettings): 2009-09-29 Jedrzej Nowacki Reviewed by Simon Hausmann. https://bugs.webkit.org/show_bug.cgi?id=29844 QWebPage dependency autotest fix. Fix for database() autotest. All opened databases should be removed at end of test. * tests/qwebpage/tst_qwebpage.cpp: (tst_QWebPage::database): 2009-09-29 Jedrzej Nowacki Reviewed by Simon Hausmann. Some QWebHistory and QWebPage autotest crash fixes. Some checking for m_mainFrame were added. MainFrame should be created at some point of QWebPage live cicle. https://bugs.webkit.org/show_bug.cgi?id=29803 * Api/qwebpage.cpp: (QWebPage::~QWebPage): (QWebPage::currentFrame): (QWebPage::history): (QWebPage::selectedText): (QWebPage::updatePositionDependentActions): * tests/qwebpage/tst_qwebpage.cpp: (tst_QWebPage::crashTests_LazyInitializationOfMainFrame): 2009-09-29 Kenneth Rohde Christiansen Reviewed by Simon Hausmann and Tor Arne Vestbø. Implement QWebPage Extension for error pages, incl. an example on how to use it in QtLauncher. Correct our use of ResourceError. * Api/qwebpage.h: (ExtensionOption::): (ExtensionOption::ErrorPageExtensionReturn::ErrorPageExtensionReturn): * QtLauncher/main.cpp: (WebPage::supportsExtension): (MainWindow::MainWindow): (MainWindow::selectElements): (WebPage::extension): * WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::cancelledError): (WebCore::FrameLoaderClientQt::blockedError): (WebCore::FrameLoaderClientQt::cannotShowURLError): (WebCore::FrameLoaderClientQt::interruptForPolicyChangeError): (WebCore::FrameLoaderClientQt::cannotShowMIMETypeError): (WebCore::FrameLoaderClientQt::fileDoesNotExistError): (WebCore::FrameLoaderClientQt::callErrorPageExtension): (WebCore::FrameLoaderClientQt::dispatchDidFailProvisionalLoad): (WebCore::FrameLoaderClientQt::dispatchDidFailLoad): * WebCoreSupport/FrameLoaderClientQt.h: --- .../JavaScriptCore/API/JSCallbackConstructor.cpp | 2 +- .../JavaScriptCore/API/JSCallbackConstructor.h | 2 +- .../webkit/JavaScriptCore/API/JSCallbackObject.h | 2 +- .../JavaScriptCore/API/JSCallbackObjectFunctions.h | 2 +- src/3rdparty/webkit/JavaScriptCore/ChangeLog | 428 ++++++++ .../webkit/JavaScriptCore/bytecode/CodeBlock.h | 4 +- .../webkit/JavaScriptCore/bytecode/SamplingTool.h | 2 +- .../webkit/JavaScriptCore/debugger/Debugger.cpp | 6 +- .../JavaScriptCore/debugger/DebuggerCallFrame.cpp | 6 +- .../JavaScriptCore/interpreter/Interpreter.cpp | 55 +- .../JavaScriptCore/interpreter/Interpreter.h | 10 +- src/3rdparty/webkit/JavaScriptCore/jit/JIT.h | 8 +- .../webkit/JavaScriptCore/jit/JITArithmetic.cpp | 160 +-- .../webkit/JavaScriptCore/jit/JITOpcodes.cpp | 30 +- src/3rdparty/webkit/JavaScriptCore/jsc.cpp | 21 +- .../JavaScriptCore/runtime/ArrayConstructor.cpp | 2 +- .../JavaScriptCore/runtime/ArrayConstructor.h | 2 +- .../JavaScriptCore/runtime/ArrayPrototype.cpp | 2 +- .../webkit/JavaScriptCore/runtime/ArrayPrototype.h | 2 +- .../JavaScriptCore/runtime/BooleanConstructor.cpp | 2 +- .../JavaScriptCore/runtime/BooleanConstructor.h | 2 +- .../JavaScriptCore/runtime/BooleanObject.cpp | 2 +- .../webkit/JavaScriptCore/runtime/BooleanObject.h | 2 +- .../JavaScriptCore/runtime/BooleanPrototype.cpp | 2 +- .../JavaScriptCore/runtime/BooleanPrototype.h | 2 +- .../webkit/JavaScriptCore/runtime/Collector.cpp | 8 +- .../webkit/JavaScriptCore/runtime/Completion.cpp | 10 +- .../JavaScriptCore/runtime/DateConstructor.cpp | 2 +- .../JavaScriptCore/runtime/DateConstructor.h | 2 +- .../webkit/JavaScriptCore/runtime/DateInstance.cpp | 2 +- .../webkit/JavaScriptCore/runtime/DateInstance.h | 2 +- .../JavaScriptCore/runtime/DatePrototype.cpp | 2 +- .../webkit/JavaScriptCore/runtime/DatePrototype.h | 2 +- .../JavaScriptCore/runtime/ErrorConstructor.cpp | 2 +- .../JavaScriptCore/runtime/ErrorConstructor.h | 2 +- .../JavaScriptCore/runtime/ErrorInstance.cpp | 2 +- .../webkit/JavaScriptCore/runtime/ErrorInstance.h | 2 +- .../JavaScriptCore/runtime/ErrorPrototype.cpp | 2 +- .../webkit/JavaScriptCore/runtime/ErrorPrototype.h | 2 +- .../webkit/JavaScriptCore/runtime/Executable.h | 22 +- .../JavaScriptCore/runtime/FunctionConstructor.cpp | 2 +- .../JavaScriptCore/runtime/FunctionConstructor.h | 2 +- .../JavaScriptCore/runtime/FunctionPrototype.cpp | 2 +- .../JavaScriptCore/runtime/FunctionPrototype.h | 2 +- .../JavaScriptCore/runtime/GlobalEvalFunction.cpp | 2 +- .../JavaScriptCore/runtime/GlobalEvalFunction.h | 2 +- .../JavaScriptCore/runtime/InternalFunction.cpp | 2 +- .../JavaScriptCore/runtime/InternalFunction.h | 4 +- .../webkit/JavaScriptCore/runtime/JSActivation.cpp | 2 +- .../webkit/JavaScriptCore/runtime/JSActivation.h | 4 +- .../webkit/JavaScriptCore/runtime/JSArray.cpp | 6 +- .../webkit/JavaScriptCore/runtime/JSArray.h | 6 +- .../webkit/JavaScriptCore/runtime/JSByteArray.cpp | 2 +- .../webkit/JavaScriptCore/runtime/JSByteArray.h | 2 +- .../webkit/JavaScriptCore/runtime/JSFunction.cpp | 6 +- .../webkit/JavaScriptCore/runtime/JSFunction.h | 6 +- .../webkit/JavaScriptCore/runtime/JSGlobalData.cpp | 15 + .../webkit/JavaScriptCore/runtime/JSGlobalData.h | 3 + .../JavaScriptCore/runtime/JSGlobalObject.cpp | 7 +- .../webkit/JavaScriptCore/runtime/JSGlobalObject.h | 24 +- .../runtime/JSGlobalObjectFunctions.cpp | 6 +- .../webkit/JavaScriptCore/runtime/JSONObject.h | 2 +- .../webkit/JavaScriptCore/runtime/JSObject.h | 9 +- .../JavaScriptCore/runtime/JSVariableObject.h | 2 +- .../JavaScriptCore/runtime/JSWrapperObject.h | 4 +- .../webkit/JavaScriptCore/runtime/MathObject.cpp | 2 +- .../webkit/JavaScriptCore/runtime/MathObject.h | 2 +- .../runtime/NativeErrorConstructor.cpp | 2 +- .../runtime/NativeErrorConstructor.h | 2 +- .../runtime/NativeErrorPrototype.cpp | 2 +- .../JavaScriptCore/runtime/NativeErrorPrototype.h | 2 +- .../JavaScriptCore/runtime/NumberConstructor.cpp | 2 +- .../JavaScriptCore/runtime/NumberConstructor.h | 2 +- .../webkit/JavaScriptCore/runtime/NumberObject.cpp | 2 +- .../webkit/JavaScriptCore/runtime/NumberObject.h | 2 +- .../JavaScriptCore/runtime/NumberPrototype.cpp | 2 +- .../JavaScriptCore/runtime/NumberPrototype.h | 2 +- .../JavaScriptCore/runtime/ObjectConstructor.cpp | 2 +- .../JavaScriptCore/runtime/ObjectConstructor.h | 2 +- .../JavaScriptCore/runtime/ObjectPrototype.cpp | 2 +- .../JavaScriptCore/runtime/ObjectPrototype.h | 2 +- .../JavaScriptCore/runtime/PropertyNameArray.h | 2 +- .../JavaScriptCore/runtime/PrototypeFunction.cpp | 2 +- .../JavaScriptCore/runtime/PrototypeFunction.h | 2 +- .../JavaScriptCore/runtime/RegExpConstructor.cpp | 2 +- .../JavaScriptCore/runtime/RegExpConstructor.h | 2 +- .../webkit/JavaScriptCore/runtime/RegExpObject.cpp | 2 +- .../webkit/JavaScriptCore/runtime/RegExpObject.h | 4 +- .../JavaScriptCore/runtime/RegExpPrototype.cpp | 2 +- .../JavaScriptCore/runtime/RegExpPrototype.h | 2 +- .../JavaScriptCore/runtime/StringConstructor.cpp | 2 +- .../JavaScriptCore/runtime/StringConstructor.h | 2 +- .../webkit/JavaScriptCore/runtime/StringObject.cpp | 6 +- .../webkit/JavaScriptCore/runtime/StringObject.h | 6 +- .../StringObjectThatMasqueradesAsUndefined.h | 2 +- .../JavaScriptCore/runtime/StringPrototype.cpp | 2 +- .../JavaScriptCore/runtime/StringPrototype.h | 2 +- .../webkit/JavaScriptCore/wtf/Assertions.cpp | 4 + .../webkit/JavaScriptCore/wtf/Assertions.h | 12 + .../webkit/JavaScriptCore/wtf/PassRefPtr.h | 58 +- src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h | 6 +- src/3rdparty/webkit/JavaScriptCore/wtf/RefPtr.h | 27 + src/3rdparty/webkit/VERSION | 4 +- src/3rdparty/webkit/WebCore/ChangeLog | 1100 ++++++++++++++++++++ src/3rdparty/webkit/WebCore/WebCore.gypi | 36 +- src/3rdparty/webkit/WebCore/WebCore.pro | 28 +- .../WebCore/bindings/js/DOMObjectWithSVGContext.h | 2 +- .../WebCore/bindings/js/JSAbstractWorkerCustom.cpp | 4 +- .../bindings/js/JSDOMApplicationCacheCustom.cpp | 4 +- .../webkit/WebCore/bindings/js/JSDOMBinding.cpp | 4 +- .../webkit/WebCore/bindings/js/JSDOMBinding.h | 12 +- .../WebCore/bindings/js/JSDOMGlobalObject.cpp | 14 +- .../webkit/WebCore/bindings/js/JSDOMGlobalObject.h | 10 +- .../webkit/WebCore/bindings/js/JSDOMWindowBase.cpp | 2 +- .../webkit/WebCore/bindings/js/JSDOMWindowBase.h | 2 +- .../WebCore/bindings/js/JSDOMWindowCustom.cpp | 12 +- .../webkit/WebCore/bindings/js/JSEventListener.cpp | 26 +- .../webkit/WebCore/bindings/js/JSEventListener.h | 13 +- .../WebCore/bindings/js/JSEventSourceCustom.cpp | 4 +- .../WebCore/bindings/js/JSHTMLAllCollection.h | 2 +- .../bindings/js/JSInspectedObjectWrapper.cpp | 2 +- .../WebCore/bindings/js/JSInspectedObjectWrapper.h | 2 +- .../bindings/js/JSInspectorCallbackWrapper.cpp | 2 +- .../bindings/js/JSInspectorCallbackWrapper.h | 2 +- .../WebCore/bindings/js/JSLazyEventListener.cpp | 49 +- .../WebCore/bindings/js/JSLazyEventListener.h | 11 +- .../WebCore/bindings/js/JSMessagePortCustom.cpp | 4 +- .../webkit/WebCore/bindings/js/JSNodeCustom.cpp | 4 +- .../bindings/js/JSQuarantinedObjectWrapper.cpp | 2 +- .../bindings/js/JSQuarantinedObjectWrapper.h | 2 +- .../bindings/js/JSSVGElementInstanceCustom.cpp | 4 +- .../WebCore/bindings/js/JSWorkerContextBase.cpp | 2 +- .../WebCore/bindings/js/JSWorkerContextBase.h | 2 +- .../WebCore/bindings/js/JSWorkerContextCustom.cpp | 4 +- .../WebCore/bindings/js/JSXMLHttpRequestCustom.cpp | 4 +- .../bindings/js/JSXMLHttpRequestUploadCustom.cpp | 4 +- .../WebCore/bindings/js/ScriptEventListener.cpp | 57 +- .../WebCore/bindings/js/ScriptEventListener.h | 3 + .../WebCore/bindings/scripts/CodeGeneratorCOM.pm | 3 +- .../WebCore/bindings/scripts/CodeGeneratorJS.pm | 22 +- .../WebCore/bindings/scripts/CodeGeneratorV8.pm | 8 +- .../webkit/WebCore/bridge/runtime_object.cpp | 2 +- .../webkit/WebCore/bridge/runtime_object.h | 2 +- src/3rdparty/webkit/WebCore/dom/Document.cpp | 19 +- src/3rdparty/webkit/WebCore/dom/Document.h | 13 +- src/3rdparty/webkit/WebCore/dom/EventListener.h | 7 +- src/3rdparty/webkit/WebCore/dom/EventListener.idl | 2 +- src/3rdparty/webkit/WebCore/dom/EventTarget.cpp | 2 +- src/3rdparty/webkit/WebCore/dom/Node.cpp | 25 +- src/3rdparty/webkit/WebCore/dom/Node.h | 3 + src/3rdparty/webkit/WebCore/dom/TransformSource.h | 51 + .../webkit/WebCore/dom/TransformSourceLibxslt.cpp | 43 + .../webkit/WebCore/dom/TransformSourceQt.cpp | 34 + .../webkit/WebCore/dom/XMLTokenizerLibxml2.cpp | 4 +- src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp | 49 +- .../WebCore/editing/BreakBlockquoteCommand.cpp | 9 + .../WebCore/editing/DeleteSelectionCommand.cpp | 2 - .../webkit/WebCore/generated/JSAbstractWorker.cpp | 4 +- .../webkit/WebCore/generated/JSAbstractWorker.h | 4 +- src/3rdparty/webkit/WebCore/generated/JSAttr.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSAttr.h | 4 +- .../webkit/WebCore/generated/JSBarInfo.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSBarInfo.h | 4 +- .../webkit/WebCore/generated/JSCDATASection.cpp | 2 +- .../webkit/WebCore/generated/JSCDATASection.h | 4 +- .../webkit/WebCore/generated/JSCSSCharsetRule.cpp | 2 +- .../webkit/WebCore/generated/JSCSSCharsetRule.h | 4 +- .../webkit/WebCore/generated/JSCSSFontFaceRule.cpp | 2 +- .../webkit/WebCore/generated/JSCSSFontFaceRule.h | 4 +- .../webkit/WebCore/generated/JSCSSImportRule.cpp | 2 +- .../webkit/WebCore/generated/JSCSSImportRule.h | 4 +- .../webkit/WebCore/generated/JSCSSMediaRule.cpp | 2 +- .../webkit/WebCore/generated/JSCSSMediaRule.h | 4 +- .../webkit/WebCore/generated/JSCSSPageRule.cpp | 2 +- .../webkit/WebCore/generated/JSCSSPageRule.h | 4 +- .../WebCore/generated/JSCSSPrimitiveValue.cpp | 2 +- .../webkit/WebCore/generated/JSCSSPrimitiveValue.h | 4 +- .../webkit/WebCore/generated/JSCSSRule.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSCSSRule.h | 4 +- .../webkit/WebCore/generated/JSCSSRuleList.cpp | 2 +- .../webkit/WebCore/generated/JSCSSRuleList.h | 4 +- .../WebCore/generated/JSCSSStyleDeclaration.cpp | 2 +- .../WebCore/generated/JSCSSStyleDeclaration.h | 4 +- .../webkit/WebCore/generated/JSCSSStyleRule.cpp | 2 +- .../webkit/WebCore/generated/JSCSSStyleRule.h | 4 +- .../webkit/WebCore/generated/JSCSSStyleSheet.cpp | 2 +- .../webkit/WebCore/generated/JSCSSStyleSheet.h | 4 +- .../webkit/WebCore/generated/JSCSSValue.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSCSSValue.h | 4 +- .../webkit/WebCore/generated/JSCSSValueList.cpp | 2 +- .../webkit/WebCore/generated/JSCSSValueList.h | 4 +- .../generated/JSCSSVariablesDeclaration.cpp | 2 +- .../WebCore/generated/JSCSSVariablesDeclaration.h | 4 +- .../WebCore/generated/JSCSSVariablesRule.cpp | 2 +- .../webkit/WebCore/generated/JSCSSVariablesRule.h | 4 +- .../webkit/WebCore/generated/JSCanvasArray.cpp | 2 +- .../webkit/WebCore/generated/JSCanvasArray.h | 4 +- .../WebCore/generated/JSCanvasArrayBuffer.cpp | 2 +- .../webkit/WebCore/generated/JSCanvasArrayBuffer.h | 4 +- .../webkit/WebCore/generated/JSCanvasByteArray.cpp | 2 +- .../webkit/WebCore/generated/JSCanvasByteArray.h | 4 +- .../WebCore/generated/JSCanvasFloatArray.cpp | 2 +- .../webkit/WebCore/generated/JSCanvasFloatArray.h | 4 +- .../webkit/WebCore/generated/JSCanvasGradient.cpp | 2 +- .../webkit/WebCore/generated/JSCanvasGradient.h | 4 +- .../webkit/WebCore/generated/JSCanvasIntArray.cpp | 2 +- .../webkit/WebCore/generated/JSCanvasIntArray.h | 4 +- .../webkit/WebCore/generated/JSCanvasPattern.cpp | 2 +- .../webkit/WebCore/generated/JSCanvasPattern.h | 4 +- .../WebCore/generated/JSCanvasRenderingContext.cpp | 2 +- .../WebCore/generated/JSCanvasRenderingContext.h | 4 +- .../generated/JSCanvasRenderingContext2D.cpp | 2 +- .../WebCore/generated/JSCanvasRenderingContext2D.h | 4 +- .../generated/JSCanvasRenderingContext3D.cpp | 2 +- .../WebCore/generated/JSCanvasRenderingContext3D.h | 4 +- .../WebCore/generated/JSCanvasShortArray.cpp | 2 +- .../webkit/WebCore/generated/JSCanvasShortArray.h | 4 +- .../generated/JSCanvasUnsignedByteArray.cpp | 2 +- .../WebCore/generated/JSCanvasUnsignedByteArray.h | 4 +- .../WebCore/generated/JSCanvasUnsignedIntArray.cpp | 2 +- .../WebCore/generated/JSCanvasUnsignedIntArray.h | 4 +- .../generated/JSCanvasUnsignedShortArray.cpp | 2 +- .../WebCore/generated/JSCanvasUnsignedShortArray.h | 4 +- .../webkit/WebCore/generated/JSCharacterData.cpp | 2 +- .../webkit/WebCore/generated/JSCharacterData.h | 4 +- .../webkit/WebCore/generated/JSClientRect.cpp | 2 +- .../webkit/WebCore/generated/JSClientRect.h | 4 +- .../webkit/WebCore/generated/JSClientRectList.cpp | 2 +- .../webkit/WebCore/generated/JSClientRectList.h | 4 +- .../webkit/WebCore/generated/JSClipboard.cpp | 2 +- .../webkit/WebCore/generated/JSClipboard.h | 4 +- .../webkit/WebCore/generated/JSComment.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSComment.h | 4 +- .../webkit/WebCore/generated/JSConsole.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSConsole.h | 4 +- .../webkit/WebCore/generated/JSCoordinates.cpp | 2 +- .../webkit/WebCore/generated/JSCoordinates.h | 4 +- .../webkit/WebCore/generated/JSCounter.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSCounter.h | 4 +- .../WebCore/generated/JSDOMApplicationCache.cpp | 18 +- .../WebCore/generated/JSDOMApplicationCache.h | 4 +- .../WebCore/generated/JSDOMCoreException.cpp | 2 +- .../webkit/WebCore/generated/JSDOMCoreException.h | 4 +- .../WebCore/generated/JSDOMImplementation.cpp | 2 +- .../webkit/WebCore/generated/JSDOMImplementation.h | 4 +- .../webkit/WebCore/generated/JSDOMParser.cpp | 2 +- .../webkit/WebCore/generated/JSDOMParser.h | 4 +- .../webkit/WebCore/generated/JSDOMSelection.cpp | 2 +- .../webkit/WebCore/generated/JSDOMSelection.h | 4 +- .../webkit/WebCore/generated/JSDOMWindow.cpp | 158 +-- .../webkit/WebCore/generated/JSDOMWindow.h | 7 +- .../webkit/WebCore/generated/JSDataGridColumn.cpp | 2 +- .../webkit/WebCore/generated/JSDataGridColumn.h | 4 +- .../WebCore/generated/JSDataGridColumnList.cpp | 2 +- .../WebCore/generated/JSDataGridColumnList.h | 4 +- .../webkit/WebCore/generated/JSDatabase.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSDatabase.h | 4 +- .../WebCore/generated/JSDedicatedWorkerContext.cpp | 4 +- .../WebCore/generated/JSDedicatedWorkerContext.h | 4 +- .../webkit/WebCore/generated/JSDocument.cpp | 80 +- src/3rdparty/webkit/WebCore/generated/JSDocument.h | 4 +- .../WebCore/generated/JSDocumentFragment.cpp | 2 +- .../webkit/WebCore/generated/JSDocumentFragment.h | 4 +- .../webkit/WebCore/generated/JSDocumentType.cpp | 2 +- .../webkit/WebCore/generated/JSDocumentType.h | 4 +- .../webkit/WebCore/generated/JSElement.cpp | 80 +- src/3rdparty/webkit/WebCore/generated/JSElement.h | 4 +- src/3rdparty/webkit/WebCore/generated/JSEntity.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSEntity.h | 4 +- .../webkit/WebCore/generated/JSEntityReference.cpp | 2 +- .../webkit/WebCore/generated/JSEntityReference.h | 4 +- .../webkit/WebCore/generated/JSErrorEvent.cpp | 2 +- .../webkit/WebCore/generated/JSErrorEvent.h | 4 +- src/3rdparty/webkit/WebCore/generated/JSEvent.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSEvent.h | 4 +- .../webkit/WebCore/generated/JSEventException.cpp | 2 +- .../webkit/WebCore/generated/JSEventException.h | 4 +- .../webkit/WebCore/generated/JSEventSource.cpp | 8 +- .../webkit/WebCore/generated/JSEventSource.h | 4 +- src/3rdparty/webkit/WebCore/generated/JSFile.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSFile.h | 4 +- .../webkit/WebCore/generated/JSFileList.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSFileList.h | 4 +- .../webkit/WebCore/generated/JSGeolocation.cpp | 2 +- .../webkit/WebCore/generated/JSGeolocation.h | 4 +- .../webkit/WebCore/generated/JSGeoposition.cpp | 2 +- .../webkit/WebCore/generated/JSGeoposition.h | 4 +- .../WebCore/generated/JSHTMLAnchorElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLAnchorElement.h | 4 +- .../WebCore/generated/JSHTMLAppletElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLAppletElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLAreaElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLAreaElement.h | 4 +- .../WebCore/generated/JSHTMLAudioElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLAudioElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLBRElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLBRElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLBaseElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLBaseElement.h | 4 +- .../WebCore/generated/JSHTMLBaseFontElement.cpp | 2 +- .../WebCore/generated/JSHTMLBaseFontElement.h | 4 +- .../WebCore/generated/JSHTMLBlockquoteElement.cpp | 2 +- .../WebCore/generated/JSHTMLBlockquoteElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLBodyElement.cpp | 18 +- .../webkit/WebCore/generated/JSHTMLBodyElement.h | 4 +- .../WebCore/generated/JSHTMLButtonElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLButtonElement.h | 4 +- .../WebCore/generated/JSHTMLCanvasElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLCanvasElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLCollection.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLCollection.h | 4 +- .../WebCore/generated/JSHTMLDListElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLDListElement.h | 4 +- .../generated/JSHTMLDataGridCellElement.cpp | 2 +- .../WebCore/generated/JSHTMLDataGridCellElement.h | 4 +- .../WebCore/generated/JSHTMLDataGridColElement.cpp | 2 +- .../WebCore/generated/JSHTMLDataGridColElement.h | 4 +- .../WebCore/generated/JSHTMLDataGridElement.cpp | 2 +- .../WebCore/generated/JSHTMLDataGridElement.h | 4 +- .../WebCore/generated/JSHTMLDataGridRowElement.cpp | 2 +- .../WebCore/generated/JSHTMLDataGridRowElement.h | 4 +- .../WebCore/generated/JSHTMLDataListElement.cpp | 2 +- .../WebCore/generated/JSHTMLDataListElement.h | 4 +- .../WebCore/generated/JSHTMLDirectoryElement.cpp | 2 +- .../WebCore/generated/JSHTMLDirectoryElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLDivElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLDivElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLDocument.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLDocument.h | 4 +- .../webkit/WebCore/generated/JSHTMLElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLElement.h | 4 +- .../WebCore/generated/JSHTMLEmbedElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLEmbedElement.h | 4 +- .../WebCore/generated/JSHTMLFieldSetElement.cpp | 2 +- .../WebCore/generated/JSHTMLFieldSetElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLFontElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLFontElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLFormElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLFormElement.h | 4 +- .../WebCore/generated/JSHTMLFrameElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLFrameElement.h | 4 +- .../WebCore/generated/JSHTMLFrameSetElement.cpp | 18 +- .../WebCore/generated/JSHTMLFrameSetElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLHRElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLHRElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLHeadElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLHeadElement.h | 4 +- .../WebCore/generated/JSHTMLHeadingElement.cpp | 2 +- .../WebCore/generated/JSHTMLHeadingElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLHtmlElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLHtmlElement.h | 4 +- .../WebCore/generated/JSHTMLIFrameElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLIFrameElement.h | 4 +- .../WebCore/generated/JSHTMLImageElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLImageElement.h | 4 +- .../WebCore/generated/JSHTMLInputElement.cpp | 6 +- .../webkit/WebCore/generated/JSHTMLInputElement.h | 4 +- .../WebCore/generated/JSHTMLIsIndexElement.cpp | 2 +- .../WebCore/generated/JSHTMLIsIndexElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLLIElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLLIElement.h | 4 +- .../WebCore/generated/JSHTMLLabelElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLLabelElement.h | 4 +- .../WebCore/generated/JSHTMLLegendElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLLegendElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLLinkElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLLinkElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLMapElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLMapElement.h | 4 +- .../WebCore/generated/JSHTMLMarqueeElement.cpp | 2 +- .../WebCore/generated/JSHTMLMarqueeElement.h | 4 +- .../WebCore/generated/JSHTMLMediaElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLMediaElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLMenuElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLMenuElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLMetaElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLMetaElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLModElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLModElement.h | 4 +- .../WebCore/generated/JSHTMLOListElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLOListElement.h | 4 +- .../WebCore/generated/JSHTMLObjectElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLObjectElement.h | 4 +- .../WebCore/generated/JSHTMLOptGroupElement.cpp | 2 +- .../WebCore/generated/JSHTMLOptGroupElement.h | 4 +- .../WebCore/generated/JSHTMLOptionElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLOptionElement.h | 4 +- .../WebCore/generated/JSHTMLOptionsCollection.cpp | 2 +- .../WebCore/generated/JSHTMLOptionsCollection.h | 4 +- .../WebCore/generated/JSHTMLParagraphElement.cpp | 2 +- .../WebCore/generated/JSHTMLParagraphElement.h | 4 +- .../WebCore/generated/JSHTMLParamElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLParamElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLPreElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLPreElement.h | 4 +- .../WebCore/generated/JSHTMLQuoteElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLQuoteElement.h | 4 +- .../WebCore/generated/JSHTMLScriptElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLScriptElement.h | 4 +- .../WebCore/generated/JSHTMLSelectElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLSelectElement.h | 4 +- .../WebCore/generated/JSHTMLSourceElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLSourceElement.h | 4 +- .../WebCore/generated/JSHTMLStyleElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLStyleElement.h | 4 +- .../generated/JSHTMLTableCaptionElement.cpp | 2 +- .../WebCore/generated/JSHTMLTableCaptionElement.h | 4 +- .../WebCore/generated/JSHTMLTableCellElement.cpp | 2 +- .../WebCore/generated/JSHTMLTableCellElement.h | 4 +- .../WebCore/generated/JSHTMLTableColElement.cpp | 2 +- .../WebCore/generated/JSHTMLTableColElement.h | 4 +- .../WebCore/generated/JSHTMLTableElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLTableElement.h | 4 +- .../WebCore/generated/JSHTMLTableRowElement.cpp | 2 +- .../WebCore/generated/JSHTMLTableRowElement.h | 4 +- .../generated/JSHTMLTableSectionElement.cpp | 2 +- .../WebCore/generated/JSHTMLTableSectionElement.h | 4 +- .../WebCore/generated/JSHTMLTextAreaElement.cpp | 6 +- .../WebCore/generated/JSHTMLTextAreaElement.h | 4 +- .../WebCore/generated/JSHTMLTitleElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLTitleElement.h | 4 +- .../WebCore/generated/JSHTMLUListElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLUListElement.h | 4 +- .../WebCore/generated/JSHTMLVideoElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLVideoElement.h | 4 +- .../webkit/WebCore/generated/JSHistory.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSHistory.h | 4 +- .../webkit/WebCore/generated/JSImageData.cpp | 2 +- .../webkit/WebCore/generated/JSImageData.h | 4 +- .../WebCore/generated/JSInspectorBackend.cpp | 75 +- .../webkit/WebCore/generated/JSInspectorBackend.h | 9 +- .../WebCore/generated/JSJavaScriptCallFrame.cpp | 2 +- .../WebCore/generated/JSJavaScriptCallFrame.h | 4 +- .../webkit/WebCore/generated/JSKeyboardEvent.cpp | 2 +- .../webkit/WebCore/generated/JSKeyboardEvent.h | 4 +- .../webkit/WebCore/generated/JSLocation.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSLocation.h | 4 +- src/3rdparty/webkit/WebCore/generated/JSMedia.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSMedia.h | 4 +- .../webkit/WebCore/generated/JSMediaError.cpp | 2 +- .../webkit/WebCore/generated/JSMediaError.h | 4 +- .../webkit/WebCore/generated/JSMediaList.cpp | 2 +- .../webkit/WebCore/generated/JSMediaList.h | 4 +- .../webkit/WebCore/generated/JSMessageChannel.cpp | 2 +- .../webkit/WebCore/generated/JSMessageChannel.h | 4 +- .../webkit/WebCore/generated/JSMessageEvent.cpp | 2 +- .../webkit/WebCore/generated/JSMessageEvent.h | 4 +- .../webkit/WebCore/generated/JSMessagePort.cpp | 4 +- .../webkit/WebCore/generated/JSMessagePort.h | 4 +- .../webkit/WebCore/generated/JSMimeType.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSMimeType.h | 4 +- .../webkit/WebCore/generated/JSMimeTypeArray.cpp | 2 +- .../webkit/WebCore/generated/JSMimeTypeArray.h | 4 +- .../webkit/WebCore/generated/JSMouseEvent.cpp | 2 +- .../webkit/WebCore/generated/JSMouseEvent.h | 4 +- .../webkit/WebCore/generated/JSMutationEvent.cpp | 2 +- .../webkit/WebCore/generated/JSMutationEvent.h | 4 +- .../webkit/WebCore/generated/JSNamedNodeMap.cpp | 2 +- .../webkit/WebCore/generated/JSNamedNodeMap.h | 4 +- .../webkit/WebCore/generated/JSNavigator.cpp | 2 +- .../webkit/WebCore/generated/JSNavigator.h | 4 +- src/3rdparty/webkit/WebCore/generated/JSNode.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSNode.h | 4 +- .../webkit/WebCore/generated/JSNodeFilter.cpp | 2 +- .../webkit/WebCore/generated/JSNodeFilter.h | 4 +- .../webkit/WebCore/generated/JSNodeIterator.cpp | 2 +- .../webkit/WebCore/generated/JSNodeIterator.h | 4 +- .../webkit/WebCore/generated/JSNodeList.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSNodeList.h | 4 +- .../webkit/WebCore/generated/JSNotation.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSNotation.h | 4 +- .../webkit/WebCore/generated/JSOverflowEvent.cpp | 2 +- .../webkit/WebCore/generated/JSOverflowEvent.h | 4 +- .../WebCore/generated/JSPageTransitionEvent.cpp | 2 +- .../WebCore/generated/JSPageTransitionEvent.h | 4 +- src/3rdparty/webkit/WebCore/generated/JSPlugin.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSPlugin.h | 4 +- .../webkit/WebCore/generated/JSPluginArray.cpp | 2 +- .../webkit/WebCore/generated/JSPluginArray.h | 4 +- .../webkit/WebCore/generated/JSPositionError.cpp | 2 +- .../webkit/WebCore/generated/JSPositionError.h | 4 +- .../WebCore/generated/JSProcessingInstruction.cpp | 2 +- .../WebCore/generated/JSProcessingInstruction.h | 4 +- .../webkit/WebCore/generated/JSProgressEvent.cpp | 2 +- .../webkit/WebCore/generated/JSProgressEvent.h | 4 +- .../webkit/WebCore/generated/JSRGBColor.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSRGBColor.h | 4 +- src/3rdparty/webkit/WebCore/generated/JSRange.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSRange.h | 4 +- .../webkit/WebCore/generated/JSRangeException.cpp | 2 +- .../webkit/WebCore/generated/JSRangeException.h | 4 +- src/3rdparty/webkit/WebCore/generated/JSRect.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSRect.h | 4 +- .../webkit/WebCore/generated/JSSQLError.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSSQLError.h | 4 +- .../webkit/WebCore/generated/JSSQLResultSet.cpp | 2 +- .../webkit/WebCore/generated/JSSQLResultSet.h | 4 +- .../WebCore/generated/JSSQLResultSetRowList.cpp | 2 +- .../WebCore/generated/JSSQLResultSetRowList.h | 4 +- .../webkit/WebCore/generated/JSSQLTransaction.cpp | 2 +- .../webkit/WebCore/generated/JSSQLTransaction.h | 4 +- .../webkit/WebCore/generated/JSSVGAElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGAElement.h | 4 +- .../WebCore/generated/JSSVGAltGlyphElement.cpp | 2 +- .../WebCore/generated/JSSVGAltGlyphElement.h | 4 +- .../webkit/WebCore/generated/JSSVGAngle.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSSVGAngle.h | 4 +- .../WebCore/generated/JSSVGAnimateColorElement.cpp | 2 +- .../WebCore/generated/JSSVGAnimateColorElement.h | 4 +- .../WebCore/generated/JSSVGAnimateElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGAnimateElement.h | 4 +- .../generated/JSSVGAnimateTransformElement.cpp | 2 +- .../generated/JSSVGAnimateTransformElement.h | 4 +- .../WebCore/generated/JSSVGAnimatedAngle.cpp | 2 +- .../webkit/WebCore/generated/JSSVGAnimatedAngle.h | 4 +- .../WebCore/generated/JSSVGAnimatedBoolean.cpp | 2 +- .../WebCore/generated/JSSVGAnimatedBoolean.h | 4 +- .../WebCore/generated/JSSVGAnimatedEnumeration.cpp | 2 +- .../WebCore/generated/JSSVGAnimatedEnumeration.h | 4 +- .../WebCore/generated/JSSVGAnimatedInteger.cpp | 2 +- .../WebCore/generated/JSSVGAnimatedInteger.h | 4 +- .../WebCore/generated/JSSVGAnimatedLength.cpp | 2 +- .../webkit/WebCore/generated/JSSVGAnimatedLength.h | 4 +- .../WebCore/generated/JSSVGAnimatedLengthList.cpp | 2 +- .../WebCore/generated/JSSVGAnimatedLengthList.h | 4 +- .../WebCore/generated/JSSVGAnimatedNumber.cpp | 2 +- .../webkit/WebCore/generated/JSSVGAnimatedNumber.h | 4 +- .../WebCore/generated/JSSVGAnimatedNumberList.cpp | 2 +- .../WebCore/generated/JSSVGAnimatedNumberList.h | 4 +- .../generated/JSSVGAnimatedPreserveAspectRatio.cpp | 2 +- .../generated/JSSVGAnimatedPreserveAspectRatio.h | 4 +- .../webkit/WebCore/generated/JSSVGAnimatedRect.cpp | 2 +- .../webkit/WebCore/generated/JSSVGAnimatedRect.h | 4 +- .../WebCore/generated/JSSVGAnimatedString.cpp | 2 +- .../webkit/WebCore/generated/JSSVGAnimatedString.h | 4 +- .../generated/JSSVGAnimatedTransformList.cpp | 2 +- .../WebCore/generated/JSSVGAnimatedTransformList.h | 4 +- .../WebCore/generated/JSSVGAnimationElement.cpp | 2 +- .../WebCore/generated/JSSVGAnimationElement.h | 4 +- .../WebCore/generated/JSSVGCircleElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGCircleElement.h | 4 +- .../WebCore/generated/JSSVGClipPathElement.cpp | 2 +- .../WebCore/generated/JSSVGClipPathElement.h | 4 +- .../webkit/WebCore/generated/JSSVGColor.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSSVGColor.h | 4 +- .../JSSVGComponentTransferFunctionElement.cpp | 2 +- .../JSSVGComponentTransferFunctionElement.h | 4 +- .../WebCore/generated/JSSVGCursorElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGCursorElement.h | 4 +- .../webkit/WebCore/generated/JSSVGDefsElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGDefsElement.h | 4 +- .../webkit/WebCore/generated/JSSVGDescElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGDescElement.h | 4 +- .../webkit/WebCore/generated/JSSVGDocument.cpp | 2 +- .../webkit/WebCore/generated/JSSVGDocument.h | 4 +- .../webkit/WebCore/generated/JSSVGElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGElement.h | 4 +- .../WebCore/generated/JSSVGElementInstance.cpp | 82 +- .../WebCore/generated/JSSVGElementInstance.h | 4 +- .../WebCore/generated/JSSVGElementInstanceList.cpp | 2 +- .../WebCore/generated/JSSVGElementInstanceList.h | 4 +- .../WebCore/generated/JSSVGEllipseElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGEllipseElement.h | 4 +- .../webkit/WebCore/generated/JSSVGException.cpp | 2 +- .../webkit/WebCore/generated/JSSVGException.h | 4 +- .../WebCore/generated/JSSVGFEBlendElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGFEBlendElement.h | 4 +- .../generated/JSSVGFEColorMatrixElement.cpp | 2 +- .../WebCore/generated/JSSVGFEColorMatrixElement.h | 4 +- .../generated/JSSVGFEComponentTransferElement.cpp | 2 +- .../generated/JSSVGFEComponentTransferElement.h | 4 +- .../WebCore/generated/JSSVGFECompositeElement.cpp | 2 +- .../WebCore/generated/JSSVGFECompositeElement.h | 4 +- .../generated/JSSVGFEDiffuseLightingElement.cpp | 2 +- .../generated/JSSVGFEDiffuseLightingElement.h | 4 +- .../generated/JSSVGFEDisplacementMapElement.cpp | 2 +- .../generated/JSSVGFEDisplacementMapElement.h | 4 +- .../generated/JSSVGFEDistantLightElement.cpp | 2 +- .../WebCore/generated/JSSVGFEDistantLightElement.h | 4 +- .../WebCore/generated/JSSVGFEFloodElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGFEFloodElement.h | 4 +- .../WebCore/generated/JSSVGFEFuncAElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGFEFuncAElement.h | 4 +- .../WebCore/generated/JSSVGFEFuncBElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGFEFuncBElement.h | 4 +- .../WebCore/generated/JSSVGFEFuncGElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGFEFuncGElement.h | 4 +- .../WebCore/generated/JSSVGFEFuncRElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGFEFuncRElement.h | 4 +- .../generated/JSSVGFEGaussianBlurElement.cpp | 2 +- .../WebCore/generated/JSSVGFEGaussianBlurElement.h | 4 +- .../WebCore/generated/JSSVGFEImageElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGFEImageElement.h | 4 +- .../WebCore/generated/JSSVGFEMergeElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGFEMergeElement.h | 4 +- .../WebCore/generated/JSSVGFEMergeNodeElement.cpp | 2 +- .../WebCore/generated/JSSVGFEMergeNodeElement.h | 4 +- .../WebCore/generated/JSSVGFEOffsetElement.cpp | 2 +- .../WebCore/generated/JSSVGFEOffsetElement.h | 4 +- .../WebCore/generated/JSSVGFEPointLightElement.cpp | 2 +- .../WebCore/generated/JSSVGFEPointLightElement.h | 4 +- .../generated/JSSVGFESpecularLightingElement.cpp | 2 +- .../generated/JSSVGFESpecularLightingElement.h | 4 +- .../WebCore/generated/JSSVGFESpotLightElement.cpp | 2 +- .../WebCore/generated/JSSVGFESpotLightElement.h | 4 +- .../WebCore/generated/JSSVGFETileElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGFETileElement.h | 4 +- .../WebCore/generated/JSSVGFETurbulenceElement.cpp | 2 +- .../WebCore/generated/JSSVGFETurbulenceElement.h | 4 +- .../WebCore/generated/JSSVGFilterElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGFilterElement.h | 4 +- .../webkit/WebCore/generated/JSSVGFontElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGFontElement.h | 4 +- .../WebCore/generated/JSSVGFontFaceElement.cpp | 2 +- .../WebCore/generated/JSSVGFontFaceElement.h | 4 +- .../generated/JSSVGFontFaceFormatElement.cpp | 2 +- .../WebCore/generated/JSSVGFontFaceFormatElement.h | 4 +- .../WebCore/generated/JSSVGFontFaceNameElement.cpp | 2 +- .../WebCore/generated/JSSVGFontFaceNameElement.h | 4 +- .../WebCore/generated/JSSVGFontFaceSrcElement.cpp | 2 +- .../WebCore/generated/JSSVGFontFaceSrcElement.h | 4 +- .../WebCore/generated/JSSVGFontFaceUriElement.cpp | 2 +- .../WebCore/generated/JSSVGFontFaceUriElement.h | 4 +- .../generated/JSSVGForeignObjectElement.cpp | 2 +- .../WebCore/generated/JSSVGForeignObjectElement.h | 4 +- .../webkit/WebCore/generated/JSSVGGElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGGElement.h | 4 +- .../webkit/WebCore/generated/JSSVGGlyphElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGGlyphElement.h | 4 +- .../WebCore/generated/JSSVGGradientElement.cpp | 2 +- .../WebCore/generated/JSSVGGradientElement.h | 4 +- .../webkit/WebCore/generated/JSSVGHKernElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGHKernElement.h | 4 +- .../webkit/WebCore/generated/JSSVGImageElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGImageElement.h | 4 +- .../webkit/WebCore/generated/JSSVGLength.cpp | 2 +- .../webkit/WebCore/generated/JSSVGLength.h | 4 +- .../webkit/WebCore/generated/JSSVGLengthList.cpp | 2 +- .../webkit/WebCore/generated/JSSVGLengthList.h | 4 +- .../webkit/WebCore/generated/JSSVGLineElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGLineElement.h | 4 +- .../generated/JSSVGLinearGradientElement.cpp | 2 +- .../WebCore/generated/JSSVGLinearGradientElement.h | 4 +- .../WebCore/generated/JSSVGMarkerElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGMarkerElement.h | 4 +- .../webkit/WebCore/generated/JSSVGMaskElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGMaskElement.h | 4 +- .../webkit/WebCore/generated/JSSVGMatrix.cpp | 2 +- .../webkit/WebCore/generated/JSSVGMatrix.h | 4 +- .../WebCore/generated/JSSVGMetadataElement.cpp | 2 +- .../WebCore/generated/JSSVGMetadataElement.h | 4 +- .../WebCore/generated/JSSVGMissingGlyphElement.cpp | 2 +- .../WebCore/generated/JSSVGMissingGlyphElement.h | 4 +- .../webkit/WebCore/generated/JSSVGNumber.cpp | 2 +- .../webkit/WebCore/generated/JSSVGNumber.h | 4 +- .../webkit/WebCore/generated/JSSVGNumberList.cpp | 2 +- .../webkit/WebCore/generated/JSSVGNumberList.h | 4 +- .../webkit/WebCore/generated/JSSVGPaint.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSSVGPaint.h | 4 +- .../webkit/WebCore/generated/JSSVGPathElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGPathElement.h | 4 +- .../webkit/WebCore/generated/JSSVGPathSeg.cpp | 2 +- .../webkit/WebCore/generated/JSSVGPathSeg.h | 4 +- .../WebCore/generated/JSSVGPathSegArcAbs.cpp | 2 +- .../webkit/WebCore/generated/JSSVGPathSegArcAbs.h | 4 +- .../WebCore/generated/JSSVGPathSegArcRel.cpp | 2 +- .../webkit/WebCore/generated/JSSVGPathSegArcRel.h | 4 +- .../WebCore/generated/JSSVGPathSegClosePath.cpp | 2 +- .../WebCore/generated/JSSVGPathSegClosePath.h | 4 +- .../generated/JSSVGPathSegCurvetoCubicAbs.cpp | 2 +- .../generated/JSSVGPathSegCurvetoCubicAbs.h | 4 +- .../generated/JSSVGPathSegCurvetoCubicRel.cpp | 2 +- .../generated/JSSVGPathSegCurvetoCubicRel.h | 4 +- .../JSSVGPathSegCurvetoCubicSmoothAbs.cpp | 2 +- .../generated/JSSVGPathSegCurvetoCubicSmoothAbs.h | 4 +- .../JSSVGPathSegCurvetoCubicSmoothRel.cpp | 2 +- .../generated/JSSVGPathSegCurvetoCubicSmoothRel.h | 4 +- .../generated/JSSVGPathSegCurvetoQuadraticAbs.cpp | 2 +- .../generated/JSSVGPathSegCurvetoQuadraticAbs.h | 4 +- .../generated/JSSVGPathSegCurvetoQuadraticRel.cpp | 2 +- .../generated/JSSVGPathSegCurvetoQuadraticRel.h | 4 +- .../JSSVGPathSegCurvetoQuadraticSmoothAbs.cpp | 2 +- .../JSSVGPathSegCurvetoQuadraticSmoothAbs.h | 4 +- .../JSSVGPathSegCurvetoQuadraticSmoothRel.cpp | 2 +- .../JSSVGPathSegCurvetoQuadraticSmoothRel.h | 4 +- .../WebCore/generated/JSSVGPathSegLinetoAbs.cpp | 2 +- .../WebCore/generated/JSSVGPathSegLinetoAbs.h | 4 +- .../generated/JSSVGPathSegLinetoHorizontalAbs.cpp | 2 +- .../generated/JSSVGPathSegLinetoHorizontalAbs.h | 4 +- .../generated/JSSVGPathSegLinetoHorizontalRel.cpp | 2 +- .../generated/JSSVGPathSegLinetoHorizontalRel.h | 4 +- .../WebCore/generated/JSSVGPathSegLinetoRel.cpp | 2 +- .../WebCore/generated/JSSVGPathSegLinetoRel.h | 4 +- .../generated/JSSVGPathSegLinetoVerticalAbs.cpp | 2 +- .../generated/JSSVGPathSegLinetoVerticalAbs.h | 4 +- .../generated/JSSVGPathSegLinetoVerticalRel.cpp | 2 +- .../generated/JSSVGPathSegLinetoVerticalRel.h | 4 +- .../webkit/WebCore/generated/JSSVGPathSegList.cpp | 2 +- .../webkit/WebCore/generated/JSSVGPathSegList.h | 4 +- .../WebCore/generated/JSSVGPathSegMovetoAbs.cpp | 2 +- .../WebCore/generated/JSSVGPathSegMovetoAbs.h | 4 +- .../WebCore/generated/JSSVGPathSegMovetoRel.cpp | 2 +- .../WebCore/generated/JSSVGPathSegMovetoRel.h | 4 +- .../WebCore/generated/JSSVGPatternElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGPatternElement.h | 4 +- .../webkit/WebCore/generated/JSSVGPoint.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSSVGPoint.h | 4 +- .../webkit/WebCore/generated/JSSVGPointList.cpp | 2 +- .../webkit/WebCore/generated/JSSVGPointList.h | 4 +- .../WebCore/generated/JSSVGPolygonElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGPolygonElement.h | 4 +- .../WebCore/generated/JSSVGPolylineElement.cpp | 2 +- .../WebCore/generated/JSSVGPolylineElement.h | 4 +- .../WebCore/generated/JSSVGPreserveAspectRatio.cpp | 2 +- .../WebCore/generated/JSSVGPreserveAspectRatio.h | 4 +- .../generated/JSSVGRadialGradientElement.cpp | 2 +- .../WebCore/generated/JSSVGRadialGradientElement.h | 4 +- .../webkit/WebCore/generated/JSSVGRect.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSSVGRect.h | 4 +- .../webkit/WebCore/generated/JSSVGRectElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGRectElement.h | 4 +- .../WebCore/generated/JSSVGRenderingIntent.cpp | 2 +- .../WebCore/generated/JSSVGRenderingIntent.h | 4 +- .../webkit/WebCore/generated/JSSVGSVGElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGSVGElement.h | 4 +- .../WebCore/generated/JSSVGScriptElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGScriptElement.h | 4 +- .../webkit/WebCore/generated/JSSVGSetElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGSetElement.h | 4 +- .../webkit/WebCore/generated/JSSVGStopElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGStopElement.h | 4 +- .../webkit/WebCore/generated/JSSVGStringList.cpp | 2 +- .../webkit/WebCore/generated/JSSVGStringList.h | 4 +- .../webkit/WebCore/generated/JSSVGStyleElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGStyleElement.h | 4 +- .../WebCore/generated/JSSVGSwitchElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGSwitchElement.h | 4 +- .../WebCore/generated/JSSVGSymbolElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGSymbolElement.h | 4 +- .../webkit/WebCore/generated/JSSVGTRefElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGTRefElement.h | 4 +- .../webkit/WebCore/generated/JSSVGTSpanElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGTSpanElement.h | 4 +- .../WebCore/generated/JSSVGTextContentElement.cpp | 2 +- .../WebCore/generated/JSSVGTextContentElement.h | 4 +- .../webkit/WebCore/generated/JSSVGTextElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGTextElement.h | 4 +- .../WebCore/generated/JSSVGTextPathElement.cpp | 2 +- .../WebCore/generated/JSSVGTextPathElement.h | 4 +- .../generated/JSSVGTextPositioningElement.cpp | 2 +- .../generated/JSSVGTextPositioningElement.h | 4 +- .../webkit/WebCore/generated/JSSVGTitleElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGTitleElement.h | 4 +- .../webkit/WebCore/generated/JSSVGTransform.cpp | 2 +- .../webkit/WebCore/generated/JSSVGTransform.h | 4 +- .../WebCore/generated/JSSVGTransformList.cpp | 2 +- .../webkit/WebCore/generated/JSSVGTransformList.h | 4 +- .../webkit/WebCore/generated/JSSVGUnitTypes.cpp | 2 +- .../webkit/WebCore/generated/JSSVGUnitTypes.h | 4 +- .../webkit/WebCore/generated/JSSVGUseElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGUseElement.h | 4 +- .../webkit/WebCore/generated/JSSVGViewElement.cpp | 2 +- .../webkit/WebCore/generated/JSSVGViewElement.h | 4 +- .../webkit/WebCore/generated/JSSVGZoomEvent.cpp | 2 +- .../webkit/WebCore/generated/JSSVGZoomEvent.h | 4 +- src/3rdparty/webkit/WebCore/generated/JSScreen.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSScreen.h | 4 +- .../webkit/WebCore/generated/JSSharedWorker.cpp | 2 +- .../webkit/WebCore/generated/JSSharedWorker.h | 4 +- .../WebCore/generated/JSSharedWorkerContext.cpp | 4 +- .../WebCore/generated/JSSharedWorkerContext.h | 4 +- .../webkit/WebCore/generated/JSStorage.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSStorage.h | 4 +- .../webkit/WebCore/generated/JSStorageEvent.cpp | 2 +- .../webkit/WebCore/generated/JSStorageEvent.h | 4 +- .../webkit/WebCore/generated/JSStyleSheet.cpp | 2 +- .../webkit/WebCore/generated/JSStyleSheet.h | 4 +- .../webkit/WebCore/generated/JSStyleSheetList.cpp | 2 +- .../webkit/WebCore/generated/JSStyleSheetList.h | 4 +- src/3rdparty/webkit/WebCore/generated/JSText.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSText.h | 4 +- .../webkit/WebCore/generated/JSTextEvent.cpp | 2 +- .../webkit/WebCore/generated/JSTextEvent.h | 4 +- .../webkit/WebCore/generated/JSTextMetrics.cpp | 2 +- .../webkit/WebCore/generated/JSTextMetrics.h | 4 +- .../webkit/WebCore/generated/JSTimeRanges.cpp | 2 +- .../webkit/WebCore/generated/JSTimeRanges.h | 4 +- .../webkit/WebCore/generated/JSTreeWalker.cpp | 2 +- .../webkit/WebCore/generated/JSTreeWalker.h | 4 +- .../webkit/WebCore/generated/JSUIEvent.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSUIEvent.h | 4 +- .../webkit/WebCore/generated/JSValidityState.cpp | 2 +- .../webkit/WebCore/generated/JSValidityState.h | 4 +- .../webkit/WebCore/generated/JSVoidCallback.cpp | 2 +- .../webkit/WebCore/generated/JSVoidCallback.h | 4 +- .../WebCore/generated/JSWebKitAnimationEvent.cpp | 2 +- .../WebCore/generated/JSWebKitAnimationEvent.h | 4 +- .../WebCore/generated/JSWebKitCSSKeyframeRule.cpp | 2 +- .../WebCore/generated/JSWebKitCSSKeyframeRule.h | 4 +- .../WebCore/generated/JSWebKitCSSKeyframesRule.cpp | 2 +- .../WebCore/generated/JSWebKitCSSKeyframesRule.h | 4 +- .../webkit/WebCore/generated/JSWebKitCSSMatrix.cpp | 2 +- .../webkit/WebCore/generated/JSWebKitCSSMatrix.h | 4 +- .../generated/JSWebKitCSSTransformValue.cpp | 2 +- .../WebCore/generated/JSWebKitCSSTransformValue.h | 4 +- .../webkit/WebCore/generated/JSWebKitPoint.cpp | 2 +- .../webkit/WebCore/generated/JSWebKitPoint.h | 4 +- .../WebCore/generated/JSWebKitTransitionEvent.cpp | 2 +- .../WebCore/generated/JSWebKitTransitionEvent.h | 4 +- .../webkit/WebCore/generated/JSWebSocket.cpp | 8 +- .../webkit/WebCore/generated/JSWebSocket.h | 4 +- .../webkit/WebCore/generated/JSWheelEvent.cpp | 2 +- .../webkit/WebCore/generated/JSWheelEvent.h | 4 +- src/3rdparty/webkit/WebCore/generated/JSWorker.cpp | 4 +- src/3rdparty/webkit/WebCore/generated/JSWorker.h | 4 +- .../webkit/WebCore/generated/JSWorkerContext.cpp | 4 +- .../webkit/WebCore/generated/JSWorkerContext.h | 4 +- .../webkit/WebCore/generated/JSWorkerLocation.cpp | 2 +- .../webkit/WebCore/generated/JSWorkerLocation.h | 4 +- .../webkit/WebCore/generated/JSWorkerNavigator.cpp | 2 +- .../webkit/WebCore/generated/JSWorkerNavigator.h | 4 +- .../webkit/WebCore/generated/JSXMLHttpRequest.cpp | 14 +- .../webkit/WebCore/generated/JSXMLHttpRequest.h | 4 +- .../generated/JSXMLHttpRequestException.cpp | 2 +- .../WebCore/generated/JSXMLHttpRequestException.h | 4 +- .../generated/JSXMLHttpRequestProgressEvent.cpp | 2 +- .../generated/JSXMLHttpRequestProgressEvent.h | 4 +- .../WebCore/generated/JSXMLHttpRequestUpload.cpp | 12 +- .../WebCore/generated/JSXMLHttpRequestUpload.h | 4 +- .../webkit/WebCore/generated/JSXMLSerializer.cpp | 2 +- .../webkit/WebCore/generated/JSXMLSerializer.h | 4 +- .../webkit/WebCore/generated/JSXPathEvaluator.cpp | 2 +- .../webkit/WebCore/generated/JSXPathEvaluator.h | 4 +- .../webkit/WebCore/generated/JSXPathException.cpp | 2 +- .../webkit/WebCore/generated/JSXPathException.h | 4 +- .../webkit/WebCore/generated/JSXPathExpression.cpp | 2 +- .../webkit/WebCore/generated/JSXPathExpression.h | 4 +- .../webkit/WebCore/generated/JSXPathNSResolver.cpp | 2 +- .../webkit/WebCore/generated/JSXPathNSResolver.h | 4 +- .../webkit/WebCore/generated/JSXPathResult.cpp | 2 +- .../webkit/WebCore/generated/JSXPathResult.h | 4 +- .../webkit/WebCore/generated/JSXSLTProcessor.cpp | 2 +- .../webkit/WebCore/generated/JSXSLTProcessor.h | 4 +- .../webkit/WebCore/html/HTMLCanvasElement.cpp | 23 +- .../webkit/WebCore/html/HTMLInputElement.cpp | 8 +- .../webkit/WebCore/html/HTMLInputElement.h | 2 +- .../webkit/WebCore/html/HTMLInputElement.idl | 3 +- .../webkit/WebCore/html/HTMLLinkElement.cpp | 18 +- .../webkit/WebCore/html/HTMLTextAreaElement.cpp | 22 +- .../webkit/WebCore/html/HTMLTextAreaElement.h | 4 +- .../webkit/WebCore/html/HTMLTextAreaElement.idl | 3 +- .../webkit/WebCore/inspector/InspectorBackend.cpp | 32 +- .../webkit/WebCore/inspector/InspectorBackend.h | 7 +- .../webkit/WebCore/inspector/InspectorBackend.idl | 7 +- .../WebCore/inspector/InspectorController.cpp | 4 +- .../webkit/WebCore/inspector/InspectorDOMAgent.cpp | 94 +- .../webkit/WebCore/inspector/InspectorDOMAgent.h | 20 +- .../inspector/InspectorDOMStorageResource.cpp | 2 +- .../inspector/InspectorDOMStorageResource.h | 2 +- .../webkit/WebCore/inspector/InspectorFrontend.cpp | 14 + .../webkit/WebCore/inspector/InspectorFrontend.h | 4 + .../webkit/WebCore/inspector/front-end/DOMAgent.js | 24 +- .../WebCore/inspector/front-end/ElementsPanel.js | 14 + .../front-end/EventListenersSidebarPane.js | 221 ++++ .../front-end/Images/grayConnectorPoint.png | Bin 0 -> 236 bytes .../front-end/Images/whiteConnectorPoint.png | Bin 0 -> 225 bytes .../WebCore/inspector/front-end/ProfilesPanel.js | 9 +- .../inspector/front-end/StylesSidebarPane.js | 23 +- .../webkit/WebCore/inspector/front-end/WebKit.qrc | 3 + .../WebCore/inspector/front-end/inspector.css | 107 +- .../WebCore/inspector/front-end/inspector.html | 1 + .../WebCore/inspector/front-end/inspector.js | 17 +- .../WebCore/inspector/front-end/utilities.js | 31 +- src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp | 2 +- .../webkit/WebCore/loader/ImageDocument.cpp | 4 +- src/3rdparty/webkit/WebCore/page/DOMWindow.idl | 4 +- src/3rdparty/webkit/WebCore/page/EventHandler.cpp | 21 +- src/3rdparty/webkit/WebCore/page/EventHandler.h | 2 + src/3rdparty/webkit/WebCore/page/Frame.cpp | 7 +- src/3rdparty/webkit/WebCore/page/Settings.cpp | 16 + src/3rdparty/webkit/WebCore/page/Settings.h | 15 + .../webkit/WebCore/page/UserContentURLPattern.cpp | 212 ++++ .../webkit/WebCore/page/UserContentURLPattern.h | 72 ++ .../platform/graphics/filters/FEComposite.cpp | 72 +- .../WebCore/platform/network/CredentialStorage.cpp | 18 +- .../platform/network/qt/QNetworkReplyHandler.cpp | 49 +- .../webkit/WebCore/platform/qt/Localizations.cpp | 2 +- .../webkit/WebCore/platform/text/CString.cpp | 14 - .../webkit/WebCore/platform/text/CString.h | 5 - .../webkit/WebCore/platform/text/TextEncoding.cpp | 1 + .../WebCore/rendering/MediaControlElements.cpp | 34 +- .../WebCore/rendering/MediaControlElements.h | 8 - .../webkit/WebCore/rendering/RenderBox.cpp | 21 +- .../webkit/WebCore/rendering/RenderInline.cpp | 10 +- .../webkit/WebCore/rendering/RenderObject.cpp | 15 +- .../webkit/WebCore/rendering/RenderObject.h | 10 +- .../webkit/WebCore/rendering/RenderTheme.cpp | 18 + .../webkit/WebCore/rendering/RenderTheme.h | 1 + .../WebCore/rendering/RenderThemeChromiumSkia.cpp | 13 + .../WebCore/rendering/RenderThemeChromiumSkia.h | 5 + .../WebCore/storage/StorageEventDispatcher.h | 54 + src/3rdparty/webkit/WebCore/svg/SVGUseElement.cpp | 4 + .../WebCore/svg/animation/SVGSMILElement.cpp | 4 +- .../webkit/WebCore/workers/WorkerContext.cpp | 2 +- src/3rdparty/webkit/WebCore/xml/XSLStyleSheet.cpp | 312 ------ src/3rdparty/webkit/WebCore/xml/XSLStyleSheet.h | 26 +- .../webkit/WebCore/xml/XSLStyleSheetLibxslt.cpp | 313 ++++++ .../webkit/WebCore/xml/XSLStyleSheetQt.cpp | 103 ++ src/3rdparty/webkit/WebCore/xml/XSLTProcessor.cpp | 315 +----- src/3rdparty/webkit/WebCore/xml/XSLTProcessor.h | 10 +- .../webkit/WebCore/xml/XSLTProcessorLibxslt.cpp | 335 ++++++ .../webkit/WebCore/xml/XSLTProcessorQt.cpp | 149 +++ src/3rdparty/webkit/WebKit/ChangeLog | 20 + src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp | 11 +- src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h | 23 +- src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp | 4 +- src/3rdparty/webkit/WebKit/qt/ChangeLog | 73 ++ .../qt/WebCoreSupport/FrameLoaderClientQt.cpp | 50 +- .../WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h | 1 + .../webkitsnippets/qtwebkit_qwebview_snippet.cpp | 8 +- .../WebKit/qt/tests/qwebpage/tst_qwebpage.cpp | 36 +- 921 files changed, 6113 insertions(+), 2609 deletions(-) create mode 100644 src/3rdparty/webkit/WebCore/dom/TransformSource.h create mode 100644 src/3rdparty/webkit/WebCore/dom/TransformSourceLibxslt.cpp create mode 100644 src/3rdparty/webkit/WebCore/dom/TransformSourceQt.cpp create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/EventListenersSidebarPane.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/grayConnectorPoint.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/whiteConnectorPoint.png create mode 100644 src/3rdparty/webkit/WebCore/page/UserContentURLPattern.cpp create mode 100644 src/3rdparty/webkit/WebCore/page/UserContentURLPattern.h create mode 100644 src/3rdparty/webkit/WebCore/storage/StorageEventDispatcher.h delete mode 100644 src/3rdparty/webkit/WebCore/xml/XSLStyleSheet.cpp create mode 100644 src/3rdparty/webkit/WebCore/xml/XSLStyleSheetLibxslt.cpp create mode 100644 src/3rdparty/webkit/WebCore/xml/XSLStyleSheetQt.cpp create mode 100644 src/3rdparty/webkit/WebCore/xml/XSLTProcessorLibxslt.cpp create mode 100644 src/3rdparty/webkit/WebCore/xml/XSLTProcessorQt.cpp diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackConstructor.cpp b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackConstructor.cpp index 64c83cb..1c33962 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackConstructor.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackConstructor.cpp @@ -36,7 +36,7 @@ namespace JSC { const ClassInfo JSCallbackConstructor::info = { "CallbackConstructor", 0, 0, 0 }; -JSCallbackConstructor::JSCallbackConstructor(PassRefPtr structure, JSClassRef jsClass, JSObjectCallAsConstructorCallback callback) +JSCallbackConstructor::JSCallbackConstructor(NonNullPassRefPtr structure, JSClassRef jsClass, JSObjectCallAsConstructorCallback callback) : JSObject(structure) , m_class(jsClass) , m_callback(callback) diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackConstructor.h b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackConstructor.h index 0497aa2..202b119 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackConstructor.h +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackConstructor.h @@ -33,7 +33,7 @@ namespace JSC { class JSCallbackConstructor : public JSObject { public: - JSCallbackConstructor(PassRefPtr, JSClassRef, JSObjectCallAsConstructorCallback); + JSCallbackConstructor(NonNullPassRefPtr, JSClassRef, JSObjectCallAsConstructorCallback); virtual ~JSCallbackConstructor(); JSClassRef classRef() const { return m_class; } JSObjectCallAsConstructorCallback callback() const { return m_callback; } diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObject.h b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObject.h index 47fd6c3..86f2f32 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObject.h +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObject.h @@ -36,7 +36,7 @@ namespace JSC { template class JSCallbackObject : public Base { public: - JSCallbackObject(ExecState*, PassRefPtr, JSClassRef, void* data); + JSCallbackObject(ExecState*, NonNullPassRefPtr, JSClassRef, void* data); JSCallbackObject(JSClassRef); virtual ~JSCallbackObject(); diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObjectFunctions.h b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObjectFunctions.h index 4d113fe..9b726e8 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObjectFunctions.h +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObjectFunctions.h @@ -47,7 +47,7 @@ inline JSCallbackObject* JSCallbackObject::asCallbackObject(JSValue } template -JSCallbackObject::JSCallbackObject(ExecState* exec, PassRefPtr structure, JSClassRef jsClass, void* data) +JSCallbackObject::JSCallbackObject(ExecState* exec, NonNullPassRefPtr structure, JSClassRef jsClass, void* data) : Base(structure) , m_callbackObjectData(new JSCallbackObjectData(data, jsClass)) { diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog index f6a644a..05f90b9 100644 --- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog +++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog @@ -1,3 +1,431 @@ +2009-09-30 Csaba Osztrogonac + + Reviewed by NOBODY (OOPS!). + + Buildfix for platforms using JSVALUE32. + https://bugs.webkit.org/show_bug.cgi?id=29915 + + After http://trac.webkit.org/changeset/48905 the build broke in JSVALUE32 case. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_add): + - Declaration of "OperandTypes types" moved before first use. + - Typos fixed: dst modified to result, regT2 added. + - Unnecessary code removed. + (JSC::JIT::emitSlow_op_add): + - Missing declaration of "OperandTypes types" added. + +2009-09-30 Janne Koskinen + + Reviewed by Simon Hausmann. + + Reduce heap size on Symbian from 64MB to 8MB. + + This is not a perfect fix, it requires more fine tuning. + But this makes it possible again to debug in the emulator, + which is more important in order to be able to fix other + run-time issues. + + * runtime/Collector.h: + +2009-09-30 Janne Koskinen + + Reviewed by Simon Hausmann. + + Fix CRASH() macro for Symbian build. + + * wtf/Assertions.h: Added missing } + +2009-09-29 Geoffrey Garen + + Reviewed by Gavin Barraclough. + + Inlined a few math operations. + + ~1% SunSpider speedup. + + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::compileBinaryArithOpSlowCase): + (JSC::JIT::emitSlow_op_add): + (JSC::JIT::emitSlow_op_mul): + (JSC::JIT::emit_op_sub): + (JSC::JIT::emitSlow_op_sub): Don't take a stub call when operating on + a constant int and a double. + +2009-09-28 Oliver Hunt + + Reviewed by Gavin Barraclough. + + Tidy up codeblock sampler + https://bugs.webkit.org/show_bug.cgi?id=29836 + + Some rather simple refactoring of codeblock sampler so that + it's easier for us to use it to find problems in non-jsc + environments + + * JavaScriptCore.exp: + * bytecode/SamplingTool.h: + * debugger/Debugger.cpp: + (JSC::evaluateInGlobalCallFrame): + * debugger/DebuggerCallFrame.cpp: + (JSC::DebuggerCallFrame::evaluate): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::Interpreter): + (JSC::Interpreter::execute): + (JSC::Interpreter::privateExecute): + (JSC::Interpreter::enableSampler): + (JSC::Interpreter::dumpSampleData): + (JSC::Interpreter::startSampling): + (JSC::Interpreter::stopSampling): + * interpreter/Interpreter.h: + (JSC::Interpreter::sampler): + * jit/JIT.h: + * jsc.cpp: + (runWithScripts): + * runtime/Completion.cpp: + (JSC::checkSyntax): + (JSC::evaluate): + * runtime/Executable.h: + (JSC::EvalExecutable::EvalExecutable): + (JSC::ProgramExecutable::create): + (JSC::ProgramExecutable::ProgramExecutable): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::startSampling): + (JSC::JSGlobalData::stopSampling): + (JSC::JSGlobalData::dumpSampleData): + * runtime/JSGlobalData.h: + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncEval): + +2009-09-29 Jeremy Orlow + + Reviewed by Dimitri Glazkov. + + Add GYP generated files to svn:ignore + https://bugs.webkit.org/show_bug.cgi?id=29895 + + The following files are generated by JavaScriptCore's GYP file and should be ignored: + + pcre.mk + wtf.scons + wtf.mk + SConstruct + wtf_config.scons + wtf_config.mk + pcre.scons + + * JavaScriptCore.gyp: Changed property svn:ignore. + +2009-09-29 Geoffrey Garen + + Reviewed by Sam Weinig. + + Standardized an optimization for adding non-numbers. + + SunSpider says maybe a tiny speedup. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_add): + (JSC::JIT::emitSlow_op_add): + +2009-09-29 Geoffrey Garen + + Windows build fix: export a new symbol. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-09-28 Geoffrey Garen + + Reviewed by Sam Weinig. + + Removed virtual destructor from JSGlobalObjectData to eliminate pointer + fix-ups when accessing JSGlobalObject::d. + + Replaced with an explicit destructor function pointer. + + 6% speedup on bench-alloc-nonretained.js. + + * JavaScriptCore.exp: + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::~JSGlobalObject): + (JSC::JSGlobalObject::destroyJSGlobalObjectData): + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): + (JSC::JSGlobalObject::JSGlobalObject): + +2009-09-29 Janne Koskinen + + Reviewed by David Kilzer. + + [Qt] Assert messages prints visible in Symbian + https://bugs.webkit.org/show_bug.cgi?id=29808 + + Asserts use vprintf to print the messages to stderr. + In Symbian Open C it is not possible to see stderr so + I routed the messages to stdout instead. + + * wtf/Assertions.cpp: + +2009-09-29 Janne Koskinen + + Reviewed by Darin Adler. + + [Qt] Symbian CRASH macro implementation + + Added Symbian specific crash macro that + stops to crash line if JIT debugging is used. + Additional differentiation of access violation + (KERN-EXEC 3) and CRASH panic. + + * wtf/Assertions.h: + +2009-09-28 Mark Rowe + + Fix the PowerPC build. + + * JavaScriptCore.exp: + +2009-09-28 Mark Rowe + + Reviewed by Gavin Barraclough. + + JavaScriptCore fails to mark registers when built for x86_64 using LLVM GCC. + + * runtime/Collector.cpp: + (JSC::Heap::markCurrentThreadConservatively): Force jmp_buf to use the appropriate alignment for a pointer + to ensure that we correctly interpret the contents of registers during marking. + +2009-09-28 Geoffrey Garen + + Windows build fix: added new exports. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-09-28 Geoffrey Garen + + Windows build fix: removed exports that no longer exist. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-09-28 Geoffrey Garen + + Reviewed by Darin Adler. + + NotNullPassRefPtr: smart pointer optimized for passing references that are not null + https://bugs.webkit.org/show_bug.cgi?id=29822 + + Added NotNullPassRefPtr, and deployed it in all places that initialize + JavaScript objects. + + 2.2% speedup on bench-allocate-nonretained.js. + + * API/JSCallbackConstructor.cpp: + (JSC::JSCallbackConstructor::JSCallbackConstructor): + * API/JSCallbackConstructor.h: + * API/JSCallbackObject.h: + * API/JSCallbackObjectFunctions.h: + (JSC::JSCallbackObject::JSCallbackObject): + * JavaScriptCore.exp: + * bytecode/CodeBlock.h: + (JSC::CodeBlock::addFunctionDecl): + (JSC::CodeBlock::addFunctionExpr): + * runtime/ArrayConstructor.cpp: + (JSC::ArrayConstructor::ArrayConstructor): + * runtime/ArrayConstructor.h: + * runtime/ArrayPrototype.cpp: + (JSC::ArrayPrototype::ArrayPrototype): + * runtime/ArrayPrototype.h: + * runtime/BooleanConstructor.cpp: + (JSC::BooleanConstructor::BooleanConstructor): + * runtime/BooleanConstructor.h: + * runtime/BooleanObject.cpp: + (JSC::BooleanObject::BooleanObject): + * runtime/BooleanObject.h: + * runtime/BooleanPrototype.cpp: + (JSC::BooleanPrototype::BooleanPrototype): + * runtime/BooleanPrototype.h: + * runtime/DateConstructor.cpp: + (JSC::DateConstructor::DateConstructor): + * runtime/DateConstructor.h: + * runtime/DateInstance.cpp: + (JSC::DateInstance::DateInstance): + * runtime/DateInstance.h: + * runtime/DatePrototype.cpp: + (JSC::DatePrototype::DatePrototype): + * runtime/DatePrototype.h: + * runtime/ErrorConstructor.cpp: + (JSC::ErrorConstructor::ErrorConstructor): + * runtime/ErrorConstructor.h: + * runtime/ErrorInstance.cpp: + (JSC::ErrorInstance::ErrorInstance): + * runtime/ErrorInstance.h: + * runtime/ErrorPrototype.cpp: + (JSC::ErrorPrototype::ErrorPrototype): + * runtime/ErrorPrototype.h: + * runtime/FunctionConstructor.cpp: + (JSC::FunctionConstructor::FunctionConstructor): + * runtime/FunctionConstructor.h: + * runtime/FunctionPrototype.cpp: + (JSC::FunctionPrototype::FunctionPrototype): + * runtime/FunctionPrototype.h: + * runtime/GlobalEvalFunction.cpp: + (JSC::GlobalEvalFunction::GlobalEvalFunction): + * runtime/GlobalEvalFunction.h: + * runtime/InternalFunction.cpp: + (JSC::InternalFunction::InternalFunction): + * runtime/InternalFunction.h: + (JSC::InternalFunction::InternalFunction): + * runtime/JSActivation.cpp: + (JSC::JSActivation::JSActivation): + * runtime/JSActivation.h: + (JSC::JSActivation::JSActivationData::JSActivationData): + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): + * runtime/JSArray.h: + * runtime/JSByteArray.cpp: + (JSC::JSByteArray::JSByteArray): + * runtime/JSByteArray.h: + * runtime/JSFunction.cpp: + (JSC::JSFunction::JSFunction): + * runtime/JSFunction.h: + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::JSGlobalObject): + * runtime/JSONObject.h: + (JSC::JSONObject::JSONObject): + * runtime/JSObject.h: + (JSC::JSObject::JSObject): + (JSC::JSObject::setStructure): + * runtime/JSVariableObject.h: + (JSC::JSVariableObject::JSVariableObject): + * runtime/JSWrapperObject.h: + (JSC::JSWrapperObject::JSWrapperObject): + * runtime/MathObject.cpp: + (JSC::MathObject::MathObject): + * runtime/MathObject.h: + * runtime/NativeErrorConstructor.cpp: + (JSC::NativeErrorConstructor::NativeErrorConstructor): + * runtime/NativeErrorConstructor.h: + * runtime/NativeErrorPrototype.cpp: + (JSC::NativeErrorPrototype::NativeErrorPrototype): + * runtime/NativeErrorPrototype.h: + * runtime/NumberConstructor.cpp: + (JSC::NumberConstructor::NumberConstructor): + * runtime/NumberConstructor.h: + * runtime/NumberObject.cpp: + (JSC::NumberObject::NumberObject): + * runtime/NumberObject.h: + * runtime/NumberPrototype.cpp: + (JSC::NumberPrototype::NumberPrototype): + * runtime/NumberPrototype.h: + * runtime/ObjectConstructor.cpp: + (JSC::ObjectConstructor::ObjectConstructor): + * runtime/ObjectConstructor.h: + * runtime/ObjectPrototype.cpp: + (JSC::ObjectPrototype::ObjectPrototype): + * runtime/ObjectPrototype.h: + * runtime/PropertyNameArray.h: + (JSC::PropertyNameArrayData::setCachedPrototypeChain): + * runtime/PrototypeFunction.cpp: + (JSC::PrototypeFunction::PrototypeFunction): + * runtime/PrototypeFunction.h: + * runtime/RegExpConstructor.cpp: + (JSC::RegExpConstructor::RegExpConstructor): + * runtime/RegExpConstructor.h: + * runtime/RegExpObject.cpp: + (JSC::RegExpObject::RegExpObject): + * runtime/RegExpObject.h: + (JSC::RegExpObject::RegExpObjectData::RegExpObjectData): + * runtime/RegExpPrototype.cpp: + (JSC::RegExpPrototype::RegExpPrototype): + * runtime/RegExpPrototype.h: + * runtime/StringConstructor.cpp: + (JSC::StringConstructor::StringConstructor): + * runtime/StringConstructor.h: + * runtime/StringObject.cpp: + (JSC::StringObject::StringObject): + * runtime/StringObject.h: + * runtime/StringObjectThatMasqueradesAsUndefined.h: + (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined): + * runtime/StringPrototype.cpp: + (JSC::StringPrototype::StringPrototype): + * runtime/StringPrototype.h: + * wtf/PassRefPtr.h: + (WTF::NotNullPassRefPtr::NotNullPassRefPtr): + (WTF::NotNullPassRefPtr::~NotNullPassRefPtr): + (WTF::NotNullPassRefPtr::get): + (WTF::NotNullPassRefPtr::clear): + (WTF::NotNullPassRefPtr::releaseRef): + (WTF::NotNullPassRefPtr::operator*): + (WTF::NotNullPassRefPtr::operator->): + (WTF::NotNullPassRefPtr::operator!): + (WTF::NotNullPassRefPtr::operator UnspecifiedBoolType): + * wtf/RefPtr.h: + (WTF::RefPtr::RefPtr): + (WTF::operator==): + +2009-09-28 Oliver Hunt + + Reviewed by Geoff Garen. + + Hard dependency on SSE2 instruction set with JIT + https://bugs.webkit.org/show_bug.cgi?id=29779 + + Add floating point support checks to op_jfalse and op_jtrue, and + fix the logic for the slow case of op_add + + * jit/JITArithmetic.cpp: + (JSC::JIT::emitSlow_op_add): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_jfalse): + (JSC::JIT::emit_op_jtrue): + +2009-09-28 Yaar Schnitman + + Reviewed by Dimitri Glazkov. + + Chromium port - recognize we are being built independently + of chromium and look for dependencies under webkit/chromium rather + than chromium/src. + + https://bugs.webkit.org/show_bug.cgi?id=29722 + + * JavaScriptCore.gyp/JavaScriptCore.gyp: + +2009-09-28 Jakub Wieczorek + + Reviewed by Simon Hausmann. + + [Qt] Implement XSLT support with QtXmlPatterns. + https://bugs.webkit.org/show_bug.cgi?id=28303 + + * wtf/Platform.h: Add a WTF_USE_QXMLQUERY #define. + +2009-09-28 Gabor Loki + + Reviewed by Simon Hausmann. + + Remove __clear_cache which is an internal function of GCC + https://bugs.webkit.org/show_bug.cgi?id=28886 + + Although __clear_cache is exported from GCC, this is an internal + function. GCC makes no promises about it. + + * jit/ExecutableAllocator.h: + (JSC::ExecutableAllocator::cacheFlush): + +2009-09-28 Sam Weinig + + Reviewed by Oliver Hunt. + + Fix an absolute path to somewhere in Oliver's machine to a relative path + for derived JSONObject.lut.h. + + * JavaScriptCore.xcodeproj/project.pbxproj: + 2009-09-28 Joerg Bornemann Reviewed by Simon Hausmann. diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h index 0163540..4ba58d7 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h @@ -441,10 +441,10 @@ namespace JSC { ALWAYS_INLINE bool isConstantRegisterIndex(int index) { return index >= FirstConstantRegisterIndex; } ALWAYS_INLINE JSValue getConstant(int index) const { return m_constantRegisters[index - FirstConstantRegisterIndex].jsValue(); } - unsigned addFunctionDecl(PassRefPtr n) { unsigned size = m_functionDecls.size(); m_functionDecls.append(n); return size; } + unsigned addFunctionDecl(NonNullPassRefPtr n) { unsigned size = m_functionDecls.size(); m_functionDecls.append(n); return size; } FunctionExecutable* functionDecl(int index) { return m_functionDecls[index].get(); } int numberOfFunctionDecls() { return m_functionDecls.size(); } - unsigned addFunctionExpr(PassRefPtr n) { unsigned size = m_functionExprs.size(); m_functionExprs.append(n); return size; } + unsigned addFunctionExpr(NonNullPassRefPtr n) { unsigned size = m_functionExprs.size(); m_functionExprs.append(n); return size; } FunctionExecutable* functionExpr(int index) { return m_functionExprs[index].get(); } unsigned addRegExp(RegExp* r) { createRareDataIfNecessary(); unsigned size = m_rareData->m_regexps.size(); m_rareData->m_regexps.append(r); return size; } diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.h b/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.h index 711b086..8e3ed9e 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.h +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.h @@ -113,7 +113,7 @@ namespace JSC { void sample(CodeBlock*, Instruction*); - ScriptExecutable* m_executable; + RefPtr m_executable; CodeBlock* m_codeBlock; int m_sampleCount; int m_opcodeSampleCount; diff --git a/src/3rdparty/webkit/JavaScriptCore/debugger/Debugger.cpp b/src/3rdparty/webkit/JavaScriptCore/debugger/Debugger.cpp index db02329..902a802 100644 --- a/src/3rdparty/webkit/JavaScriptCore/debugger/Debugger.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/debugger/Debugger.cpp @@ -100,12 +100,12 @@ JSValue evaluateInGlobalCallFrame(const UString& script, JSValue& exception, JSG { CallFrame* globalCallFrame = globalObject->globalExec(); - EvalExecutable eval(globalCallFrame, makeSource(script)); - JSObject* error = eval.compile(globalCallFrame, globalCallFrame->scopeChain()); + RefPtr eval = EvalExecutable::create(globalCallFrame, makeSource(script)); + JSObject* error = eval->compile(globalCallFrame, globalCallFrame->scopeChain()); if (error) return error; - return globalObject->globalData()->interpreter->execute(&eval, globalCallFrame, globalObject, globalCallFrame->scopeChain(), &exception); + return globalObject->globalData()->interpreter->execute(eval.get(), globalCallFrame, globalObject, globalCallFrame->scopeChain(), &exception); } } // namespace JSC diff --git a/src/3rdparty/webkit/JavaScriptCore/debugger/DebuggerCallFrame.cpp b/src/3rdparty/webkit/JavaScriptCore/debugger/DebuggerCallFrame.cpp index 88b14e6..c9d7cc6 100644 --- a/src/3rdparty/webkit/JavaScriptCore/debugger/DebuggerCallFrame.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/debugger/DebuggerCallFrame.cpp @@ -79,12 +79,12 @@ JSValue DebuggerCallFrame::evaluate(const UString& script, JSValue& exception) c if (!m_callFrame->codeBlock()) return JSValue(); - EvalExecutable eval(m_callFrame, makeSource(script)); - JSObject* error = eval.compile(m_callFrame, m_callFrame->scopeChain()); + RefPtr eval = EvalExecutable::create(m_callFrame, makeSource(script)); + JSObject* error = eval->compile(m_callFrame, m_callFrame->scopeChain()); if (error) return error; - return m_callFrame->scopeChain()->globalData->interpreter->execute(&eval, m_callFrame, thisObject(), m_callFrame->scopeChain(), &exception); + return m_callFrame->scopeChain()->globalData->interpreter->execute(eval.get(), m_callFrame, thisObject(), m_callFrame->scopeChain(), &exception); } } // namespace JSC diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp index 2aaa325..847b1fa 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp @@ -363,10 +363,13 @@ NEVER_INLINE JSValue Interpreter::callEval(CallFrame* callFrame, RegisterFile* r } Interpreter::Interpreter() - : m_sampler(0) + : m_sampleEntryDepth(0) , m_reentryDepth(0) { privateExecute(InitializeAndReturn, 0, 0, 0); +#if ENABLE(OPCODE_SAMPLING) + enableSampler(); +#endif } #ifndef NDEBUG @@ -648,7 +651,7 @@ JSValue Interpreter::execute(ProgramExecutable* program, CallFrame* callFrame, S JSValue result; { - SamplingTool::CallRecord callRecord(m_sampler); + SamplingTool::CallRecord callRecord(m_sampler.get()); m_reentryDepth++; #if ENABLE(JIT) @@ -714,7 +717,7 @@ JSValue Interpreter::execute(FunctionExecutable* functionExecutable, CallFrame* JSValue result; { - SamplingTool::CallRecord callRecord(m_sampler); + SamplingTool::CallRecord callRecord(m_sampler.get()); m_reentryDepth++; #if ENABLE(JIT) @@ -782,7 +785,7 @@ JSValue Interpreter::execute(CallFrameClosure& closure, JSValue* exception) JSValue result; { - SamplingTool::CallRecord callRecord(m_sampler); + SamplingTool::CallRecord callRecord(m_sampler.get()); m_reentryDepth++; #if ENABLE(JIT) @@ -876,7 +879,7 @@ JSValue Interpreter::execute(EvalExecutable* eval, CallFrame* callFrame, JSObjec JSValue result; { - SamplingTool::CallRecord callRecord(m_sampler); + SamplingTool::CallRecord callRecord(m_sampler.get()); m_reentryDepth++; #if ENABLE(JIT) @@ -3056,7 +3059,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi JSValue returnValue; { - SamplingTool::HostCallRecord callRecord(m_sampler); + SamplingTool::HostCallRecord callRecord(m_sampler.get()); returnValue = callData.native.function(newCallFrame, asObject(v), thisValue, args); } CHECK_FOR_EXCEPTION(); @@ -3210,7 +3213,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi JSValue returnValue; { - SamplingTool::HostCallRecord callRecord(m_sampler); + SamplingTool::HostCallRecord callRecord(m_sampler.get()); returnValue = callData.native.function(newCallFrame, asObject(v), thisValue, args); } CHECK_FOR_EXCEPTION(); @@ -3462,7 +3465,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi JSValue returnValue; { - SamplingTool::HostCallRecord callRecord(m_sampler); + SamplingTool::HostCallRecord callRecord(m_sampler.get()); returnValue = constructData.native.function(newCallFrame, asObject(v), args); } CHECK_FOR_EXCEPTION(); @@ -3914,4 +3917,40 @@ CallFrame* Interpreter::findFunctionCallFrame(CallFrame* callFrame, InternalFunc return 0; } +void Interpreter::enableSampler() +{ +#if ENABLE(OPCODE_SAMPLING) + if (!m_sampler) { + m_sampler.set(new SamplingTool(this)); + m_sampler->setup(); + } +#endif +} +void Interpreter::dumpSampleData(ExecState* exec) +{ +#if ENABLE(OPCODE_SAMPLING) + if (m_sampler) + m_sampler->dump(exec); +#else + UNUSED_PARAM(exec); +#endif +} +void Interpreter::startSampling() +{ +#if ENABLE(SAMPLING_THREAD) + if (!m_sampleEntryDepth) + SamplingThread::start(); + + m_sampleEntryDepth++; +#endif +} +void Interpreter::stopSampling() +{ +#if ENABLE(SAMPLING_THREAD) + m_sampleEntryDepth--; + if (!m_sampleEntryDepth) + SamplingThread::stop(); +#endif +} + } // namespace JSC diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.h b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.h index 8cb75d2..3046b28 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.h +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.h @@ -105,13 +105,15 @@ namespace JSC { void getArgumentsData(CallFrame*, JSFunction*&, ptrdiff_t& firstParameterIndex, Register*& argv, int& argc); - void setSampler(SamplingTool* sampler) { m_sampler = sampler; } - SamplingTool* sampler() { return m_sampler; } + SamplingTool* sampler() { return m_sampler.get(); } NEVER_INLINE JSValue callEval(CallFrame*, RegisterFile*, Register* argv, int argc, int registerOffset, JSValue& exceptionValue); NEVER_INLINE HandlerInfo* throwException(CallFrame*&, JSValue&, unsigned bytecodeOffset, bool); NEVER_INLINE void debug(CallFrame*, DebugHookID, int firstLine, int lastLine); + void dumpSampleData(ExecState* exec); + void startSampling(); + void stopSampling(); private: enum ExecutionFlag { Normal, InitializeAndReturn }; @@ -149,7 +151,9 @@ namespace JSC { bool isCallBytecode(Opcode opcode) { return opcode == getOpcode(op_call) || opcode == getOpcode(op_construct) || opcode == getOpcode(op_call_eval); } - SamplingTool* m_sampler; + void enableSampler(); + int m_sampleEntryDepth; + OwnPtr m_sampler; int m_reentryDepth; diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JIT.h b/src/3rdparty/webkit/JavaScriptCore/jit/JIT.h index 3b35935..0712743 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JIT.h +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JIT.h @@ -514,7 +514,11 @@ namespace JSC { void emitTagAsBoolImmediate(RegisterID reg); void compileBinaryArithOp(OpcodeID, unsigned dst, unsigned src1, unsigned src2, OperandTypes opi); - void compileBinaryArithOpSlowCase(OpcodeID, Vector::iterator&, unsigned dst, unsigned src1, unsigned src2, OperandTypes opi); +#if USE(JSVALUE64) + void compileBinaryArithOpSlowCase(OpcodeID, Vector::iterator&, unsigned dst, unsigned src1, unsigned src2, OperandTypes, bool op1HasImmediateIntFastCase, bool op2HasImmediateIntFastCase); +#else + void compileBinaryArithOpSlowCase(OpcodeID, Vector::iterator&, unsigned dst, unsigned src1, unsigned src2, OperandTypes); +#endif #if ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS) void compileGetByIdHotPath(int resultVReg, int baseVReg, Identifier* ident, unsigned propertyAccessInstructionIndex); @@ -538,7 +542,7 @@ namespace JSC { static const int patchOffsetGetByIdPropertyMapOffset = 31; static const int patchOffsetGetByIdPutResult = 31; #if ENABLE(OPCODE_SAMPLING) - static const int patchOffsetGetByIdSlowCaseCall = 63; + static const int patchOffsetGetByIdSlowCaseCall = 64; #else static const int patchOffsetGetByIdSlowCaseCall = 41; #endif diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITArithmetic.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITArithmetic.cpp index fb44386..7afc1f2 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITArithmetic.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITArithmetic.cpp @@ -566,6 +566,14 @@ void JIT::emit_op_add(Instruction* currentInstruction) unsigned op2 = currentInstruction[3].u.operand; OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand); + if (!types.first().mightBeNumber() || !types.second().mightBeNumber()) { + JITStubCall stubCall(this, cti_op_add); + stubCall.addArgument(op1); + stubCall.addArgument(op2); + stubCall.call(dst); + return; + } + JumpList notInt32Op1; JumpList notInt32Op2; @@ -630,19 +638,21 @@ void JIT::emitSlow_op_add(Instruction* currentInstruction, Vector unsigned op2 = currentInstruction[3].u.operand; OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand); + if (!types.first().mightBeNumber() || !types.second().mightBeNumber()) + return; + unsigned op; int32_t constant; if (getOperandConstantImmediateInt(op1, op2, op, constant)) { linkSlowCase(iter); // overflow check - if (!supportsFloatingPoint()) { + if (!supportsFloatingPoint()) linkSlowCase(iter); // non-sse case - return; + else { + ResultType opType = op == op1 ? types.first() : types.second(); + if (!opType.definitelyIsNumber()) + linkSlowCase(iter); // double check } - - ResultType opType = op == op1 ? types.first() : types.second(); - if (!opType.definitelyIsNumber()) - linkSlowCase(iter); // double check } else { linkSlowCase(iter); // overflow check @@ -1932,47 +1942,77 @@ void JIT::compileBinaryArithOp(OpcodeID opcodeID, unsigned, unsigned op1, unsign emitFastArithIntToImmNoCheck(regT0, regT0); } -void JIT::compileBinaryArithOpSlowCase(OpcodeID opcodeID, Vector::iterator& iter, unsigned result, unsigned op1, unsigned, OperandTypes types) +void JIT::compileBinaryArithOpSlowCase(OpcodeID opcodeID, Vector::iterator& iter, unsigned result, unsigned op1, unsigned op2, OperandTypes types, bool op1HasImmediateIntFastCase, bool op2HasImmediateIntFastCase) { // We assume that subtracting TagTypeNumber is equivalent to adding DoubleEncodeOffset. COMPILE_ASSERT(((JSImmediate::TagTypeNumber + JSImmediate::DoubleEncodeOffset) == 0), TagTypeNumber_PLUS_DoubleEncodeOffset_EQUALS_0); - - Jump notImm1 = getSlowCase(iter); - Jump notImm2 = getSlowCase(iter); + + Jump notImm1; + Jump notImm2; + if (op1HasImmediateIntFastCase) { + notImm2 = getSlowCase(iter); + } else if (op2HasImmediateIntFastCase) { + notImm1 = getSlowCase(iter); + } else { + notImm1 = getSlowCase(iter); + notImm2 = getSlowCase(iter); + } linkSlowCase(iter); // Integer overflow case - we could handle this in JIT code, but this is likely rare. - if (opcodeID == op_mul) // op_mul has an extra slow case to handle 0 * negative number. + if (opcodeID == op_mul && !op1HasImmediateIntFastCase && !op2HasImmediateIntFastCase) // op_mul has an extra slow case to handle 0 * negative number. linkSlowCase(iter); emitGetVirtualRegister(op1, regT0); Label stubFunctionCall(this); JITStubCall stubCall(this, opcodeID == op_add ? cti_op_add : opcodeID == op_sub ? cti_op_sub : cti_op_mul); + if (op1HasImmediateIntFastCase || op2HasImmediateIntFastCase) { + emitGetVirtualRegister(op1, regT0); + emitGetVirtualRegister(op2, regT1); + } stubCall.addArgument(regT0); stubCall.addArgument(regT1); stubCall.call(result); Jump end = jump(); - // if we get here, eax is not an int32, edx not yet checked. - notImm1.link(this); - if (!types.first().definitelyIsNumber()) - emitJumpIfNotImmediateNumber(regT0).linkTo(stubFunctionCall, this); - if (!types.second().definitelyIsNumber()) - emitJumpIfNotImmediateNumber(regT1).linkTo(stubFunctionCall, this); - addPtr(tagTypeNumberRegister, regT0); - movePtrToDouble(regT0, fpRegT1); - Jump op2isDouble = emitJumpIfNotImmediateInteger(regT1); - convertInt32ToDouble(regT1, fpRegT2); - Jump op2wasInteger = jump(); - - // if we get here, eax IS an int32, edx is not. - notImm2.link(this); - if (!types.second().definitelyIsNumber()) - emitJumpIfNotImmediateNumber(regT1).linkTo(stubFunctionCall, this); - convertInt32ToDouble(regT0, fpRegT1); - op2isDouble.link(this); - addPtr(tagTypeNumberRegister, regT1); - movePtrToDouble(regT1, fpRegT2); - op2wasInteger.link(this); + if (op1HasImmediateIntFastCase) { + notImm2.link(this); + if (!types.second().definitelyIsNumber()) + emitJumpIfNotImmediateNumber(regT0).linkTo(stubFunctionCall, this); + emitGetVirtualRegister(op1, regT1); + convertInt32ToDouble(regT1, fpRegT1); + addPtr(tagTypeNumberRegister, regT0); + movePtrToDouble(regT0, fpRegT2); + } else if (op2HasImmediateIntFastCase) { + notImm1.link(this); + if (!types.first().definitelyIsNumber()) + emitJumpIfNotImmediateNumber(regT0).linkTo(stubFunctionCall, this); + emitGetVirtualRegister(op2, regT1); + convertInt32ToDouble(regT1, fpRegT1); + addPtr(tagTypeNumberRegister, regT0); + movePtrToDouble(regT0, fpRegT2); + } else { + // if we get here, eax is not an int32, edx not yet checked. + notImm1.link(this); + if (!types.first().definitelyIsNumber()) + emitJumpIfNotImmediateNumber(regT0).linkTo(stubFunctionCall, this); + if (!types.second().definitelyIsNumber()) + emitJumpIfNotImmediateNumber(regT1).linkTo(stubFunctionCall, this); + addPtr(tagTypeNumberRegister, regT0); + movePtrToDouble(regT0, fpRegT1); + Jump op2isDouble = emitJumpIfNotImmediateInteger(regT1); + convertInt32ToDouble(regT1, fpRegT2); + Jump op2wasInteger = jump(); + + // if we get here, eax IS an int32, edx is not. + notImm2.link(this); + if (!types.second().definitelyIsNumber()) + emitJumpIfNotImmediateNumber(regT1).linkTo(stubFunctionCall, this); + convertInt32ToDouble(regT0, fpRegT1); + op2isDouble.link(this); + addPtr(tagTypeNumberRegister, regT1); + movePtrToDouble(regT1, fpRegT2); + op2wasInteger.link(this); + } if (opcodeID == op_add) addDouble(fpRegT2, fpRegT1); @@ -2027,16 +2067,14 @@ void JIT::emitSlow_op_add(Instruction* currentInstruction, Vector unsigned result = currentInstruction[1].u.operand; unsigned op1 = currentInstruction[2].u.operand; unsigned op2 = currentInstruction[3].u.operand; + OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand); - if (isOperandConstantImmediateInt(op1) || isOperandConstantImmediateInt(op2)) { - linkSlowCase(iter); - linkSlowCase(iter); - JITStubCall stubCall(this, cti_op_add); - stubCall.addArgument(op1, regT2); - stubCall.addArgument(op2, regT2); - stubCall.call(result); - } else - compileBinaryArithOpSlowCase(op_add, iter, result, op1, op2, OperandTypes::fromInt(currentInstruction[4].u.operand)); + if (!types.first().mightBeNumber() || !types.second().mightBeNumber()) + return; + + bool op1HasImmediateIntFastCase = isOperandConstantImmediateInt(op1); + bool op2HasImmediateIntFastCase = !op1HasImmediateIntFastCase && isOperandConstantImmediateInt(op2); + compileBinaryArithOpSlowCase(op_add, iter, result, op1, op2, OperandTypes::fromInt(currentInstruction[4].u.operand), op1HasImmediateIntFastCase, op2HasImmediateIntFastCase); } void JIT::emit_op_mul(Instruction* currentInstruction) @@ -2071,17 +2109,9 @@ void JIT::emitSlow_op_mul(Instruction* currentInstruction, Vector unsigned op2 = currentInstruction[3].u.operand; OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand); - if ((isOperandConstantImmediateInt(op1) && (getConstantOperandImmediateInt(op1) > 0)) - || (isOperandConstantImmediateInt(op2) && (getConstantOperandImmediateInt(op2) > 0))) { - linkSlowCase(iter); - linkSlowCase(iter); - // There is an extra slow case for (op1 * -N) or (-N * op2), to check for 0 since this should produce a result of -0. - JITStubCall stubCall(this, cti_op_mul); - stubCall.addArgument(op1, regT2); - stubCall.addArgument(op2, regT2); - stubCall.call(result); - } else - compileBinaryArithOpSlowCase(op_mul, iter, result, op1, op2, types); + bool op1HasImmediateIntFastCase = isOperandConstantImmediateInt(op1) && getConstantOperandImmediateInt(op1) > 0; + bool op2HasImmediateIntFastCase = !op1HasImmediateIntFastCase && isOperandConstantImmediateInt(op2) && getConstantOperandImmediateInt(op2) > 0; + compileBinaryArithOpSlowCase(op_mul, iter, result, op1, op2, OperandTypes::fromInt(currentInstruction[4].u.operand), op1HasImmediateIntFastCase, op2HasImmediateIntFastCase); } void JIT::emit_op_div(Instruction* currentInstruction) @@ -2189,7 +2219,6 @@ void JIT::emit_op_sub(Instruction* currentInstruction) OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand); compileBinaryArithOp(op_sub, result, op1, op2, types); - emitPutVirtualRegister(result); } @@ -2200,7 +2229,7 @@ void JIT::emitSlow_op_sub(Instruction* currentInstruction, Vector unsigned op2 = currentInstruction[3].u.operand; OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand); - compileBinaryArithOpSlowCase(op_sub, iter, result, op1, op2, types); + compileBinaryArithOpSlowCase(op_sub, iter, result, op1, op2, types, false, false); } #else // USE(JSVALUE64) @@ -2383,6 +2412,15 @@ void JIT::emit_op_add(Instruction* currentInstruction) unsigned result = currentInstruction[1].u.operand; unsigned op1 = currentInstruction[2].u.operand; unsigned op2 = currentInstruction[3].u.operand; + OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand); + + if (!types.first().mightBeNumber() || !types.second().mightBeNumber()) { + JITStubCall stubCall(this, cti_op_add); + stubCall.addArgument(op1, regT2); + stubCall.addArgument(op2, regT2); + stubCall.call(result); + return; + } if (isOperandConstantImmediateInt(op1)) { emitGetVirtualRegister(op2, regT0); @@ -2397,15 +2435,7 @@ void JIT::emit_op_add(Instruction* currentInstruction) signExtend32ToPtr(regT0, regT0); emitPutVirtualRegister(result); } else { - OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand); - if (types.first().mightBeNumber() && types.second().mightBeNumber()) - compileBinaryArithOp(op_add, result, op1, op2, OperandTypes::fromInt(currentInstruction[4].u.operand)); - else { - JITStubCall stubCall(this, cti_op_add); - stubCall.addArgument(op1, regT2); - stubCall.addArgument(op2, regT2); - stubCall.call(result); - } + compileBinaryArithOp(op_add, result, op1, op2, OperandTypes::fromInt(currentInstruction[4].u.operand)); } } @@ -2415,6 +2445,10 @@ void JIT::emitSlow_op_add(Instruction* currentInstruction, Vector unsigned op1 = currentInstruction[2].u.operand; unsigned op2 = currentInstruction[3].u.operand; + OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand); + if (!types.first().mightBeNumber() || !types.second().mightBeNumber()) + return; + if (isOperandConstantImmediateInt(op1)) { Jump notImm = getSlowCase(iter); linkSlowCase(iter); diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp index 28d630b..7059cc8 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp @@ -794,14 +794,17 @@ void JIT::emit_op_jfalse(Instruction* currentInstruction) Jump isTrue2 = branch32(NotEqual, regT0, Imm32(0)); addJump(jump(), target + 2); - isNotInteger.link(this); + if (supportsFloatingPoint()) { + isNotInteger.link(this); - addSlowCase(branch32(Above, regT1, Imm32(JSValue::LowestTag))); + addSlowCase(branch32(Above, regT1, Imm32(JSValue::LowestTag))); + + zeroDouble(fpRegT0); + emitLoadDouble(cond, fpRegT1); + addJump(branchDouble(DoubleEqual, fpRegT0, fpRegT1), target + 2); + } else + addSlowCase(isNotInteger); - zeroDouble(fpRegT0); - emitLoadDouble(cond, fpRegT1); - addJump(branchDouble(DoubleEqual, fpRegT0, fpRegT1), target + 2); - isTrue.link(this); isTrue2.link(this); } @@ -832,14 +835,17 @@ void JIT::emit_op_jtrue(Instruction* currentInstruction) Jump isFalse2 = branch32(Equal, regT0, Imm32(0)); addJump(jump(), target + 2); - isNotInteger.link(this); + if (supportsFloatingPoint()) { + isNotInteger.link(this); - addSlowCase(branch32(Above, regT1, Imm32(JSValue::LowestTag))); + addSlowCase(branch32(Above, regT1, Imm32(JSValue::LowestTag))); + + zeroDouble(fpRegT0); + emitLoadDouble(cond, fpRegT1); + addJump(branchDouble(DoubleNotEqual, fpRegT0, fpRegT1), target + 2); + } else + addSlowCase(isNotInteger); - zeroDouble(fpRegT0); - emitLoadDouble(cond, fpRegT1); - addJump(branchDouble(DoubleNotEqual, fpRegT0, fpRegT1), target + 2); - isFalse.link(this); isFalse2.link(this); } diff --git a/src/3rdparty/webkit/JavaScriptCore/jsc.cpp b/src/3rdparty/webkit/JavaScriptCore/jsc.cpp index ee4e393..9399b1a 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jsc.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/jsc.cpp @@ -360,11 +360,8 @@ static bool runWithScripts(GlobalObject* globalObject, const Vector + diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.js b/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.js index 921bb7a..de4f4fb 100644 --- a/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.js +++ b/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.js @@ -42,7 +42,8 @@ var Preferences = { heapProfilerPresent: false, samplingCPUProfiler: false, showColorNicknames: true, - colorFormat: "hex" + colorFormat: "hex", + eventListenersFilter: "all" } var WebInspector = { @@ -354,6 +355,10 @@ WebInspector.loaded = function() if (colorFormat) Preferences.colorFormat = colorFormat; + var eventListenersFilter = InspectorController.setting("event-listeners-filter"); + if (eventListenersFilter) + Preferences.eventListenersFilter = eventListenersFilter; + this.drawer = new WebInspector.Drawer(); this.console = new WebInspector.ConsoleView(this.drawer); // TODO: Uncomment when enabling the Changes Panel @@ -914,10 +919,8 @@ WebInspector.addResource = function(identifier, payload) this.resources[identifier] = resource; this.resourceURLMap[resource.url] = resource; - if (resource.mainResource) { + if (resource.mainResource) this.mainResource = resource; - this.panels.elements.reset(); - } if (this.panels.resources) this.panels.resources.addResource(resource); @@ -1117,6 +1120,12 @@ WebInspector.resourceURLChanged = function(resource, oldURL) this.resourceURLMap[resource.url] = resource; } +WebInspector.didCommitLoad = function() +{ + // Cleanup elements panel early on inspected page refresh. + WebInspector.setDocument(null); +} + WebInspector.addMessageToConsole = function(payload) { var consoleMessage = new WebInspector.ConsoleMessage( diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/utilities.js b/src/3rdparty/webkit/WebCore/inspector/front-end/utilities.js index e83c7c0..5f41b56 100644 --- a/src/3rdparty/webkit/WebCore/inspector/front-end/utilities.js +++ b/src/3rdparty/webkit/WebCore/inspector/front-end/utilities.js @@ -621,11 +621,38 @@ function nodeTitleInfo(hasChildren, linkify) return info; } -function getDocumentForNode(node) { +function appropriateSelectorForNode(node, justSelector) +{ + if (!node) + return ""; + + var lowerCaseName = node.localName || node.nodeName.toLowerCase(); + + var id = node.getAttribute("id"); + if (id) { + var selector = "#" + id; + return (justSelector ? selector : lowerCaseName + selector); + } + + var className = node.getAttribute("class"); + if (className) { + var selector = "." + className.replace(/\s+/, "."); + return (justSelector ? selector : lowerCaseName + selector); + } + + if (lowerCaseName === "input" && node.getAttribute("type")) + return lowerCaseName + "[type=\"" + node.getAttribute("type") + "\"]"; + + return lowerCaseName; +} + +function getDocumentForNode(node) +{ return node.nodeType == Node.DOCUMENT_NODE ? node : node.ownerDocument; } -function parentNode(node) { +function parentNode(node) +{ return node.parentNode; } diff --git a/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp b/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp index 57cf85a..93a1f10 100644 --- a/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp +++ b/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp @@ -947,9 +947,9 @@ void FrameLoader::begin(const KURL& url, bool dispatch, SecurityOrigin* origin) m_outgoingReferrer = ref.string(); m_URL = url; + document->setURL(m_URL); m_frame->setDocument(document); - document->setURL(m_URL); if (m_decoder) document->setDecoder(m_decoder.get()); if (forcedSecurityOrigin) diff --git a/src/3rdparty/webkit/WebCore/loader/ImageDocument.cpp b/src/3rdparty/webkit/WebCore/loader/ImageDocument.cpp index 8078ccd..9b5598d 100644 --- a/src/3rdparty/webkit/WebCore/loader/ImageDocument.cpp +++ b/src/3rdparty/webkit/WebCore/loader/ImageDocument.cpp @@ -70,7 +70,7 @@ private: { } - virtual void handleEvent(Event*); + virtual void handleEvent(ScriptExecutionContext*, Event*); ImageDocument* m_doc; }; @@ -358,7 +358,7 @@ bool ImageDocument::shouldShrinkToFit() const // -------- -void ImageEventListener::handleEvent(Event* event) +void ImageEventListener::handleEvent(ScriptExecutionContext*, Event* event) { if (event->type() == eventNames().resizeEvent) m_doc->windowSizeChanged(); diff --git a/src/3rdparty/webkit/WebCore/page/DOMWindow.idl b/src/3rdparty/webkit/WebCore/page/DOMWindow.idl index f36175e..4e3a03e 100644 --- a/src/3rdparty/webkit/WebCore/page/DOMWindow.idl +++ b/src/3rdparty/webkit/WebCore/page/DOMWindow.idl @@ -489,9 +489,7 @@ module window { attribute XMLHttpRequestUploadConstructor XMLHttpRequestUpload; attribute XMLHttpRequestExceptionConstructor XMLHttpRequestException; -#if defined(ENABLE_XSLT) && ENABLE_XSLT - attribute [JSCCustomGetter] XSLTProcessorConstructor XSLTProcessor; // Usable with the new operator -#endif + attribute [JSCCustomGetter,Conditional=XSLT] XSLTProcessorConstructor XSLTProcessor; // Usable with the new operator #if defined(ENABLE_CHANNEL_MESSAGING) && ENABLE_CHANNEL_MESSAGING attribute MessagePortConstructor MessagePort; diff --git a/src/3rdparty/webkit/WebCore/page/EventHandler.cpp b/src/3rdparty/webkit/WebCore/page/EventHandler.cpp index 3772d65..1075e72 100644 --- a/src/3rdparty/webkit/WebCore/page/EventHandler.cpp +++ b/src/3rdparty/webkit/WebCore/page/EventHandler.cpp @@ -894,8 +894,10 @@ bool EventHandler::scrollOverflow(ScrollDirection direction, ScrollGranularity g if (node) { RenderObject* r = node->renderer(); - if (r && !r->isListBox()) - return r->enclosingBox()->scroll(direction, granularity); + if (r && !r->isListBox() && r->enclosingBox()->scroll(direction, granularity)) { + setFrameWasScrolledByUser(); + return true; + } } return false; @@ -1778,6 +1780,7 @@ bool EventHandler::handleWheelEvent(PlatformWheelEvent& e) FrameView* view = m_frame->view(); if (!view) return false; + setFrameWasScrolledByUser(); IntPoint vPoint = view->windowToContents(e.pos()); Node* node; @@ -2479,17 +2482,23 @@ void EventHandler::sendResizeEvent() void EventHandler::sendScrollEvent() { + setFrameWasScrolledByUser(); + if (m_frame->view()) + m_frame->document()->dispatchEvent(Event::create(eventNames().scrollEvent, true, false)); +} + +void EventHandler::setFrameWasScrolledByUser() +{ FrameView* v = m_frame->view(); - if (!v) - return; - v->setWasScrolledByUser(true); - m_frame->document()->dispatchEvent(Event::create(eventNames().scrollEvent, true, false)); + if (v) + v->setWasScrolledByUser(true); } bool EventHandler::passMousePressEventToScrollbar(MouseEventWithHitTestResults& mev, Scrollbar* scrollbar) { if (!scrollbar || !scrollbar->enabled()) return false; + setFrameWasScrolledByUser(); return scrollbar->mouseDown(mev.event()); } diff --git a/src/3rdparty/webkit/WebCore/page/EventHandler.h b/src/3rdparty/webkit/WebCore/page/EventHandler.h index e1a02db..0221397 100644 --- a/src/3rdparty/webkit/WebCore/page/EventHandler.h +++ b/src/3rdparty/webkit/WebCore/page/EventHandler.h @@ -306,6 +306,8 @@ private: #endif void updateLastScrollbarUnderMouse(Scrollbar*, bool); + + void setFrameWasScrolledByUser(); bool capturesDragging() const { return m_capturesDragging; } diff --git a/src/3rdparty/webkit/WebCore/page/Frame.cpp b/src/3rdparty/webkit/WebCore/page/Frame.cpp index 28e6a9e..e8e796f 100644 --- a/src/3rdparty/webkit/WebCore/page/Frame.cpp +++ b/src/3rdparty/webkit/WebCore/page/Frame.cpp @@ -73,6 +73,7 @@ #include "Settings.h" #include "TextIterator.h" #include "TextResourceDecoder.h" +#include "UserContentURLPattern.h" #include "XMLNames.h" #include "htmlediting.h" #include "markup.h" @@ -870,12 +871,16 @@ void Frame::injectUserScriptsForWorld(unsigned worldID, const UserScriptVector& if (userScripts.isEmpty()) return; + Document* doc = document(); + if (!doc) + return; + // FIXME: Need to implement pattern checking. Vector sourceCode; unsigned count = userScripts.size(); for (unsigned i = 0; i < count; ++i) { UserScript* script = userScripts[i].get(); - if (script->injectionTime() == injectionTime) + if (script->injectionTime() == injectionTime && UserContentURLPattern::matchesPatterns(doc->url(), script->patterns())) sourceCode.append(ScriptSourceCode(script->source(), script->url())); } script()->evaluateInIsolatedWorld(worldID, sourceCode); diff --git a/src/3rdparty/webkit/WebCore/page/Settings.cpp b/src/3rdparty/webkit/WebCore/page/Settings.cpp index 708d595..ab438a1 100644 --- a/src/3rdparty/webkit/WebCore/page/Settings.cpp +++ b/src/3rdparty/webkit/WebCore/page/Settings.cpp @@ -117,6 +117,10 @@ Settings::Settings(Page* page) , m_acceleratedCompositingEnabled(true) , m_experimentalNotificationsEnabled(false) , m_pluginHalterEnabled(false) + , m_experimentalWebGLEnabled(false) +#if ENABLE(WEB_SOCKETS) + , m_experimentalWebSocketsEnabled(false) +#endif { // A Frame may not have been created yet, so we initialize the AtomicString // hash before trying to use it. @@ -528,4 +532,16 @@ void Settings::setShouldUseHighResolutionTimers(bool shouldUseHighResolutionTime } #endif +void Settings::setExperimentalWebGLEnabled(bool enabled) +{ + m_experimentalWebGLEnabled = enabled; +} + +#if ENABLE(WEB_SOCKETS) +void Settings::setExperimentalWebSocketsEnabled(bool enabled) +{ + m_experimentalWebSocketsEnabled = enabled; +} +#endif + } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/page/Settings.h b/src/3rdparty/webkit/WebCore/page/Settings.h index b3daf19..ec9c8f9 100644 --- a/src/3rdparty/webkit/WebCore/page/Settings.h +++ b/src/3rdparty/webkit/WebCore/page/Settings.h @@ -267,6 +267,16 @@ namespace WebCore { void setPluginAllowedRunTime(unsigned); unsigned pluginAllowedRunTime() const { return m_pluginAllowedRunTime; } + // This run-time flag is only temporary while the WebGL + // specification is being developed. + void setExperimentalWebGLEnabled(bool); + bool experimentalWebGLEnabled() const { return m_experimentalWebGLEnabled; } + +#if ENABLE(WEB_SOCKETS) + void setExperimentalWebSocketsEnabled(bool); + bool experimentalWebSocketsEnabled() const { return m_experimentalWebSocketsEnabled; } +#endif + private: Page* m_page; @@ -334,6 +344,11 @@ namespace WebCore { bool m_acceleratedCompositingEnabled : 1; bool m_experimentalNotificationsEnabled : 1; bool m_pluginHalterEnabled : 1; + bool m_experimentalWebGLEnabled : 1; + +#if ENABLE(WEB_SOCKETS) + bool m_experimentalWebSocketsEnabled : 1; +#endif #if USE(SAFARI_THEME) static bool gShouldPaintNativeControls; diff --git a/src/3rdparty/webkit/WebCore/page/UserContentURLPattern.cpp b/src/3rdparty/webkit/WebCore/page/UserContentURLPattern.cpp new file mode 100644 index 0000000..1960131 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/page/UserContentURLPattern.cpp @@ -0,0 +1,212 @@ +/* + * Copyright (C) 2009 Apple 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 COMPUTER, 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 COMPUTER, 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 "UserContentURLPattern.h" +#include "KURL.h" +#include + +namespace WebCore { + +bool UserContentURLPattern::matchesPatterns(const KURL& url, const Vector& patterns) +{ + // Treat no patterns at all as though a pattern of * was specified. + if (patterns.isEmpty()) + return true; + + for (unsigned i = 0; i < patterns.size(); ++i) { + UserContentURLPattern contentPattern(patterns[i]); + if (contentPattern.matches(url)) + return true; + } + + return false; +} + +bool UserContentURLPattern::parse(const String& pattern) +{ + DEFINE_STATIC_LOCAL(const String, schemeSeparator, ("://")); + + int schemeEndPos = pattern.find(schemeSeparator); + if (schemeEndPos == -1) + return false; + + m_scheme = pattern.left(schemeEndPos); + + int hostStartPos = schemeEndPos + schemeSeparator.length(); + if (hostStartPos >= static_cast(pattern.length())) + return false; + + int pathStartPos = 0; + + if (m_scheme == "file") + pathStartPos = hostStartPos; + else { + int hostEndPos = pattern.find("/", hostStartPos); + if (hostEndPos == -1) + return false; + + m_host = pattern.substring(hostStartPos, hostEndPos - hostStartPos); + + // The first component can be '*', which means to match all subdomains. + Vector hostComponents; + m_host.split(".", hostComponents); + if (hostComponents[0] == "*") { + m_matchSubdomains = true; + m_host = ""; + for (unsigned i = 1; i < hostComponents.size(); ++i) { + m_host = m_host + hostComponents[i]; + if (i < hostComponents.size() - 1) + m_host = m_host + "."; + } + } + + // No other '*' can occur in the host. + if (m_host.find("*") != -1) + return false; + + pathStartPos = hostEndPos; + } + + m_path = pattern.right(pattern.length() - pathStartPos); + + return true; +} + +bool UserContentURLPattern::matches(const KURL& test) const +{ + if (m_invalid) + return false; + + if (test.protocol() != m_scheme) + return false; + + if (!matchesHost(test)) + return false; + + return matchesPath(test); +} + +bool UserContentURLPattern::matchesHost(const KURL& test) const +{ + if (test.host() == m_host) + return true; + + if (!m_matchSubdomains) + return false; + + // If we're matching subdomains, and we have no host, that means the pattern + // was ://*/, so we match anything. + if (!m_host.length()) + return true; + + // Check if the test host is a subdomain of our host. + return test.host().endsWith(m_host, false); +} + +struct MatchTester +{ + const String m_pattern; + unsigned m_patternIndex; + + const String m_test; + unsigned m_testIndex; + + MatchTester(const String& pattern, const String& test) + : m_pattern(pattern) + , m_patternIndex(0) + , m_test(test) + , m_testIndex(0) + { + } + + bool testStringFinished() const { return m_testIndex >= m_test.length(); } + bool patternStringFinished() const { return m_patternIndex >= m_pattern.length(); } + + void eatWildcard() + { + while (!patternStringFinished()) { + if (m_pattern[m_patternIndex] != '*') + return; + m_patternIndex++; + } + } + + void eatSameChars() + { + while (!patternStringFinished() && !testStringFinished()) { + if (m_pattern[m_patternIndex] == '*') + return; + if (m_pattern[m_patternIndex] != m_test[m_testIndex]) + return; + m_patternIndex++; + m_testIndex++; + } + } + + bool test() + { + // Eat all the matching chars. + eatSameChars(); + + // If the string is finished, then the pattern must be empty too, or contains + // only wildcards. + if (testStringFinished()) { + eatWildcard(); + if (patternStringFinished()) + return true; + return false; + } + + // Pattern is empty but not string, this is not a match. + if (patternStringFinished()) + return false; + + // If we don't encounter a *, then we're hosed. + if (m_pattern[m_patternIndex] != '*') + return false; + + while (!testStringFinished()) { + MatchTester nextMatch(*this); + nextMatch.m_patternIndex++; + if (nextMatch.test()) + return true; + m_testIndex++; + } + + // We reached the end of the string. Let's see if the pattern contains only + // wildcards. + eatWildcard(); + return patternStringFinished(); + } +}; + +bool UserContentURLPattern::matchesPath(const KURL& test) const +{ + MatchTester match(m_path, test.path()); + return match.test(); +} + +} // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/page/UserContentURLPattern.h b/src/3rdparty/webkit/WebCore/page/UserContentURLPattern.h new file mode 100644 index 0000000..bc87f55 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/page/UserContentURLPattern.h @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2009 Apple 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 COMPUTER, 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 COMPUTER, 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 UserContentURLPattern_h +#define UserContentURLPattern_h + +#include "PlatformString.h" +#include + +namespace WebCore { + +class KURL; + +class UserContentURLPattern { +public: + UserContentURLPattern(const String& pattern) + : m_matchSubdomains(false) + { + m_invalid = !parse(pattern); + } + + bool matches(const KURL&) const; + + const String& scheme() const { return m_scheme; } + const String& host() const { return m_host; } + const String& path() const { return m_path; } + + bool matchSubdomains() const { return m_matchSubdomains; } + + static bool matchesPatterns(const KURL&, const Vector&); + +private: + bool parse(const String& pattern); + + bool matchesHost(const KURL&) const; + bool matchesPath(const KURL&) const; + + bool m_invalid; + + String m_scheme; + String m_host; + String m_path; + + bool m_matchSubdomains; +}; + + +} // namespace WebCore + +#endif // UserContentURLPattern_h diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/filters/FEComposite.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/filters/FEComposite.cpp index 0706358..f452a2d 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/filters/FEComposite.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/filters/FEComposite.cpp @@ -2,6 +2,7 @@ Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann 2004, 2005 Rob Buis 2005 Eric Seidel + 2009 Dirk Schulze This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -24,7 +25,10 @@ #if ENABLE(FILTERS) #include "FEComposite.h" +#include "CanvasPixelArray.h" #include "Filter.h" +#include "GraphicsContext.h" +#include "ImageData.h" namespace WebCore { @@ -97,8 +101,74 @@ void FEComposite::setK4(float k4) m_k4 = k4; } -void FEComposite::apply(Filter*) +inline void arithmetic(const RefPtr& srcPixelArrayA, CanvasPixelArray*& srcPixelArrayB, + float k1, float k2, float k3, float k4) { + float scaledK1 = k1 / 255.f; + float scaledK4 = k4 * 255.f; + for (unsigned pixelOffset = 0; pixelOffset < srcPixelArrayA->length(); pixelOffset += 4) { + for (unsigned channel = 0; channel < 4; ++channel) { + unsigned char i1 = srcPixelArrayA->get(pixelOffset + channel); + unsigned char i2 = srcPixelArrayB->get(pixelOffset + channel); + + unsigned char result = scaledK1 * i1 * i2 + k2 * i1 + k3 * i2 + scaledK4; + if (channel == 3 && i1 == 0 && i2 == 0) + result = 0; + srcPixelArrayB->set(pixelOffset + channel, result); + } + } +} + +void FEComposite::apply(Filter* filter) +{ + m_in->apply(filter); + m_in2->apply(filter); + if (!m_in->resultImage() || !m_in2->resultImage()) + return; + + GraphicsContext* filterContext = getEffectContext(); + if (!filterContext) + return; + + FloatRect srcRect = FloatRect(0.f, 0.f, -1.f, -1.f); + switch (m_type) { + case FECOMPOSITE_OPERATOR_OVER: + filterContext->drawImage(m_in->resultImage()->image(), calculateDrawingRect(m_in->subRegion())); + filterContext->drawImage(m_in2->resultImage()->image(), calculateDrawingRect(m_in2->subRegion())); + break; + case FECOMPOSITE_OPERATOR_IN: + filterContext->save(); + filterContext->clipToImageBuffer(calculateDrawingRect(m_in2->subRegion()), m_in2->resultImage()); + filterContext->drawImage(m_in->resultImage()->image(), calculateDrawingRect(m_in->subRegion())); + filterContext->restore(); + break; + case FECOMPOSITE_OPERATOR_OUT: + filterContext->drawImage(m_in->resultImage()->image(), calculateDrawingRect(m_in->subRegion())); + filterContext->drawImage(m_in2->resultImage()->image(), calculateDrawingRect(m_in2->subRegion()), srcRect, CompositeDestinationOut); + break; + case FECOMPOSITE_OPERATOR_ATOP: + filterContext->drawImage(m_in2->resultImage()->image(), calculateDrawingRect(m_in2->subRegion())); + filterContext->drawImage(m_in->resultImage()->image(), calculateDrawingRect(m_in->subRegion()), srcRect, CompositeSourceAtop); + break; + case FECOMPOSITE_OPERATOR_XOR: + filterContext->drawImage(m_in2->resultImage()->image(), calculateDrawingRect(m_in2->subRegion())); + filterContext->drawImage(m_in->resultImage()->image(), calculateDrawingRect(m_in->subRegion()), srcRect, CompositeXOR); + break; + case FECOMPOSITE_OPERATOR_ARITHMETIC: { + IntRect effectADrawingRect = calculateDrawingIntRect(m_in->subRegion()); + RefPtr srcPixelArrayA(m_in->resultImage()->getPremultipliedImageData(effectADrawingRect)->data()); + + IntRect effectBDrawingRect = calculateDrawingIntRect(m_in2->subRegion()); + RefPtr imageData(m_in2->resultImage()->getPremultipliedImageData(effectBDrawingRect)); + CanvasPixelArray* srcPixelArrayB(imageData->data()); + + arithmetic(srcPixelArrayA, srcPixelArrayB, m_k1, m_k2, m_k3, m_k4); + resultImage()->putPremultipliedImageData(imageData.get(), IntRect(IntPoint(), resultImage()->size()), IntPoint()); + } + break; + default: + break; + } } void FEComposite::dump() diff --git a/src/3rdparty/webkit/WebCore/platform/network/CredentialStorage.cpp b/src/3rdparty/webkit/WebCore/platform/network/CredentialStorage.cpp index b7f4c01..407ed5b 100644 --- a/src/3rdparty/webkit/WebCore/platform/network/CredentialStorage.cpp +++ b/src/3rdparty/webkit/WebCore/platform/network/CredentialStorage.cpp @@ -60,6 +60,9 @@ static String originStringFromURL(const KURL& url) void CredentialStorage::set(const Credential& credential, const ProtectionSpace& protectionSpace, const KURL& url) { + ASSERT(url.protocolInHTTPFamily()); + ASSERT(url.isValid()); + protectionSpaceToCredentialMap().set(protectionSpace, credential); ProtectionSpaceAuthenticationScheme scheme = protectionSpace.authenticationScheme(); @@ -70,14 +73,15 @@ void CredentialStorage::set(const Credential& credential, const ProtectionSpace& pair >::iterator, bool> result = originToDefaultBasicCredentialMap().add(origin, pathToCredentialMap); // Remove the last path component that is not a directory to determine the subpath for which this credential applies. + // We keep a leading slash, but remove a trailing one. String path = url.path(); - if (!path.endsWith("/")) { + ASSERT(path.length() > 0); + ASSERT(path[0] == '/'); + if (path.length() > 1) { int index = path.reverseFind('/'); - if (index != -1) - path = path.substring(0, index); + path = path.substring(0, index ? index : 1); } - if (path.endsWith("/") && path.length() > 1) - path = path.substring(0, path.length() - 1); + ASSERT(path.length() == 1 || path[path.length() - 1] != '/'); result.first->second.set(path, credential); } @@ -102,13 +106,13 @@ Credential CredentialStorage::getDefaultAuthenticationCredential(const KURL& url while (credential.isEmpty() && !path.isNull()) { int index = path.reverseFind('/'); if (index == 0) { - path = String(); credential = pathToCredentialMap.get("/"); + break; } else if (index == -1) { // This case should never happen, as all HTTP URL paths should start with a leading / ASSERT_NOT_REACHED(); credential = pathToCredentialMap.get(path); - path = String(); + break; } else { path = path.substring(0, index); credential = pathToCredentialMap.get(path); diff --git a/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp b/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp index eac430f..3303b34 100644 --- a/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp +++ b/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp @@ -205,13 +205,28 @@ QNetworkReply* QNetworkReplyHandler::release() return reply; } +static bool ignoreHttpError(QNetworkReply* reply, bool receivedData) +{ + int httpStatusCode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); + + if (httpStatusCode == 401 || httpStatusCode == 407) + return true; + + if (receivedData && (httpStatusCode >= 400 && httpStatusCode < 600)) + return true; + + return false; +} + void QNetworkReplyHandler::finish() { m_shouldFinish = (m_loadMode != LoadNormal); if (m_shouldFinish) return; - sendResponseIfNeeded(); + // FIXME: Investigate if this check should be moved into sendResponseIfNeeded() + if (!m_reply->error()) + sendResponseIfNeeded(); if (!m_resourceHandle) return; @@ -225,23 +240,22 @@ void QNetworkReplyHandler::finish() if (m_redirected) { resetState(); start(); - } else if (m_reply->error() != QNetworkReply::NoError - // a web page that returns 401/403/404 can still have content - && ((m_reply->error() != QNetworkReply::ContentOperationNotPermittedError - && m_reply->error() != QNetworkReply::ContentNotFoundError - && m_reply->error() != QNetworkReply::ProtocolUnknownError - && m_reply->error() != QNetworkReply::UnknownContentError) - // If the web page sent content, let's give it to the user. - || !m_responseDataSent) - && m_reply->error() != QNetworkReply::AuthenticationRequiredError - && m_reply->error() != QNetworkReply::ProxyAuthenticationRequiredError) { - QUrl url = m_reply->url(); - ResourceError error(url.host(), m_reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), - url.toString(), m_reply->errorString()); - client->didFail(m_resourceHandle, error); - } else { + } else if (!m_reply->error() || ignoreHttpError(m_reply, m_responseDataSent)) { client->didFinishLoading(m_resourceHandle); + } else { + int code = m_reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); + + QUrl url = m_reply->url(); + + if (code) { + ResourceError error("HTTP", code, url.toString(), m_reply->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toString()); + client->didFail(m_resourceHandle, error); + } else { + ResourceError error("QtNetwork", m_reply->error(), url.toString(), m_reply->errorString()); + client->didFail(m_resourceHandle, error); + } } + oldReply->deleteLater(); if (oldReply == m_reply) m_reply = 0; @@ -300,8 +314,7 @@ void QNetworkReplyHandler::sendResponseIfNeeded() * For local file requests remove the content length and the last-modified * headers as required by fast/dom/xmlhttprequest-get.xhtml */ - foreach (QByteArray headerName, m_reply->rawHeaderList()) { - + foreach (const QByteArray& headerName, m_reply->rawHeaderList()) { if (isLocalFileReply && (headerName == "Content-Length" || headerName == "Last-Modified")) continue; diff --git a/src/3rdparty/webkit/WebCore/platform/qt/Localizations.cpp b/src/3rdparty/webkit/WebCore/platform/qt/Localizations.cpp index 977b284..77cac57 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/Localizations.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/Localizations.cpp @@ -427,7 +427,7 @@ String localizedMediaControlElementHelpText(const String& name) if (name == "CurrentTimeDisplay") return QCoreApplication::translate("QWebPage", "Current movie time", "Media controller element"); if (name == "TimeRemainingDisplay") - return QCoreApplication::translate("QWebPage", "Remaining move time", "Media controller element"); + return QCoreApplication::translate("QWebPage", "Remaining movie time", "Media controller element"); if (name == "StatusDisplay") return QCoreApplication::translate("QWebPage", "Current movie status", "Media controller element"); if (name == "FullscreenButton") diff --git a/src/3rdparty/webkit/WebCore/platform/text/CString.cpp b/src/3rdparty/webkit/WebCore/platform/text/CString.cpp index 5b8ac58..25f5fa1 100644 --- a/src/3rdparty/webkit/WebCore/platform/text/CString.cpp +++ b/src/3rdparty/webkit/WebCore/platform/text/CString.cpp @@ -27,19 +27,10 @@ #include "config.h" #include "CString.h" -#include "Base64.h" - using std::min; namespace WebCore { -PassRefPtr CStringBuffer::base64Encode() -{ - Vector encoded; - WebCore::base64Encode(m_vector, encoded); - return CStringBuffer::create(encoded); -} - CString::CString(const char* str) { init(str, strlen(str)); @@ -99,11 +90,6 @@ void CString::copyBufferIfNeeded() memcpy(m_buffer->mutableData(), m_temp->data(), len); } -CString CString::base64Encode() -{ - return CString(m_buffer->base64Encode().get()); -} - bool operator==(const CString& a, const CString& b) { if (a.isNull() != b.isNull()) diff --git a/src/3rdparty/webkit/WebCore/platform/text/CString.h b/src/3rdparty/webkit/WebCore/platform/text/CString.h index 2d1cc2b..b9030d6 100644 --- a/src/3rdparty/webkit/WebCore/platform/text/CString.h +++ b/src/3rdparty/webkit/WebCore/platform/text/CString.h @@ -43,12 +43,9 @@ namespace WebCore { friend class CString; static PassRefPtr create(unsigned length) { return adoptRef(new CStringBuffer(length)); } - static PassRefPtr create(const Vector& vectorToAdopt) { return adoptRef(new CStringBuffer(vectorToAdopt)); } CStringBuffer(unsigned length) : m_vector(length) { } - CStringBuffer(const Vector& vectorToAdopt) : m_vector(vectorToAdopt) { } char* mutableData() { return m_vector.data(); } - PassRefPtr base64Encode(); Vector m_vector; }; @@ -62,8 +59,6 @@ namespace WebCore { CString(CStringBuffer* buffer) : m_buffer(buffer) { } static CString newUninitialized(size_t length, char*& characterBuffer); - CString base64Encode(); - const char* data() const; char* mutableData(); unsigned length() const; diff --git a/src/3rdparty/webkit/WebCore/platform/text/TextEncoding.cpp b/src/3rdparty/webkit/WebCore/platform/text/TextEncoding.cpp index b76f739..c5c8cfd 100644 --- a/src/3rdparty/webkit/WebCore/platform/text/TextEncoding.cpp +++ b/src/3rdparty/webkit/WebCore/platform/text/TextEncoding.cpp @@ -264,6 +264,7 @@ const TextEncoding& UTF32LittleEndianEncoding() const TextEncoding& UTF8Encoding() { static TextEncoding globalUTF8Encoding("UTF-8"); + ASSERT(globalUTF8Encoding.isValid()); return globalUTF8Encoding; } diff --git a/src/3rdparty/webkit/WebCore/rendering/MediaControlElements.cpp b/src/3rdparty/webkit/WebCore/rendering/MediaControlElements.cpp index 969716f..29e2e57 100644 --- a/src/3rdparty/webkit/WebCore/rendering/MediaControlElements.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/MediaControlElements.cpp @@ -135,7 +135,10 @@ PassRefPtr MediaControlElement::styleForElement() bool MediaControlElement::rendererIsNeeded(RenderStyle* style) { - return HTMLDivElement::rendererIsNeeded(style) && parent() && parent()->renderer(); + ASSERT(document()->page()); + + return HTMLDivElement::rendererIsNeeded(style) && parent() && parent()->renderer() + && document()->page()->theme()->shouldRenderMediaControlPart(style->appearance(), m_mediaElement); } void MediaControlElement::attach() @@ -360,7 +363,10 @@ PassRefPtr MediaControlInputElement::styleForElement() bool MediaControlInputElement::rendererIsNeeded(RenderStyle* style) { - return HTMLInputElement::rendererIsNeeded(style) && parent() && parent()->renderer(); + ASSERT(document()->page()); + + return HTMLInputElement::rendererIsNeeded(style) && parent() && parent()->renderer() + && document()->page()->theme()->shouldRenderMediaControlPart(style->appearance(), m_mediaElement); } void MediaControlInputElement::attach() @@ -444,16 +450,6 @@ void MediaControlMuteButtonElement::updateDisplayType() setDisplayType(m_mediaElement->muted() ? MediaUnMuteButton : MediaMuteButton); } -bool MediaControlMuteButtonElement::disabled() const -{ - return !m_mediaElement->hasAudio(); -} - -bool MediaControlMuteButtonElement::rendererIsNeeded(RenderStyle* style) -{ - return MediaControlInputElement::rendererIsNeeded(style) && !disabled(); -} - // ---------------------------- MediaControlPlayButtonElement::MediaControlPlayButtonElement(Document* document, HTMLMediaElement* element) @@ -551,11 +547,6 @@ void MediaControlRewindButtonElement::defaultEventHandler(Event* event) HTMLInputElement::defaultEventHandler(event); } -bool MediaControlRewindButtonElement::rendererIsNeeded(RenderStyle* style) -{ - return MediaControlInputElement::rendererIsNeeded(style) && m_mediaElement->movieLoadType() != MediaPlayer::LiveStream; -} - // ---------------------------- @@ -573,10 +564,6 @@ void MediaControlReturnToRealtimeButtonElement::defaultEventHandler(Event* event HTMLInputElement::defaultEventHandler(event); } -bool MediaControlReturnToRealtimeButtonElement::rendererIsNeeded(RenderStyle* style) -{ - return MediaControlInputElement::rendererIsNeeded(style) && m_mediaElement->movieLoadType() == MediaPlayer::LiveStream; -} // ---------------------------- @@ -664,11 +651,6 @@ void MediaControlFullscreenButtonElement::defaultEventHandler(Event* event) HTMLInputElement::defaultEventHandler(event); } -bool MediaControlFullscreenButtonElement::rendererIsNeeded(RenderStyle* style) -{ - return MediaControlInputElement::rendererIsNeeded(style) && m_mediaElement->supportsFullscreen(); -} - // ---------------------------- diff --git a/src/3rdparty/webkit/WebCore/rendering/MediaControlElements.h b/src/3rdparty/webkit/WebCore/rendering/MediaControlElements.h index e80f7fa..f692485 100644 --- a/src/3rdparty/webkit/WebCore/rendering/MediaControlElements.h +++ b/src/3rdparty/webkit/WebCore/rendering/MediaControlElements.h @@ -155,9 +155,6 @@ public: bool hitTest(const IntPoint& absPoint); MediaControlElementType displayType() const { return m_displayType; } - // Some elements are disabled by movie state (eg. mute if no audio). - virtual bool disabled() const { return false; } - HTMLMediaElement* mediaElement() const { return m_mediaElement; } virtual bool isMediaControlElement() const { return true; } @@ -177,8 +174,6 @@ public: MediaControlMuteButtonElement(Document*, HTMLMediaElement*); virtual void defaultEventHandler(Event*); virtual void updateDisplayType(); - virtual bool disabled() const; - virtual bool rendererIsNeeded(RenderStyle*); }; // ---------------------------- @@ -212,7 +207,6 @@ class MediaControlRewindButtonElement : public MediaControlInputElement { public: MediaControlRewindButtonElement(Document*, HTMLMediaElement*); virtual void defaultEventHandler(Event*); - virtual bool rendererIsNeeded(RenderStyle*); }; // ---------------------------- @@ -221,7 +215,6 @@ class MediaControlReturnToRealtimeButtonElement : public MediaControlInputElemen public: MediaControlReturnToRealtimeButtonElement(Document*, HTMLMediaElement*); virtual void defaultEventHandler(Event*); - virtual bool rendererIsNeeded(RenderStyle*); }; // ---------------------------- @@ -247,7 +240,6 @@ class MediaControlFullscreenButtonElement : public MediaControlInputElement { public: MediaControlFullscreenButtonElement(Document*, HTMLMediaElement*); virtual void defaultEventHandler(Event*); - virtual bool rendererIsNeeded(RenderStyle*); }; // ---------------------------- diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderBox.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderBox.cpp index dd58ed1..c8d3037 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderBox.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderBox.cpp @@ -941,7 +941,8 @@ void RenderBox::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool if (style()->position() == FixedPosition) fixed = true; - RenderObject* o = container(); + bool containerSkipped; + RenderObject* o = container(repaintContainer, &containerSkipped); if (!o) return; @@ -959,6 +960,14 @@ void RenderBox::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool } else transformState.move(containerOffset.width(), containerOffset.height(), preserve3D ? TransformState::AccumulateTransform : TransformState::FlattenTransform); + if (containerSkipped) { + // There can't be a transfrom between repaintContainer and o, because transforms create containers, so it should be safe + // to just subtract the delta between the repaintContainer and o. + IntSize repaintContainerOffset = repaintContainer->offsetFromContainer(o); + transformState.move(-repaintContainerOffset.width(), -repaintContainerOffset.height(), preserve3D ? TransformState::AccumulateTransform : TransformState::FlattenTransform); + return; + } + o->mapLocalToContainer(repaintContainer, fixed, useTransforms, transformState); } @@ -1131,7 +1140,8 @@ void RenderBox::computeRectForRepaint(RenderBoxModelObject* repaintContainer, In if (repaintContainer == this) return; - RenderObject* o = container(); + bool containerSkipped; + RenderObject* o = container(repaintContainer, &containerSkipped); if (!o) return; @@ -1188,6 +1198,13 @@ void RenderBox::computeRectForRepaint(RenderBoxModelObject* repaintContainer, In return; } else rect.setLocation(topLeft); + + if (containerSkipped) { + // If the repaintContainer is below o, then we need to map the rect into repaintContainer's coordinates. + IntSize containerOffset = repaintContainer->offsetFromContainer(o); + rect.move(-containerOffset); + return; + } o->computeRectForRepaint(repaintContainer, rect, fixed); } diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderInline.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderInline.cpp index 07b28cc..a5e973e 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderInline.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderInline.cpp @@ -652,7 +652,8 @@ void RenderInline::computeRectForRepaint(RenderBoxModelObject* repaintContainer, if (repaintContainer == this) return; - RenderObject* o = container(); + bool containerSkipped; + RenderObject* o = container(repaintContainer, &containerSkipped); if (!o) return; @@ -693,6 +694,13 @@ void RenderInline::computeRectForRepaint(RenderBoxModelObject* repaintContainer, return; } else rect.setLocation(topLeft); + + if (containerSkipped) { + // If the repaintContainer is below o, then we need to map the rect into repaintContainer's coordinates. + IntSize containerOffset = repaintContainer->offsetFromContainer(o); + rect.move(-containerOffset); + return; + } o->computeRectForRepaint(repaintContainer, rect, fixed); } diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp index 1d5ed0c..b7f59e1 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp @@ -1788,8 +1788,11 @@ bool RenderObject::hasOutlineAnnotation() const return node() && node()->isLink() && document()->printing(); } -RenderObject* RenderObject::container() const +RenderObject* RenderObject::container(RenderBoxModelObject* repaintContainer, bool* repaintContainerSkipped) const { + if (repaintContainerSkipped) + *repaintContainerSkipped = false; + // This method is extremely similar to containingBlock(), but with a few notable // exceptions. // (1) It can be used on orphaned subtrees, i.e., it can be called safely even when @@ -1814,14 +1817,20 @@ RenderObject* RenderObject::container() const // we'll just return 0). // FIXME: The definition of view() has changed to not crawl up the render tree. It might // be safe now to use it. - while (o && o->parent() && !(o->hasTransform() && o->isRenderBlock())) + while (o && o->parent() && !(o->hasTransform() && o->isRenderBlock())) { + if (repaintContainerSkipped && o == repaintContainer) + *repaintContainerSkipped = true; o = o->parent(); + } } else if (pos == AbsolutePosition) { // Same goes here. We technically just want our containing block, but // we may not have one if we're part of an uninstalled subtree. We'll // climb as high as we can though. - while (o && o->style()->position() == StaticPosition && !o->isRenderView() && !(o->hasTransform() && o->isRenderBlock())) + while (o && o->style()->position() == StaticPosition && !o->isRenderView() && !(o->hasTransform() && o->isRenderBlock())) { + if (repaintContainerSkipped && o == repaintContainer) + *repaintContainerSkipped = true; o = o->parent(); + } } return o; diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderObject.h b/src/3rdparty/webkit/WebCore/rendering/RenderObject.h index 34f2b8b..367eaa6 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderObject.h +++ b/src/3rdparty/webkit/WebCore/rendering/RenderObject.h @@ -403,11 +403,11 @@ public: bool hasOutlineAnnotation() const; bool hasOutline() const { return style()->hasOutline() || hasOutlineAnnotation(); } - /** - * returns the object containing this one. can be different from parent for - * positioned elements - */ - RenderObject* container() const; + // Returns the object containing this one. Can be different from parent for positioned elements. + // If repaintContainer and repaintContainerSkipped are not null, on return *repaintContainerSkipped + // is true if the renderer returned is an ancestor of repaintContainer. + RenderObject* container(RenderBoxModelObject* repaintContainer = 0, bool* repaintContainerSkipped = 0) const; + virtual RenderObject* hoverAncestor() const { return parent(); } // IE Extension that can be called on any RenderObject. See the implementation for the details. diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderTheme.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderTheme.cpp index 7b4dfe3..b5826cd 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderTheme.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderTheme.cpp @@ -30,6 +30,7 @@ #include "GraphicsContext.h" #include "HTMLInputElement.h" #include "HTMLNames.h" +#include "MediaControlElements.h" #include "Page.h" #include "RenderStyle.h" #include "RenderView.h" @@ -396,6 +397,23 @@ bool RenderTheme::hitTestMediaControlPart(RenderObject* o, const IntPoint& absPo FloatPoint localPoint = o->absoluteToLocal(absPoint, false, true); // respect transforms return toRenderBox(o)->borderBoxRect().contains(roundedIntPoint(localPoint)); } + +bool RenderTheme::shouldRenderMediaControlPart(ControlPart part, Element* e) +{ + HTMLMediaElement* mediaElement = static_cast(e); + switch (part) { + case MediaMuteButtonPart: + return mediaElement->hasAudio(); + case MediaRewindButtonPart: + return mediaElement->movieLoadType() != MediaPlayer::LiveStream; + case MediaReturnToRealtimeButtonPart: + return mediaElement->movieLoadType() == MediaPlayer::LiveStream; + case MediaFullscreenButtonPart: + return mediaElement->supportsFullscreen(); + default: + return true; + } +} #endif Color RenderTheme::activeSelectionBackgroundColor() const diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderTheme.h b/src/3rdparty/webkit/WebCore/rendering/RenderTheme.h index c00c2eb..1b6a7e4 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderTheme.h +++ b/src/3rdparty/webkit/WebCore/rendering/RenderTheme.h @@ -172,6 +172,7 @@ public: #if ENABLE(VIDEO) // Media controls virtual bool hitTestMediaControlPart(RenderObject*, const IntPoint& absPoint); + virtual bool shouldRenderMediaControlPart(ControlPart, Element*); #endif protected: diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumSkia.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumSkia.cpp index 82e633b..4f486d5 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumSkia.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumSkia.cpp @@ -868,6 +868,19 @@ int RenderThemeChromiumSkia::buttonInternalPaddingBottom() const return 1; } +#if ENABLE(VIDEO) +bool RenderThemeChromiumSkia::shouldRenderMediaControlPart(ControlPart part, Element* e) +{ + HTMLMediaElement* mediaElement = static_cast(e); + switch (part) { + case MediaMuteButtonPart: + return true; + default: + return RenderTheme::shouldRenderMediaControlPart(part, e); + } +} +#endif + // static void RenderThemeChromiumSkia::setDefaultFontSize(int fontSize) { diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumSkia.h b/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumSkia.h index 37e656f..98e3a35 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumSkia.h +++ b/src/3rdparty/webkit/WebCore/rendering/RenderThemeChromiumSkia.h @@ -126,6 +126,11 @@ namespace WebCore { virtual int buttonInternalPaddingTop() const; virtual int buttonInternalPaddingBottom() const; +#if ENABLE(VIDEO) + // Media controls + virtual bool shouldRenderMediaControlPart(ControlPart, Element*); +#endif + // Provide a way to pass the default font size from the Settings object // to the render theme. FIXME: http://b/1129186 A cleaner way would be // to remove the default font size from this object and have callers diff --git a/src/3rdparty/webkit/WebCore/storage/StorageEventDispatcher.h b/src/3rdparty/webkit/WebCore/storage/StorageEventDispatcher.h new file mode 100644 index 0000000..f4a98ef --- /dev/null +++ b/src/3rdparty/webkit/WebCore/storage/StorageEventDispatcher.h @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2008 Apple Inc. All rights reserved. + * Copyright (C) 2009 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 Apple Computer, Inc. ("Apple") 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 APPLE 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 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. + */ + +#ifndef StorageEventDispatcher_h +#define StorageEventDispatcher_h + +#if ENABLE(DOM_STORAGE) + +#include "PlatformString.h" +#include "StorageArea.h" + +namespace WebCore { + + // This is in its own class since Chromium must override it. + class StorageEventDispatcher { + public: + static void dispatch(const String& key, const String& oldValue, const String& newValue, StorageType, SecurityOrigin*, Frame* sourceFrame); + + private: + // Do not instantiate. + StorageEventDispatcher(); + }; + +} // namespace WebCore + +#endif // ENABLE(DOM_STORAGE) + +#endif // StorageEventDispatcher_h diff --git a/src/3rdparty/webkit/WebCore/svg/SVGUseElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGUseElement.cpp index 4b66e03..0c2abe0 100644 --- a/src/3rdparty/webkit/WebCore/svg/SVGUseElement.cpp +++ b/src/3rdparty/webkit/WebCore/svg/SVGUseElement.cpp @@ -1,6 +1,7 @@ /* Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann 2004, 2005, 2006, 2007 Rob Buis + Copyright (C) Research In Motion Limited 2009. All rights reserved. This file is part of the KDE project @@ -158,6 +159,9 @@ void SVGUseElement::childrenChanged(bool changedByParser, Node* beforeChange, No static bool shadowTreeContainsChangedNodes(SVGElementInstance* target) { + if (!target) // when use is referencing an non-existing element, there will be no Instance tree built + return false; + if (target->needsUpdate()) return true; diff --git a/src/3rdparty/webkit/WebCore/svg/animation/SVGSMILElement.cpp b/src/3rdparty/webkit/WebCore/svg/animation/SVGSMILElement.cpp index 8ec9435..3957b81 100644 --- a/src/3rdparty/webkit/WebCore/svg/animation/SVGSMILElement.cpp +++ b/src/3rdparty/webkit/WebCore/svg/animation/SVGSMILElement.cpp @@ -87,7 +87,7 @@ private: m_eventBase->addEventListener(m_condition->m_name, this, false); } - virtual void handleEvent(Event*); + virtual void handleEvent(ScriptExecutionContext*, Event*); SVGSMILElement* m_animation; SVGSMILElement::Condition* m_condition; @@ -103,7 +103,7 @@ bool ConditionEventListener::operator==(const EventListener& listener) return false; } -void ConditionEventListener::handleEvent(Event* event) +void ConditionEventListener::handleEvent(ScriptExecutionContext*, Event* event) { m_animation->handleConditionEvent(event, m_condition); } diff --git a/src/3rdparty/webkit/WebCore/workers/WorkerContext.cpp b/src/3rdparty/webkit/WebCore/workers/WorkerContext.cpp index 22e5b56..f4d795b 100644 --- a/src/3rdparty/webkit/WebCore/workers/WorkerContext.cpp +++ b/src/3rdparty/webkit/WebCore/workers/WorkerContext.cpp @@ -233,7 +233,7 @@ void WorkerContext::reportException(const String& errorMessage, int lineNumber, { bool errorHandled = false; if (onerror()) - errorHandled = onerror()->reportError(errorMessage, sourceURL, lineNumber); + errorHandled = onerror()->reportError(this, errorMessage, sourceURL, lineNumber); if (!errorHandled) thread()->workerReportingProxy().postExceptionToWorkerObject(errorMessage, lineNumber, sourceURL); diff --git a/src/3rdparty/webkit/WebCore/xml/XSLStyleSheet.cpp b/src/3rdparty/webkit/WebCore/xml/XSLStyleSheet.cpp deleted file mode 100644 index b7d52f8..0000000 --- a/src/3rdparty/webkit/WebCore/xml/XSLStyleSheet.cpp +++ /dev/null @@ -1,312 +0,0 @@ -/* - * This file is part of the XSL implementation. - * - * Copyright (C) 2004, 2005, 2006, 2008 Apple 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 "XSLStyleSheet.h" - -#if ENABLE(XSLT) - -#include "CString.h" -#include "Console.h" -#include "DOMWindow.h" -#include "DocLoader.h" -#include "Document.h" -#include "Frame.h" -#include "Node.h" -#include "XMLTokenizer.h" -#include "XMLTokenizerScope.h" -#include "XSLImportRule.h" -#include "XSLTProcessor.h" -#include "loader.h" - -#include -#include - -#if PLATFORM(MAC) -#include "SoftLinking.h" -#endif - -#if PLATFORM(MAC) -SOFT_LINK_LIBRARY(libxslt) -SOFT_LINK(libxslt, xsltIsBlank, int, (xmlChar *str), (str)) -SOFT_LINK(libxslt, xsltGetNsProp, xmlChar *, (xmlNodePtr node, const xmlChar *name, const xmlChar *nameSpace), (node, name, nameSpace)) -SOFT_LINK(libxslt, xsltParseStylesheetDoc, xsltStylesheetPtr, (xmlDocPtr doc), (doc)) -SOFT_LINK(libxslt, xsltLoadStylesheetPI, xsltStylesheetPtr, (xmlDocPtr doc), (doc)) -#endif - -namespace WebCore { - -XSLStyleSheet::XSLStyleSheet(XSLImportRule* parentRule, const String& href) - : StyleSheet(parentRule, href) - , m_ownerDocument(0) - , m_stylesheetDoc(0) - , m_embedded(false) - , m_processed(false) // Child sheets get marked as processed when the libxslt engine has finally seen them. - , m_stylesheetDocTaken(false) - , m_parentStyleSheet(0) -{ -} - -XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& href, bool embedded) - : StyleSheet(parentNode, href) - , m_ownerDocument(parentNode->document()) - , m_stylesheetDoc(0) - , m_embedded(embedded) - , m_processed(true) // The root sheet starts off processed. - , m_stylesheetDocTaken(false) - , m_parentStyleSheet(0) -{ -} - -XSLStyleSheet::~XSLStyleSheet() -{ - if (!m_stylesheetDocTaken) - xmlFreeDoc(m_stylesheetDoc); -} - -bool XSLStyleSheet::isLoading() -{ - unsigned len = length(); - for (unsigned i = 0; i < len; ++i) { - StyleBase* rule = item(i); - if (rule->isImportRule()) { - XSLImportRule* import = static_cast(rule); - if (import->isLoading()) - return true; - } - } - return false; -} - -void XSLStyleSheet::checkLoaded() -{ - if (isLoading()) - return; - if (parent()) - parent()->checkLoaded(); - if (ownerNode()) - ownerNode()->sheetLoaded(); -} - -xmlDocPtr XSLStyleSheet::document() -{ - if (m_embedded && ownerDocument()) - return (xmlDocPtr)ownerDocument()->transformSource(); - return m_stylesheetDoc; -} - -void XSLStyleSheet::clearDocuments() -{ - m_stylesheetDoc = 0; - unsigned len = length(); - for (unsigned i = 0; i < len; ++i) { - StyleBase* rule = item(i); - if (rule->isImportRule()) { - XSLImportRule* import = static_cast(rule); - if (import->styleSheet()) - import->styleSheet()->clearDocuments(); - } - } -} - -DocLoader* XSLStyleSheet::docLoader() -{ - if (!m_ownerDocument) - return 0; - return m_ownerDocument->docLoader(); -} - -bool XSLStyleSheet::parseString(const String& string, bool) -{ - // Parse in a single chunk into an xmlDocPtr - const UChar BOM = 0xFEFF; - const unsigned char BOMHighByte = *reinterpret_cast(&BOM); - if (!m_stylesheetDocTaken) - xmlFreeDoc(m_stylesheetDoc); - m_stylesheetDocTaken = false; - - Console* console = 0; - if (Frame* frame = ownerDocument()->frame()) - console = frame->domWindow()->console(); - - XMLTokenizerScope scope(docLoader(), XSLTProcessor::genericErrorFunc, XSLTProcessor::parseErrorFunc, console); - - const char* buffer = reinterpret_cast(string.characters()); - int size = string.length() * sizeof(UChar); - - xmlParserCtxtPtr ctxt = xmlCreateMemoryParserCtxt(buffer, size); - - if (m_parentStyleSheet) { - // The XSL transform may leave the newly-transformed document - // with references to the symbol dictionaries of the style sheet - // and any of its children. XML document disposal can corrupt memory - // if a document uses more than one symbol dictionary, so we - // ensure that all child stylesheets use the same dictionaries as their - // parents. - xmlDictFree(ctxt->dict); - ctxt->dict = m_parentStyleSheet->m_stylesheetDoc->dict; - xmlDictReference(ctxt->dict); - } - - m_stylesheetDoc = xmlCtxtReadMemory(ctxt, buffer, size, - href().utf8().data(), - BOMHighByte == 0xFF ? "UTF-16LE" : "UTF-16BE", - XML_PARSE_NOENT | XML_PARSE_DTDATTR | XML_PARSE_NOWARNING | XML_PARSE_NOCDATA); - xmlFreeParserCtxt(ctxt); - - loadChildSheets(); - - return m_stylesheetDoc; -} - -void XSLStyleSheet::loadChildSheets() -{ - if (!document()) - return; - - xmlNodePtr stylesheetRoot = document()->children; - - // Top level children may include other things such as DTD nodes, we ignore those. - while (stylesheetRoot && stylesheetRoot->type != XML_ELEMENT_NODE) - stylesheetRoot = stylesheetRoot->next; - - if (m_embedded) { - // We have to locate (by ID) the appropriate embedded stylesheet element, so that we can walk the - // import/include list. - xmlAttrPtr idNode = xmlGetID(document(), (const xmlChar*)(href().utf8().data())); - if (!idNode) - return; - stylesheetRoot = idNode->parent; - } else { - // FIXME: Need to handle an external URI with a # in it. This is a pretty minor edge case, so we'll deal - // with it later. - } - - if (stylesheetRoot) { - // Walk the children of the root element and look for import/include elements. - // Imports must occur first. - xmlNodePtr curr = stylesheetRoot->children; - while (curr) { - if (curr->type != XML_ELEMENT_NODE) { - curr = curr->next; - continue; - } - if (IS_XSLT_ELEM(curr) && IS_XSLT_NAME(curr, "import")) { - xmlChar* uriRef = xsltGetNsProp(curr, (const xmlChar*)"href", XSLT_NAMESPACE); - loadChildSheet(String::fromUTF8((const char*)uriRef)); - xmlFree(uriRef); - } else - break; - curr = curr->next; - } - - // Now handle includes. - while (curr) { - if (curr->type == XML_ELEMENT_NODE && IS_XSLT_ELEM(curr) && IS_XSLT_NAME(curr, "include")) { - xmlChar* uriRef = xsltGetNsProp(curr, (const xmlChar*)"href", XSLT_NAMESPACE); - loadChildSheet(String::fromUTF8((const char*)uriRef)); - xmlFree(uriRef); - } - curr = curr->next; - } - } -} - -void XSLStyleSheet::loadChildSheet(const String& href) -{ - RefPtr childRule = XSLImportRule::create(this, href); - append(childRule); - childRule->loadSheet(); -} - -xsltStylesheetPtr XSLStyleSheet::compileStyleSheet() -{ - // FIXME: Hook up error reporting for the stylesheet compilation process. - if (m_embedded) - return xsltLoadStylesheetPI(document()); - - // xsltParseStylesheetDoc makes the document part of the stylesheet - // so we have to release our pointer to it. - ASSERT(!m_stylesheetDocTaken); - xsltStylesheetPtr result = xsltParseStylesheetDoc(m_stylesheetDoc); - if (result) - m_stylesheetDocTaken = true; - return result; -} - -void XSLStyleSheet::setParentStyleSheet(XSLStyleSheet* parent) -{ - m_parentStyleSheet = parent; - if (parent) - m_ownerDocument = parent->ownerDocument(); -} - -xmlDocPtr XSLStyleSheet::locateStylesheetSubResource(xmlDocPtr parentDoc, const xmlChar* uri) -{ - bool matchedParent = (parentDoc == document()); - unsigned len = length(); - for (unsigned i = 0; i < len; ++i) { - StyleBase* rule = item(i); - if (rule->isImportRule()) { - XSLImportRule* import = static_cast(rule); - XSLStyleSheet* child = import->styleSheet(); - if (!child) - continue; - if (matchedParent) { - if (child->processed()) - continue; // libxslt has been given this sheet already. - - // Check the URI of the child stylesheet against the doc URI. - // In order to ensure that libxml canonicalized both URLs, we get the original href - // string from the import rule and canonicalize it using libxml before comparing it - // with the URI argument. - CString importHref = import->href().utf8(); - xmlChar* base = xmlNodeGetBase(parentDoc, (xmlNodePtr)parentDoc); - xmlChar* childURI = xmlBuildURI((const xmlChar*)importHref.data(), base); - bool equalURIs = xmlStrEqual(uri, childURI); - xmlFree(base); - xmlFree(childURI); - if (equalURIs) { - child->markAsProcessed(); - return child->document(); - } - } else { - xmlDocPtr result = import->styleSheet()->locateStylesheetSubResource(parentDoc, uri); - if (result) - return result; - } - } - } - - return 0; -} - -void XSLStyleSheet::markAsProcessed() -{ - ASSERT(!m_processed); - ASSERT(!m_stylesheetDocTaken); - m_processed = true; - m_stylesheetDocTaken = true; -} - -} // namespace WebCore - -#endif // ENABLE(XSLT) diff --git a/src/3rdparty/webkit/WebCore/xml/XSLStyleSheet.h b/src/3rdparty/webkit/WebCore/xml/XSLStyleSheet.h index fe97b54..c9729bb 100644 --- a/src/3rdparty/webkit/WebCore/xml/XSLStyleSheet.h +++ b/src/3rdparty/webkit/WebCore/xml/XSLStyleSheet.h @@ -26,8 +26,12 @@ #if ENABLE(XSLT) #include "StyleSheet.h" + +#if !USE(QXMLQUERY) #include #include +#endif + #include namespace WebCore { @@ -38,10 +42,12 @@ class XSLImportRule; class XSLStyleSheet : public StyleSheet { public: +#if !USE(QXMLQUERY) static PassRefPtr create(XSLImportRule* parentImport, const String& href) { return adoptRef(new XSLStyleSheet(parentImport, href)); } +#endif static PassRefPtr create(Node* parentNode, const String& href) { return adoptRef(new XSLStyleSheet(parentNode, href, false)); @@ -65,31 +71,41 @@ public: void loadChildSheets(); void loadChildSheet(const String& href); - xsltStylesheetPtr compileStyleSheet(); - DocLoader* docLoader(); Document* ownerDocument() { return m_ownerDocument; } void setParentStyleSheet(XSLStyleSheet* parent); +#if USE(QXMLQUERY) + String sheetString() const { return m_sheetString; } +#else xmlDocPtr document(); + xsltStylesheetPtr compileStyleSheet(); + xmlDocPtr locateStylesheetSubResource(xmlDocPtr parentDoc, const xmlChar* uri); +#endif void clearDocuments(); - xmlDocPtr locateStylesheetSubResource(xmlDocPtr parentDoc, const xmlChar* uri); - void markAsProcessed(); bool processed() const { return m_processed; } private: XSLStyleSheet(Node* parentNode, const String& href, bool embedded); +#if !USE(QXMLQUERY) XSLStyleSheet(XSLImportRule* parentImport, const String& href); +#endif Document* m_ownerDocument; - xmlDocPtr m_stylesheetDoc; bool m_embedded; bool m_processed; + +#if USE(QXMLQUERY) + String m_sheetString; +#else + xmlDocPtr m_stylesheetDoc; bool m_stylesheetDocTaken; +#endif + XSLStyleSheet* m_parentStyleSheet; }; diff --git a/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetLibxslt.cpp b/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetLibxslt.cpp new file mode 100644 index 0000000..2ae8b82 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetLibxslt.cpp @@ -0,0 +1,313 @@ +/* + * This file is part of the XSL implementation. + * + * Copyright (C) 2004, 2005, 2006, 2008 Apple 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 "XSLStyleSheet.h" + +#if ENABLE(XSLT) + +#include "CString.h" +#include "Console.h" +#include "DOMWindow.h" +#include "DocLoader.h" +#include "Document.h" +#include "Frame.h" +#include "Node.h" +#include "TransformSource.h" +#include "XMLTokenizer.h" +#include "XMLTokenizerScope.h" +#include "XSLImportRule.h" +#include "XSLTProcessor.h" +#include "loader.h" + +#include +#include + +#if PLATFORM(MAC) +#include "SoftLinking.h" +#endif + +#if PLATFORM(MAC) +SOFT_LINK_LIBRARY(libxslt) +SOFT_LINK(libxslt, xsltIsBlank, int, (xmlChar *str), (str)) +SOFT_LINK(libxslt, xsltGetNsProp, xmlChar *, (xmlNodePtr node, const xmlChar *name, const xmlChar *nameSpace), (node, name, nameSpace)) +SOFT_LINK(libxslt, xsltParseStylesheetDoc, xsltStylesheetPtr, (xmlDocPtr doc), (doc)) +SOFT_LINK(libxslt, xsltLoadStylesheetPI, xsltStylesheetPtr, (xmlDocPtr doc), (doc)) +#endif + +namespace WebCore { + +XSLStyleSheet::XSLStyleSheet(XSLImportRule* parentRule, const String& href) + : StyleSheet(parentRule, href) + , m_ownerDocument(0) + , m_embedded(false) + , m_processed(false) // Child sheets get marked as processed when the libxslt engine has finally seen them. + , m_stylesheetDoc(0) + , m_stylesheetDocTaken(false) + , m_parentStyleSheet(0) +{ +} + +XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& href, bool embedded) + : StyleSheet(parentNode, href) + , m_ownerDocument(parentNode->document()) + , m_embedded(embedded) + , m_processed(true) // The root sheet starts off processed. + , m_stylesheetDoc(0) + , m_stylesheetDocTaken(false) + , m_parentStyleSheet(0) +{ +} + +XSLStyleSheet::~XSLStyleSheet() +{ + if (!m_stylesheetDocTaken) + xmlFreeDoc(m_stylesheetDoc); +} + +bool XSLStyleSheet::isLoading() +{ + unsigned len = length(); + for (unsigned i = 0; i < len; ++i) { + StyleBase* rule = item(i); + if (rule->isImportRule()) { + XSLImportRule* import = static_cast(rule); + if (import->isLoading()) + return true; + } + } + return false; +} + +void XSLStyleSheet::checkLoaded() +{ + if (isLoading()) + return; + if (parent()) + parent()->checkLoaded(); + if (ownerNode()) + ownerNode()->sheetLoaded(); +} + +xmlDocPtr XSLStyleSheet::document() +{ + if (m_embedded && ownerDocument() && ownerDocument()->transformSource()) + return (xmlDocPtr)ownerDocument()->transformSource()->platformSource(); + return m_stylesheetDoc; +} + +void XSLStyleSheet::clearDocuments() +{ + m_stylesheetDoc = 0; + unsigned len = length(); + for (unsigned i = 0; i < len; ++i) { + StyleBase* rule = item(i); + if (rule->isImportRule()) { + XSLImportRule* import = static_cast(rule); + if (import->styleSheet()) + import->styleSheet()->clearDocuments(); + } + } +} + +DocLoader* XSLStyleSheet::docLoader() +{ + if (!m_ownerDocument) + return 0; + return m_ownerDocument->docLoader(); +} + +bool XSLStyleSheet::parseString(const String& string, bool) +{ + // Parse in a single chunk into an xmlDocPtr + const UChar BOM = 0xFEFF; + const unsigned char BOMHighByte = *reinterpret_cast(&BOM); + if (!m_stylesheetDocTaken) + xmlFreeDoc(m_stylesheetDoc); + m_stylesheetDocTaken = false; + + Console* console = 0; + if (Frame* frame = ownerDocument()->frame()) + console = frame->domWindow()->console(); + + XMLTokenizerScope scope(docLoader(), XSLTProcessor::genericErrorFunc, XSLTProcessor::parseErrorFunc, console); + + const char* buffer = reinterpret_cast(string.characters()); + int size = string.length() * sizeof(UChar); + + xmlParserCtxtPtr ctxt = xmlCreateMemoryParserCtxt(buffer, size); + + if (m_parentStyleSheet) { + // The XSL transform may leave the newly-transformed document + // with references to the symbol dictionaries of the style sheet + // and any of its children. XML document disposal can corrupt memory + // if a document uses more than one symbol dictionary, so we + // ensure that all child stylesheets use the same dictionaries as their + // parents. + xmlDictFree(ctxt->dict); + ctxt->dict = m_parentStyleSheet->m_stylesheetDoc->dict; + xmlDictReference(ctxt->dict); + } + + m_stylesheetDoc = xmlCtxtReadMemory(ctxt, buffer, size, + href().utf8().data(), + BOMHighByte == 0xFF ? "UTF-16LE" : "UTF-16BE", + XML_PARSE_NOENT | XML_PARSE_DTDATTR | XML_PARSE_NOWARNING | XML_PARSE_NOCDATA); + xmlFreeParserCtxt(ctxt); + + loadChildSheets(); + + return m_stylesheetDoc; +} + +void XSLStyleSheet::loadChildSheets() +{ + if (!document()) + return; + + xmlNodePtr stylesheetRoot = document()->children; + + // Top level children may include other things such as DTD nodes, we ignore those. + while (stylesheetRoot && stylesheetRoot->type != XML_ELEMENT_NODE) + stylesheetRoot = stylesheetRoot->next; + + if (m_embedded) { + // We have to locate (by ID) the appropriate embedded stylesheet element, so that we can walk the + // import/include list. + xmlAttrPtr idNode = xmlGetID(document(), (const xmlChar*)(href().utf8().data())); + if (!idNode) + return; + stylesheetRoot = idNode->parent; + } else { + // FIXME: Need to handle an external URI with a # in it. This is a pretty minor edge case, so we'll deal + // with it later. + } + + if (stylesheetRoot) { + // Walk the children of the root element and look for import/include elements. + // Imports must occur first. + xmlNodePtr curr = stylesheetRoot->children; + while (curr) { + if (curr->type != XML_ELEMENT_NODE) { + curr = curr->next; + continue; + } + if (IS_XSLT_ELEM(curr) && IS_XSLT_NAME(curr, "import")) { + xmlChar* uriRef = xsltGetNsProp(curr, (const xmlChar*)"href", XSLT_NAMESPACE); + loadChildSheet(String::fromUTF8((const char*)uriRef)); + xmlFree(uriRef); + } else + break; + curr = curr->next; + } + + // Now handle includes. + while (curr) { + if (curr->type == XML_ELEMENT_NODE && IS_XSLT_ELEM(curr) && IS_XSLT_NAME(curr, "include")) { + xmlChar* uriRef = xsltGetNsProp(curr, (const xmlChar*)"href", XSLT_NAMESPACE); + loadChildSheet(String::fromUTF8((const char*)uriRef)); + xmlFree(uriRef); + } + curr = curr->next; + } + } +} + +void XSLStyleSheet::loadChildSheet(const String& href) +{ + RefPtr childRule = XSLImportRule::create(this, href); + append(childRule); + childRule->loadSheet(); +} + +xsltStylesheetPtr XSLStyleSheet::compileStyleSheet() +{ + // FIXME: Hook up error reporting for the stylesheet compilation process. + if (m_embedded) + return xsltLoadStylesheetPI(document()); + + // xsltParseStylesheetDoc makes the document part of the stylesheet + // so we have to release our pointer to it. + ASSERT(!m_stylesheetDocTaken); + xsltStylesheetPtr result = xsltParseStylesheetDoc(m_stylesheetDoc); + if (result) + m_stylesheetDocTaken = true; + return result; +} + +void XSLStyleSheet::setParentStyleSheet(XSLStyleSheet* parent) +{ + m_parentStyleSheet = parent; + if (parent) + m_ownerDocument = parent->ownerDocument(); +} + +xmlDocPtr XSLStyleSheet::locateStylesheetSubResource(xmlDocPtr parentDoc, const xmlChar* uri) +{ + bool matchedParent = (parentDoc == document()); + unsigned len = length(); + for (unsigned i = 0; i < len; ++i) { + StyleBase* rule = item(i); + if (rule->isImportRule()) { + XSLImportRule* import = static_cast(rule); + XSLStyleSheet* child = import->styleSheet(); + if (!child) + continue; + if (matchedParent) { + if (child->processed()) + continue; // libxslt has been given this sheet already. + + // Check the URI of the child stylesheet against the doc URI. + // In order to ensure that libxml canonicalized both URLs, we get the original href + // string from the import rule and canonicalize it using libxml before comparing it + // with the URI argument. + CString importHref = import->href().utf8(); + xmlChar* base = xmlNodeGetBase(parentDoc, (xmlNodePtr)parentDoc); + xmlChar* childURI = xmlBuildURI((const xmlChar*)importHref.data(), base); + bool equalURIs = xmlStrEqual(uri, childURI); + xmlFree(base); + xmlFree(childURI); + if (equalURIs) { + child->markAsProcessed(); + return child->document(); + } + } else { + xmlDocPtr result = import->styleSheet()->locateStylesheetSubResource(parentDoc, uri); + if (result) + return result; + } + } + } + + return 0; +} + +void XSLStyleSheet::markAsProcessed() +{ + ASSERT(!m_processed); + ASSERT(!m_stylesheetDocTaken); + m_processed = true; + m_stylesheetDocTaken = true; +} + +} // namespace WebCore + +#endif // ENABLE(XSLT) diff --git a/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetQt.cpp b/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetQt.cpp new file mode 100644 index 0000000..9fada0e --- /dev/null +++ b/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetQt.cpp @@ -0,0 +1,103 @@ +/* + * This file is part of the XSL implementation. + * + * Copyright (C) 2009 Jakub Wieczorek + * + * 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 "XSLStyleSheet.h" + +#if ENABLE(XSLT) + +#include "DOMWindow.h" +#include "Document.h" +#include "Node.h" +#include "NotImplemented.h" +#include "XSLTProcessor.h" +#include "loader.h" + +namespace WebCore { + +XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& href, bool embedded) + : StyleSheet(parentNode, href) + , m_ownerDocument(parentNode->document()) + , m_embedded(embedded) +{ +} + +XSLStyleSheet::~XSLStyleSheet() +{ +} + +bool XSLStyleSheet::isLoading() +{ + notImplemented(); + return false; +} + +void XSLStyleSheet::checkLoaded() +{ + if (ownerNode()) + ownerNode()->sheetLoaded(); +} + +void XSLStyleSheet::clearDocuments() +{ + notImplemented(); +} + +DocLoader* XSLStyleSheet::docLoader() +{ + if (!m_ownerDocument) + return 0; + return m_ownerDocument->docLoader(); +} + +bool XSLStyleSheet::parseString(const String& string, bool) +{ + // FIXME: Fix QXmlQuery so that it allows compiling the stylesheet before setting the document + // to be transformed. This way we could not only check if the stylesheet is correct before using it + // but also turn XSLStyleSheet::sheetString() into XSLStyleSheet::query() that returns a QXmlQuery. + + m_sheetString = string; + return !m_sheetString.isEmpty(); +} + +void XSLStyleSheet::loadChildSheets() +{ + notImplemented(); +} + +void XSLStyleSheet::loadChildSheet(const String& href) +{ + notImplemented(); +} + +void XSLStyleSheet::setParentStyleSheet(XSLStyleSheet* parent) +{ + notImplemented(); +} + +void XSLStyleSheet::markAsProcessed() +{ + notImplemented(); +} + +} // namespace WebCore + +#endif // ENABLE(XSLT) diff --git a/src/3rdparty/webkit/WebCore/xml/XSLTProcessor.cpp b/src/3rdparty/webkit/WebCore/xml/XSLTProcessor.cpp index 8eaef67..b182243 100644 --- a/src/3rdparty/webkit/WebCore/xml/XSLTProcessor.cpp +++ b/src/3rdparty/webkit/WebCore/xml/XSLTProcessor.cpp @@ -26,10 +26,7 @@ #include "XSLTProcessor.h" -#include "CString.h" -#include "Console.h" #include "DOMImplementation.h" -#include "DOMWindow.h" #include "DocLoader.h" #include "DocumentFragment.h" #include "Frame.h" @@ -38,166 +35,17 @@ #include "HTMLDocument.h" #include "HTMLTokenizer.h" // for parseHTMLDocumentFragment #include "Page.h" -#include "ResourceError.h" -#include "ResourceHandle.h" -#include "ResourceRequest.h" -#include "ResourceResponse.h" #include "Text.h" #include "TextResourceDecoder.h" #include "XMLTokenizer.h" -#include "XSLTExtensions.h" -#include "XSLTUnicodeSort.h" #include "loader.h" #include "markup.h" -#include -#include -#include #include #include #include -#if PLATFORM(MAC) -#include "SoftLinking.h" - -SOFT_LINK_LIBRARY(libxslt); -SOFT_LINK(libxslt, xsltFreeStylesheet, void, (xsltStylesheetPtr sheet), (sheet)) -SOFT_LINK(libxslt, xsltFreeTransformContext, void, (xsltTransformContextPtr ctxt), (ctxt)) -SOFT_LINK(libxslt, xsltNewTransformContext, xsltTransformContextPtr, (xsltStylesheetPtr style, xmlDocPtr doc), (style, doc)) -SOFT_LINK(libxslt, xsltApplyStylesheetUser, xmlDocPtr, (xsltStylesheetPtr style, xmlDocPtr doc, const char** params, const char* output, FILE* profile, xsltTransformContextPtr userCtxt), (style, doc, params, output, profile, userCtxt)) -SOFT_LINK(libxslt, xsltQuoteUserParams, int, (xsltTransformContextPtr ctxt, const char** params), (ctxt, params)) -SOFT_LINK(libxslt, xsltSetCtxtSortFunc, void, (xsltTransformContextPtr ctxt, xsltSortFunc handler), (ctxt, handler)) -SOFT_LINK(libxslt, xsltSetLoaderFunc, void, (xsltDocLoaderFunc f), (f)) -SOFT_LINK(libxslt, xsltSaveResultTo, int, (xmlOutputBufferPtr buf, xmlDocPtr result, xsltStylesheetPtr style), (buf, result, style)) -SOFT_LINK(libxslt, xsltNextImport, xsltStylesheetPtr, (xsltStylesheetPtr style), (style)) -#endif - namespace WebCore { -void XSLTProcessor::genericErrorFunc(void*, const char*, ...) -{ - // It would be nice to do something with this error message. -} - -void XSLTProcessor::parseErrorFunc(void* userData, xmlError* error) -{ - Console* console = static_cast(userData); - if (!console) - return; - - MessageLevel level; - switch (error->level) { - case XML_ERR_NONE: - level = TipMessageLevel; - break; - case XML_ERR_WARNING: - level = WarningMessageLevel; - break; - case XML_ERR_ERROR: - case XML_ERR_FATAL: - default: - level = ErrorMessageLevel; - break; - } - - console->addMessage(XMLMessageSource, LogMessageType, level, error->message, error->line, error->file); -} - -// FIXME: There seems to be no way to control the ctxt pointer for loading here, thus we have globals. -static XSLTProcessor* globalProcessor = 0; -static DocLoader* globalDocLoader = 0; -static xmlDocPtr docLoaderFunc(const xmlChar* uri, - xmlDictPtr, - int options, - void* ctxt, - xsltLoadType type) -{ - if (!globalProcessor) - return 0; - - switch (type) { - case XSLT_LOAD_DOCUMENT: { - xsltTransformContextPtr context = (xsltTransformContextPtr)ctxt; - xmlChar* base = xmlNodeGetBase(context->document->doc, context->node); - KURL url(KURL(ParsedURLString, reinterpret_cast(base)), reinterpret_cast(uri)); - xmlFree(base); - ResourceError error; - ResourceResponse response; - - Vector data; - - bool requestAllowed = globalDocLoader->frame() && globalDocLoader->doc()->securityOrigin()->canRequest(url); - if (requestAllowed) { - globalDocLoader->frame()->loader()->loadResourceSynchronously(url, AllowStoredCredentials, error, response, data); - requestAllowed = globalDocLoader->doc()->securityOrigin()->canRequest(response.url()); - } - if (!requestAllowed) { - data.clear(); - globalDocLoader->printAccessDeniedMessage(url); - } - - Console* console = 0; - if (Frame* frame = globalProcessor->xslStylesheet()->ownerDocument()->frame()) - console = frame->domWindow()->console(); - xmlSetStructuredErrorFunc(console, XSLTProcessor::parseErrorFunc); - xmlSetGenericErrorFunc(console, XSLTProcessor::genericErrorFunc); - - // We don't specify an encoding here. Neither Gecko nor WinIE respects - // the encoding specified in the HTTP headers. - xmlDocPtr doc = xmlReadMemory(data.data(), data.size(), (const char*)uri, 0, options); - - xmlSetStructuredErrorFunc(0, 0); - xmlSetGenericErrorFunc(0, 0); - - return doc; - } - case XSLT_LOAD_STYLESHEET: - return globalProcessor->xslStylesheet()->locateStylesheetSubResource(((xsltStylesheetPtr)ctxt)->doc, uri); - default: - break; - } - - return 0; -} - -static inline void setXSLTLoadCallBack(xsltDocLoaderFunc func, XSLTProcessor* processor, DocLoader* loader) -{ - xsltSetLoaderFunc(func); - globalProcessor = processor; - globalDocLoader = loader; -} - -static int writeToVector(void* context, const char* buffer, int len) -{ - Vector& resultOutput = *static_cast*>(context); - String decodedChunk = String::fromUTF8(buffer, len); - resultOutput.append(decodedChunk.characters(), decodedChunk.length()); - return len; -} - -static bool saveResultToString(xmlDocPtr resultDoc, xsltStylesheetPtr sheet, String& resultString) -{ - xmlOutputBufferPtr outputBuf = xmlAllocOutputBuffer(0); - if (!outputBuf) - return false; - - Vector resultVector; - outputBuf->context = &resultVector; - outputBuf->writecallback = writeToVector; - - int retval = xsltSaveResultTo(outputBuf, resultDoc, sheet); - xmlOutputBufferClose(outputBuf); - if (retval < 0) - return false; - - // Workaround for : libxslt appends an extra line feed to the result. - if (resultVector.size() > 0 && resultVector[resultVector.size() - 1] == '\n') - resultVector.removeLast(); - - resultString = String::adopt(resultVector); - - return true; -} - static inline void transformTextStringToXHTMLDocumentString(String& text) { // Modify the output so that it is a well-formed XHTML document with a
 tag enclosing the text.
@@ -213,38 +61,6 @@ static inline void transformTextStringToXHTMLDocumentString(String& text)
         "\n";
 }
 
-static const char** xsltParamArrayFromParameterMap(XSLTProcessor::ParameterMap& parameters)
-{
-    if (parameters.isEmpty())
-        return 0;
-
-    const char** parameterArray = (const char**)fastMalloc(((parameters.size() * 2) + 1) * sizeof(char*));
-
-    XSLTProcessor::ParameterMap::iterator end = parameters.end();
-    unsigned index = 0;
-    for (XSLTProcessor::ParameterMap::iterator it = parameters.begin(); it != end; ++it) {
-        parameterArray[index++] = strdup(it->first.utf8().data());
-        parameterArray[index++] = strdup(it->second.utf8().data());
-    }
-    parameterArray[index] = 0;
-
-    return parameterArray;
-}
-
-static void freeXsltParamArray(const char** params)
-{
-    const char** temp = params;
-    if (!params)
-        return;
-    
-    while (*temp) {
-        free((void*)*(temp++)); // strdup returns malloc'd blocks, so we have to use free() here
-        free((void*)*(temp++));
-    }
-    fastFree(params);
-}
-
-
 PassRefPtr XSLTProcessor::createDocumentFromSource(const String& sourceString,
     const String& sourceEncoding, const String& sourceMIMEType, Node* sourceNode, Frame* frame)
 {
@@ -258,7 +74,7 @@ PassRefPtr XSLTProcessor::createDocumentFromSource(const String& sourc
         transformTextStringToXHTMLDocumentString(documentSource);
     } else
         result = ownerDocument->implementation()->createDocument(sourceMIMEType, frame, false);
-    
+
     // Before parsing, we need to save & detach the old document and get the new document
     // in place. We have to do this only if we're rendering the result document.
     if (frame) {
@@ -267,15 +83,15 @@ PassRefPtr XSLTProcessor::createDocumentFromSource(const String& sourc
         result->setTransformSourceDocument(frame->document());
         frame->setDocument(result);
     }
-    
+
     if (sourceIsDocument)
         result->setURL(ownerDocument->url());
     result->open();
-    
+
     RefPtr decoder = TextResourceDecoder::create(sourceMIMEType);
     decoder->setEncoding(sourceEncoding.isEmpty() ? UTF8Encoding() : TextEncoding(sourceEncoding), TextResourceDecoder::EncodingFromXMLHeader);
     result->setDecoder(decoder.release());
-    
+
     result->write(documentSource);
     result->finishParsing();
     result->close();
@@ -286,7 +102,7 @@ PassRefPtr XSLTProcessor::createDocumentFromSource(const String& sourc
 static inline RefPtr createFragmentFromSource(const String& sourceString, const String& sourceMIMEType, Document* outputDoc)
 {
     RefPtr fragment = DocumentFragment::create(outputDoc);
-    
+
     if (sourceMIMEType == "text/html")
         parseHTMLDocumentFragment(sourceString, fragment.get());
     else if (sourceMIMEType == "text/plain")
@@ -296,118 +112,10 @@ static inline RefPtr createFragmentFromSource(const String& so
         if (!successfulParse)
             return 0;
     }
-    
-    // FIXME: Do we need to mess with URLs here?
-        
-    return fragment;
-}
-
-static xsltStylesheetPtr xsltStylesheetPointer(RefPtr& cachedStylesheet, Node* stylesheetRootNode)
-{
-    if (!cachedStylesheet && stylesheetRootNode) {
-        cachedStylesheet = XSLStyleSheet::create(stylesheetRootNode->parent() ? stylesheetRootNode->parent() : stylesheetRootNode,
-            stylesheetRootNode->document()->url().string());
-        cachedStylesheet->parseString(createMarkup(stylesheetRootNode));
-    }
-    
-    if (!cachedStylesheet || !cachedStylesheet->document())
-        return 0;
-    
-    return cachedStylesheet->compileStyleSheet();
-}
 
-static inline xmlDocPtr xmlDocPtrFromNode(Node* sourceNode, bool& shouldDelete)
-{
-    RefPtr ownerDocument = sourceNode->document();
-    bool sourceIsDocument = (sourceNode == ownerDocument.get());
-    
-    xmlDocPtr sourceDoc = 0;
-    if (sourceIsDocument)
-        sourceDoc = (xmlDocPtr)ownerDocument->transformSource();
-    if (!sourceDoc) {
-        sourceDoc = (xmlDocPtr)xmlDocPtrForString(ownerDocument->docLoader(), createMarkup(sourceNode),
-            sourceIsDocument ? ownerDocument->url().string() : String());
-        shouldDelete = (sourceDoc != 0);
-    }
-    return sourceDoc;
-}
-
-static inline String resultMIMEType(xmlDocPtr resultDoc, xsltStylesheetPtr sheet)
-{
-    // There are three types of output we need to be able to deal with:
-    // HTML (create an HTML document), XML (create an XML document),
-    // and text (wrap in a 
 and create an XML document).
-
-    const xmlChar* resultType = 0;
-    XSLT_GET_IMPORT_PTR(resultType, sheet, method);
-    if (resultType == 0 && resultDoc->type == XML_HTML_DOCUMENT_NODE)
-        resultType = (const xmlChar*)"html";
-    
-    if (xmlStrEqual(resultType, (const xmlChar*)"html"))
-        return "text/html";
-    else if (xmlStrEqual(resultType, (const xmlChar*)"text"))
-        return "text/plain";
-        
-    return "application/xml";
-}
-
-bool XSLTProcessor::transformToString(Node* sourceNode, String& mimeType, String& resultString, String& resultEncoding)
-{
-    RefPtr ownerDocument = sourceNode->document();
-    
-    setXSLTLoadCallBack(docLoaderFunc, this, ownerDocument->docLoader());
-    xsltStylesheetPtr sheet = xsltStylesheetPointer(m_stylesheet, m_stylesheetRootNode.get());
-    if (!sheet) {
-        setXSLTLoadCallBack(0, 0, 0);
-        return false;
-    }
-    m_stylesheet->clearDocuments();
-
-    xmlChar* origMethod = sheet->method;
-    if (!origMethod && mimeType == "text/html")
-        sheet->method = (xmlChar*)"html";
-
-    bool success = false;
-    bool shouldFreeSourceDoc = false;
-    if (xmlDocPtr sourceDoc = xmlDocPtrFromNode(sourceNode, shouldFreeSourceDoc)) {
-        // The XML declaration would prevent parsing the result as a fragment, and it's not needed even for documents, 
-        // as the result of this function is always immediately parsed.
-        sheet->omitXmlDeclaration = true;
-
-        xsltTransformContextPtr transformContext = xsltNewTransformContext(sheet, sourceDoc);
-        registerXSLTExtensions(transformContext);
-
-        // : XSLT processor  algorithm only compares by code point
-        xsltSetCtxtSortFunc(transformContext, xsltUnicodeSortFunction);
-
-        // This is a workaround for a bug in libxslt. 
-        // The bug has been fixed in version 1.1.13, so once we ship that this can be removed.
-        if (transformContext->globalVars == NULL)
-           transformContext->globalVars = xmlHashCreate(20);
-
-        const char** params = xsltParamArrayFromParameterMap(m_parameters);
-        xsltQuoteUserParams(transformContext, params);
-        xmlDocPtr resultDoc = xsltApplyStylesheetUser(sheet, sourceDoc, 0, 0, 0, transformContext);
-        
-        xsltFreeTransformContext(transformContext);        
-        freeXsltParamArray(params);
-        
-        if (shouldFreeSourceDoc)
-            xmlFreeDoc(sourceDoc);
-        
-        if (success = saveResultToString(resultDoc, sheet, resultString)) {
-            mimeType = resultMIMEType(resultDoc, sheet);
-            resultEncoding = (char*)resultDoc->encoding;
-        }
-        xmlFreeDoc(resultDoc);
-    }
-    
-    sheet->method = origMethod;
-    setXSLTLoadCallBack(0, 0, 0);
-    xsltFreeStylesheet(sheet);
-    m_stylesheet = 0;
+    // FIXME: Do we need to mess with URLs here?
 
-    return success;
+    return fragment;
 }
 
 PassRefPtr XSLTProcessor::transformToDocument(Node* sourceNode)
@@ -429,7 +137,7 @@ PassRefPtr XSLTProcessor::transformToFragment(Node* sourceNode
     // If the output document is HTML, default to HTML method.
     if (outputDoc->isHTMLDocument())
         resultMIMEType = "text/html";
-    
+
     if (!transformToString(sourceNode, resultMIMEType, resultString, resultEncoding))
         return 0;
     return createFragmentFromSource(resultString, resultMIMEType, outputDoc);
@@ -455,6 +163,13 @@ void XSLTProcessor::removeParameter(const String& /*namespaceURI*/, const String
     m_parameters.remove(localName);
 }
 
+void XSLTProcessor::reset()
+{
+    m_stylesheet.clear();
+    m_stylesheetRootNode.clear();
+    m_parameters.clear();
+}
+
 } // namespace WebCore
 
 #endif // ENABLE(XSLT)
diff --git a/src/3rdparty/webkit/WebCore/xml/XSLTProcessor.h b/src/3rdparty/webkit/WebCore/xml/XSLTProcessor.h
index 9ee2aad..9b91017 100644
--- a/src/3rdparty/webkit/WebCore/xml/XSLTProcessor.h
+++ b/src/3rdparty/webkit/WebCore/xml/XSLTProcessor.h
@@ -28,9 +28,12 @@
 #include "Node.h"
 #include "StringHash.h"
 #include "XSLStyleSheet.h"
+#include 
+
+#if !USE(QXMLQUERY)
 #include 
 #include 
-#include 
+#endif
 
 namespace WebCore {
 
@@ -56,14 +59,15 @@ public:
     void removeParameter(const String& namespaceURI, const String& localName);
     void clearParameters() { m_parameters.clear(); }
 
-    void reset() { m_stylesheet.clear(); m_stylesheetRootNode.clear();  m_parameters.clear(); }
+    void reset();
 
+#if !USE(QXMLQUERY)
     static void parseErrorFunc(void* userData, xmlError*);
     static void genericErrorFunc(void* userData, const char* msg, ...);
     
-public:
     // Only for libXSLT callbacks
     XSLStyleSheet* xslStylesheet() const { return m_stylesheet.get(); }
+#endif
 
     typedef HashMap ParameterMap;
 
diff --git a/src/3rdparty/webkit/WebCore/xml/XSLTProcessorLibxslt.cpp b/src/3rdparty/webkit/WebCore/xml/XSLTProcessorLibxslt.cpp
new file mode 100644
index 0000000..200c56b
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/xml/XSLTProcessorLibxslt.cpp
@@ -0,0 +1,335 @@
+/*
+ * This file is part of the XSL implementation.
+ *
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple, Inc. All rights reserved.
+ * Copyright (C) 2005, 2006 Alexey Proskuryakov 
+ *
+ * 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"
+
+#if ENABLE(XSLT)
+
+#include "XSLTProcessor.h"
+
+#include "Console.h"
+#include "CString.h"
+#include "DOMWindow.h"
+#include "DocLoader.h"
+#include "Frame.h"
+#include "ResourceError.h"
+#include "ResourceHandle.h"
+#include "ResourceRequest.h"
+#include "ResourceResponse.h"
+#include "TransformSource.h"
+#include "XMLTokenizer.h"
+#include "XSLStyleSheet.h"
+#include "XSLTExtensions.h"
+#include "XSLTUnicodeSort.h"
+#include "loader.h"
+#include "markup.h"
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#if PLATFORM(MAC)
+#include "SoftLinking.h"
+
+SOFT_LINK_LIBRARY(libxslt);
+SOFT_LINK(libxslt, xsltFreeStylesheet, void, (xsltStylesheetPtr sheet), (sheet))
+SOFT_LINK(libxslt, xsltFreeTransformContext, void, (xsltTransformContextPtr ctxt), (ctxt))
+SOFT_LINK(libxslt, xsltNewTransformContext, xsltTransformContextPtr, (xsltStylesheetPtr style, xmlDocPtr doc), (style, doc))
+SOFT_LINK(libxslt, xsltApplyStylesheetUser, xmlDocPtr, (xsltStylesheetPtr style, xmlDocPtr doc, const char** params, const char* output, FILE* profile, xsltTransformContextPtr userCtxt), (style, doc, params, output, profile, userCtxt))
+SOFT_LINK(libxslt, xsltQuoteUserParams, int, (xsltTransformContextPtr ctxt, const char** params), (ctxt, params))
+SOFT_LINK(libxslt, xsltSetCtxtSortFunc, void, (xsltTransformContextPtr ctxt, xsltSortFunc handler), (ctxt, handler))
+SOFT_LINK(libxslt, xsltSetLoaderFunc, void, (xsltDocLoaderFunc f), (f))
+SOFT_LINK(libxslt, xsltSaveResultTo, int, (xmlOutputBufferPtr buf, xmlDocPtr result, xsltStylesheetPtr style), (buf, result, style))
+SOFT_LINK(libxslt, xsltNextImport, xsltStylesheetPtr, (xsltStylesheetPtr style), (style))
+#endif
+
+namespace WebCore {
+
+void XSLTProcessor::genericErrorFunc(void*, const char*, ...)
+{
+    // It would be nice to do something with this error message.
+}
+
+void XSLTProcessor::parseErrorFunc(void* userData, xmlError* error)
+{
+    Console* console = static_cast(userData);
+    if (!console)
+        return;
+
+    MessageLevel level;
+    switch (error->level) {
+    case XML_ERR_NONE:
+        level = TipMessageLevel;
+        break;
+    case XML_ERR_WARNING:
+        level = WarningMessageLevel;
+        break;
+    case XML_ERR_ERROR:
+    case XML_ERR_FATAL:
+    default:
+        level = ErrorMessageLevel;
+        break;
+    }
+
+    console->addMessage(XMLMessageSource, LogMessageType, level, error->message, error->line, error->file);
+}
+
+// FIXME: There seems to be no way to control the ctxt pointer for loading here, thus we have globals.
+static XSLTProcessor* globalProcessor = 0;
+static DocLoader* globalDocLoader = 0;
+static xmlDocPtr docLoaderFunc(const xmlChar* uri,
+                                    xmlDictPtr,
+                                    int options,
+                                    void* ctxt,
+                                    xsltLoadType type)
+{
+    if (!globalProcessor)
+        return 0;
+
+    switch (type) {
+    case XSLT_LOAD_DOCUMENT: {
+        xsltTransformContextPtr context = (xsltTransformContextPtr)ctxt;
+        xmlChar* base = xmlNodeGetBase(context->document->doc, context->node);
+        KURL url(KURL(ParsedURLString, reinterpret_cast(base)), reinterpret_cast(uri));
+        xmlFree(base);
+        ResourceError error;
+        ResourceResponse response;
+
+        Vector data;
+
+        bool requestAllowed = globalDocLoader->frame() && globalDocLoader->doc()->securityOrigin()->canRequest(url);
+        if (requestAllowed) {
+            globalDocLoader->frame()->loader()->loadResourceSynchronously(url, AllowStoredCredentials, error, response, data);
+            requestAllowed = globalDocLoader->doc()->securityOrigin()->canRequest(response.url());
+        }
+        if (!requestAllowed) {
+            data.clear();
+            globalDocLoader->printAccessDeniedMessage(url);
+        }
+
+        Console* console = 0;
+        if (Frame* frame = globalProcessor->xslStylesheet()->ownerDocument()->frame())
+            console = frame->domWindow()->console();
+        xmlSetStructuredErrorFunc(console, XSLTProcessor::parseErrorFunc);
+        xmlSetGenericErrorFunc(console, XSLTProcessor::genericErrorFunc);
+
+        // We don't specify an encoding here. Neither Gecko nor WinIE respects
+        // the encoding specified in the HTTP headers.
+        xmlDocPtr doc = xmlReadMemory(data.data(), data.size(), (const char*)uri, 0, options);
+
+        xmlSetStructuredErrorFunc(0, 0);
+        xmlSetGenericErrorFunc(0, 0);
+
+        return doc;
+    }
+    case XSLT_LOAD_STYLESHEET:
+        return globalProcessor->xslStylesheet()->locateStylesheetSubResource(((xsltStylesheetPtr)ctxt)->doc, uri);
+    default:
+        break;
+    }
+
+    return 0;
+}
+
+static inline void setXSLTLoadCallBack(xsltDocLoaderFunc func, XSLTProcessor* processor, DocLoader* loader)
+{
+    xsltSetLoaderFunc(func);
+    globalProcessor = processor;
+    globalDocLoader = loader;
+}
+
+static int writeToVector(void* context, const char* buffer, int len)
+{
+    Vector& resultOutput = *static_cast*>(context);
+    String decodedChunk = String::fromUTF8(buffer, len);
+    resultOutput.append(decodedChunk.characters(), decodedChunk.length());
+    return len;
+}
+
+static bool saveResultToString(xmlDocPtr resultDoc, xsltStylesheetPtr sheet, String& resultString)
+{
+    xmlOutputBufferPtr outputBuf = xmlAllocOutputBuffer(0);
+    if (!outputBuf)
+        return false;
+
+    Vector resultVector;
+    outputBuf->context = &resultVector;
+    outputBuf->writecallback = writeToVector;
+
+    int retval = xsltSaveResultTo(outputBuf, resultDoc, sheet);
+    xmlOutputBufferClose(outputBuf);
+    if (retval < 0)
+        return false;
+
+    // Workaround for : libxslt appends an extra line feed to the result.
+    if (resultVector.size() > 0 && resultVector[resultVector.size() - 1] == '\n')
+        resultVector.removeLast();
+
+    resultString = String::adopt(resultVector);
+
+    return true;
+}
+
+static const char** xsltParamArrayFromParameterMap(XSLTProcessor::ParameterMap& parameters)
+{
+    if (parameters.isEmpty())
+        return 0;
+
+    const char** parameterArray = (const char**)fastMalloc(((parameters.size() * 2) + 1) * sizeof(char*));
+
+    XSLTProcessor::ParameterMap::iterator end = parameters.end();
+    unsigned index = 0;
+    for (XSLTProcessor::ParameterMap::iterator it = parameters.begin(); it != end; ++it) {
+        parameterArray[index++] = strdup(it->first.utf8().data());
+        parameterArray[index++] = strdup(it->second.utf8().data());
+    }
+    parameterArray[index] = 0;
+
+    return parameterArray;
+}
+
+static void freeXsltParamArray(const char** params)
+{
+    const char** temp = params;
+    if (!params)
+        return;
+
+    while (*temp) {
+        free((void*)*(temp++)); // strdup returns malloc'd blocks, so we have to use free() here
+        free((void*)*(temp++));
+    }
+    fastFree(params);
+}
+
+static xsltStylesheetPtr xsltStylesheetPointer(RefPtr& cachedStylesheet, Node* stylesheetRootNode)
+{
+    if (!cachedStylesheet && stylesheetRootNode) {
+        cachedStylesheet = XSLStyleSheet::create(stylesheetRootNode->parent() ? stylesheetRootNode->parent() : stylesheetRootNode,
+            stylesheetRootNode->document()->url().string());
+        cachedStylesheet->parseString(createMarkup(stylesheetRootNode));
+    }
+
+    if (!cachedStylesheet || !cachedStylesheet->document())
+        return 0;
+
+    return cachedStylesheet->compileStyleSheet();
+}
+
+static inline xmlDocPtr xmlDocPtrFromNode(Node* sourceNode, bool& shouldDelete)
+{
+    RefPtr ownerDocument = sourceNode->document();
+    bool sourceIsDocument = (sourceNode == ownerDocument.get());
+
+    xmlDocPtr sourceDoc = 0;
+    if (sourceIsDocument && ownerDocument->transformSource())
+        sourceDoc = (xmlDocPtr)ownerDocument->transformSource()->platformSource();
+    if (!sourceDoc) {
+        sourceDoc = (xmlDocPtr)xmlDocPtrForString(ownerDocument->docLoader(), createMarkup(sourceNode),
+            sourceIsDocument ? ownerDocument->url().string() : String());
+        shouldDelete = sourceDoc;
+    }
+    return sourceDoc;
+}
+
+static inline String resultMIMEType(xmlDocPtr resultDoc, xsltStylesheetPtr sheet)
+{
+    // There are three types of output we need to be able to deal with:
+    // HTML (create an HTML document), XML (create an XML document),
+    // and text (wrap in a 
 and create an XML document).
+
+    const xmlChar* resultType = 0;
+    XSLT_GET_IMPORT_PTR(resultType, sheet, method);
+    if (!resultType && resultDoc->type == XML_HTML_DOCUMENT_NODE)
+        resultType = (const xmlChar*)"html";
+
+    if (xmlStrEqual(resultType, (const xmlChar*)"html"))
+        return "text/html";
+    if (xmlStrEqual(resultType, (const xmlChar*)"text"))
+        return "text/plain";
+
+    return "application/xml";
+}
+
+bool XSLTProcessor::transformToString(Node* sourceNode, String& mimeType, String& resultString, String& resultEncoding)
+{
+    RefPtr ownerDocument = sourceNode->document();
+
+    setXSLTLoadCallBack(docLoaderFunc, this, ownerDocument->docLoader());
+    xsltStylesheetPtr sheet = xsltStylesheetPointer(m_stylesheet, m_stylesheetRootNode.get());
+    if (!sheet) {
+        setXSLTLoadCallBack(0, 0, 0);
+        return false;
+    }
+    m_stylesheet->clearDocuments();
+
+    xmlChar* origMethod = sheet->method;
+    if (!origMethod && mimeType == "text/html")
+        sheet->method = (xmlChar*)"html";
+
+    bool success = false;
+    bool shouldFreeSourceDoc = false;
+    if (xmlDocPtr sourceDoc = xmlDocPtrFromNode(sourceNode, shouldFreeSourceDoc)) {
+        // The XML declaration would prevent parsing the result as a fragment, and it's not needed even for documents,
+        // as the result of this function is always immediately parsed.
+        sheet->omitXmlDeclaration = true;
+
+        xsltTransformContextPtr transformContext = xsltNewTransformContext(sheet, sourceDoc);
+        registerXSLTExtensions(transformContext);
+
+        // : XSLT processor  algorithm only compares by code point
+        xsltSetCtxtSortFunc(transformContext, xsltUnicodeSortFunction);
+
+        // This is a workaround for a bug in libxslt.
+        // The bug has been fixed in version 1.1.13, so once we ship that this can be removed.
+        if (!transformContext->globalVars)
+           transformContext->globalVars = xmlHashCreate(20);
+
+        const char** params = xsltParamArrayFromParameterMap(m_parameters);
+        xsltQuoteUserParams(transformContext, params);
+        xmlDocPtr resultDoc = xsltApplyStylesheetUser(sheet, sourceDoc, 0, 0, 0, transformContext);
+
+        xsltFreeTransformContext(transformContext);
+        freeXsltParamArray(params);
+
+        if (shouldFreeSourceDoc)
+            xmlFreeDoc(sourceDoc);
+
+        if (success = saveResultToString(resultDoc, sheet, resultString)) {
+            mimeType = resultMIMEType(resultDoc, sheet);
+            resultEncoding = (char*)resultDoc->encoding;
+        }
+        xmlFreeDoc(resultDoc);
+    }
+
+    sheet->method = origMethod;
+    setXSLTLoadCallBack(0, 0, 0);
+    xsltFreeStylesheet(sheet);
+    m_stylesheet = 0;
+
+    return success;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(XSLT)
diff --git a/src/3rdparty/webkit/WebCore/xml/XSLTProcessorQt.cpp b/src/3rdparty/webkit/WebCore/xml/XSLTProcessorQt.cpp
new file mode 100644
index 0000000..523306a
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/xml/XSLTProcessorQt.cpp
@@ -0,0 +1,149 @@
+/*
+ * This file is part of the XSL implementation.
+ *
+ * Copyright (C) 2009 Jakub Wieczorek 
+ *
+ * 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"
+
+#if ENABLE(XSLT)
+
+#include "XSLTProcessor.h"
+
+#include "Console.h"
+#include "DOMWindow.h"
+#include "Frame.h"
+#include "TransformSource.h"
+#include "loader.h"
+#include "markup.h"
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+namespace WebCore {
+
+class XSLTMessageHandler : public QAbstractMessageHandler {
+
+public:
+    XSLTMessageHandler(Document* document = 0);
+    virtual void handleMessage(QtMsgType type, const QString& description,
+                               const QUrl& identifier, const QSourceLocation& sourceLocation);
+
+private:
+    Document* m_document;
+};
+
+XSLTMessageHandler::XSLTMessageHandler(Document* document)
+    : QAbstractMessageHandler()
+    , m_document(document)
+{
+}
+
+void XSLTMessageHandler::handleMessage(QtMsgType type, const QString& description,
+                                       const QUrl& identifier, const QSourceLocation& sourceLocation)
+{
+    if (!m_document->frame())
+        return;
+
+    MessageLevel level;
+    switch (type) {
+    case QtDebugMsg:
+        level = TipMessageLevel;
+        break;
+    case QtWarningMsg:
+        level = WarningMessageLevel;
+        break;
+    case QtCriticalMsg:
+    case QtFatalMsg:
+        level = ErrorMessageLevel;
+        break;
+    default:
+        level = LogMessageLevel;
+        break;
+    }
+
+    Console* console = m_document->frame()->domWindow()->console();
+    console->addMessage(XMLMessageSource, LogMessageType, level, description,
+                        sourceLocation.line(), sourceLocation.uri().toString());
+}
+
+bool XSLTProcessor::transformToString(Node* sourceNode, String& mimeType, String& resultString, String& resultEncoding)
+{
+    bool success = false;
+
+    RefPtr stylesheet = m_stylesheet;
+    if (!stylesheet && m_stylesheetRootNode) {
+        Node* node = m_stylesheetRootNode.get();
+        stylesheet = XSLStyleSheet::create(node->parent() ? node->parent() : node, node->document()->url().string());
+        stylesheet->parseString(createMarkup(node));
+    }
+
+    if (!stylesheet || stylesheet->sheetString().isEmpty())
+        return success;
+
+    RefPtr ownerDocument = sourceNode->document();
+    bool sourceIsDocument = (sourceNode == ownerDocument.get());
+
+    QXmlQuery query(QXmlQuery::XSLT20);
+
+    XSLTMessageHandler messageHandler(ownerDocument.get());
+    query.setMessageHandler(&messageHandler);
+
+    XSLTProcessor::ParameterMap::iterator end = m_parameters.end();
+    for (XSLTProcessor::ParameterMap::iterator it = m_parameters.begin(); it != end; ++it)
+        query.bindVariable(QString(it->first), QXmlItem(QVariant(it->second)));
+
+    QString source;
+    if (sourceIsDocument && ownerDocument->transformSource())
+        source = ownerDocument->transformSource()->platformSource();
+    if (!sourceIsDocument || source.isEmpty())
+        source = createMarkup(sourceNode);
+
+    QBuffer inputBuffer;
+    QBuffer styleSheetBuffer;
+    QBuffer outputBuffer;
+
+    inputBuffer.setData(source.toUtf8());
+    styleSheetBuffer.setData(QString(stylesheet->sheetString()).toUtf8());
+
+    inputBuffer.open(QIODevice::ReadOnly);
+    styleSheetBuffer.open(QIODevice::ReadOnly);
+    outputBuffer.open(QIODevice::ReadWrite);
+
+    query.setFocus(&inputBuffer);
+    query.setQuery(&styleSheetBuffer, QUrl(stylesheet->href()));
+    success = query.evaluateTo(&outputBuffer);
+    outputBuffer.reset();
+    resultString = QString::fromUtf8(outputBuffer.readAll()).trimmed();
+
+    if (m_stylesheet) {
+        m_stylesheet->clearDocuments();
+        m_stylesheet = 0;
+    }
+
+    return success;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(XSLT)
diff --git a/src/3rdparty/webkit/WebKit/ChangeLog b/src/3rdparty/webkit/WebKit/ChangeLog
index 7d55d82..2f8f18f 100644
--- a/src/3rdparty/webkit/WebKit/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/ChangeLog
@@ -1,3 +1,23 @@
+2009-09-29  Brady Eidson  
+
+        Reviewed by John Sullivan.
+
+        WebKit Mac API should provide a delegate interface for global history.
+         and https://webkit.org/b/29904
+
+        * WebKit.xcodeproj/project.pbxproj:
+
+2009-09-28  Yaar Schnitman  
+
+        Reviewed by Dimitri Glazkov.
+
+        https://bugs.webkit.org/show_bug.cgi?id=29722
+
+        * chromium/DEPS: Describes the chromium port's dependencies and
+          is used by gclient to fetch them.
+        * chromium/webkit.gyp: Currently only builds webcore but in
+          the future will also build the webkit api.
+
 2009-09-26  David Kilzer  
 
         Part 2 of 2:  DerivedSources.make broken for non-Mac targets
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
index 45a38c6..4b6248a 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
@@ -1491,11 +1491,10 @@ QWebPage::QWebPage(QObject *parent)
 */
 QWebPage::~QWebPage()
 {
-    if (d->mainFrame) {
-        FrameLoader *loader = d->mainFrame->d->frame->loader();
-        if (loader)
-            loader->detachFromParent();
-    }
+    d->createMainFrame();
+    FrameLoader *loader = d->mainFrame->d->frame->loader();
+    if (loader)
+        loader->detachFromParent();
     if (d->inspector)
         d->inspector->setPage(0);
     delete d;
@@ -1936,6 +1935,7 @@ bool QWebPage::acceptNavigationRequest(QWebFrame *frame, const QWebNetworkReques
 */
 QString QWebPage::selectedText() const
 {
+    d->createMainFrame();
     return d->page->focusController()->focusedOrMainFrame()->selectedText();
 }
 
@@ -2491,6 +2491,7 @@ void QWebPage::updatePositionDependentActions(const QPoint &pos)
         }
     }
 
+    d->createMainFrame();
     WebCore::Frame* focusedFrame = d->page->focusController()->focusedOrMainFrame();
     HitTestResult result = focusedFrame->eventHandler()->hitTestResultAtPoint(focusedFrame->view()->windowToContents(pos), /*allowShadowContent*/ false);
 
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h
index aecd860..b024997 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h
@@ -25,12 +25,12 @@
 #include "qwebkitglobal.h"
 
 #include 
+#include 
 #include 
 
 QT_BEGIN_NAMESPACE
 class QNetworkProxy;
 class QUndoStack;
-class QUrl;
 class QMenu;
 class QNetworkRequest;
 class QNetworkReply;
@@ -266,7 +266,8 @@ public:
     QMenu *createStandardContextMenu();
 
     enum Extension {
-        ChooseMultipleFilesExtension
+        ChooseMultipleFilesExtension,
+        ErrorPageExtension
     };
     class ExtensionOption
     {};
@@ -284,6 +285,24 @@ public:
         QStringList fileNames;
     };
 
+    enum ErrorDomain { QtNetwork, Http, WebKit };
+    class ErrorPageExtensionOption : public ExtensionOption {
+    public:
+        ErrorDomain domain;
+        int error;
+        QString errorString;
+    };
+
+    class ErrorPageExtensionReturn : public ExtensionReturn {
+    public:
+        ErrorPageExtensionReturn() : contentType(QLatin1String("text/html")), encoding(QLatin1String("utf-8")) {};
+        QString contentType;
+        QString encoding;
+        QUrl baseUrl;
+        QByteArray content;
+    };
+
+
     virtual bool extension(Extension extension, const ExtensionOption *option = 0, ExtensionReturn *output = 0);
     virtual bool supportsExtension(Extension extension) const;
 
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp
index 5f74f36..eedf7d1 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp
@@ -356,8 +356,8 @@ QWebSettings::QWebSettings()
     // Initialize our global defaults
     d->fontSizes.insert(QWebSettings::MinimumFontSize, 0);
     d->fontSizes.insert(QWebSettings::MinimumLogicalFontSize, 0);
-    d->fontSizes.insert(QWebSettings::DefaultFontSize, 14);
-    d->fontSizes.insert(QWebSettings::DefaultFixedFontSize, 14);
+    d->fontSizes.insert(QWebSettings::DefaultFontSize, 16);
+    d->fontSizes.insert(QWebSettings::DefaultFixedFontSize, 13);
     d->fontFamilies.insert(QWebSettings::StandardFont, QLatin1String("Arial"));
     d->fontFamilies.insert(QWebSettings::FixedFont, QLatin1String("Courier New"));
     d->fontFamilies.insert(QWebSettings::SerifFont, QLatin1String("Times New Roman"));
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index a8b5c38..b252d8c 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,76 @@
+2009-09-29  Andras Becsi  
+
+        Reviewed by Tor Arne Vestbø.
+
+        [Qt] Default font size reconciliation to 16px/13px to match other platform's de-facto standard.
+        This fixes https://bugs.webkit.org/show_bug.cgi?id=19674.
+
+        * Api/qwebsettings.cpp:
+        (QWebSettings::QWebSettings):
+
+2009-09-29  Jedrzej Nowacki  
+
+        Reviewed by Simon Hausmann.
+
+        https://bugs.webkit.org/show_bug.cgi?id=29844
+
+        QWebPage dependency autotest fix.
+
+        Fix for database() autotest. All opened databases should be removed at
+        end of test.
+
+        * tests/qwebpage/tst_qwebpage.cpp:
+        (tst_QWebPage::database):
+
+2009-09-29  Jedrzej Nowacki  
+
+        Reviewed by Simon Hausmann.
+
+        Some QWebHistory and QWebPage autotest crash fixes.
+
+        Some checking for m_mainFrame were added. MainFrame should be created
+        at some point of QWebPage live cicle.
+
+        https://bugs.webkit.org/show_bug.cgi?id=29803
+
+        * Api/qwebpage.cpp:
+        (QWebPage::~QWebPage):
+        (QWebPage::currentFrame):
+        (QWebPage::history):
+        (QWebPage::selectedText):
+        (QWebPage::updatePositionDependentActions):
+        * tests/qwebpage/tst_qwebpage.cpp:
+        (tst_QWebPage::crashTests_LazyInitializationOfMainFrame):
+
+2009-09-29  Kenneth Rohde Christiansen  
+
+        Reviewed by Simon Hausmann and Tor Arne Vestbø.
+
+        Implement QWebPage Extension for error pages, incl.
+        an example on how to use it in QtLauncher.
+
+        Correct our use of ResourceError.
+
+        * Api/qwebpage.h:
+        (ExtensionOption::):
+        (ExtensionOption::ErrorPageExtensionReturn::ErrorPageExtensionReturn):
+        * QtLauncher/main.cpp:
+        (WebPage::supportsExtension):
+        (MainWindow::MainWindow):
+        (MainWindow::selectElements):
+        (WebPage::extension):
+        * WebCoreSupport/FrameLoaderClientQt.cpp:
+        (WebCore::FrameLoaderClientQt::cancelledError):
+        (WebCore::FrameLoaderClientQt::blockedError):
+        (WebCore::FrameLoaderClientQt::cannotShowURLError):
+        (WebCore::FrameLoaderClientQt::interruptForPolicyChangeError):
+        (WebCore::FrameLoaderClientQt::cannotShowMIMETypeError):
+        (WebCore::FrameLoaderClientQt::fileDoesNotExistError):
+        (WebCore::FrameLoaderClientQt::callErrorPageExtension):
+        (WebCore::FrameLoaderClientQt::dispatchDidFailProvisionalLoad):
+        (WebCore::FrameLoaderClientQt::dispatchDidFailLoad):
+        * WebCoreSupport/FrameLoaderClientQt.h:
+
 2009-09-28  Andre Poenitz  
 
         Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index 0c636f6..67d974c 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -702,8 +702,10 @@ void FrameLoaderClientQt::committedLoad(WebCore::DocumentLoader* loader, const c
 
 WebCore::ResourceError FrameLoaderClientQt::cancelledError(const WebCore::ResourceRequest& request)
 {
-    return ResourceError("Error", -999, request.url().prettyURL(),
+    ResourceError error = ResourceError("QtNetwork", QNetworkReply::OperationCanceledError, request.url().prettyURL(),
             QCoreApplication::translate("QWebFrame", "Request cancelled", 0, QCoreApplication::UnicodeUTF8));
+    error.setIsCancellation(true);
+    return error;
 }
 
 // copied from WebKit/Misc/WebKitErrors[Private].h
@@ -719,32 +721,32 @@ enum {
 
 WebCore::ResourceError FrameLoaderClientQt::blockedError(const WebCore::ResourceRequest& request)
 {
-    return ResourceError("Error", WebKitErrorCannotUseRestrictedPort, request.url().prettyURL(),
+    return ResourceError("WebKit", WebKitErrorCannotUseRestrictedPort, request.url().prettyURL(),
             QCoreApplication::translate("QWebFrame", "Request blocked", 0, QCoreApplication::UnicodeUTF8));
 }
 
 
 WebCore::ResourceError FrameLoaderClientQt::cannotShowURLError(const WebCore::ResourceRequest& request)
 {
-    return ResourceError("Error", WebKitErrorCannotShowURL, request.url().string(),
+    return ResourceError("WebKit", WebKitErrorCannotShowURL, request.url().string(),
             QCoreApplication::translate("QWebFrame", "Cannot show URL", 0, QCoreApplication::UnicodeUTF8));
 }
 
 WebCore::ResourceError FrameLoaderClientQt::interruptForPolicyChangeError(const WebCore::ResourceRequest& request)
 {
-    return ResourceError("Error", WebKitErrorFrameLoadInterruptedByPolicyChange, request.url().string(),
+    return ResourceError("WebKit", WebKitErrorFrameLoadInterruptedByPolicyChange, request.url().string(),
             QCoreApplication::translate("QWebFrame", "Frame load interrupted by policy change", 0, QCoreApplication::UnicodeUTF8));
 }
 
 WebCore::ResourceError FrameLoaderClientQt::cannotShowMIMETypeError(const WebCore::ResourceResponse& response)
 {
-    return ResourceError("Error", WebKitErrorCannotShowMIMEType, response.url().string(),
+    return ResourceError("WebKit", WebKitErrorCannotShowMIMEType, response.url().string(),
             QCoreApplication::translate("QWebFrame", "Cannot show mimetype", 0, QCoreApplication::UnicodeUTF8));
 }
 
 WebCore::ResourceError FrameLoaderClientQt::fileDoesNotExistError(const WebCore::ResourceResponse& response)
 {
-    return ResourceError("Error", -998 /* ### */, response.url().string(),
+    return ResourceError("QtNetwork", QNetworkReply::ContentNotFoundError, response.url().string(),
             QCoreApplication::translate("QWebFrame", "File does not exist", 0, QCoreApplication::UnicodeUTF8));
 }
 
@@ -860,12 +862,46 @@ void FrameLoaderClientQt::dispatchDidLoadResourceByXMLHttpRequest(unsigned long,
     notImplemented();
 }
 
+void FrameLoaderClientQt::callErrorPageExtension(const WebCore::ResourceError& error)
+{
+    QWebPage* page = m_webFrame->page();
+    if (page->supportsExtension(QWebPage::ErrorPageExtension)) {
+        QWebPage::ErrorPageExtensionOption option;
+
+        if (error.domain() == "QtNetwork")
+            option.domain = QWebPage::QtNetwork;
+        else if (error.domain() == "HTTP")
+            option.domain = QWebPage::Http;
+        else if (error.domain() == "WebKit")
+            option.domain = QWebPage::WebKit;
+        else
+            return;
+
+        option.error = error.errorCode();
+        option.errorString = error.localizedDescription();
+
+        QWebPage::ErrorPageExtensionReturn output;
+        if (!page->extension(QWebPage::ErrorPageExtension, &option, &output))
+            return;
+
+        KURL baseUrl(output.baseUrl);
+        KURL failingUrl(QUrl(error.failingURL()));
+
+        WebCore::ResourceRequest request(baseUrl);
+        WTF::RefPtr buffer = WebCore::SharedBuffer::create(output.content.constData(), output.content.length());
+        WebCore::SubstituteData substituteData(buffer, output.contentType, output.encoding, failingUrl);
+        m_frame->loader()->load(request, substituteData, false);
+    }
+}
+
 void FrameLoaderClientQt::dispatchDidFailProvisionalLoad(const WebCore::ResourceError& error)
 {
     if (dumpFrameLoaderCallbacks)
         printf("%s - didFailProvisionalLoadWithError\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
 
     m_loadError = error;
+    if (!error.isNull() && !error.isCancellation())
+        callErrorPageExtension(error);
 }
 
 void FrameLoaderClientQt::dispatchDidFailLoad(const WebCore::ResourceError& error)
@@ -874,6 +910,8 @@ void FrameLoaderClientQt::dispatchDidFailLoad(const WebCore::ResourceError& erro
         printf("%s - didFailLoadWithError\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
 
     m_loadError = error;
+    if (!error.isNull() && !error.isCancellation())
+        callErrorPageExtension(error);
 }
 
 WebCore::Frame* FrameLoaderClientQt::dispatchCreatePage()
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
index 8a7e428..66c4252 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
@@ -59,6 +59,7 @@ namespace WebCore {
 
         friend class ::QWebFrame;
         void callPolicyFunction(FramePolicyFunction function, PolicyAction action);
+        void callErrorPageExtension(const ResourceError&);
     signals:
         void loadStarted();
         void loadProgress(int d);
diff --git a/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_qwebview_snippet.cpp b/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_qwebview_snippet.cpp
index 069bea2..f04cd29 100644
--- a/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_qwebview_snippet.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_qwebview_snippet.cpp
@@ -13,22 +13,22 @@ void wrapInFunction()
 
 
 //! [2]
-    view->triggerPageAction(QWebPage::Copy);
+    view->triggerAction(QWebPage::Copy);
 //! [2]
 
 
 //! [3]
-    view->page()->triggerAction(QWebPage::Stop);
+    view->page()->triggerPageAction(QWebPage::Stop);
 //! [3]
 
 
 //! [4]
-    view->page()->triggerAction(QWebPage::GoBack);
+    view->page()->triggerPageAction(QWebPage::GoBack);
 //! [4]
 
 
 //! [5]
-    view->page()->triggerAction(QWebPage::GoForward);
+    view->page()->triggerPageAction(QWebPage::GoForward);
 //! [5]
 
 }
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index 0fb05b8..283950e 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -113,11 +113,9 @@ private slots:
     void localURLSchemes();
     void testOptionalJSObjects();
     void testEnablePersistentStorage();
-
     void consoleOutput();
 
-private:
-
+    void crashTests_LazyInitializationOfMainFrame();
 
 private:
     QWebView* m_view;
@@ -466,14 +464,19 @@ void tst_QWebPage::database()
     m_page->mainFrame()->evaluateJavaScript("var db3; db3=openDatabase('testdb', '1.0', 'test database API', 50000);db3.transaction(function(tx) { tx.executeSql('CREATE TABLE IF NOT EXISTS Test (text TEXT)', []); }, function(tx, result) { }, function(tx, error) { });");
     QTest::qWait(200);
 
+    // Remove all databases.
     QWebSecurityOrigin origin = m_page->mainFrame()->securityOrigin();
     QList dbs = origin.databases();
-    if (dbs.count() > 0) {
-        QString fileName = dbs[0].fileName();
+    for (int i = 0; i < dbs.count(); i++) {
+        QString fileName = dbs[i].fileName();
         QVERIFY(QFile::exists(fileName));
-        QWebDatabase::removeDatabase(dbs[0]);
+        QWebDatabase::removeDatabase(dbs[i]);
         QVERIFY(!QFile::exists(fileName));
     }
+    QVERIFY(!origin.databases().size());
+    // Remove removed test :-)
+    QWebDatabase::removeAllDatabases();
+    QVERIFY(!origin.databases().size());
     QTest::qWait(1000);
 }
 
@@ -1301,5 +1304,26 @@ void tst_QWebPage::testEnablePersistentStorage()
     QVERIFY(!webPage.settings()->iconDatabasePath().isEmpty());
 }
 
+void tst_QWebPage::crashTests_LazyInitializationOfMainFrame()
+{
+    {
+        QWebPage webPage;
+    }
+    {
+        QWebPage webPage;
+        webPage.selectedText();
+    }
+    {
+        QWebPage webPage;
+        webPage.triggerAction(QWebPage::Back, true);
+    }
+    {
+        QWebPage webPage;
+        QPoint pos(10,10);
+        webPage.updatePositionDependentActions(pos);
+    }
+}
+
+
 QTEST_MAIN(tst_QWebPage)
 #include "tst_qwebpage.moc"
-- 
cgit v0.12